diff --git a/awx/ui/static/js/controllers/Admins.js b/awx/ui/static/js/controllers/Admins.js index 813ddc7f87..3cc8e7f6b5 100644 --- a/awx/ui/static/js/controllers/Admins.js +++ b/awx/ui/static/js/controllers/Admins.js @@ -17,7 +17,7 @@ * Controller functions for ading Admins to an Organization. * */ -'use strict'; + function AdminsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, AdminList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, GetBasePath, SelectionInit) { diff --git a/awx/ui/static/js/controllers/Authentication.js b/awx/ui/static/js/controllers/Authentication.js index 8109981693..dcc6ed0d38 100644 --- a/awx/ui/static/js/controllers/Authentication.js +++ b/awx/ui/static/js/controllers/Authentication.js @@ -57,7 +57,7 @@ * @Usage * This is usage information. */ -'use strict'; + function Authenticate($log, $cookieStore, $compile, $window, $rootScope, $location, Authorization, ToggleClass, Alert, Wait, Timer, Empty, ClearScope) { diff --git a/awx/ui/static/js/controllers/Credentials.js b/awx/ui/static/js/controllers/Credentials.js index 3b929dc8a1..4e3f923b67 100644 --- a/awx/ui/static/js/controllers/Credentials.js +++ b/awx/ui/static/js/controllers/Credentials.js @@ -11,7 +11,7 @@ * @name controllers.function:Credentials * @description This controller's for the credentials page */ -'use strict'; + function CredentialsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, CredentialList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js index 5a9d28866f..9ae0f70cb3 100644 --- a/awx/ui/static/js/controllers/Home.js +++ b/awx/ui/static/js/controllers/Home.js @@ -14,7 +14,7 @@ * @name controllers.function:Home * @description This controller's for the dashboard */ -'use strict'; + /** * @ngdoc method diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js index b8bbb36c1a..dd1def1f7e 100644 --- a/awx/ui/static/js/controllers/Inventories.js +++ b/awx/ui/static/js/controllers/Inventories.js @@ -12,7 +12,7 @@ * @name controllers.function:Inventories * @description This controller's for the Inventory page */ -'use strict'; + function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $compile, $filter, Rest, Alert, InventoryList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, Wait, Stream, diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index d2b3d6393a..5600d99881 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -9,7 +9,7 @@ * @name controllers.function:JobDetail * @description This controller's for the Job Detail Page */ -'use strict'; + function JobDetailController ($location, $rootScope, $scope, $compile, $routeParams, $log, ClearScope, Breadcrumbs, LoadBreadCrumbs, GetBasePath, Wait, Rest, ProcessErrors, SelectPlay, SelectTask, Socket, GetElapsed, DrawGraph, LoadHostSummary, ReloadHostSummaryList, JobIsFinished, SetTaskStyles, DigestEvent, diff --git a/awx/ui/static/js/controllers/JobEvents.js b/awx/ui/static/js/controllers/JobEvents.js index 3ddc44b1d1..219bbc98fd 100644 --- a/awx/ui/static/js/controllers/JobEvents.js +++ b/awx/ui/static/js/controllers/JobEvents.js @@ -12,7 +12,7 @@ * @name controllers.function:JobEvent * @description This controller's for the job event page */ -'use strict'; + function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobEventList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, LookUpInit, ToggleChildren, diff --git a/awx/ui/static/js/controllers/JobHosts.js b/awx/ui/static/js/controllers/JobHosts.js index 32a32c07d5..4a4882e960 100644 --- a/awx/ui/static/js/controllers/JobHosts.js +++ b/awx/ui/static/js/controllers/JobHosts.js @@ -12,7 +12,7 @@ * @name controllers.function:JobHosts * @description This controller's for the job hosts page */ -'use strict'; + function JobHostSummaryList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobHostList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, Refresh, diff --git a/awx/ui/static/js/controllers/JobStdout.js b/awx/ui/static/js/controllers/JobStdout.js index 51c01a2f95..42432320c1 100644 --- a/awx/ui/static/js/controllers/JobStdout.js +++ b/awx/ui/static/js/controllers/JobStdout.js @@ -9,7 +9,7 @@ * @name controllers.function:JobStdout * @description This controller's for the standard out page that can be displayed when a job runs */ -'use strict'; + function JobStdoutController ($log, $rootScope, $scope, $compile, $routeParams, ClearScope, GetBasePath, Wait, Rest, ProcessErrors, Socket) { diff --git a/awx/ui/static/js/controllers/JobTemplates.js b/awx/ui/static/js/controllers/JobTemplates.js index 70a82799ae..70f74e2013 100644 --- a/awx/ui/static/js/controllers/JobTemplates.js +++ b/awx/ui/static/js/controllers/JobTemplates.js @@ -12,7 +12,7 @@ * @name controllers.function:JobTemplate * @description This controller's for the Job Template page */ -'use strict'; + function JobTemplatesList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobTemplateList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, diff --git a/awx/ui/static/js/controllers/Jobs.js b/awx/ui/static/js/controllers/Jobs.js index cbafb57b89..f74d418075 100644 --- a/awx/ui/static/js/controllers/Jobs.js +++ b/awx/ui/static/js/controllers/Jobs.js @@ -12,7 +12,7 @@ * @name controllers.function:Jobs * @description This controller's for the jobs page */ -'use strict'; + function JobsListController ($rootScope, $log, $scope, $compile, $routeParams, ClearScope, Breadcrumbs, LoadBreadCrumbs, LoadSchedulesScope, LoadJobsScope, RunningJobsList, CompletedJobsList, QueuedJobsList, ScheduledJobsList, GetChoices, GetBasePath, Wait, Socket) { diff --git a/awx/ui/static/js/controllers/Organizations.js b/awx/ui/static/js/controllers/Organizations.js index ada8b3ae05..f289f9cc23 100644 --- a/awx/ui/static/js/controllers/Organizations.js +++ b/awx/ui/static/js/controllers/Organizations.js @@ -12,7 +12,7 @@ * @name controllers.function:Organizations * @description This controller's for the Organizations page */ -'use strict'; + function OrganizationsList($routeParams, $scope, $rootScope, $location, $log, Rest, Alert, LoadBreadCrumbs, Prompt, GenerateList, OrganizationList, SearchInit, PaginateInit, ClearScope, ProcessErrors, GetBasePath, SelectionInit, Wait, Stream) { diff --git a/awx/ui/static/js/controllers/Permissions.js b/awx/ui/static/js/controllers/Permissions.js index 658ffc3140..b65a914460 100644 --- a/awx/ui/static/js/controllers/Permissions.js +++ b/awx/ui/static/js/controllers/Permissions.js @@ -12,7 +12,7 @@ * @name controllers.function:Permissions * @description This controller's for permissions */ -'use strict'; + function PermissionsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, PermissionList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, diff --git a/awx/ui/static/js/controllers/Portal.js b/awx/ui/static/js/controllers/Portal.js index 035c62fb97..1cb329577d 100644 --- a/awx/ui/static/js/controllers/Portal.js +++ b/awx/ui/static/js/controllers/Portal.js @@ -14,7 +14,7 @@ * @name controllers.function:Portal * @description This controller's for portal mode */ -'use strict'; + /** * @ngdoc method diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index 64c5e1c96a..0cec630e76 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -12,7 +12,7 @@ * @name controllers.function:Projects * @description This controller's for the projects page */ -'use strict'; + function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, ProjectList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, SelectionInit, ProjectUpdate, diff --git a/awx/ui/static/js/controllers/Schedules.js b/awx/ui/static/js/controllers/Schedules.js index 440a12b167..953124ada0 100644 --- a/awx/ui/static/js/controllers/Schedules.js +++ b/awx/ui/static/js/controllers/Schedules.js @@ -12,7 +12,7 @@ * @name controllers.function:Schedules * @description This controller's for schedules */ -'use strict'; + function ScheduleEditController($scope, $compile, $location, $routeParams, SchedulesList, Rest, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, GetChoices, Stream) { diff --git a/awx/ui/static/js/controllers/Sockets.js b/awx/ui/static/js/controllers/Sockets.js index 2935d52ff7..b652d6bda5 100644 --- a/awx/ui/static/js/controllers/Sockets.js +++ b/awx/ui/static/js/controllers/Sockets.js @@ -11,7 +11,7 @@ * @description This controller's for controlling websockets * discuss */ -'use strict'; + function SocketsController ($scope, $compile, ClearScope, Socket) { diff --git a/awx/ui/static/js/controllers/Survey.js.old.js b/awx/ui/static/js/controllers/Survey.js.old.js index 33ba72833a..11a96a869b 100644 --- a/awx/ui/static/js/controllers/Survey.js.old.js +++ b/awx/ui/static/js/controllers/Survey.js.old.js @@ -26,7 +26,7 @@ // * // * The variables in local memory are cleaned out whenever the user navigates to a page (other than the Survey Maker page) // */ -// 'use strict'; +// // function SurveyController($scope, $rootScope, $compile, $location, $log, $routeParams, SurveyMakerForm, // GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, diff --git a/awx/ui/static/js/controllers/Teams.js b/awx/ui/static/js/controllers/Teams.js index 7c243b659b..b4e9bcbd8d 100644 --- a/awx/ui/static/js/controllers/Teams.js +++ b/awx/ui/static/js/controllers/Teams.js @@ -12,7 +12,7 @@ * @name controllers.function:Teams * @description This controller's for teams */ -'use strict'; + function TeamsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, TeamList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, SetTeamListeners, GetBasePath, SelectionInit, Wait, diff --git a/awx/ui/static/js/controllers/Users.js b/awx/ui/static/js/controllers/Users.js index 718c8b73b7..8a2e74b673 100644 --- a/awx/ui/static/js/controllers/Users.js +++ b/awx/ui/static/js/controllers/Users.js @@ -11,7 +11,7 @@ * @name controllers.function:Users * @description This controller's the Users page */ -'use strict'; + function UsersList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, UserList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, SelectionInit, Wait, Stream) { diff --git a/awx/ui/static/js/forms/JobTemplates.js b/awx/ui/static/js/forms/JobTemplates.js index abc12ee1ce..abb19f144e 100644 --- a/awx/ui/static/js/forms/JobTemplates.js +++ b/awx/ui/static/js/forms/JobTemplates.js @@ -12,7 +12,7 @@ * @name forms.function:JobTemplate * @description This form is for adding/editing a Job Template */ -'use strict'; + angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'CompletedJobsDefinition']) diff --git a/awx/ui/static/js/forms/JobVarsPrompt.js b/awx/ui/static/js/forms/JobVarsPrompt.js index 61248a29a8..416dc50feb 100644 --- a/awx/ui/static/js/forms/JobVarsPrompt.js +++ b/awx/ui/static/js/forms/JobVarsPrompt.js @@ -11,7 +11,7 @@ * @name forms.function:JobVarsPrompt * @description This form is for job variables prompt modal */ -'use strict'; + angular.module('JobVarsPromptFormDefinition', []) diff --git a/awx/ui/static/js/forms/LicenseForm.js b/awx/ui/static/js/forms/LicenseForm.js index ea3e706325..d053deb222 100644 --- a/awx/ui/static/js/forms/LicenseForm.js +++ b/awx/ui/static/js/forms/LicenseForm.js @@ -10,7 +10,7 @@ * @name forms.function:LicenseForm * @description This form is for viewing the license information */ -'use strict'; + angular.module('LicenseFormDefinition', []) .value('LicenseForm', { diff --git a/awx/ui/static/js/help/ChromeSocketHelp.js b/awx/ui/static/js/help/ChromeSocketHelp.js index a06f9ceb5f..b9352694b6 100644 --- a/awx/ui/static/js/help/ChromeSocketHelp.js +++ b/awx/ui/static/js/help/ChromeSocketHelp.js @@ -18,7 +18,7 @@ * @name help.function:ChromeSocketHelp * @description This help modal gives instructions on what the user should do if not connected to the web sockets while using Chrome. */ -'use strict'; + angular.module('ChromeSocketHelpDefinition', []) .value('ChromeSocketHelp', { diff --git a/awx/ui/static/js/help/FirefoxSocketHelp.js b/awx/ui/static/js/help/FirefoxSocketHelp.js index af9d135587..425d2c7118 100644 --- a/awx/ui/static/js/help/FirefoxSocketHelp.js +++ b/awx/ui/static/js/help/FirefoxSocketHelp.js @@ -11,7 +11,7 @@ * @name help.function:FirefoxSocketHelp * @description This help modal gives instructions on what the user should do if not connected to the web sockets while using Firefox. */ -'use strict'; + angular.module('FFSocketHelpDefinition', []) .value('FFSocketHelp', { diff --git a/awx/ui/static/js/help/InventoryGroups.js b/awx/ui/static/js/help/InventoryGroups.js index 994acfec22..fe3b0b7deb 100644 --- a/awx/ui/static/js/help/InventoryGroups.js +++ b/awx/ui/static/js/help/InventoryGroups.js @@ -12,7 +12,7 @@ * @name help.function:InventoryGroups * @description This help modal walks the user how to add groups to an inventory or a subgroup to an existing group. */ -'use strict'; + angular.module('InventoryGroupsHelpDefinition', []) .value('InventoryGroupsHelp', { diff --git a/awx/ui/static/js/help/SafariSocketHelp.js b/awx/ui/static/js/help/SafariSocketHelp.js index a95c6e8113..f8841fafde 100644 --- a/awx/ui/static/js/help/SafariSocketHelp.js +++ b/awx/ui/static/js/help/SafariSocketHelp.js @@ -11,7 +11,7 @@ * @name help.function:SafariSocketHelp * @description This help modal gives instructions on what the user should do if not connected to the web sockets while using Safari. Safari does not support websockets. */ -'use strict'; + angular.module('SafariSocketHelpDefinition', []) .value('SafariSocketHelp', { diff --git a/awx/ui/static/js/helpers/AboutAnsible.js b/awx/ui/static/js/helpers/AboutAnsible.js index 9c332767cc..8578cc6b6e 100644 --- a/awx/ui/static/js/helpers/AboutAnsible.js +++ b/awx/ui/static/js/helpers/AboutAnsible.js @@ -16,7 +16,7 @@ * @name helpers.function:AboutAnsible * @description This is the code for the About Ansible modal window that pops up with cowsay giving company/tower info and copyright information. */ -'use strict'; + angular.module('AboutAnsibleHelpModal', ['RestServices', 'Utilities','ModalDialog']) .factory('AboutAnsibleHelp', ['$rootScope', '$compile', '$location' , 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', 'CreateDialog', diff --git a/awx/ui/static/js/helpers/Access.js b/awx/ui/static/js/helpers/Access.js index 226dfa8920..4ad995e07c 100644 --- a/awx/ui/static/js/helpers/Access.js +++ b/awx/ui/static/js/helpers/Access.js @@ -12,7 +12,7 @@ * @description routines checking user access */ -'use strict'; + angular.module('AccessHelper', ['RestServices', 'Utilities']) diff --git a/awx/ui/static/js/helpers/Children.js b/awx/ui/static/js/helpers/Children.js index bc8b0e334d..dadd884007 100644 --- a/awx/ui/static/js/helpers/Children.js +++ b/awx/ui/static/js/helpers/Children.js @@ -11,7 +11,7 @@ * 'show' attribute of each job_event in the set of job_events. * See the filter in job_events.js list. */ -'use strict'; + angular.module('ChildrenHelper', ['RestServices', 'Utilities']) .factory('ToggleChildren', ['$location', 'Store', function ($location, Store) { diff --git a/awx/ui/static/js/helpers/ConfigureTower.js b/awx/ui/static/js/helpers/ConfigureTower.js index 1f28e0785c..4d8b37d451 100644 --- a/awx/ui/static/js/helpers/ConfigureTower.js +++ b/awx/ui/static/js/helpers/ConfigureTower.js @@ -11,7 +11,7 @@ * */ -'use strict'; + angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog', 'GeneratorHelpers']) diff --git a/awx/ui/static/js/helpers/Credentials.js b/awx/ui/static/js/helpers/Credentials.js index 43bd723f26..12370dbdce 100644 --- a/awx/ui/static/js/helpers/Credentials.js +++ b/awx/ui/static/js/helpers/Credentials.js @@ -10,7 +10,7 @@ * @name helpers.function:Credentials * @description Functions shared amongst Credential related controllers */ -'use strict'; + angular.module('CredentialsHelper', ['Utilities']) diff --git a/awx/ui/static/js/helpers/CustomInventory.js b/awx/ui/static/js/helpers/CustomInventory.js index a447ecc5cb..915be61d4a 100644 --- a/awx/ui/static/js/helpers/CustomInventory.js +++ b/awx/ui/static/js/helpers/CustomInventory.js @@ -11,7 +11,7 @@ * */ -'use strict'; + angular.module('CreateCustomInventoryHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog', 'GeneratorHelpers', 'CustomInventoryFormDefinition']) diff --git a/awx/ui/static/js/helpers/EventViewer.js b/awx/ui/static/js/helpers/EventViewer.js index 898c464429..240d990737 100644 --- a/awx/ui/static/js/helpers/EventViewer.js +++ b/awx/ui/static/js/helpers/EventViewer.js @@ -9,7 +9,7 @@ * @name helpers.function:EventViewer * @description eventviewerhelper */ -'use strict'; + angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFormDefinition', 'HostsHelper']) diff --git a/awx/ui/static/js/helpers/Events.js b/awx/ui/static/js/helpers/Events.js index 50c93f9550..8532f3c5a9 100644 --- a/awx/ui/static/js/helpers/Events.js +++ b/awx/ui/static/js/helpers/Events.js @@ -11,7 +11,7 @@ * @name helpers.function:Events * @description EventView - show the job_events form in a modal dialog */ -'use strict'; + angular.module('EventsHelper', ['RestServices', 'Utilities', 'JobEventDataDefinition', 'JobEventsFormDefinition']) diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index 379ee7d47d..5abc73cb20 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -6,7 +6,7 @@ * Routines that handle group add/edit/delete on the Inventory tree widget. * */ -'use strict'; + /** * @ngdoc function diff --git a/awx/ui/static/js/helpers/HostEventsViewer.js b/awx/ui/static/js/helpers/HostEventsViewer.js index 4333b6addf..cbc8152bd9 100644 --- a/awx/ui/static/js/helpers/HostEventsViewer.js +++ b/awx/ui/static/js/helpers/HostEventsViewer.js @@ -11,7 +11,7 @@ * @name helpers.function:HostEventsViewer * @description view a list of events for a given job and host */ -'use strict'; + angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities', 'EventViewerHelper']) diff --git a/awx/ui/static/js/helpers/Hosts.js b/awx/ui/static/js/helpers/Hosts.js index af3467d8f3..3d69b860d9 100644 --- a/awx/ui/static/js/helpers/Hosts.js +++ b/awx/ui/static/js/helpers/Hosts.js @@ -14,7 +14,7 @@ * @description Routines that handle host add/edit/delete on the Inventory detail page. */ -'use strict'; + angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'HostListDefinition', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'AuthService', 'HostsHelper', diff --git a/awx/ui/static/js/helpers/JobDetail.js b/awx/ui/static/js/helpers/JobDetail.js index 87f8aa38f4..180b572452 100644 --- a/awx/ui/static/js/helpers/JobDetail.js +++ b/awx/ui/static/js/helpers/JobDetail.js @@ -37,7 +37,7 @@ */ -'use strict'; + angular.module('JobDetailHelper', ['Utilities', 'RestServices', 'ModalDialog']) diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js index 43e3fd007d..60ee289df1 100644 --- a/awx/ui/static/js/helpers/JobSubmission.js +++ b/awx/ui/static/js/helpers/JobSubmission.js @@ -9,7 +9,7 @@ * @name helpers.function:JobSubmission * @description */ -'use strict'; + angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'CredentialFormDefinition', 'CredentialsListDefinition', 'LookUpHelper', 'JobSubmissionHelper', 'JobTemplateFormDefinition', 'ModalDialog', 'FormGenerator', 'JobVarsPromptFormDefinition']) diff --git a/awx/ui/static/js/helpers/JobTemplates.js b/awx/ui/static/js/helpers/JobTemplates.js index 734facff1f..5577047ff7 100644 --- a/awx/ui/static/js/helpers/JobTemplates.js +++ b/awx/ui/static/js/helpers/JobTemplates.js @@ -11,7 +11,7 @@ * @name helpers.function:JobTemplatesHelper * @description Routines shared by job related controllers */ -'use strict'; + angular.module('JobTemplatesHelper', ['Utilities']) diff --git a/awx/ui/static/js/helpers/Jobs.js b/awx/ui/static/js/helpers/Jobs.js index 52d52f96b5..4a15962cd6 100644 --- a/awx/ui/static/js/helpers/Jobs.js +++ b/awx/ui/static/js/helpers/Jobs.js @@ -11,7 +11,7 @@ * @name helpers.function:Jobs * @description routines shared by job related controllers */ -'use strict'; + angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'JobSummaryDefinition', 'InventoryHelper', 'GeneratorHelpers', 'JobSubmissionHelper', 'LogViewerHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator']) diff --git a/awx/ui/static/js/helpers/License.js b/awx/ui/static/js/helpers/License.js index d08e2ad9cc..0ea8efa552 100644 --- a/awx/ui/static/js/helpers/License.js +++ b/awx/ui/static/js/helpers/License.js @@ -17,7 +17,7 @@ * * */ -'use strict'; + angular.module('LicenseHelper', ['RestServices', 'Utilities', 'LicenseUpdateFormDefinition', 'FormGenerator', 'ParseHelper', 'ModalDialog', 'VariablesHelper', 'LicenseFormDefinition', 'AccessHelper']) diff --git a/awx/ui/static/js/helpers/LoadConfig.js b/awx/ui/static/js/helpers/LoadConfig.js index 1052ad7739..da872c6672 100644 --- a/awx/ui/static/js/helpers/LoadConfig.js +++ b/awx/ui/static/js/helpers/LoadConfig.js @@ -14,7 +14,7 @@ /*jshint evil:true */ -'use strict'; + angular.module('LoadConfigHelper', ['Utilities']) diff --git a/awx/ui/static/js/helpers/LogViewer.js b/awx/ui/static/js/helpers/LogViewer.js index 56a91a7ca7..bbd56f3bd7 100644 --- a/awx/ui/static/js/helpers/LogViewer.js +++ b/awx/ui/static/js/helpers/LogViewer.js @@ -9,7 +9,7 @@ * @name helpers.function:LogViewer * @description logviewer */ -'use strict'; + angular.module('LogViewerHelper', ['ModalDialog', 'Utilities', 'FormGenerator', 'VariablesHelper']) diff --git a/awx/ui/static/js/helpers/Lookup.js b/awx/ui/static/js/helpers/Lookup.js index cd0877c9ce..9e62a3249a 100644 --- a/awx/ui/static/js/helpers/Lookup.js +++ b/awx/ui/static/js/helpers/Lookup.js @@ -22,7 +22,7 @@ * }) */ -'use strict'; + angular.module('LookUpHelper', ['RestServices', 'Utilities', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ApiLoader', 'ModalDialog']) diff --git a/awx/ui/static/js/helpers/PaginationHelpers.js b/awx/ui/static/js/helpers/PaginationHelpers.js index 87ac589aad..9429664440 100644 --- a/awx/ui/static/js/helpers/PaginationHelpers.js +++ b/awx/ui/static/js/helpers/PaginationHelpers.js @@ -9,7 +9,7 @@ * @name helpers.function:PaginationHelpers * @description pagination */ -'use strict'; + angular.module('PaginationHelpers', ['Utilities', 'RefreshHelper', 'RefreshRelatedHelper']) diff --git a/awx/ui/static/js/helpers/Parse.js b/awx/ui/static/js/helpers/Parse.js index c051611015..b459a72311 100644 --- a/awx/ui/static/js/helpers/Parse.js +++ b/awx/ui/static/js/helpers/Parse.js @@ -12,7 +12,7 @@ * */ -'use strict'; + angular.module('ParseHelper', ['Utilities', 'AngularCodeMirrorModule']) .factory('ParseTypeChange', ['Alert', 'AngularCodeMirror', function (Alert, AngularCodeMirror) { diff --git a/awx/ui/static/js/helpers/Projects.js b/awx/ui/static/js/helpers/Projects.js index 668cb8d0bd..796c807476 100644 --- a/awx/ui/static/js/helpers/Projects.js +++ b/awx/ui/static/js/helpers/Projects.js @@ -13,7 +13,7 @@ * */ -'use strict'; + angular.module('ProjectsHelper', ['RestServices', 'Utilities', 'ProjectStatusDefinition', 'ProjectFormDefinition']) diff --git a/awx/ui/static/js/helpers/Schedules.js b/awx/ui/static/js/helpers/Schedules.js index 409ca5287d..aa0ef626dc 100644 --- a/awx/ui/static/js/helpers/Schedules.js +++ b/awx/ui/static/js/helpers/Schedules.js @@ -11,7 +11,7 @@ * */ -'use strict'; + angular.module('SchedulesHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog', 'GeneratorHelpers']) diff --git a/awx/ui/static/js/helpers/Selection.js b/awx/ui/static/js/helpers/Selection.js index b7914c8da1..a843d8850a 100644 --- a/awx/ui/static/js/helpers/Selection.js +++ b/awx/ui/static/js/helpers/Selection.js @@ -14,7 +14,7 @@ * }) */ -'use strict'; + angular.module('SelectionHelper', ['Utilities', 'RestServices']) diff --git a/awx/ui/static/js/helpers/SocketHelper.js b/awx/ui/static/js/helpers/SocketHelper.js index 9e877c0859..810e253dd5 100644 --- a/awx/ui/static/js/helpers/SocketHelper.js +++ b/awx/ui/static/js/helpers/SocketHelper.js @@ -11,7 +11,7 @@ * */ -'use strict'; + angular.module('SocketHelper', ['Utilities', 'FFSocketHelpDefinition', 'SafariSocketHelpDefinition' , 'ChromeSocketHelpDefinition']) diff --git a/awx/ui/static/js/helpers/Survey.js b/awx/ui/static/js/helpers/Survey.js index 295d9de544..e616b4cc3e 100644 --- a/awx/ui/static/js/helpers/Survey.js +++ b/awx/ui/static/js/helpers/Survey.js @@ -11,7 +11,7 @@ * */ -'use strict'; + angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog' , 'GeneratorHelpers']) diff --git a/awx/ui/static/js/helpers/Users.js b/awx/ui/static/js/helpers/Users.js index 97ebcf2eec..2d43403fea 100644 --- a/awx/ui/static/js/helpers/Users.js +++ b/awx/ui/static/js/helpers/Users.js @@ -10,7 +10,7 @@ * */ -'use strict'; + angular.module('UserHelper', ['UserFormDefinition']) .factory('ResetForm', ['UserForm', diff --git a/awx/ui/static/js/helpers/Variables.js b/awx/ui/static/js/helpers/Variables.js index 58a175cb51..9a840f2a3a 100644 --- a/awx/ui/static/js/helpers/Variables.js +++ b/awx/ui/static/js/helpers/Variables.js @@ -10,7 +10,7 @@ * */ -'use strict'; + angular.module('VariablesHelper', ['Utilities']) diff --git a/awx/ui/static/js/helpers/api-defaults.js b/awx/ui/static/js/helpers/api-defaults.js index 09bd3a09a6..a3ae1e3fab 100644 --- a/awx/ui/static/js/helpers/api-defaults.js +++ b/awx/ui/static/js/helpers/api-defaults.js @@ -10,7 +10,7 @@ * @name helpers.function:api-defaults * @description this could use more discussion */ -'use strict'; + angular.module('APIDefaults', ['RestServices', 'Utilities']) .factory('GetAPIDefaults', ['Alert', 'Rest', '$rootScope', diff --git a/awx/ui/static/js/helpers/inventory.js b/awx/ui/static/js/helpers/inventory.js index 15a474016f..5a4794b4e0 100644 --- a/awx/ui/static/js/helpers/inventory.js +++ b/awx/ui/static/js/helpers/inventory.js @@ -10,7 +10,7 @@ * for the menu piece. The routine for building the menu is in InventoriesEdit controller * (controllers/Inventories.js) */ -'use strict'; + angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationListDefinition', 'ListGenerator', 'AuthService', 'InventoryHelper', 'InventoryFormDefinition', 'ParseHelper', 'SearchHelper', 'VariablesHelper', diff --git a/awx/ui/static/js/helpers/md5.js b/awx/ui/static/js/helpers/md5.js index eefd1a2df4..11682df2cd 100644 --- a/awx/ui/static/js/helpers/md5.js +++ b/awx/ui/static/js/helpers/md5.js @@ -13,7 +13,7 @@ * discussion */ -'use strict'; + angular.module('md5Helper', ['RestServices', 'Utilities', 'angular-md5']) .factory('md5Setup', ['md5', function (md5) { diff --git a/awx/ui/static/js/helpers/refresh-related.js b/awx/ui/static/js/helpers/refresh-related.js index 124f66f31c..d478e46238 100644 --- a/awx/ui/static/js/helpers/refresh-related.js +++ b/awx/ui/static/js/helpers/refresh-related.js @@ -19,7 +19,7 @@ * */ -'use strict'; + angular.module('RefreshRelatedHelper', ['RestServices', 'Utilities', 'PaginationHelpers']) .factory('RefreshRelated', ['ProcessErrors', 'Rest', 'Wait', 'PageRangeSetup', diff --git a/awx/ui/static/js/helpers/refresh.js b/awx/ui/static/js/helpers/refresh.js index f2f2d65147..6956649fc1 100644 --- a/awx/ui/static/js/helpers/refresh.js +++ b/awx/ui/static/js/helpers/refresh.js @@ -18,7 +18,7 @@ * */ -'use strict'; + angular.module('RefreshHelper', ['RestServices', 'Utilities', 'PaginationHelpers']) .factory('Refresh', ['ProcessErrors', 'Rest', 'Wait', 'Empty', 'PageRangeSetup', diff --git a/awx/ui/static/js/helpers/related-search.js b/awx/ui/static/js/helpers/related-search.js index 557d21024c..d5541bffd1 100644 --- a/awx/ui/static/js/helpers/related-search.js +++ b/awx/ui/static/js/helpers/related-search.js @@ -19,7 +19,7 @@ * */ -'use strict'; + angular.module('RelatedSearchHelper', ['RestServices', 'Utilities', 'RefreshRelatedHelper']) .factory('RelatedSearchInit', ['$timeout', 'Alert', 'Rest', 'RefreshRelated', 'Wait', 'Empty', diff --git a/awx/ui/static/js/helpers/search.js b/awx/ui/static/js/helpers/search.js index e3109d195c..c64370b7bd 100644 --- a/awx/ui/static/js/helpers/search.js +++ b/awx/ui/static/js/helpers/search.js @@ -19,7 +19,7 @@ * */ -'use strict'; + angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper']) diff --git a/awx/ui/static/js/helpers/teams.js b/awx/ui/static/js/helpers/teams.js index de49b7256c..58e2b8100b 100644 --- a/awx/ui/static/js/helpers/teams.js +++ b/awx/ui/static/js/helpers/teams.js @@ -9,7 +9,7 @@ * Routines shared amongst the team controllers */ -'use strict'; + angular.module('TeamHelper', ['RestServices', 'Utilities', 'OrganizationListDefinition', 'SearchHelper', 'PaginationHelpers', 'ListGenerator' diff --git a/awx/ui/static/js/lists/Admins.js b/awx/ui/static/js/lists/Admins.js index fa7d5b62cc..2f92966fbe 100644 --- a/awx/ui/static/js/lists/Admins.js +++ b/awx/ui/static/js/lists/Admins.js @@ -7,7 +7,7 @@ * @dict */ -'use strict'; + angular.module('AdminListDefinition', []) .value('AdminList', { diff --git a/awx/ui/static/js/lists/CloudCredentials.js b/awx/ui/static/js/lists/CloudCredentials.js index 795e38a370..12b5f52c48 100644 --- a/awx/ui/static/js/lists/CloudCredentials.js +++ b/awx/ui/static/js/lists/CloudCredentials.js @@ -7,7 +7,7 @@ * @dict */ -'use strict'; + angular.module('CloudCredentialsListDefinition', []) .value('CloudCredentialList', { diff --git a/awx/ui/static/js/lists/CompletedJobs.js b/awx/ui/static/js/lists/CompletedJobs.js index 8fdf2669d0..9d73a64214 100644 --- a/awx/ui/static/js/lists/CompletedJobs.js +++ b/awx/ui/static/js/lists/CompletedJobs.js @@ -6,7 +6,7 @@ * */ -'use strict'; + angular.module('CompletedJobsDefinition', []) .value( 'CompletedJobsList', { diff --git a/awx/ui/static/js/lists/ConfigureTowerJobs.js b/awx/ui/static/js/lists/ConfigureTowerJobs.js index 884e0847f9..3604d49968 100644 --- a/awx/ui/static/js/lists/ConfigureTowerJobs.js +++ b/awx/ui/static/js/lists/ConfigureTowerJobs.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('ConfigureTowerJobsListDefinition', []) .value('ConfigureTowerJobsList', { diff --git a/awx/ui/static/js/lists/Credentials.js b/awx/ui/static/js/lists/Credentials.js index 419d383e60..28b29cf069 100644 --- a/awx/ui/static/js/lists/Credentials.js +++ b/awx/ui/static/js/lists/Credentials.js @@ -7,7 +7,7 @@ * @dict */ -'use strict'; + angular.module('CredentialsListDefinition', []) .value('CredentialList', { diff --git a/awx/ui/static/js/lists/CustomInventory.js b/awx/ui/static/js/lists/CustomInventory.js index 15b80b0f51..3f1ce95974 100644 --- a/awx/ui/static/js/lists/CustomInventory.js +++ b/awx/ui/static/js/lists/CustomInventory.js @@ -7,7 +7,7 @@ * @dict */ -'use strict'; + angular.module('CustomInventoryListDefinition', []) .value('CustomInventoryList', { diff --git a/awx/ui/static/js/lists/Groups.js b/awx/ui/static/js/lists/Groups.js index 7facabbfac..a1f6e43f9c 100644 --- a/awx/ui/static/js/lists/Groups.js +++ b/awx/ui/static/js/lists/Groups.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('GroupListDefinition', []) .value('GroupList', { diff --git a/awx/ui/static/js/lists/HomeGroups.js b/awx/ui/static/js/lists/HomeGroups.js index 84b33eb10d..12d81a0b70 100644 --- a/awx/ui/static/js/lists/HomeGroups.js +++ b/awx/ui/static/js/lists/HomeGroups.js @@ -8,7 +8,7 @@ * */ -'use strict'; + angular.module('HomeGroupListDefinition', []) .value('HomeGroupList', { diff --git a/awx/ui/static/js/lists/HomeHosts.js b/awx/ui/static/js/lists/HomeHosts.js index 8ccbdbeb63..c009c2446c 100644 --- a/awx/ui/static/js/lists/HomeHosts.js +++ b/awx/ui/static/js/lists/HomeHosts.js @@ -8,7 +8,7 @@ * */ -'use strict'; + angular.module('HomeHostListDefinition', []) .value('HomeHostList', { diff --git a/awx/ui/static/js/lists/Hosts.js b/awx/ui/static/js/lists/Hosts.js index 889a1093d4..81238c9cbd 100644 --- a/awx/ui/static/js/lists/Hosts.js +++ b/awx/ui/static/js/lists/Hosts.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('HostListDefinition', []) .value('HostList', { diff --git a/awx/ui/static/js/lists/Inventories.js b/awx/ui/static/js/lists/Inventories.js index c4bf3c19c0..e93948120b 100644 --- a/awx/ui/static/js/lists/Inventories.js +++ b/awx/ui/static/js/lists/Inventories.js @@ -6,7 +6,7 @@ * */ -'use strict'; + angular.module('InventoriesListDefinition', []) .value('InventoryList', { diff --git a/awx/ui/static/js/lists/InventoryHosts.js b/awx/ui/static/js/lists/InventoryHosts.js index 32a008a443..aa07d8643d 100644 --- a/awx/ui/static/js/lists/InventoryHosts.js +++ b/awx/ui/static/js/lists/InventoryHosts.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('InventoryHostsDefinition', []) .value('InventoryHosts', { diff --git a/awx/ui/static/js/lists/JobEvents.js b/awx/ui/static/js/lists/JobEvents.js index 96269ae484..98d3d2d40b 100644 --- a/awx/ui/static/js/lists/JobEvents.js +++ b/awx/ui/static/js/lists/JobEvents.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('JobEventsListDefinition', []) .value('JobEventList', { diff --git a/awx/ui/static/js/lists/JobHosts.js b/awx/ui/static/js/lists/JobHosts.js index 3879db29ac..2a7e498f5e 100644 --- a/awx/ui/static/js/lists/JobHosts.js +++ b/awx/ui/static/js/lists/JobHosts.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('JobHostDefinition', []) .value('JobHostList', { diff --git a/awx/ui/static/js/lists/JobTemplates.js b/awx/ui/static/js/lists/JobTemplates.js index 5321770777..b59622431d 100644 --- a/awx/ui/static/js/lists/JobTemplates.js +++ b/awx/ui/static/js/lists/JobTemplates.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('JobTemplatesListDefinition', []) .value('JobTemplateList', { diff --git a/awx/ui/static/js/lists/Jobs.js b/awx/ui/static/js/lists/Jobs.js index 929988e293..9905fce1e2 100644 --- a/awx/ui/static/js/lists/Jobs.js +++ b/awx/ui/static/js/lists/Jobs.js @@ -9,7 +9,7 @@ * */ -'use strict'; + angular.module('JobsListDefinition', []) .value( 'JobsList', { diff --git a/awx/ui/static/js/lists/Organizations.js b/awx/ui/static/js/lists/Organizations.js index 307c874945..bd5aa1d36b 100644 --- a/awx/ui/static/js/lists/Organizations.js +++ b/awx/ui/static/js/lists/Organizations.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('OrganizationListDefinition', []) .value('OrganizationList', { diff --git a/awx/ui/static/js/lists/Permissions.js b/awx/ui/static/js/lists/Permissions.js index 82360d9b92..4252059761 100644 --- a/awx/ui/static/js/lists/Permissions.js +++ b/awx/ui/static/js/lists/Permissions.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('PermissionListDefinition', []) .value('PermissionList', { diff --git a/awx/ui/static/js/lists/PortalJobTemplates.js b/awx/ui/static/js/lists/PortalJobTemplates.js index 7de5143e03..f01fbc896c 100644 --- a/awx/ui/static/js/lists/PortalJobTemplates.js +++ b/awx/ui/static/js/lists/PortalJobTemplates.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('PortalJobTemplatesListDefinition', []) .value('PortalJobTemplateList', { diff --git a/awx/ui/static/js/lists/PortalJobs.js b/awx/ui/static/js/lists/PortalJobs.js index 22dd48031e..cc5ca47104 100644 --- a/awx/ui/static/js/lists/PortalJobs.js +++ b/awx/ui/static/js/lists/PortalJobs.js @@ -9,7 +9,7 @@ * */ -'use strict'; + angular.module('PortalJobsListDefinition', []) .value( 'PortalJobsList', { diff --git a/awx/ui/static/js/lists/Projects.js b/awx/ui/static/js/lists/Projects.js index 5772c50804..9ca356c080 100644 --- a/awx/ui/static/js/lists/Projects.js +++ b/awx/ui/static/js/lists/Projects.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('ProjectsListDefinition', []) .value('ProjectList', { diff --git a/awx/ui/static/js/lists/QueuedJobs.js b/awx/ui/static/js/lists/QueuedJobs.js index fe2ebd868e..60b2b5eabe 100644 --- a/awx/ui/static/js/lists/QueuedJobs.js +++ b/awx/ui/static/js/lists/QueuedJobs.js @@ -6,7 +6,7 @@ * */ -'use strict'; + angular.module('QueuedJobsDefinition', []) .value( 'QueuedJobsList', { diff --git a/awx/ui/static/js/lists/RunningJobs.js b/awx/ui/static/js/lists/RunningJobs.js index ccb8f3e283..9171cd8736 100644 --- a/awx/ui/static/js/lists/RunningJobs.js +++ b/awx/ui/static/js/lists/RunningJobs.js @@ -6,7 +6,7 @@ * */ -'use strict'; + angular.module('RunningJobsDefinition', []) .value( 'RunningJobsList', { diff --git a/awx/ui/static/js/lists/ScheduledJobs.js b/awx/ui/static/js/lists/ScheduledJobs.js index 10ee4a16b2..c349bc3228 100644 --- a/awx/ui/static/js/lists/ScheduledJobs.js +++ b/awx/ui/static/js/lists/ScheduledJobs.js @@ -6,7 +6,7 @@ * */ -'use strict'; + angular.module('ScheduledJobsDefinition', []) .value( 'ScheduledJobsList', { diff --git a/awx/ui/static/js/lists/Schedules.js b/awx/ui/static/js/lists/Schedules.js index a9f3c94401..5cc7756b40 100644 --- a/awx/ui/static/js/lists/Schedules.js +++ b/awx/ui/static/js/lists/Schedules.js @@ -6,7 +6,7 @@ * */ -'use strict'; + angular.module('SchedulesListDefinition', []) .value('SchedulesList', { diff --git a/awx/ui/static/js/lists/Streams.js b/awx/ui/static/js/lists/Streams.js index a75a2f0c76..f8c1390f97 100644 --- a/awx/ui/static/js/lists/Streams.js +++ b/awx/ui/static/js/lists/Streams.js @@ -7,7 +7,7 @@ * */ -'use strict'; + angular.module('StreamListDefinition', []) .value('StreamList', { diff --git a/awx/ui/static/js/lists/Teams.js b/awx/ui/static/js/lists/Teams.js index 385f4b36ba..353eeb8b01 100644 --- a/awx/ui/static/js/lists/Teams.js +++ b/awx/ui/static/js/lists/Teams.js @@ -6,7 +6,7 @@ * */ -'use strict'; + angular.module('TeamsListDefinition', []) .value('TeamList', { diff --git a/awx/ui/static/js/lists/Users.js b/awx/ui/static/js/lists/Users.js index 32a35bd955..9aabf92638 100644 --- a/awx/ui/static/js/lists/Users.js +++ b/awx/ui/static/js/lists/Users.js @@ -6,7 +6,7 @@ * */ -'use strict'; + angular.module('UserListDefinition', []) .value('UserList', { diff --git a/awx/ui/static/js/widgets/DashboardCounts.js b/awx/ui/static/js/widgets/DashboardCounts.js index 4bf8f6003f..ec79822ac4 100644 --- a/awx/ui/static/js/widgets/DashboardCounts.js +++ b/awx/ui/static/js/widgets/DashboardCounts.js @@ -13,7 +13,7 @@ * */ -'use strict'; + angular.module('DashboardCountsWidget', ['RestServices', 'Utilities']) .factory('DashboardCounts', ['$rootScope', '$compile', 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', diff --git a/awx/ui/static/js/widgets/DashboardJobs.js b/awx/ui/static/js/widgets/DashboardJobs.js index 423627dd50..b3db9e1c45 100644 --- a/awx/ui/static/js/widgets/DashboardJobs.js +++ b/awx/ui/static/js/widgets/DashboardJobs.js @@ -8,7 +8,7 @@ * */ -'use strict'; + angular.module('DashboardJobsWidget', ['RestServices', 'Utilities']) .factory('DashboardJobs', ['$rootScope', '$compile', 'LoadSchedulesScope', 'LoadJobsScope', 'JobsList', 'ScheduledJobsList', 'GetChoices', 'GetBasePath', diff --git a/awx/ui/static/js/widgets/HostGraph.js b/awx/ui/static/js/widgets/HostGraph.js new file mode 100644 index 0000000000..58b38b7e18 --- /dev/null +++ b/awx/ui/static/js/widgets/HostGraph.js @@ -0,0 +1,180 @@ +/********************************************* + * Copyright (c) 2014 AnsibleWorks, Inc. + */ + /** + * @ngdoc function + * @name widgets.function:HostGraph + * @description + * + */ + + + + +angular.module('HostGraphWidget', ['RestServices', 'Utilities']) + .factory('HostGraph', ['$rootScope', '$compile', '$location', 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', + function ($rootScope, $compile, $location, Rest, GetBasePath, ProcessErrors) { + return function (params) { + + var scope = params.scope, + target = params.target, + html, element, url, license, license_graph; + + + // html = "
\n"; + html ="
\n"; + html += "
Host Count
\n"; + html += "
\n"; + html +="
\n"; + html += "
\n"; + + // html += "
\n"; + + + + element = angular.element(document.getElementById(target)); + element.html(html); + $compile(element)(scope); + + url = GetBasePath('config'); + + if (scope.removeResizeHostGraph) { + scope.removeResizeHostGraph(); + } + scope.removeResizeHostGraph= scope.$on('ResizeHostGraph', function () { + if($(window).width()<500){ + $('.graph-container').height(300); + } + else{ + var winHeight = $(window).height(), + available_height = winHeight - $('#main-menu-container .navbar').outerHeight() - $('#count-container').outerHeight() - 120; + $('.graph-container').height(available_height/2); + license_graph.update(); + } + }); + + Rest.setUrl(url); + Rest.get() + .success(function (data){ + license = data.license_info.instance_count; + scope.$emit('licenseCountReady', license); + }) + .error(function (data, status) { + ProcessErrors(scope, data, status, null, { hdr: 'Error!', + msg: 'Failed to get: ' + url + ' GET returned: ' + status }); + }); + + if (scope.removeLicenseCountReady) { + scope.removeLicenseCountReady(); + } + scope.removeLicenseCountReady = scope.$on('licenseCountReady', function (e, license) { + url = GetBasePath('dashboard')+'graphs/inventory/'; + Rest.setUrl(url); + Rest.get() + .success(function (data) { + scope.$emit('hostDataReady', data, license); + }) + .error(function (data, status) { + ProcessErrors(scope, data, status, null, { hdr: 'Error!', + msg: 'Failed to get: ' + url + ' GET returned: ' + status }); + }); + + }); + + if (scope.removeHostDataReady) { + scope.removeHostDataReady(); + } + scope.removeHostDataReady = scope.$on('hostDataReady', function (e, data, license) { + + //url = GetBasePath('dashboard')+'graphs/'; + var graphData = [ + { + "key" : "Hosts" , + "color" : "#1778c3", + "values": data.hosts + }, + { + "key" : "License" , + "color" : "#171717", + "values": data.hosts + } + ]; + + graphData.map(function(series) { + if(series.key==="Hosts"){ + series.values = series.values.map(function(d) { + return { + x: d[0], + y: d[1] + }; + }); + } + if(series.key==="License"){ + series.values = series.values.map(function(d) { + return { + x: d[0], + y: license + }; + }); + + } + return series; + + }); + + nv.addGraph({ + generate: function() { + var width = $('.graph-container').width(), // nv.utils.windowSize().width/3, + height = $('.graph-container').height()*0.6; //nv.utils.windowSize().height/5, + license_graph = nv.models.lineChart() + .margin({top: 15, right: 75, bottom: 40, left: 85}) + .x(function(d,i) { return i ;}) + .useInteractiveGuideline(true) //We want nice looking tooltips and a guideline! + .transitionDuration(350) //how fast do you want the lines to transition? + .showLegend(true) //Show the legend, allowing users to turn on/off line series. + .showYAxis(true) //Show the y-axis + .showXAxis(true) //Show the x-axis + ; + + license_graph.xAxis + .axisLabel("Time") + .tickFormat(function(d) { + var dx = graphData[0].values[d] && graphData[0].values[d].x || 0; + return dx ? d3.time.format('%m/%d')(new Date(Number(dx+'000'))) : ''; + }); + + license_graph.yAxis //Chart y-axis settings + .axisLabel('Hosts') + .tickFormat(d3.format('.f')); + + d3.select('.host-count-graph svg') + .datum(graphData).transition() + .attr('width', width) + .attr('height', height) + .duration(500) + .call(license_graph) + .style({ + // 'width': width, + // 'height': height, + "font-family": 'Open Sans', + "font-style": "normal", + "font-weight":400, + "src": "url(/static/fonts/OpenSans-Regular.ttf)" + }); + + + // nv.utils.windowResize(license_graph.update); + scope.$emit('WidgetLoaded'); + return license_graph; + + }, + + }); + //}); + }); + + + + }; + } + ]); \ No newline at end of file diff --git a/awx/ui/static/js/widgets/HostPieChart.js b/awx/ui/static/js/widgets/HostPieChart.js new file mode 100644 index 0000000000..80d6143d83 --- /dev/null +++ b/awx/ui/static/js/widgets/HostPieChart.js @@ -0,0 +1,128 @@ +/********************************************* + * Copyright (c) 2014 AnsibleWorks, Inc. + */ + /** + * @ngdoc function + * @name widgets.function:HostPieChart + * @description + * HostPieChart.js + * + * file for the host status pie chart + * + */ + + + +angular.module('HostPieChartWidget', ['RestServices', 'Utilities']) + .factory('HostPieChart', ['$rootScope', '$compile', + //'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', + function ($rootScope, $compile){ + //, Rest, GetBasePath, ProcessErrors) { + return function (params) { + + var scope = params.scope, + target = params.target, + dashboard = params.dashboard, + html, element, data, + canvas, context, winHeight, available_height, host_pie_chart; + + // html = "
\n"; + + html ="
\n"; + html += "
Host Status
\n"; + html += "
\n"; + + html +="
\n"; + html += "
\n"; + html += "
\n"; + + // html += "
\n"; + + element = angular.element(document.getElementById(target)); + element.html(html); + $compile(element)(scope); + + if (scope.removeResizeHostPieGraph) { + scope.removeResizeHostPieGraph(); + } + scope.removeResizeHostPieGraph= scope.$on('ResizeHostPieGraph', function () { + if($(window).width()<500){ + $('.graph-container').height(300); + } + else{ + var winHeight = $(window).height(), + available_height = winHeight - $('#main-menu-container .navbar').outerHeight() - $('#count-container').outerHeight() - 120; + $('.graph-container').height(available_height/2); + if(host_pie_chart){ + host_pie_chart.update(); + } + } + }); + + if(dashboard.hosts.total+dashboard.hosts.failed>0){ + data = [ + { + "label": "Successful", + "color": "#00aa00", + "value" : dashboard.hosts.total + } , + { + "label": "Failed", + "color" : "#aa0000", + "value" : dashboard.hosts.failed + } + ]; + + nv.addGraph(function() { + var width = $('.graph-container').width(), // nv.utils.windowSize().width/3, + height = $('.graph-container').height()*0.7; //nv.utils.windowSize().height/5, + host_pie_chart = nv.models.pieChart() + .margin({top: 5, right: 75, bottom: 40, left: 85}) + .x(function(d) { return d.label; }) + .y(function(d) { return d.value; }) + .showLabels(true) + .labelThreshold(0.01) + .tooltipContent(function(x, y) { + return ''+x+''+ '

' + Math.floor(y.replace(',','')) + ' Hosts ' + '

'; + }) + .color(['#00aa00', '#aa0000']); + + host_pie_chart.pie.pieLabelsOutside(true).labelType("percent"); + + d3.select(".host-pie-chart svg") + .datum(data) + .attr('width', width) + .attr('height', height) + .transition().duration(350) + .call(host_pie_chart) + .style({ + "font-family": 'Open Sans', + "font-style": "normal", + "font-weight":400, + "src": "url(/static/fonts/OpenSans-Regular.ttf)" + }); + // nv.utils.windowResize(host_pie_chart.update); + scope.$emit('WidgetLoaded'); + return host_pie_chart; + }); + } + else{ + winHeight = $(window).height(); + available_height = winHeight - $('#main-menu-container .navbar').outerHeight() - $('#count-container').outerHeight() - 120; + $('.graph-container:eq(1)').height(available_height/2); + $('.host-pie-chart svg').replaceWith(''); + + canvas = document.getElementById("circlecanvas"); + context = canvas.getContext("2d"); + context.arc(55, 55, 50, 0, Math.PI * 2, false); + context.lineWidth = 1; + context.strokeStyle = '#1778c3'; + context.stroke(); + context.font = "12px Open Sans"; + context.fillText("No Host data",18,55); + + scope.$emit('WidgetLoaded'); + } + }; + } + ]); diff --git a/awx/ui/static/js/widgets/InventorySyncStatus.js b/awx/ui/static/js/widgets/InventorySyncStatus.js index e3019efcf4..230ad6513e 100644 --- a/awx/ui/static/js/widgets/InventorySyncStatus.js +++ b/awx/ui/static/js/widgets/InventorySyncStatus.js @@ -11,7 +11,7 @@ * */ -'use strict'; + angular.module('InventorySyncStatusWidget', ['RestServices', 'Utilities']) .factory('InventorySyncStatus', ['$rootScope', '$compile', function ($rootScope, $compile) { diff --git a/awx/ui/static/js/widgets/JobStatus.js b/awx/ui/static/js/widgets/JobStatus.js index f0f8832db2..ef1baca2b9 100644 --- a/awx/ui/static/js/widgets/JobStatus.js +++ b/awx/ui/static/js/widgets/JobStatus.js @@ -11,7 +11,7 @@ * */ -'use strict'; + angular.module('JobStatusWidget', ['RestServices', 'Utilities']) .factory('JobStatus', ['$rootScope', '$compile', 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', diff --git a/awx/ui/static/js/widgets/JobStatusGraph.js b/awx/ui/static/js/widgets/JobStatusGraph.js new file mode 100644 index 0000000000..eee5ffd14a --- /dev/null +++ b/awx/ui/static/js/widgets/JobStatusGraph.js @@ -0,0 +1,219 @@ +/********************************************* + * Copyright (c) 2014 AnsibleWorks, Inc. + */ + /** + * @ngdoc function + * @name widgets.function:JobStatusGraph + * @description + */ + + + + +angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities']) + .factory('JobStatusGraph', ['$rootScope', '$compile', '$location' , 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', + function ($rootScope, $compile , $location, Rest, GetBasePath, ProcessErrors) { + return function (params) { + + var scope = params.scope, + target = params.target, + // dashboard = params.dashboard, + html, element, url, job_status_chart, + period="month", + job_type="all"; + + // html = "
\n"; + + html = "
\n"; + html += "
Job Status
\n"; // for All Jobs, Past Month + + html += "
\n"; + html += "
\n"; + html += "Job Type: \n"; + html += "All\n"; + html += " \n"; + + html += "\n"; + html += "
\n"; + + html += "
\n"; //end of filter div + + html += "
\n"; + html += "
\n"; + html += "Period: \n"; + html += "Past Month\n"; + html += " \n"; + + html += "\n"; + html += "
\n"; + html += "
\n"; //end of filter div + + html += "
\n"; // end of row + + html +="
\n"; + html += "
\n"; + html += "
\n"; + + // html += "
\n"; + + function createGraph(){ + + url = GetBasePath('dashboard')+'graphs/jobs/?period='+period+'&job_type='+job_type; + Rest.setUrl(url); + Rest.get() + .success(function (data){ + scope.$emit('graphDataReady', data); + return job_type, period; + + }) + .error(function (data, status) { + ProcessErrors(scope, data, status, null, { hdr: 'Error!', + msg: 'Failed to get: ' + url + ' GET returned: ' + status }); + }); + } + + if ($rootScope.removeReloadJobStatusGraph) { + $rootScope.removeReloadJobStatusGraph(); + } + $rootScope.removeReloadJobStatusGraph = $rootScope.$on('ReloadJobStatusGraph', function() { + createGraph(); + }); + + element = angular.element(document.getElementById(target)); + element.html(html); + $compile(element)(scope); + + createGraph(); + + if (scope.removeResizeJobGraph) { + scope.removeResizeJobGraph(); + } + scope.removeResizeJobGraph= scope.$on('ResizeJobGraph', function () { + if($(window).width()<500){ + $('.graph-container').height(300); + } + else{ + var winHeight = $(window).height(), + available_height = winHeight - $('#main-menu-container .navbar').outerHeight() - $('#count-container').outerHeight() - 120; + $('.graph-container').height(available_height/2); + job_status_chart.update(); + } + }); + + if (scope.removeGraphDataReady) { + scope.removeGraphDataReady(); + } + scope.removeGraphDataReady = scope.$on('graphDataReady', function (e, data) { + + + var timeFormat, graphData = [ + { + "color": "#00aa00", + "key": "Successful", + "values": data.jobs.successful + }, + { + "key" : "Failed" , + "color" : "#aa0000", + "values": data.jobs.failed + } + ]; + + if(period==="day"){ + timeFormat="%H:%M"; + } + else { + timeFormat = '%m/%d'; + } + graphData.map(function(series) { + series.values = series.values.map(function(d) { + return { + x: d[0], + y: d[1] + }; + }); + return series; + }); + + nv.addGraph({ + generate: function() { + var width = $('.graph-container').width(), // nv.utils.windowSize().width/3, + height = $('.graph-container').height()*0.7; //nv.utils.windowSize().height/5, + job_status_chart = nv.models.lineChart() + .margin({top: 5, right: 75, bottom: 80, left: 85}) //Adjust chart margins to give the x-axis some breathing room. + .x(function(d,i) { return i; }) + .useInteractiveGuideline(true) //We want nice looking tooltips and a guideline! + .transitionDuration(350) //how fast do you want the lines to transition? + .showLegend(true) //Show the legend, allowing users to turn on/off line series. + .showYAxis(true) //Show the y-axis + .showXAxis(true) //Show the x-axis + // .width(width) + // .height(height) + ; + + job_status_chart.xAxis + .axisLabel("Time")//.showMaxMin(true) + .tickFormat(function(d) { + var dx = graphData[0].values[d] && graphData[0].values[d].x || 0; + return dx ? d3.time.format(timeFormat)(new Date(Number(dx+'000'))) : ''; + }); + + job_status_chart.yAxis //Chart y-axis settings + .axisLabel('Jobs') + .tickFormat(d3.format('.f')); + + d3.select('.job-status-graph svg') + .datum(graphData).transition() + .attr('width', width) + .attr('height', height) + .duration(1000) + .call(job_status_chart) + .style({ + // 'width': width, + // 'height': height, + "font-family": 'Open Sans', + "font-style": "normal", + "font-weight":400, + "src": "url(/static/fonts/OpenSans-Regular.ttf)" + }); + + // when the Period drop down filter is used, create a new graph based on the + d3.selectAll(".n") + .on("click", function() { + period = this.getAttribute("id"); + $('#period-dropdown').replaceWith(""+this.text+"\n"); + + createGraph(); + }); + + //On click, update with new data + d3.selectAll(".m") + .on("click", function() { + job_type = this.getAttribute("id"); + $('#type-dropdown').replaceWith(""+this.text+"\n"); + + createGraph(); + }); + + scope.$emit('WidgetLoaded'); + return job_status_chart; + + }, + + + }); + + }); + + }; + } + ]); \ No newline at end of file diff --git a/awx/ui/static/js/widgets/ObjectCount.js b/awx/ui/static/js/widgets/ObjectCount.js index 474682a617..55dba49bd3 100644 --- a/awx/ui/static/js/widgets/ObjectCount.js +++ b/awx/ui/static/js/widgets/ObjectCount.js @@ -11,7 +11,7 @@ * */ -'use strict'; + angular.module('ObjectCountWidget', ['RestServices', 'Utilities']) .factory('ObjectCount', ['$rootScope', '$compile', 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', diff --git a/awx/ui/static/js/widgets/PortalJobs.js b/awx/ui/static/js/widgets/PortalJobs.js index 8fee74ff41..4a4c66d7f7 100644 --- a/awx/ui/static/js/widgets/PortalJobs.js +++ b/awx/ui/static/js/widgets/PortalJobs.js @@ -8,7 +8,7 @@ * */ -'use strict'; + angular.module('PortalJobsWidget', ['RestServices', 'Utilities']) .factory('PortalJobsWidget', ['$rootScope', '$compile', 'LoadSchedulesScope', 'LoadJobsScope', 'PortalJobsList', 'ScheduledJobsList', 'GetChoices', 'GetBasePath', 'PortalJobTemplateList' , diff --git a/awx/ui/static/js/widgets/SCMSyncStatus.js b/awx/ui/static/js/widgets/SCMSyncStatus.js index 956819523c..cbe3167a02 100644 --- a/awx/ui/static/js/widgets/SCMSyncStatus.js +++ b/awx/ui/static/js/widgets/SCMSyncStatus.js @@ -10,7 +10,7 @@ * Dashboard widget showing object counts and license availability. * */ -'use strict'; + angular.module('SCMSyncStatusWidget', ['RestServices', 'Utilities']) .factory('SCMSyncStatus', ['$rootScope', '$compile', diff --git a/awx/ui/static/js/widgets/Stream.js b/awx/ui/static/js/widgets/Stream.js index b6dd7fc60b..df4aad864d 100644 --- a/awx/ui/static/js/widgets/Stream.js +++ b/awx/ui/static/js/widgets/Stream.js @@ -11,7 +11,7 @@ * */ -'use strict'; + angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefinition', 'SearchHelper', 'PaginationHelpers', 'RefreshHelper', 'ListGenerator', 'StreamWidget', 'AuthService', @@ -531,4 +531,4 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti scope.search(list.iterator); }; } -]); \ No newline at end of file +]); diff --git a/awx/ui/static/lib/ansible/AuthService.js b/awx/ui/static/lib/ansible/AuthService.js index 6e3ae7647a..046c93ab1b 100644 --- a/awx/ui/static/lib/ansible/AuthService.js +++ b/awx/ui/static/lib/ansible/AuthService.js @@ -10,7 +10,7 @@ * */ -'use strict'; + angular.module('AuthService', ['ngCookies', 'Utilities']) diff --git a/awx/ui/static/lib/ansible/InventoryTree.js b/awx/ui/static/lib/ansible/InventoryTree.js index 9ad32b9023..05d6d61d53 100644 --- a/awx/ui/static/lib/ansible/InventoryTree.js +++ b/awx/ui/static/lib/ansible/InventoryTree.js @@ -12,7 +12,7 @@ * */ -'use strict'; + angular.module('InventoryTree', ['Utilities', 'RestServices', 'GroupsHelper', 'PromptDialog']) diff --git a/awx/ui/static/lib/ansible/Modal.js b/awx/ui/static/lib/ansible/Modal.js index 76aeda1508..8754d989c0 100644 --- a/awx/ui/static/lib/ansible/Modal.js +++ b/awx/ui/static/lib/ansible/Modal.js @@ -13,7 +13,7 @@ * */ -'use strict'; + angular.module('ModalDialog', ['Utilities', 'ParseHelper']) diff --git a/awx/ui/static/lib/ansible/RestServices.js b/awx/ui/static/lib/ansible/RestServices.js index 3a0f6a68d6..5b769633d0 100644 --- a/awx/ui/static/lib/ansible/RestServices.js +++ b/awx/ui/static/lib/ansible/RestServices.js @@ -51,7 +51,7 @@ * */ -'use strict'; + angular.module('RestServices', ['ngCookies', 'AuthService']) .factory('Rest', ['$http', '$rootScope', '$cookieStore', '$q', 'Authorization', diff --git a/awx/ui/static/lib/ansible/Socket.js b/awx/ui/static/lib/ansible/Socket.js index 35a378c86c..d51438cc8b 100644 --- a/awx/ui/static/lib/ansible/Socket.js +++ b/awx/ui/static/lib/ansible/Socket.js @@ -12,7 +12,7 @@ /* global io */ -'use strict'; + /** * @ngdoc method * @name lib.ansible.function:Socket#SocketIO diff --git a/awx/ui/static/lib/ansible/Timer.js b/awx/ui/static/lib/ansible/Timer.js index 2bae201507..5008ec62cb 100644 --- a/awx/ui/static/lib/ansible/Timer.js +++ b/awx/ui/static/lib/ansible/Timer.js @@ -11,7 +11,7 @@ * duration set in config.js * */ -'use strict'; + /** * @ngdoc method * @name lib.ansible.function:Timer#TimerService diff --git a/awx/ui/static/lib/ansible/Utilities.js b/awx/ui/static/lib/ansible/Utilities.js index 2094f46418..9e7430d42e 100644 --- a/awx/ui/static/lib/ansible/Utilities.js +++ b/awx/ui/static/lib/ansible/Utilities.js @@ -12,7 +12,7 @@ /* jshint devel:true */ -'use strict'; + angular.module('Utilities', ['RestServices', 'Utilities']) diff --git a/awx/ui/static/lib/ansible/api-loader.js b/awx/ui/static/lib/ansible/api-loader.js index e8871b4228..40a89dfe64 100644 --- a/awx/ui/static/lib/ansible/api-loader.js +++ b/awx/ui/static/lib/ansible/api-loader.js @@ -17,7 +17,7 @@ * */ -'use strict'; + angular.module('ApiLoader', ['Utilities']) diff --git a/awx/ui/static/lib/ansible/directives.js b/awx/ui/static/lib/ansible/directives.js index ca9a7eaf4c..6d32ab3d18 100644 --- a/awx/ui/static/lib/ansible/directives.js +++ b/awx/ui/static/lib/ansible/directives.js @@ -9,7 +9,7 @@ * */ -'use strict'; + /* global chkPass:false */ diff --git a/awx/ui/static/lib/ansible/filters.js b/awx/ui/static/lib/ansible/filters.js index e743855c2c..cd992de4f2 100644 --- a/awx/ui/static/lib/ansible/filters.js +++ b/awx/ui/static/lib/ansible/filters.js @@ -9,7 +9,7 @@ * */ -'use strict'; + angular.module('AWFilters', []) diff --git a/awx/ui/static/lib/ansible/form-generator.js b/awx/ui/static/lib/ansible/form-generator.js index 66f164a385..6dc5fce5c8 100644 --- a/awx/ui/static/lib/ansible/form-generator.js +++ b/awx/ui/static/lib/ansible/form-generator.js @@ -132,7 +132,7 @@ * Applying CodeMirror to the text area is handled by ParseTypeChange() found in helpers/Parse.js. Within the controller will be a call to ParseTypeChange that creates the CodeMirror object and sets up the required $scope methods for handles getting, settting and type conversion. */ -'use strict'; + angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator']) diff --git a/awx/ui/static/lib/ansible/generator-helpers.js b/awx/ui/static/lib/ansible/generator-helpers.js index cd0e09b47e..ef314915cb 100644 --- a/awx/ui/static/lib/ansible/generator-helpers.js +++ b/awx/ui/static/lib/ansible/generator-helpers.js @@ -11,7 +11,7 @@ * */ -'use strict'; + angular.module('GeneratorHelpers', []) diff --git a/awx/ui/static/lib/ansible/list-generator.js b/awx/ui/static/lib/ansible/list-generator.js index aed5faa4cc..16b126ba7c 100644 --- a/awx/ui/static/lib/ansible/list-generator.js +++ b/awx/ui/static/lib/ansible/list-generator.js @@ -96,7 +96,7 @@ * The real difference is that an <a> element is used to generate fieldAction items while a <button> element is used for action items. */ -'use strict'; + angular.module('ListGenerator', ['GeneratorHelpers']) .factory('GenerateList', ['$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon', diff --git a/awx/ui/static/lib/ansible/prompt-dialog.js b/awx/ui/static/lib/ansible/prompt-dialog.js index 8bbe8692c6..dd258103c8 100644 --- a/awx/ui/static/lib/ansible/prompt-dialog.js +++ b/awx/ui/static/lib/ansible/prompt-dialog.js @@ -18,7 +18,7 @@ * } */ -'use strict'; + /** * @ngdoc method * @name lib.ansible.function:prompt-dialog#PromptDialog