mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
Add missing 'use strict' directive.
This commit is contained in:
parent
6cbd2beb7a
commit
183cbde1bc
@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('InventorySyncStatusWidget', ['RestServices', 'Utilities'])
|
||||
.factory('InventorySyncStatus', ['$rootScope', '$compile', 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', 'GetChoices',
|
||||
function($rootScope, $compile, Rest, GetBasePath, ProcessErrors, Wait, GetChoices) {
|
||||
@ -51,9 +53,9 @@ angular.module('InventorySyncStatusWidget', ['RestServices', 'Utilities'])
|
||||
}
|
||||
|
||||
html += makeRow({ label: 'Inventories',
|
||||
count: [(dashboard.inventories && dashboard.inventories.total_with_inventory_source) ?
|
||||
dashboard.inventories.total_with_inventory_source : 0 ],
|
||||
fail: [(dashboard.inventories && dashboard.inventories.inventory_failed) ? dashboard.inventories.inventory_failed : 0],
|
||||
count: (dashboard.inventories && dashboard.inventories.total_with_inventory_source) ?
|
||||
dashboard.inventories.total_with_inventory_source : 0,
|
||||
fail: (dashboard.inventories && dashboard.inventories.inventory_failed) ? dashboard.inventories.inventory_failed : 0,
|
||||
link: '/#/inventories/?has_inventory_sources=true',
|
||||
fail_link: '/#/inventories/?inventory_sources_with_failures=true'
|
||||
});
|
||||
@ -78,8 +80,8 @@ angular.module('InventorySyncStatusWidget', ['RestServices', 'Utilities'])
|
||||
for (var src in dashboard.inventory_sources) {
|
||||
if (dashboard.inventory_sources[src].total) {
|
||||
html += makeRow({ label: dashboard.inventory_sources[src].label,
|
||||
count: [(dashboard.inventory_sources[src].total) ? dashboard.inventory_sources[src].total : 0],
|
||||
fail: [(dashboard.inventory_sources[src].failed) ? dashboard.inventory_sources[src].failed : 0],
|
||||
count: (dashboard.inventory_sources[src].total) ? dashboard.inventory_sources[src].total : 0,
|
||||
fail: (dashboard.inventory_sources[src].failed) ? dashboard.inventory_sources[src].failed : 0,
|
||||
link: '/#/home/groups/?source=' + src,
|
||||
fail_link: '/#/home/groups/?status=failed&source=' + src
|
||||
});
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('JobStatusWidget', ['RestServices', 'Utilities'])
|
||||
.factory('JobStatus', ['$rootScope', '$compile', 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait',
|
||||
function($rootScope, $compile, Rest, GetBasePath, ProcessErrors, Wait) {
|
||||
@ -55,29 +57,29 @@ angular.module('JobStatusWidget', ['RestServices', 'Utilities'])
|
||||
html += makeRow({
|
||||
label: 'Jobs',
|
||||
link: '/#/jobs',
|
||||
count: [(dashboard.jobs && dashboard.jobs.total) ? dashboard.jobs.total : 0],
|
||||
fail: [(dashboard.jobs && dashboard.jobs.failed) ? dashboard.jobs.failed : 0],
|
||||
count: (dashboard.jobs && dashboard.jobs.total) ? dashboard.jobs.total : 0,
|
||||
fail: (dashboard.jobs && dashboard.jobs.failed) ? dashboard.jobs.failed : 0,
|
||||
fail_link: '/#/jobs/?status=failed'
|
||||
});
|
||||
html += makeRow({
|
||||
label: 'Inventories',
|
||||
link: '/#/inventories',
|
||||
count: [(dashboard.inventories && dashboard.inventories.total) ? dashboard.inventories.total : 0],
|
||||
fail: [(dashboard.inventories && dashboard.inventories.job_failed) ? dashboard.inventories.job_failed : 0],
|
||||
count: (dashboard.inventories && dashboard.inventories.total) ? dashboard.inventories.total : 0,
|
||||
fail: (dashboard.inventories && dashboard.inventories.job_failed) ? dashboard.inventories.job_failed : 0,
|
||||
fail_link: '/#/inventories/?has_active_failures=true'
|
||||
});
|
||||
html += makeRow({
|
||||
label: 'Groups',
|
||||
link: '/#/home/groups',
|
||||
count: [(dashboard.groups && dashboard.groups.total) ? dashboard.groups.total : 0],
|
||||
fail: [(dashboard.groups && dashboard.groups.job_failed) ? dashboard.groups.job_failed : 0],
|
||||
count: (dashboard.groups && dashboard.groups.total) ? dashboard.groups.total : 0,
|
||||
fail: (dashboard.groups && dashboard.groups.job_failed) ? dashboard.groups.job_failed : 0,
|
||||
fail_link: '/#/home/groups/?has_active_failures=true'
|
||||
});
|
||||
html += makeRow({
|
||||
label: 'Hosts',
|
||||
link: '/#/home/hosts',
|
||||
count: [(dashboard.hosts && dashboard.hosts.total) ? dashboard.hosts.total : 0],
|
||||
fail: [(dashboard.hosts && dashboard.hosts.failed) ? dashboard.hosts.failed : 0],
|
||||
count: (dashboard.hosts && dashboard.hosts.total) ? dashboard.hosts.total : 0,
|
||||
fail: (dashboard.hosts && dashboard.hosts.failed) ? dashboard.hosts.failed : 0,
|
||||
fail_link: '/#/home/hosts/?has_active_failures=true'
|
||||
});
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('ObjectCountWidget', ['RestServices', 'Utilities'])
|
||||
.factory('ObjectCount', ['$rootScope', '$compile', 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait',
|
||||
@ -21,7 +22,7 @@ angular.module('ObjectCountWidget', ['RestServices', 'Utilities'])
|
||||
var keys=[ 'organizations', 'users', 'teams', 'credentials', 'projects', 'inventories', 'groups', 'hosts',
|
||||
'job_templates', 'jobs' ];
|
||||
|
||||
html = "<div class=\"panel panel-default\">\n";
|
||||
var html = "<div class=\"panel panel-default\">\n";
|
||||
html += "<div class=\"panel-heading\">System Summary</div>\n";
|
||||
html += "<div class=\"panel-body\">\n";
|
||||
html += "<table class=\"table table-condensed table-hover\">\n";
|
||||
@ -51,8 +52,8 @@ angular.module('ObjectCountWidget', ['RestServices', 'Utilities'])
|
||||
for (var i=0; i < keys.length; i++) {
|
||||
html += makeRow({
|
||||
label: keys[i],
|
||||
link: '/#/' + [(keys[i] == 'hosts' || keys[i] == 'groups') ? 'home/' + keys[i] : keys[i] ],
|
||||
count: [(dashboard[keys[i]] && dashboard[keys[i]].total) ? dashboard[keys[i]].total : 0]
|
||||
link: '/#/' + ( (keys[i] == 'hosts' || keys[i] == 'groups') ? 'home/' + keys[i] : keys[i] ),
|
||||
count: (dashboard[keys[i]] && dashboard[keys[i]].total) ? dashboard[keys[i]].total : 0
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('SCMSyncStatusWidget', ['RestServices', 'Utilities'])
|
||||
.factory('SCMSyncStatus', ['$rootScope', '$compile', 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', 'GetChoices',
|
||||
function($rootScope, $compile, Rest, GetBasePath, ProcessErrors, Wait, GetChoices) {
|
||||
@ -59,7 +61,7 @@ angular.module('SCMSyncStatusWidget', ['RestServices', 'Utilities'])
|
||||
html += makeRow({ label: 'Projects',
|
||||
link: '/#/projects',
|
||||
count: total_count,
|
||||
fail: [(dashboard.projects && dashboard.projects.failed) ? dashboard.projects.failed : 0],
|
||||
fail: (dashboard.projects && dashboard.projects.failed) ? dashboard.projects.failed : 0,
|
||||
fail_link: '/#/projects/?status=failed'
|
||||
});
|
||||
|
||||
@ -75,8 +77,8 @@ angular.module('SCMSyncStatusWidget', ['RestServices', 'Utilities'])
|
||||
html += makeRow({
|
||||
label: dashboard.scm_types[type].label,
|
||||
link: '/#/projects/?scm_type=' + type,
|
||||
count: [(dashboard.scm_types[type].total) ? dashboard.scm_types[type].total : 0],
|
||||
fail: [(dashboard.scm_types[type].failed) ? dashboard.scm_types[type].failed : 0],
|
||||
count: (dashboard.scm_types[type].total) ? dashboard.scm_types[type].total : 0,
|
||||
fail: (dashboard.scm_types[type].failed) ? dashboard.scm_types[type].failed : 0,
|
||||
fail_link: '/#/projects/?scm_type=' + type + '&status=failed'
|
||||
});
|
||||
}
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefinition', 'SearchHelper', 'PaginationHelpers',
|
||||
'RefreshHelper', 'ListGenerator', 'StreamWidget', 'AuthService'])
|
||||
|
||||
@ -402,6 +404,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
||||
scope.removeStreamPostRefresh();
|
||||
}
|
||||
scope.removeStreamPostRefresh = scope.$on('PostRefresh', function() {
|
||||
var cDate, href, deleted, obj1, obj2;
|
||||
for (var i=0; i < scope['activities'].length; i++) {
|
||||
// Convert event_time date to local time zone
|
||||
cDate = new Date(scope['activities'][i].timestamp);
|
||||
@ -416,10 +419,9 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
|
||||
}
|
||||
|
||||
// Objects
|
||||
var href;
|
||||
var deleted = /^\_delete/;
|
||||
var obj1 = scope['activities'][i].object1;
|
||||
var obj2 = scope['activities'][i].object2;
|
||||
deleted = /^\_delete/;
|
||||
obj1 = scope['activities'][i].object1;
|
||||
obj2 = scope['activities'][i].object2;
|
||||
if ( obj1 && scope['activities'][i].summary_fields[obj1] && scope['activities'][i].summary_fields[obj1].name) {
|
||||
if ( !deleted.test(scope['activities'][i].summary_fields[obj1].name) ) {
|
||||
href = BuildUrl(scope['activities'][i].summary_fields.object1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user