1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

fix lint errors

This commit is contained in:
Jake McDermott 2018-04-03 18:06:20 -04:00
parent a5e20117e3
commit 95a37fab05
No known key found for this signature in database
GPG Key ID: 3B02CAD476EECB35
4 changed files with 44 additions and 43 deletions

View File

@ -38,8 +38,8 @@ function JobsIndexController (
vm.clear = devClear;
// Expand/collapse
vm.toggle = toggle;
vm.expand = expand;
// vm.toggle = toggle;
// vm.expand = expand;
vm.isExpanded = true;
// Panel
@ -160,10 +160,10 @@ function previous () {
});
}
function append (events, engine) {
function append (events, eng) {
return render.append(events)
.then(count => {
page.updateLineCount(count, engine);
page.updateLineCount(count, eng);
});
}
@ -277,48 +277,49 @@ function scrollIsAtRest (isAtRest) {
vm.scroll.showBackToTop = !isAtRest;
}
function expand () {
vm.toggle(parent, true);
}
// function expand () {
// vm.toggle(parent, true);
// }
function showHostDetails (id) {
jobEvent.request('get', id)
.then(() => {
const title = jobEvent.get('host_name');
// function showHostDetails (id) {
// jobEvent.request('get', id)
// .then(() => {
// const title = jobEvent.get('host_name');
vm.host = {
menu: true,
stdout: jobEvent.get('stdout')
};
// vm.host = {
// menu: true,
// stdout: jobEvent.get('stdout')
// };
$scope.jobs.modal.show(title);
});
}
// $scope.jobs.modal.show(title);
// });
// }
function toggle (uuid, menu) {
const lines = $(`.child-of-${uuid}`);
let icon = $(`#${uuid} .at-Stdout-toggle > i`);
// function toggle (uuid, menu) {
// const lines = $(`.child-of-${uuid}`);
// let icon = $(`#${uuid} .at-Stdout-toggle > i`);
if (menu || record[uuid].level === 1) {
vm.isExpanded = !vm.isExpanded;
}
// if (menu || record[uuid].level === 1) {
// vm.isExpanded = !vm.isExpanded;
// }
if (record[uuid].children) {
icon = icon.add($(`#${record[uuid].children.join(', #')}`).find('.at-Stdout-toggle > i'));
}
// if (record[uuid].children) {
// icon = icon.add($(`#${record[uuid].children.join(', #')}`)
// .find('.at-Stdout-toggle > i'));
// }
if (icon.hasClass('fa-angle-down')) {
icon.addClass('fa-angle-right');
icon.removeClass('fa-angle-down');
// if (icon.hasClass('fa-angle-down')) {
// icon.addClass('fa-angle-right');
// icon.removeClass('fa-angle-down');
lines.addClass('hidden');
} else {
icon.addClass('fa-angle-down');
icon.removeClass('fa-angle-right');
// lines.addClass('hidden');
// } else {
// icon.addClass('fa-angle-down');
// icon.removeClass('fa-angle-right');
lines.removeClass('hidden');
}
}
// lines.removeClass('hidden');
// }
// }
JobsIndexController.$inject = [
'resource',

View File

@ -156,10 +156,10 @@ function JobPageService ($q) {
this.isPageBookmarked = number => number >= this.page.bookmark.first &&
number <= this.page.bookmark.last;
this.updateLineCount = (lines, stream) => {
this.updateLineCount = (lines, engine) => {
let reference;
if (stream) {
if (engine) {
reference = this.getReference();
} else {
reference = this.getActiveReference();

View File

@ -53,8 +53,8 @@ function QuerysetService ($q, Rest, ProcessErrors, $rootScope, Wait, DjangoSearc
.map(value => {
value = this.replaceDefaultFlags(value);
value = this.replaceEncodedTokens(value);
return [key, value]
})
return [key, value];
});
},
// encodes ui-router params from {operand__key__comparator: value} pairs to API-consumable URL
@ -83,7 +83,7 @@ function QuerysetService ($q, Rest, ProcessErrors, $rootScope, Wait, DjangoSearc
for (let encodedIndex in encodedTerms) {
const [encodedKey, encodedValue] = encodedTerms[encodedIndex];
obj[encodedKey] = obj[encodedKey] || [];
obj[encodedKey].push(encodedValue)
obj[encodedKey].push(encodedValue);
}
return obj;

View File

@ -6,7 +6,7 @@ function SmartSearchController (
configService,
GetBasePath,
i18n,
qs,
qs
) {
const searchKey = `${$scope.iterator}_search`;
const optionsKey = `${$scope.list.iterator}_options`;