diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index bda458f041..80c0b1bf7e 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -17,11 +17,11 @@ if ($basePath) { urlPrefix = $basePath; } -import * as Helpers from 'tower/helpers'; -import * as Forms from 'tower/forms'; -import * as Lists from 'tower/lists'; -import * as Widgets from 'tower/widgets'; -import * as Help from 'tower/help'; +import 'tower/helpers'; +import 'tower/forms'; +import 'tower/lists'; +import 'tower/widgets'; +import 'tower/help'; import {Home, HomeGroups, HomeHosts} from 'tower/controllers/Home'; import {SocketsController} from 'tower/controllers/Sockets'; import {Authenticate} from 'tower/controllers/Authentication'; @@ -56,7 +56,7 @@ var tower = angular.module('Tower', [ dashboardGraphs.name, 'AuthService', 'Utilities', - Helpers.License.name, + 'License', 'OrganizationFormDefinition', 'UserFormDefinition', 'FormGenerator', diff --git a/awx/ui/static/js/forms.js b/awx/ui/static/js/forms.js index f405f8edae..1bf67462b7 100644 --- a/awx/ui/static/js/forms.js +++ b/awx/ui/static/js/forms.js @@ -55,4 +55,4 @@ export SurveyQuestion, Teams, Users - } + }; diff --git a/awx/ui/static/js/help.js b/awx/ui/static/js/help.js index 72543657a3..4cd7fcfdcf 100644 --- a/awx/ui/static/js/help.js +++ b/awx/ui/static/js/help.js @@ -8,4 +8,4 @@ export FirefoxSocketHelp, InventoryGroups, SafariSocketHelp - } + }; diff --git a/awx/ui/static/js/helpers.js b/awx/ui/static/js/helpers.js index 08e7084015..bd04c59e31 100644 --- a/awx/ui/static/js/helpers.js +++ b/awx/ui/static/js/helpers.js @@ -79,4 +79,4 @@ export RelatedSearch, Search, Teams - } + }; diff --git a/awx/ui/static/js/helpers/JobTemplates.js b/awx/ui/static/js/helpers/JobTemplates.js index 47de4d535e..1955188f2f 100644 --- a/awx/ui/static/js/helpers/JobTemplates.js +++ b/awx/ui/static/js/helpers/JobTemplates.js @@ -7,10 +7,10 @@ * */ /** -* @ngdoc function -* @name helpers.function:JobTemplatesHelper -* @description Routines shared by job related controllers -*/ + * @ngdoc function + * @name helpers.function:JobTemplatesHelper + * @description Routines shared by job related controllers + */ export default angular.module('JobTemplatesHelper', ['Utilities']) diff --git a/awx/ui/static/js/lists.js b/awx/ui/static/js/lists.js index e7f837ba1b..49d5b4f41c 100644 --- a/awx/ui/static/js/lists.js +++ b/awx/ui/static/js/lists.js @@ -58,4 +58,4 @@ export Streams, Teams, Users - } + }; diff --git a/awx/ui/static/js/services/adjust-graph-size.js b/awx/ui/static/js/services/adjust-graph-size.js index 5a0c5f6fcf..51777c9521 100644 --- a/awx/ui/static/js/services/adjust-graph-size.js +++ b/awx/ui/static/js/services/adjust-graph-size.js @@ -86,4 +86,4 @@ export default function() { chartModel.update(); }; -}; +} diff --git a/awx/ui/static/js/services/host-count-graph-data.js b/awx/ui/static/js/services/host-count-graph-data.js index 63ca58fbf0..5ace42cf47 100644 --- a/awx/ui/static/js/services/host-count-graph-data.js +++ b/awx/ui/static/js/services/host-count-graph-data.js @@ -1,48 +1,47 @@ -HostCountGraphData.$inject = +export default [ "Rest", "GetBasePath", "ProcessErrors", - "$q" - ] + "$q", + HostCountGraphData + ]; -export default - function HostCountGraphData(Rest, getBasePath, processErrors, $q) { +function HostCountGraphData(Rest, getBasePath, processErrors, $q) { - function pluck(property, promise) { - return promise.then(function(value) { - return value[property]; - }); - } - - function getLicenseData() { - var url = getBasePath('config'); - Rest.setUrl(url); - return Rest.get() - .then(function (data){ - var license = data.data.license_info.instance_count; - return license; - }); - } - - function getHostData() { - var url = getBasePath('dashboard')+'graphs/inventory/'; - Rest.setUrl(url); - return pluck('data', Rest.get()); - } - - return { - get: function() { - return $q.all({ - license: getLicenseData(), - hosts: getHostData() - }).catch(function (response) { - var errorMessage = 'Failed to get: ' + response.url + ' GET returned: ' + response.status; - processErrors(null, response.data, response.status, null, { hdr: 'Error!', - msg: errorMessage - }); - return response; - return $q.reject(response); - }); - } - }; + function pluck(property, promise) { + return promise.then(function(value) { + return value[property]; + }); } + + function getLicenseData() { + var url = getBasePath('config'); + Rest.setUrl(url); + return Rest.get() + .then(function (data){ + var license = data.data.license_info.instance_count; + return license; + }); + } + + function getHostData() { + var url = getBasePath('dashboard')+'graphs/inventory/'; + Rest.setUrl(url); + return pluck('data', Rest.get()); + } + + return { + get: function() { + return $q.all({ + license: getLicenseData(), + hosts: getHostData() + }).catch(function (response) { + var errorMessage = 'Failed to get: ' + response.url + ' GET returned: ' + response.status; + processErrors(null, response.data, response.status, null, { hdr: 'Error!', + msg: errorMessage + }); + return $q.reject(response); + }); + } + }; +} diff --git a/awx/ui/static/js/services/job-status-graph-data.js b/awx/ui/static/js/services/job-status-graph-data.js index 7df93a0271..492cda20fe 100644 --- a/awx/ui/static/js/services/job-status-graph-data.js +++ b/awx/ui/static/js/services/job-status-graph-data.js @@ -6,54 +6,54 @@ export default "$q", JobStatusGraphData]; - function JobStatusGraphData(Rest, getBasePath, processErrors, $rootScope, $q) { +function JobStatusGraphData(Rest, getBasePath, processErrors, $rootScope, $q) { - function pluck(property, promise) { - return promise.then(function(value) { - return value[property]; - }); - } - - function getData(period, jobType) { - var url = getBasePath('dashboard')+'graphs/jobs/?period='+period+'&job_type='+jobType; - Rest.setUrl(url); - var result = Rest.get() - .catch(function(response) { - var errorMessage = 'Failed to get: ' + response.url + ' GET returned: ' + response.status; - - processErrors(null, - response.data, - response.status, - null, { - hdr: 'Error!', - msg: errorMessage - }); - return $q.reject(response); - }); - - return pluck('data', result); - } - - return { - destroyWatcher: angular.noop, - setupWatcher: function(period, jobType) { - this.destroyWatcher = - $rootScope.$on('JobStatusChange', function() { - getData(period, jobType).then(function(result) { - $rootScope. - $broadcast('DataReceived:JobStatusGraph', - result); - return result; - }); - }); - }, - get: function(period, jobType) { - - this.destroyWatcher(); - this.setupWatcher(period, jobType); - - return getData(period, jobType); - - } - }; + function pluck(property, promise) { + return promise.then(function(value) { + return value[property]; + }); } + + function getData(period, jobType) { + var url = getBasePath('dashboard')+'graphs/jobs/?period='+period+'&job_type='+jobType; + Rest.setUrl(url); + var result = Rest.get() + .catch(function(response) { + var errorMessage = 'Failed to get: ' + response.url + ' GET returned: ' + response.status; + + processErrors(null, + response.data, + response.status, + null, { + hdr: 'Error!', + msg: errorMessage + }); + return $q.reject(response); + }); + + return pluck('data', result); + } + + return { + destroyWatcher: angular.noop, + setupWatcher: function(period, jobType) { + this.destroyWatcher = + $rootScope.$on('JobStatusChange', function() { + getData(period, jobType).then(function(result) { + $rootScope. + $broadcast('DataReceived:JobStatusGraph', + result); + return result; + }); + }); + }, + get: function(period, jobType) { + + this.destroyWatcher(); + this.setupWatcher(period, jobType); + + return getData(period, jobType); + + } + }; +} diff --git a/awx/ui/static/js/widgets.js b/awx/ui/static/js/widgets.js index 6c93a672ee..9f2b469605 100644 --- a/awx/ui/static/js/widgets.js +++ b/awx/ui/static/js/widgets.js @@ -22,4 +22,4 @@ export PortalJobs, SCMSyncStatus, Stream - } + };