From d7e2614760ad697286052c6fef49499289c27595 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Wed, 27 May 2015 11:39:16 -0400 Subject: [PATCH] Copyright JS files and removing unlicensed files Adding the Copyright and All Rights Reserved to the JS files, as well as removing pwdmeter and 3dDonut chart (in lieu of d3.js donut chart) adding the legend and getting pie chart to donut adding data labels to donut chart working legend and tooltip job detail donut Ansible Copyright added to beginning of all JS files removing pwdmeter and d3donut fixing merge conflicts --- awx/ui/static/js/app.js | 13 +- .../js/browser-data/browser-data.factory.js | 7 +- awx/ui/static/js/browser-data/main.js | 7 +- .../js/browser-data/ng-app.directive.js | 6 + awx/ui/static/js/config.js | 11 +- awx/ui/static/js/controllers/Adhoc.js | 10 +- awx/ui/static/js/controllers/Admins.js | 10 +- .../static/js/controllers/Authentication.js | 12 +- awx/ui/static/js/controllers/Credentials.js | 10 +- awx/ui/static/js/controllers/Home.js | 13 +- awx/ui/static/js/controllers/Inventories.js | 13 +- awx/ui/static/js/controllers/JobDetail.js | 10 +- awx/ui/static/js/controllers/JobEvents.js | 13 +- awx/ui/static/js/controllers/JobHosts.js | 15 +- awx/ui/static/js/controllers/JobStdout.js | 10 +- awx/ui/static/js/controllers/JobTemplates.js | 13 +- awx/ui/static/js/controllers/Jobs.js | 13 +- awx/ui/static/js/controllers/Jobs.js.old | 429 ------ awx/ui/static/js/controllers/Organizations.js | 13 +- awx/ui/static/js/controllers/Permissions.js | 13 +- awx/ui/static/js/controllers/Portal.js | 13 +- awx/ui/static/js/controllers/Projects.js | 13 +- awx/ui/static/js/controllers/Schedules.js | 15 +- awx/ui/static/js/controllers/Sockets.js | 13 +- awx/ui/static/js/controllers/Survey.js.old.js | 1253 ----------------- awx/ui/static/js/controllers/Teams.js | 13 +- awx/ui/static/js/controllers/Users.js | 12 +- .../adjust-graph-size.service.js | 7 + .../graph-helpers/auto-size.directive.js | 8 +- .../host-status-graph.directive.js | 8 +- .../job-status/job-status-graph.directive.js | 8 +- .../job-status/job-status-graph.service.js | 6 + awx/ui/static/js/debug.js | 6 + awx/ui/static/js/docs.js | 6 + awx/ui/static/js/filters.js | 6 + awx/ui/static/js/forms.js | 6 + awx/ui/static/js/forms/ActivityDetail.js | 11 +- awx/ui/static/js/forms/Adhoc.js | 11 +- awx/ui/static/js/forms/Credentials.js | 11 +- awx/ui/static/js/forms/CustomInventory.js | 12 +- awx/ui/static/js/forms/EventsViewer.js | 10 +- awx/ui/static/js/forms/Groups.js | 12 +- awx/ui/static/js/forms/HostGroups.js | 13 +- awx/ui/static/js/forms/Hosts.js | 12 +- awx/ui/static/js/forms/Inventories.js | 12 +- awx/ui/static/js/forms/InventoryStatus.js | 12 +- awx/ui/static/js/forms/JobEventData.js | 12 +- awx/ui/static/js/forms/JobSummary.js | 12 +- awx/ui/static/js/forms/JobTemplates.js | 13 +- awx/ui/static/js/forms/JobVarsPrompt.js | 12 +- awx/ui/static/js/forms/Jobs.js | 12 +- awx/ui/static/js/forms/LicenseForm.js | 11 +- awx/ui/static/js/forms/LicenseUpdate.js | 12 +- awx/ui/static/js/forms/LogViewerOptions.js | 12 +- awx/ui/static/js/forms/LogViewerStatus.js | 12 +- awx/ui/static/js/forms/Organizations.js | 12 +- awx/ui/static/js/forms/Permissions.js | 13 +- awx/ui/static/js/forms/ProjectStatus.js | 12 +- awx/ui/static/js/forms/Projects.js | 13 +- awx/ui/static/js/forms/Source.js | 14 +- awx/ui/static/js/forms/SurveyMaker.js | 12 +- awx/ui/static/js/forms/SurveyQuestion.js | 12 +- awx/ui/static/js/forms/Teams.js | 12 +- awx/ui/static/js/forms/Users.js | 12 +- awx/ui/static/js/help.js | 6 + awx/ui/static/js/help/ChromeSocketHelp.js | 12 +- awx/ui/static/js/help/FirefoxSocketHelp.js | 12 +- awx/ui/static/js/help/InventoryGroups.js | 13 +- awx/ui/static/js/help/SafariSocketHelp.js | 12 +- awx/ui/static/js/helpers.js | 6 + awx/ui/static/js/helpers/AboutAnsible.js | 12 +- awx/ui/static/js/helpers/Access.js | 12 +- awx/ui/static/js/helpers/Adhoc.js | 11 +- awx/ui/static/js/helpers/Children.js | 10 +- awx/ui/static/js/helpers/ConfigureTower.js | 11 +- awx/ui/static/js/helpers/Credentials.js | 11 +- awx/ui/static/js/helpers/CustomInventory.js | 11 +- awx/ui/static/js/helpers/EventViewer.js | 10 +- awx/ui/static/js/helpers/Events.js | 12 +- awx/ui/static/js/helpers/Groups.js | 12 +- awx/ui/static/js/helpers/HostEventsViewer.js | 12 +- awx/ui/static/js/helpers/Hosts.js | 12 +- awx/ui/static/js/helpers/JobDetail.js | 151 +- awx/ui/static/js/helpers/JobDetail.js.old | 1017 ------------- awx/ui/static/js/helpers/JobSubmission.js | 12 +- awx/ui/static/js/helpers/JobTemplates.js | 12 +- awx/ui/static/js/helpers/Jobs.js | 12 +- awx/ui/static/js/helpers/License.js | 12 +- awx/ui/static/js/helpers/LoadConfig.js | 9 +- awx/ui/static/js/helpers/LogViewer.js | 10 +- awx/ui/static/js/helpers/Lookup.js | 10 +- awx/ui/static/js/helpers/PaginationHelpers.js | 10 +- awx/ui/static/js/helpers/Parse.js | 9 +- awx/ui/static/js/helpers/Permissions.js | 9 +- awx/ui/static/js/helpers/ProjectPath.js | 9 +- awx/ui/static/js/helpers/Projects.js | 9 +- awx/ui/static/js/helpers/Schedules.js | 9 +- awx/ui/static/js/helpers/Selection.js | 9 +- awx/ui/static/js/helpers/SocketHelper.js | 9 +- awx/ui/static/js/helpers/Survey.js | 11 +- awx/ui/static/js/helpers/Users.js | 9 +- awx/ui/static/js/helpers/Variables.js | 9 +- awx/ui/static/js/helpers/api-defaults.js | 11 +- awx/ui/static/js/helpers/inventory.js | 10 +- awx/ui/static/js/helpers/md5.js | 10 +- awx/ui/static/js/helpers/refresh-related.js | 9 +- awx/ui/static/js/helpers/refresh.js | 9 +- awx/ui/static/js/helpers/related-search.js | 9 +- awx/ui/static/js/helpers/search.js | 9 +- awx/ui/static/js/helpers/teams.js | 9 +- .../delete-job-template.service.js | 8 +- awx/ui/static/js/job-templates/main.js | 6 + .../js/jobs/standard-out-details.block.less | 8 +- awx/ui/static/js/lists.js | 6 + awx/ui/static/js/lists/Admins.js | 15 +- awx/ui/static/js/lists/AllJobs.js | 13 +- awx/ui/static/js/lists/CloudCredentials.js | 12 +- awx/ui/static/js/lists/CompletedJobs.js | 11 +- awx/ui/static/js/lists/ConfigureTowerJobs.js | 12 +- awx/ui/static/js/lists/Credentials.js | 12 +- awx/ui/static/js/lists/CustomInventory.js | 13 +- awx/ui/static/js/lists/Groups.js | 14 +- awx/ui/static/js/lists/HomeGroups.js | 15 +- awx/ui/static/js/lists/HomeHosts.js | 15 +- awx/ui/static/js/lists/Hosts.js | 17 +- awx/ui/static/js/lists/Inventories.js | 13 +- awx/ui/static/js/lists/InventoryGroups.js | 10 +- awx/ui/static/js/lists/InventoryHosts.js | 15 +- awx/ui/static/js/lists/JobEvents.js | 16 +- awx/ui/static/js/lists/JobHosts.js | 16 +- awx/ui/static/js/lists/JobTemplates.js | 14 +- awx/ui/static/js/lists/Jobs.js | 16 +- awx/ui/static/js/lists/Organizations.js | 14 +- awx/ui/static/js/lists/Permissions.js | 14 +- awx/ui/static/js/lists/PortalJobTemplates.js | 14 +- awx/ui/static/js/lists/PortalJobs.js | 16 +- awx/ui/static/js/lists/Projects.js | 14 +- awx/ui/static/js/lists/ScanJobs.js | 16 +- awx/ui/static/js/lists/ScheduledJobs.js | 15 +- awx/ui/static/js/lists/Schedules.js | 15 +- awx/ui/static/js/lists/Streams.js | 16 +- awx/ui/static/js/lists/Teams.js | 13 +- awx/ui/static/js/lists/Users.js | 13 +- awx/ui/static/js/ng-console.js | 21 +- awx/ui/static/js/shared/AuthService.js | 10 +- awx/ui/static/js/shared/InventoryTree.js | 9 +- awx/ui/static/js/shared/Modal.js | 10 +- awx/ui/static/js/shared/RestServices.js | 9 +- awx/ui/static/js/shared/Socket.js | 9 +- awx/ui/static/js/shared/Timer.js | 9 +- awx/ui/static/js/shared/Utilities.js | 9 +- awx/ui/static/js/shared/api-loader.js | 10 +- .../breadcrumbs/breadcrumb.directive.js | 6 + .../breadcrumbs/breadcrumbs.controller.js | 6 + .../breadcrumbs/breadcrumbs.directive.js | 8 +- awx/ui/static/js/shared/breadcrumbs/main.js | 6 + awx/ui/static/js/shared/capitalize.filter.js | 6 + awx/ui/static/js/shared/directives.js | 10 +- .../js/shared/features/features.controller.js | 6 + .../js/shared/features/features.directive.js | 8 +- .../js/shared/features/features.service.js | 6 + awx/ui/static/js/shared/features/main.js | 6 + awx/ui/static/js/shared/filters.js | 10 +- awx/ui/static/js/shared/form-generator.js | 10 +- awx/ui/static/js/shared/generator-helpers.js | 9 +- .../list-generator/list-generator.factory.js | 9 +- .../static/js/shared/list-generator/main.js | 6 + .../toolbar-button.directive.js | 6 + awx/ui/static/js/shared/lodash-as-promised.js | 6 + awx/ui/static/js/shared/long-date.filter.js | 6 + awx/ui/static/js/shared/main.js | 6 + .../js/shared/multi-select-list/main.js | 6 + .../multi-select-list.controller.js | 6 + .../multi-select-list.directive.js | 6 + .../multi-select-list/select-all.directive.js | 6 + .../select-list-item.directive.js | 6 + awx/ui/static/js/shared/prompt-dialog.js | 9 +- awx/ui/static/js/shared/pwdmeter.js | 327 ----- .../route-extensions/link-to.directive.js | 6 + .../route-extensions/lookup-route-url.js | 6 + .../static/js/shared/route-extensions/main.js | 6 + .../route-extensions/model-listener.config.js | 6 + .../route-params.decorator.js | 6 + .../route-extensions/transition-to.factory.js | 6 + awx/ui/static/js/shared/text-label.less | 2 - awx/ui/static/js/shared/title.directive.js | 7 +- .../static/js/shared/xss-sanitizer.filter.js | 6 + awx/ui/static/js/smart-status/main.js | 6 + .../smart-status/smart-status.controller.js | 6 + .../js/smart-status/smart-status.directive.js | 6 + .../js/system-tracking/compare-facts.js | 6 + .../js/system-tracking/compare-facts/flat.js | 6 + .../compare-facts/nested-helpers.js | 6 + .../system-tracking/compare-facts/nested.js | 6 + .../data-services/fact-scan-data.service.js | 6 + .../get-data-for-comparison.factory.js | 6 + .../date-picker/date-picker.directive.js | 6 + .../js/system-tracking/date-picker/main.js | 7 +- .../fact-data-group.block.less | 6 + awx/ui/static/js/system-tracking/main.js | 6 + .../js/system-tracking/search-date-range.js | 6 + .../system-tracking/string-or-date.filter.js | 6 + .../system-tracking.controller.js | 6 + .../system-tracking/system-tracking.route.js | 6 + awx/ui/static/js/widgets.js | 6 + .../static/js/widgets/InventorySyncStatus.js | 12 +- awx/ui/static/js/widgets/JobStatus.js | 12 +- awx/ui/static/js/widgets/ObjectCount.js | 12 +- awx/ui/static/js/widgets/PortalJobs.js | 10 +- awx/ui/static/js/widgets/SCMSyncStatus.js | 12 +- awx/ui/static/js/widgets/Stream.js | 10 +- awx/ui/static/less/job-details.less | 83 +- awx/ui/static/lib/d3Donut/d3Donut.js | 123 -- awx/ui/static/partials/job_detail.html | 10 +- 214 files changed, 1366 insertions(+), 4103 deletions(-) delete mode 100644 awx/ui/static/js/controllers/Jobs.js.old delete mode 100644 awx/ui/static/js/controllers/Survey.js.old.js delete mode 100644 awx/ui/static/js/helpers/JobDetail.js.old delete mode 100644 awx/ui/static/js/shared/pwdmeter.js delete mode 100644 awx/ui/static/lib/d3Donut/d3Donut.js diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index 64e684fa11..cd39d1bddd 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -1,11 +1,10 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * app.js - * - * Declare the Tower app, define routes and perform initialization chores. - * - */ + * All Rights Reserved + *************************************************/ + + var urlPrefix; diff --git a/awx/ui/static/js/browser-data/browser-data.factory.js b/awx/ui/static/js/browser-data/browser-data.factory.js index 30d75a6b76..3b6c4f535f 100644 --- a/awx/ui/static/js/browser-data/browser-data.factory.js +++ b/awx/ui/static/js/browser-data/browser-data.factory.js @@ -1,4 +1,9 @@ -export default ['$window', function($window) { +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default ['$window', function($window) { var ua = $window.navigator.userAgent, browserName; diff --git a/awx/ui/static/js/browser-data/main.js b/awx/ui/static/js/browser-data/main.js index 3576e0f4ef..038bcf036c 100644 --- a/awx/ui/static/js/browser-data/main.js +++ b/awx/ui/static/js/browser-data/main.js @@ -1,4 +1,9 @@ -import getBrowserData from './browser-data.factory'; +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import getBrowserData from './browser-data.factory'; import ngApp from './ng-app.directive'; export default diff --git a/awx/ui/static/js/browser-data/ng-app.directive.js b/awx/ui/static/js/browser-data/ng-app.directive.js index 3d9f517f51..84d0cf8def 100644 --- a/awx/ui/static/js/browser-data/ng-app.directive.js +++ b/awx/ui/static/js/browser-data/ng-app.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /* jshint unused: vars */ export default ['browserData', function(browserData) { diff --git a/awx/ui/static/js/config.js b/awx/ui/static/js/config.js index 6c3a3d687e..c9d63161af 100644 --- a/awx/ui/static/js/config.js +++ b/awx/ui/static/js/config.js @@ -1,7 +1,12 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + + /********************************************************************** - * - * Copyright (c) 2014 AnsibleWorks, Inc. - * * config.js * * Gobal configuration variables for controlling application behavior. diff --git a/awx/ui/static/js/controllers/Adhoc.js b/awx/ui/static/js/controllers/Adhoc.js index 0d5a8da886..dd16cc28b3 100644 --- a/awx/ui/static/js/controllers/Adhoc.js +++ b/awx/ui/static/js/controllers/Adhoc.js @@ -1,11 +1,9 @@ /************************************************* - * Copyright (c) 2015 AnsibleWorks, Inc. + * Copyright (c) 2015 Ansible, Inc. * - * Adhoc.js - * - * Controller functions for the Adhoc model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Adhoc diff --git a/awx/ui/static/js/controllers/Admins.js b/awx/ui/static/js/controllers/Admins.js index eb64d5d98c..5d4dea45da 100644 --- a/awx/ui/static/js/controllers/Admins.js +++ b/awx/ui/static/js/controllers/Admins.js @@ -1,7 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc overview * @name controllers @@ -43,4 +45,4 @@ export function AdminsList($scope, $rootScope, $location, $log, $routeParams, Re AdminsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'AdminList', 'generateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'GetBasePath', 'SelectionInit' -]; \ No newline at end of file +]; diff --git a/awx/ui/static/js/controllers/Authentication.js b/awx/ui/static/js/controllers/Authentication.js index 0cc90d57c7..25e4ff2bf2 100644 --- a/awx/ui/static/js/controllers/Authentication.js +++ b/awx/ui/static/js/controllers/Authentication.js @@ -1,12 +1,8 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * Authentication.js - * - * Controller functions for user authentication. - * - */ + * All Rights Reserved + *************************************************/ /** * @ngdoc function diff --git a/awx/ui/static/js/controllers/Credentials.js b/awx/ui/static/js/controllers/Credentials.js index 91e6456543..b0fc8471e5 100644 --- a/awx/ui/static/js/controllers/Credentials.js +++ b/awx/ui/static/js/controllers/Credentials.js @@ -1,11 +1,9 @@ /************************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. + * Copyright (c) 2015 Ansible, Inc. * - * Credentials.js - * - * Controller functions for the Credential model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Credentials diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js index 5ed11aa665..75b4fb954a 100644 --- a/awx/ui/static/js/controllers/Home.js +++ b/awx/ui/static/js/controllers/Home.js @@ -1,13 +1,8 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * Home.js - * - * Controller functions for Home tab - * - */ - + * All Rights Reserved + *************************************************/ /** * @ngdoc function diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js index 9453902e0a..846b37bd75 100644 --- a/awx/ui/static/js/controllers/Inventories.js +++ b/awx/ui/static/js/controllers/Inventories.js @@ -1,12 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * Inventories.js - * - * Controller functions for the Inventory model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Inventories diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index d2199b576b..bbccc72d3f 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -1,9 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobDetail.js - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:JobDetail diff --git a/awx/ui/static/js/controllers/JobEvents.js b/awx/ui/static/js/controllers/JobEvents.js index df254daa1c..41771424e5 100644 --- a/awx/ui/static/js/controllers/JobEvents.js +++ b/awx/ui/static/js/controllers/JobEvents.js @@ -1,12 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * JobEvents.js - * - * Controller functions for the Job Events model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:JobEvent diff --git a/awx/ui/static/js/controllers/JobHosts.js b/awx/ui/static/js/controllers/JobHosts.js index cda7d54038..6270422d6f 100644 --- a/awx/ui/static/js/controllers/JobHosts.js +++ b/awx/ui/static/js/controllers/JobHosts.js @@ -1,12 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * JobHosts.js - * - * Controller functions for the Job Hosts Summary model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:JobHosts @@ -127,4 +124,4 @@ export function JobHostSummaryList($scope, $rootScope, $location, $log, $routePa JobHostSummaryList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'JobHostList', 'generateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath', 'Refresh', 'JobStatusToolTip', 'Wait' -]; \ No newline at end of file +]; diff --git a/awx/ui/static/js/controllers/JobStdout.js b/awx/ui/static/js/controllers/JobStdout.js index cbd6818e52..04a6ddfe55 100644 --- a/awx/ui/static/js/controllers/JobStdout.js +++ b/awx/ui/static/js/controllers/JobStdout.js @@ -1,9 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobStdout.js - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:JobStdout diff --git a/awx/ui/static/js/controllers/JobTemplates.js b/awx/ui/static/js/controllers/JobTemplates.js index 9f038f85fc..7904a6fbda 100644 --- a/awx/ui/static/js/controllers/JobTemplates.js +++ b/awx/ui/static/js/controllers/JobTemplates.js @@ -1,12 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * JobTemplates.js - * - * Controller functions for the Job Template model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:JobTemplate diff --git a/awx/ui/static/js/controllers/Jobs.js b/awx/ui/static/js/controllers/Jobs.js index e6064444e0..f37267cea5 100644 --- a/awx/ui/static/js/controllers/Jobs.js +++ b/awx/ui/static/js/controllers/Jobs.js @@ -1,12 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * Jobs.js - * - * Controller functions for the Inventory model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Jobs diff --git a/awx/ui/static/js/controllers/Jobs.js.old b/awx/ui/static/js/controllers/Jobs.js.old deleted file mode 100644 index ecbf8d86e5..0000000000 --- a/awx/ui/static/js/controllers/Jobs.js.old +++ /dev/null @@ -1,429 +0,0 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. - * - * - * Jobs.js - * - * Controller functions for the Job model. - * - */ - -'use strict'; - -function JobsListCtrl($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobList, GenerateList, LoadBreadCrumbs, Prompt, - SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, LookUpInit, SubmitJob, FormatDate, Refresh, - JobStatusToolTip, Empty, Wait) { - - ClearScope(); - - var list = JobList, - defaultUrl = GetBasePath('jobs'), - generator = GenerateList, - opt; - - generator.inject(list, { mode: 'edit', scope: $scope }); - - $rootScope.flashMessage = null; - $scope.selected = []; - - if ($scope.removePostRefresh) { - $scope.removePostRefresh(); - } - $scope.removePostRefresh = $scope.$on('PostRefresh', function () { - var i, cDate; - $("tr.success").each(function () { - // Make sure no rows have a green background - var ngc = $(this).attr('ng-class'); - $scope[ngc] = ""; - }); - if ($scope.jobs && $scope.jobs.length) { - for (i = 0; i < $scope.jobs.length; i++) { - // Convert created date to local time zone - cDate = new Date($scope.jobs[i].created); - $scope.jobs[i].created = FormatDate(cDate); - // Set tooltip and link - $scope.jobs[i].statusBadgeToolTip = JobStatusToolTip($scope.jobs[i].status) + - " Click to view status details."; - $scope.jobs[i].statusLinkTo = '/#/jobs/' + $scope.jobs[i].id; - } - } - }); - - if ($routeParams.job_host_summaries__host) { - defaultUrl += '?job_host_summaries__host=' + $routeParams.job_host_summaries__host; - } else if ($routeParams.inventory__int && $routeParams.status) { - defaultUrl += '?inventory__int=' + $routeParams.inventory__int + '&status=' + - $routeParams.status; - } - SearchInit({ - scope: $scope, - set: 'jobs', - list: list, - url: defaultUrl - }); - PaginateInit({ - scope: $scope, - list: list, - url: defaultUrl - }); - - // Called from Inventories page, failed jobs link. Find jobs for selected inventory. - if ($routeParams.inventory__int) { - $scope[list.iterator + 'SearchField'] = 'inventory'; - $scope[list.iterator + 'SearchValue'] = $routeParams.inventory__int; - $scope[list.iterator + 'SearchFieldLabel'] = 'Inventory ID'; - } - if ($routeParams.id__int) { - $scope[list.iterator + 'SearchField'] = 'id'; - $scope[list.iterator + 'SearchValue'] = $routeParams.id__int; - $scope[list.iterator + 'SearchFieldLabel'] = 'Job ID'; - } - if ($routeParams.status) { - $scope[list.iterator + 'SearchField'] = 'status'; - $scope[list.iterator + 'SelectShow'] = true; - $scope[list.iterator + 'SearchSelectOpts'] = list.fields.status.searchOptions; - $scope[list.iterator + 'SearchFieldLabel'] = list.fields.status.label.replace(/
/g, ' '); - for (opt in list.fields.status.searchOptions) { - if (list.fields.status.searchOptions[opt].value === $routeParams.status) { - $scope[list.iterator + 'SearchSelectValue'] = list.fields.status.searchOptions[opt]; - break; - } - } - } - - $scope.search(list.iterator); - - LoadBreadCrumbs(); - - $scope.refresh = function () { - Wait('start'); - $scope.jobLoading = false; - Refresh({ scope: $scope, set: 'jobs', iterator: 'job', url: $scope.current_url }); - }; - - $scope.refreshJob = $scope.refresh; - - $scope.editJob = function (id, name) { - LoadBreadCrumbs({ path: '/jobs/' + id, title: id + ' - ' + name }); - $location.path($location.path() + '/' + id); - }; - - $scope.viewEvents = function (id, name) { - LoadBreadCrumbs({ path: '/jobs/' + id, title: id + ' - ' + name }); - $location.path($location.path() + '/' + id + '/job_events'); - }; - - $scope.viewSummary = function (id, name) { - LoadBreadCrumbs({ path: '/jobs/' + id, title: id + ' - ' + name }); - $location.path($location.path() + '/' + id + '/job_host_summaries'); - }; - - $scope.deleteJob = function (id) { - Rest.setUrl(defaultUrl + id + '/'); - Rest.get() - .success(function (data) { - - var action, url, action_label, hdr; - - if (data.status === 'pending' || data.status === 'running' || data.status === 'waiting') { - url = data.related.cancel; - action_label = 'cancel'; - hdr = 'Cancel Job'; - } else { - url = defaultUrl + id + '/'; - action_label = 'delete'; - hdr = 'Delete Job'; - } - - action = function () { - Rest.setUrl(url); - if (action_label === 'cancel') { - Rest.post() - .success(function () { - $('#prompt-modal').modal('hide'); - $scope.search(list.iterator); - }) - .error(function (data, status) { - $('#prompt-modal').modal('hide'); - ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Call to ' + url + - ' failed. POST returned status: ' + status }); - }); - } else { - Rest.destroy() - .success(function () { - $('#prompt-modal').modal('hide'); - $scope.search(list.iterator); - }) - .error(function (data, status) { - $('#prompt-modal').modal('hide'); - ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Call to ' + url + - ' failed. DELETE returned status: ' + status }); - }); - } - }; - - Prompt({ - hdr: hdr, - body: 'Are you sure you want to ' + action_label + ' job ' + id + '?', - action: action - }); - }) - .error(function (data, status) { - ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get job details. GET returned status: ' + status }); - }); - }; - - $scope.submitJob = function (id, template) { - SubmitJob({ scope: $scope, id: id, template: template }); - }; -} - -JobsListCtrl.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'JobList', - 'GenerateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', - 'ProcessErrors', 'GetBasePath', 'LookUpInit', 'SubmitJob', 'FormatDate', 'Refresh', 'JobStatusToolTip', - 'Empty', 'Wait' -]; - - -function JobsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, JobForm, JobTemplateForm, GenerateForm, Rest, - Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList, - CredentialList, ProjectList, LookUpInit, PromptPasswords, GetBasePath, md5Setup, FormatDate, JobStatusToolTip, Wait, Empty, - ParseVariableString) { - - ClearScope(); - - var defaultUrl = GetBasePath('jobs'), - generator = GenerateForm, - id = $routeParams.id, - loadingFinishedCount = 0, - templateForm = {}; - - generator.inject(JobForm, { mode: 'edit', related: true, scope: $scope }); - - $scope.job_id = id; - $scope.parseType = 'yaml'; - $scope.statusSearchSpin = false; - $scope.disableParseSelection = true; - - function getPlaybooks(project, playbook) { - if (!Empty(project)) { - var url = GetBasePath('projects') + project + '/playbooks/'; - Rest.setUrl(url); - Rest.get() - .success(function (data) { - var i; - $scope.playbook_options = []; - for (i = 0; i < data.length; i++) { - $scope.playbook_options.push(data[i]); - } - for (i = 0; i < $scope.playbook_options.length; i++) { - if ($scope.playbook_options[i] === playbook) { - $scope.playbook = $scope.playbook_options[i]; - } - } - $scope.$emit('jobTemplateLoadFinished'); - }) - .error(function () { - $scope.$emit('jobTemplateLoadFinished'); - }); - } else { - $scope.$emit('jobTemplateLoadFinished'); - } - } - - - // Retrieve each related set and populate the playbook list - if ($scope.jobLoadedRemove) { - $scope.jobLoadedRemove(); - } - $scope.jobLoadedRemove = $scope.$on('jobLoaded', function (e, related_cloud_credential, project, playbook) { - - getPlaybooks(project, playbook); - - //$scope[form.name + 'ReadOnly'] = ($scope.status === 'new') ? false : true; - - //$('#forks-slider').slider("option", "value", $scope.forks); - //$('#forks-slider').slider("disable"); - //$('input[type="checkbox"]').attr('disabled', 'disabled'); - //$('input[type="radio"]').attr('disabled', 'disabled'); - //$('#host_config_key-gen-btn').attr('disabled', 'disabled'); - //$('textarea').attr('readonly', 'readonly'); - - // Get job template and display/hide host callback fields - /*Rest.setUrl($scope.template_url); - Rest.get() - .success(function (data) { - var dft = (data.host_config_key) ? 'true' : 'false'; - $scope.host_config_key = data.host_config_key; - md5Setup({ - scope: $scope, - master: master, - check_field: 'allow_callbacks', - default_val: dft - }); - $scope.callback_url = (data.related) ? data.related.callback : '<< Job template not found >>'; - $scope.$emit('jobTemplateLoadFinished'); - }) - .error(function () { - Wait('stop'); - $scope.callback_url = '<< Job template not found >>'; - }); - */ - if (related_cloud_credential) { - //Get the name of the cloud credential - Rest.setUrl(related_cloud_credential); - Rest.get() - .success(function (data) { - $scope.cloud_credential_name = data.name; - $scope.$emit('jobTemplateLoadFinished'); - }) - .error(function (data, status) { - ProcessErrors($scope, data, status, null, { hdr: 'Error!', - msg: 'Failed to related cloud credential. GET returned status: ' + status }); - }); - } else { - $scope.$emit('jobTemplateLoadFinished'); - } - - }); - - // Turn off 'Wait' after both cloud credential and playbook list come back - if ($scope.removeJobTemplateLoadFinished) { - $scope.removeJobTemplateLoadFinished(); - } - $scope.removeJobTemplateLoadFinished = $scope.$on('jobTemplateLoadFinished', function () { - loadingFinishedCount++; - if (loadingFinishedCount >= 2) { - // The initial template load finished. Now load related jobs, which - // will turn off the 'working' spinner. - Wait('stop'); - } - }); - - // Our job type options - $scope.job_type_options = [{ - value: 'run', - label: 'Run' - }, { - value: 'check', - label: 'Check' - }]; - $scope.verbosity_options = [{ - value: 0, - label: 'Default' - }, { - value: 1, - label: 'Verbose' - }, { - value: 3, - label: 'Debug' - }]; - $scope.playbook_options = null; - $scope.playbook = null; - - function calcRows(content) { - var n = content.match(/\n/g), - rows = (n) ? n.length : 1; - return (rows > 15) ? 15 : rows; - } - - // Retrieve detail record and prepopulate the form - Wait('start'); - Rest.setUrl(defaultUrl + ':id/'); - Rest.get({ params: { id: id } }) - .success(function (data) { - - var i, fld; - - LoadBreadCrumbs(); - - $scope.status = data.status; - $scope.created = FormatDate(data.created); - $scope.result_stdout = data.result_stdout; - $scope.result_traceback = data.result_traceback; - $scope.stdout_rows = calcRows($scope.result_stdout); - $scope.traceback_rows = calcRows($scope.result_traceback); - - // Now load the job template form - templateForm.addTitle = 'Create Job Templates'; - templateForm.editTitle = '{{ name }}'; - templateForm.name = 'job_templates'; - templateForm.twoColumns = true; - templateForm.fields = angular.copy(JobTemplateForm.fields); - for (fld in templateForm.fields) { - templateForm.fields[fld].readonly = true; - } - - $('#ui-accordion-jobs-collapse-0-panel-1').find('div').attr('id','job-template-container'); - generator.inject(templateForm, { mode: 'edit', id: 'job-template-container', scope: $scope, breadCrumbs: false }); - - for (fld in templateForm.fields) { - if (fld !== 'variables' && data[fld] !== null && data[fld] !== undefined) { - if (JobTemplateForm.fields[fld].type === 'select') { - if ($scope[fld + '_options'] && $scope[fld + '_options'].length > 0) { - for (i = 0; i < $scope[fld + '_options'].length; i++) { - if (data[fld] === $scope[fld + '_options'][i].value) { - $scope[fld] = $scope[fld + '_options'][i]; - } - } - } else { - $scope[fld] = data[fld]; - } - } else { - $scope[fld] = data[fld]; - } - } - if (fld === 'variables') { - $scope.variables = ParseVariableString(data.extra_vars); - } - if (JobTemplateForm.fields[fld].type === 'lookup' && data.summary_fields[JobTemplateForm.fields[fld].sourceModel]) { - $scope[JobTemplateForm.fields[fld].sourceModel + '_' + JobTemplateForm.fields[fld].sourceField] = - data.summary_fields[JobTemplateForm.fields[fld].sourceModel][JobTemplateForm.fields[fld].sourceField]; - } - } - - $scope.id = data.id; - $scope.name = (data.summary_fields && data.summary_fields.job_template) ? data.summary_fields.job_template.name : ''; - $scope.statusToolTip = JobStatusToolTip(data.status); - $scope.url = data.url; - $scope.project = data.project; - - $scope.$emit('jobLoaded', data.related.cloud_credential, data.project, data.playbook); - }) - .error(function (data, status) { - ProcessErrors($scope, data, status, null, { hdr: 'Error!', - msg: 'Failed to retrieve job: ' + $routeParams.id + '. GET status: ' + status }); - }); - - $scope.refresh = function () { - Wait('start'); - Rest.setUrl(defaultUrl + id + '/'); - Rest.get() - .success(function (data) { - $scope.status = data.status; - $scope.result_stdout = data.result_stdout; - $scope.result_traceback = data.result_traceback; - $scope.stdout_rows = calcRows($scope.result_stdout); - $scope.traceback_rows = calcRows($scope.result_traceback); - Wait('stop'); - }) - .error(function (data, status) { - ProcessErrors($scope, data, status, null, { hdr: 'Error!', - msg: 'Attempt to load job failed. GET returned status: ' + status }); - }); - }; - - $scope.jobSummary = function () { - $location.path('/jobs/' + id + '/job_host_summaries'); - }; - - $scope.jobEvents = function () { - $location.path('/jobs/' + id + '/job_events'); - }; -} - -JobsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'JobForm', 'JobTemplateForm', - 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit', - 'ReturnToCaller', 'ClearScope', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit', 'PromptPasswords', - 'GetBasePath', 'md5Setup', 'FormatDate', 'JobStatusToolTip', 'Wait', 'Empty', 'ParseVariableString' -]; diff --git a/awx/ui/static/js/controllers/Organizations.js b/awx/ui/static/js/controllers/Organizations.js index 9d8164ede3..b2d6ca3d80 100644 --- a/awx/ui/static/js/controllers/Organizations.js +++ b/awx/ui/static/js/controllers/Organizations.js @@ -1,12 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * Organizations.js - * - * Controller functions for Organization model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Organizations diff --git a/awx/ui/static/js/controllers/Permissions.js b/awx/ui/static/js/controllers/Permissions.js index c2425b55d9..95763c74bf 100644 --- a/awx/ui/static/js/controllers/Permissions.js +++ b/awx/ui/static/js/controllers/Permissions.js @@ -1,12 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * Permissions.js - * - * Controller functions for Permissions model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Permissions diff --git a/awx/ui/static/js/controllers/Portal.js b/awx/ui/static/js/controllers/Portal.js index 7e222b973d..d249008167 100644 --- a/awx/ui/static/js/controllers/Portal.js +++ b/awx/ui/static/js/controllers/Portal.js @@ -1,13 +1,8 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * Portal.js - * - * Controller functions for portal mode - * - */ - + * All Rights Reserved + *************************************************/ /** * @ngdoc function diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index 736637b010..a290291795 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -1,12 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * Projects.js - * - * Controller functions for the Projects model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Projects diff --git a/awx/ui/static/js/controllers/Schedules.js b/awx/ui/static/js/controllers/Schedules.js index f8a8fc9622..df73c19f51 100644 --- a/awx/ui/static/js/controllers/Schedules.js +++ b/awx/ui/static/js/controllers/Schedules.js @@ -1,12 +1,9 @@ - -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Schedules.js - * - * Controller functions for the Schedule model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Schedules @@ -98,4 +95,4 @@ GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, Get } ScheduleEditController.$inject = [ '$scope', '$compile', '$location', '$routeParams', 'SchedulesList', 'Rest', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', - 'GetBasePath', 'Wait', 'Breadcrumbs', 'Find', 'LoadDialogPartial', 'LoadSchedulesScope', 'GetChoices', 'Stream' ]; \ No newline at end of file + '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 d80dcae90f..5930b57014 100644 --- a/awx/ui/static/js/controllers/Sockets.js +++ b/awx/ui/static/js/controllers/Sockets.js @@ -1,10 +1,9 @@ -/************************************ -* Copyright (c) 2014 AnsibleWorks, Inc. -* -* Sockets.js -* SocketsController- simple test of socket connection -* -*/ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Sockets diff --git a/awx/ui/static/js/controllers/Survey.js.old.js b/awx/ui/static/js/controllers/Survey.js.old.js deleted file mode 100644 index 11a96a869b..0000000000 --- a/awx/ui/static/js/controllers/Survey.js.old.js +++ /dev/null @@ -1,1253 +0,0 @@ -// /************************************ -// * Copyright (c) 2014 AnsibleWorks, Inc. -// * -// * -// * SurveyMaker.js -// * -// * Controller functions for the survey maker -// * -// */ -// /** -// * @ngdoc function -// * @name controllers.function:SurveyMaker -// * @description This controller's for the survey maker page. -// * The survey maker interacts with the job template page, and the two go hand in hand. The scenarios are: -// * New job template - add new survey -// * New job template - edit new survey -// * Edit existing job template - add new survey -// * Edit Existing job template - edit existing survey -// * -// * Adding a new survey to any page takes the user to the Add New Survey page -// * Adding a new survey to a new job template saves the survey to session memory (navigating to survey maker forces us to save JT in memory temporarily) -// * Adding a new survey to an existing job template send the survey to the API -// * Editing an existing survey takes the user to the Edit Survey page -// * Editing a survey attached to a new job template saves the survey to session memory (saves the job template in session memory) -// * Editing a survey attached to an existing job template saves the survey to the API -// * -// * The variables in local memory are cleaned out whenever the user navigates to a page (other than the Survey Maker page) -// */ -// - -// function SurveyController($scope, $rootScope, $compile, $location, $log, $routeParams, SurveyMakerForm, -// GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, -// ReturnToCaller, Wait, SurveyQuestionForm, Store) { - - -// angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog', -// 'GeneratorHelpers']) - -// .factory('ShowSurveyModal', ['Wait', 'CreateDialog', 'Empty', '$compile' , -// function(Wait, CreateDialog, Empty, $compile) { -// return function(params) { -// // Set modal dimensions based on viewport width - -// var scope = params.scope, -// callback = params.callback, -// mode = (params.mode) ? params.mode : "survey-maker", -// title = params.title, -// element, -// target = (mode==='survey-taker') ? 'password-modal' : "survey-modal-dialog", -// buttons = [{ -// "label": "Cancel", -// "onClick": function() { -// $(this).dialog('close'); -// }, -// "icon": "fa-times", -// "class": "btn btn-default", -// "id": "survey-close-button" -// },{ -// "label": (mode==='survey-taker') ? "Launch" : "Save" , -// "onClick": function() { -// setTimeout(function(){ -// scope.$apply(function(){ -// if(mode==='survey-taker'){ -// scope.$emit('SurveyTakerCompleted'); -// } else{ -// scope.saveSurvey(); -// } -// }); -// }); -// }, -// "icon": (mode==='survey-taker') ? "fa-rocket" : "fa-check", -// "class": "btn btn-primary", -// "id": "survey-save-button" -// }]; - -// CreateDialog({ -// id: target, -// title: title, -// scope: scope, -// buttons: buttons, -// width: 700, -// height: 725, -// minWidth: 400, -// onClose: function() { -// $('#'+target).empty(); -// }, -// onOpen: function() { -// Wait('stop'); -// if(mode!=="survey-taker"){ -// $('#survey-save-button').attr('ng-disabled', "survey_questions.length<1 "); -// element = angular.element(document.getElementById('survey-save-button')); -// $compile(element)(scope); - -// } -// if(mode==="survey-taker"){ -// $('#survey-save-button').attr('ng-disabled', "survey_taker_form.$invalid"); -// element = angular.element(document.getElementById('survey-save-button')); -// $compile(element)(scope); - -// } - -// }, -// callback: callback -// }); -// }; -// }]) - -// .factory('EditSurvey', ['$routeParams','SchedulerInit', 'ShowSurveyModal', 'Wait', 'Rest', 'ProcessErrors', 'GetBasePath', 'GenerateForm', 'SurveyMakerForm', -// 'Empty', 'AddSurvey', -// function($routeParams, SchedulerInit, ShowSurveyModal, Wait, Rest, ProcessErrors, GetBasePath, GenerateForm,SurveyMakerForm, -// Empty, AddSurvey) { -// return function(params) { -// var scope = params.scope, -// id = params.id, -// // callback = params.callback, -// tempSurv = {}, -// generator = GenerateForm, -// form = SurveyMakerForm, -// // labels={ -// // "type": "Type", -// // "question_name": "Question Text", -// // "question_description": "Question Description", -// // "variable": "Answer Varaible Name", -// // "choices": "Choices", -// // "min": "Min", -// // "max": "Max", -// // "required": "Required", -// // "default": "Default Answer" -// // }, -// url = GetBasePath('job_templates') + id + '/survey_spec/', i; - -// if (scope.removeDialogReady) { -// scope.removeDialogReady(); -// } -// scope.removeDialogReady = scope.$on('DialogReady', function() { -// $('#survey-modal-dialog').dialog('open'); -// }); - - -// Wait('start'); -// if(scope.mode === 'add'){ -// tempSurv.survey_name = scope.survey_name; -// tempSurv.survey_description = scope.survey_description; -// generator.inject(form, { id: 'survey-modal-dialog' , mode: 'edit', related: false, scope: scope, breadCrumbs: false }); - -// ShowSurveyModal({ title: "Edit Survey", scope: scope, callback: 'DialogReady' }); - -// scope.survey_name = tempSurv.survey_name; -// scope.survey_description = tempSurv.survey_description; -// // scope.survey_questions = data.spec; -// for(i=0; i0){ -// // $('#survey-save-button').removeAttr('disabled') -// // } - -// question.index = index; - -// if(!$('#question_'+question.index+':eq(0)').is('div')){ -// html+='
'; -// $('#finalized_questions').append(html); -// } - -// required = (question.required===true) ? "prepend-asterisk" : ""; -// html = '
'+question.question_name+'
\n'; -// if(!Empty(question.question_description)){ -// html += '
'+question.question_description+'
\n'; -// } -// defaultValue = (question.default) ? question.default : ""; - -// if(question.type === 'text' ){ -// html+='
'+ -// '
'+ -// ''+ -// '
'; -// } -// if(question.type === "textarea"){ -// html+='
'+ -// '
'+ -// ''+ -// '
'; -// } -// if(question.type === 'multiplechoice' || question.type === "multiselect"){ -// choices = question.choices.split(/\n/); -// element = (question.type==="multiselect") ? "checkbox" : 'radio'; - -// for( i = 0; i'+ -// '' +choices[i]+ -// ''; -// } - -// } -// if(question.type === 'integer' || question.type === "float"){ -// min = (question.min) ? question.min : ""; -// max = (question.max) ? question.max : "" ; -// numberValidation = (question.type==="integer") ? "integer" : 'float'; -// html+='
'+ -// '
'+ -// ''+ -// '
'; - -// } -// html += '
'; -// html += ' '; -// html += ' '; -// html += ' '; -// html += ' '; -// html+='
'; - -// $('#question_'+question.index).append(html); - -// element = angular.element(document.getElementById('question_'+question.index)); -// // element.html(html); -// element.css('opacity', 0.7); -// $compile(element)(scope); -// // var questionScope = scope.$new; - -// $('#add_question_btn').show(); -// $('#add_question_btn').removeAttr('disabled'); -// $('#add_question_btn').focus(); -// $('#survey_maker_save_btn').removeAttr('disabled'); - -// $('#delete-question_'+question.index+'').on('click', function($event){ -// scope.deleteQuestion($event.target.parentElement.parentElement.parentElement.id.split('_')[1]); -// }); -// $('#edit-question_'+question.index+'').on('click', function($event){ -// scope.editQuestion($event.target.parentElement.parentElement.parentElement.id.split('_')[1]); -// }); -// $('#question-up_'+question.index+'').on('click', function($event){ -// scope.questionUp($event.target.parentElement.parentElement.parentElement.id.split('_')[1]); -// }); -// $('#question-down_'+question.index+'').on('click', function($event){ -// scope.questionDown($event.target.parentElement.parentElement.parentElement.id.split('_')[1]); -// }); -// }; -// }]) - -// .factory('SurveyTakerQuestion', ['GetBasePath','Rest', 'Wait', 'ProcessErrors', '$compile', 'Empty', -// function(GetBasePath, Rest, Wait, ProcessErrors, $compile, Empty) { -// return function(params) { - -// var scope = params.scope, -// // id = params.id, -// question = params.question, -// index = params.index, -// requiredAsterisk, -// requiredClasses, -// element, choices, i, checked, -// max, min, defaultValue, numberValidation - -// html = ""; - -// // if(scope.survey_questions.length>0){ -// // $('#survey-save-button').removeAttr('disabled') -// // } - -// question.index = index; -// question[question.variable] = question.default; -// scope[question.variable] = question.default; - - -// if(!$('#question_'+question.index+':eq(0)').is('div')){ -// html+='
'; -// $('#survey_taker_finalized_questions').append(html); -// } - -// requiredAsterisk = (question.required===true) ? "prepend-asterisk" : ""; -// requiredClasses = (question.required===true) ? "ng-pristine ng-invalid-required ng-invalid" : ""; - -// html = '
'+question.question_name+'
\n'; -// if(!Empty(question.question_description)){ -// html += '
'+question.question_description+'
\n'; -// } -// defaultValue = (question.default) ? question.default : ""; - -// if(question.type === 'text' ){ -// html+='
'+ -// '
'+ -// ''+ -// '
'; -// } -// if(question.type === "textarea"){ -// html+='
'+ -// '
'+ -// ''+ -// '
'; -// } -// if(question.type === 'multiplechoice' || question.type === "multiselect"){ -// choices = question.choices.split(/\n/); -// element = (question.type==="multiselect") ? "checkbox" : 'radio'; - -// for( i = 0; i'+ -// '' +choices[i]+ -// ''; -// } - -// } -// if(question.type === 'integer' || question.type === "float"){ -// min = (question.min) ? question.min : ""; -// max = (question.max) ? question.max : "" ; -// numberValidation = (question.type==="integer") ? "integer" : 'float'; -// html+='
'+ -// '
'+ -// ''+ -// '
'; - -// } -// $('#question_'+question.index).append(html); - -// element = angular.element(document.getElementById('question_'+question.index)); -// $compile(element)(scope); - -// }; -// }]) - -// .factory('EditQuestion', ['GetBasePath','Rest', 'Wait', 'ProcessErrors', '$compile', 'GenerateForm', 'SurveyQuestionForm', -// function(GetBasePath, Rest, Wait, ProcessErrors, $compile, GenerateForm, SurveyQuestionForm) { -// return function(params) { - -// var scope = params.scope, -// index = params.index, -// element, fld, i, -// form = SurveyQuestionForm; - -// $('#add_question_btn').hide(); -// $('#new_question .aw-form-well').remove(); -// element = $('.question_final:eq('+index+')'); -// element.css('opacity', 1.0); -// element.empty(); -// // $('#new_question .aw-form-well').remove(); -// GenerateForm.inject(form, { id: 'question_'+index, mode: 'edit' , scope:scope, breadCrumbs: false}); -// for(fld in form.fields){ -// if( fld === 'answer_options_number'){ -// $('#answer_min').val(scope.survey_questions[index].min); -// $('#answer_max').val(scope.survey_questions[index].max); -// } -// if( fld === 'default_int' || fld === 'default_float'){ -// $("#"+fld ).val(scope.survey_questions[index].default); -// } -// if(form.fields[fld].type === 'select'){ -// for (i = 0; i < scope.answer_types.length; i++) { -// if (scope.survey_questions[index][fld] === scope.answer_types[i].type) { -// scope[fld] = scope.answer_types[i]; -// } -// } -// } else { -// scope[fld] = scope.survey_questions[index][fld]; -// } -// } -// }; -// }]) - -// .factory('DeleteQuestion' , -// function() { -// return function(params) { - -// var scope = params.scope, -// index = params.index, -// element; - -// element = $('.question_final:eq('+index+')'); -// element.remove(); -// scope.survey_questions.splice(index, 1); -// scope.reorder(); -// if(scope.survey_questions.length<1){ -// $('#survey-save-button').attr('disabled', 'disabled'); -// } -// }; -// }) - -// .factory('SurveyControllerInit', ['$location', 'DeleteSurvey', 'EditSurvey', 'AddSurvey', 'GenerateForm', 'SurveyQuestionForm', 'Wait', 'Alert', -// 'GetBasePath', 'Rest', 'ProcessErrors' , '$compile', 'FinalizeQuestion', 'EditQuestion', 'DeleteQuestion', 'SurveyTakerQuestion', -// function($location, DeleteSurvey, EditSurvey, AddSurvey, GenerateForm, SurveyQuestionForm, Wait, Alert, -// GetBasePath, Rest, ProcessErrors, $compile, FinalizeQuestion, EditQuestion, DeleteQuestion, SurveyTakerQuestion) { -// return function(params) { -// var scope = params.scope, -// id = params.id, -// i, url; - -// scope.survey_questions = []; -// scope.answer_types=[ -// {name: 'Text' , type: 'text'}, -// {name: 'Textarea', type: 'textarea'}, -// {name: 'Multiple Choice (single select)', type: 'multiplechoice'}, -// {name: 'Multiple Choice (multiple select)', type: 'multiselect'}, -// {name: 'Integer', type: 'integer'}, -// {name: 'Float', type: 'float'} -// ]; - -// scope.deleteSurvey = function() { -// DeleteSurvey({ -// scope: scope, -// id: id, -// // callback: 'SchedulesRefresh' -// }); -// }; - -// scope.editSurvey = function() { -// EditSurvey({ -// scope: scope, -// id: id, -// // callback: 'SchedulesRefresh' -// }); -// }; - -// scope.addSurvey = function() { -// AddSurvey({ -// scope: scope, -// // callback: 'SchedulesRefresh' -// }); -// }; -// scope.addQuestion = function(){ -// GenerateForm.inject(SurveyQuestionForm, { id:'new_question', mode: 'add' , scope:scope, breadCrumbs: false}); -// scope.required = true; //set the required checkbox to true via the ngmodel attached to scope.required. - -// }; - -// scope.addNewQuestion = function(){ -// // $('#add_question_btn').on("click" , function(){ -// scope.addQuestion(); -// $('#survey_question_question_name').focus(); -// $('#add_question_btn').attr('disabled', 'disabled'); -// $('#add_question_btn').hide(); -// // }); -// }; -// scope.editQuestion = function(index){ -// EditQuestion({ -// index: index, -// scope: scope -// }); -// }; - -// scope.deleteQuestion = function(index){ -// DeleteQuestion({ -// index:index, -// scope: scope -// }); -// }; - -// scope.questionUp = function(index){ -// var animating = false, -// clickedDiv = $('#question_'+index), -// prevDiv = clickedDiv.prev(), -// distance = clickedDiv.outerHeight(); - -// if (animating) { -// return; -// } - -// if (prevDiv.length) { -// animating = true; -// $.when(clickedDiv.animate({ -// top: -distance -// }, 600), -// prevDiv.animate({ -// top: distance -// }, 600)).done(function () { -// prevDiv.css('top', '0px'); -// clickedDiv.css('top', '0px'); -// clickedDiv.insertBefore(prevDiv); -// animating = false; -// i = scope.survey_questions[index]; -// scope.survey_questions[index] = scope.survey_questions[index-1]; -// scope.survey_questions[index-1] = i; -// scope.reorder(); -// }); -// } -// }; - -// scope.questionDown = function(index){ -// var clickedDiv = $('#question_'+index), -// nextDiv = clickedDiv.next(), -// distance = clickedDiv.outerHeight(), -// animating = false; - -// if (animating) { -// return; -// } - -// if (nextDiv.length) { -// animating = true; -// $.when(clickedDiv.animate({ -// top: distance -// }, 600), -// nextDiv.animate({ -// top: -distance -// }, 600)).done(function () { -// nextDiv.css('top', '0px'); -// clickedDiv.css('top', '0px'); -// nextDiv.insertBefore(clickedDiv); -// animating = false; -// i = scope.survey_questions[index]; -// scope.survey_questions[index] = scope.survey_questions[Number(index)+1]; -// scope.survey_questions[Number(index)+1] = i; -// scope.reorder(); -// }); -// } -// }; - -// scope.reorder = function(){ -// for(i=0; i'+data[key]+'\n'; -// // } - -// // html+=''; - -// // $('#finalized_questions').before(html); -// // $('#add_question_btn').show(); -// // $('#add_question_btn').removeAttr('disabled'); -// // $('#survey_maker_save_btn').removeAttr('disabled'); -// // }; - -// // $('#add_question_btn').on("click" , function(){ -// // $scope.addQuestion(); -// // $('#add_question_btn').attr('disabled', 'disabled'); -// // }); - -// // $scope.submitQuestion = function(){ -// // var form = SurveyQuestionForm, -// // data = {}, -// // labels={}, -// // min= "min", -// // max = "max", -// // fld; -// // //generator.clearApiErrors(); -// // Wait('start'); - -// // try { -// // for (fld in form.fields) { -// // if($scope[fld]){ -// // if(fld === "type"){ -// // data[fld] = $scope[fld].type; -// // if($scope[fld].type==="integer" || $scope[fld].type==="float"){ -// // data[min] = $('#answer_min').val(); -// // data[max] = $('#answer_max').val(); -// // labels[min]= "Min"; -// // labels[max]= "Max"; -// // } -// // } -// // else{ -// // data[fld] = $scope[fld]; -// // } -// // labels[fld] = form.fields[fld].label; -// // } -// // } -// // Wait('stop'); -// // $scope.survey_questions.push(data); -// // $('#new_question .aw-form-well').remove(); -// // // for(fld in form.fields){ -// // // $scope[fld] = ''; -// // // } -// // $scope.finalizeQuestion(data , labels); - -// // } catch (err) { -// // Wait('stop'); -// // Alert("Error", "Error parsing extra variables. Parser returned: " + err); -// // } -// // }; - -// // $scope.formSave = function () { -// // generator.clearApiErrors(); -// // Wait('start'); -// // var url; -// // if(!$scope.Store("survey_for_new_job_template") && $scope.Store("survey_for_new_job_template")!==false){ -// // $scope.Store('survey_for_new_job_template', { -// // // survey_created: true, -// // name: $scope.survey_name, -// // description: $scope.survey_description, -// // spec:$scope.survey_questions -// // }); -// // Wait('stop'); -// // $location.path("/job_templates/add/"); -// // } -// // else { -// // url = GetBasePath(base)+ id + '/survey_spec/'; - -// // Rest.setUrl(url); -// // Rest.post({ name: $scope.survey_name, description: $scope.survey_description, spec:$scope.survey_questions }) -// // .success(function () { -// // Wait('stop'); -// // $location.path("/job_templates/"+id); -// // }) -// // .error(function (data, status) { -// // ProcessErrors($scope, data, status, form, { hdr: 'Error!', -// // msg: 'Failed to add new survey. Post returned status: ' + status }); -// // }); -// // } -// // }; - -// // // Save -// // $scope.formSave = function () { -// // generator.clearApiErrors(); -// // Wait('start'); -// // if($scope.Store("saved_job_template_for_survey")){ -// // $scope.Store('survey_for_new_job_template', { -// // // survey_created: true, -// // name: $scope.survey_name, -// // description: $scope.survey_description, -// // spec:$scope.survey_questions -// // }); -// // Wait('stop'); -// // $location.path("/job_templates/add/"); -// // } -// // else{ -// // var url = GetBasePath(base)+ id + '/survey_spec/'; -// // Rest.setUrl(url); -// // Rest.post({ name: $scope.survey_name, description: $scope.survey_description, spec:$scope.survey_questions }) -// // .success(function () { -// // Wait('stop'); -// // $location.path("/job_templates/"+id); -// // }) -// // .error(function (data, status) { -// // ProcessErrors($scope, data, status, form, { hdr: 'Error!', -// // msg: 'Failed to add new survey. Post returned status: ' + status }); -// // }); -// // } - -// // }; - -// // // Cancel -// // $scope.formReset = function () { -// // $rootScope.flashMessage = null; -// // generator.reset(); -// // }; -// // } - -// // SurveyMakerAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'SurveyMakerForm', -// // 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ClearScope', 'GetBasePath', 'ReturnToCaller', 'Wait', 'SurveyQuestionForm', 'Store' -// // ]; - -// // function SurveyMakerEdit($scope, $rootScope, $compile, $location, $log, $routeParams, SurveyMakerForm, -// // GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, -// // ReturnToCaller, Wait, SurveyQuestionForm, Store) { - -// // ClearScope(); - -// // // Inject dynamic view -// // var generator = GenerateForm, -// // form = SurveyMakerForm, -// // base = $location.path().replace(/^\//, '').split('/')[0], -// // id = $location.path().replace(/^\//, '').split('/')[1], -// // i, data; - -// // $scope.survey_questions=[]; - -// // $scope.answer_types=[ -// // {name: 'Text' , type: 'text'}, -// // {name: 'Textarea', type: 'textarea'}, -// // {name: 'Multiple Choice (single select)', type: 'multiplechoice'}, -// // {name: 'Multiple Choice (multiple select)', type: 'multiselect'}, -// // {name: 'JSON', type: 'json'}, -// // {name: 'Integer', type: 'integer'}, -// // {name: 'Float', type: 'number'} -// // ]; - -// // $scope.Store = Store; - -// // generator.inject(form, { mode: 'edit', related: false, scope: $scope}); -// // generator.reset(); -// // // LoadBreadCrumbs(); -// // // LoadBreadCrumbs({ -// // // path: '/job_templates/' + id + '/survey', -// // // title: 'jared rocks', // $scope.job_id + ' - ', //+ data.summary_fields.job_template.name, -// // // altPath: '/job_templates/' + id + '/survey', -// // // }); - -// // $scope.addQuestion = function(){ - -// // GenerateForm.inject(SurveyQuestionForm, {mode:'add', id:'new_question', scope:$scope, breadCrumbs: false}); -// // }; -// // // $scope.addQuestion(); - -// // // $('#question_shadow').mouseenter(function(){ -// // // $('#question_shadow').css({ -// // // "opacity": "1", -// // // "border": "1px solid", -// // // "border-color": "rgb(204,204,204)", -// // // "border-radius": "4px" -// // // }); -// // // $('#question_add_btn').show(); -// // // }); - -// // // $('#question_shadow').mouseleave(function(){ -// // // $('#question_shadow').css({ -// // // "opacity": ".4", -// // // "border": "1px dashed", -// // // "border-color": "rgb(204,204,204)", -// // // "border-radius": "4px" -// // // }); -// // // $('#question_add_btn').hide(); -// // // }) - - -// // // $('#question_shadow').on("click" , function(){ -// // // // var survey_width = $('#survey_maker_question_area').width()-10, -// // // // html = ""; - -// // // // $('#add_question_btn').attr('disabled', 'disabled') -// // // // $('#survey_maker_question_area').append(html); -// // // addQuestion(); -// // // $('#question_shadow').hide(); -// // // $('#question_shadow').css({ -// // // "opacity": ".4", -// // // "border": "1px dashed", -// // // "border-color": "rgb(204,204,204)", -// // // "border-radius": "4px" -// // // }); -// // // }); -// // $scope.finalizeQuestion= function(data){ -// // var key, -// // labels={ -// // "type": "Type", -// // "question_name": "Question Text", -// // "question_description": "Question Description", -// // "variable": "Answer Varaible Name", -// // "choices": "Choices", -// // "min": "Min", -// // "max": "Max", -// // "required": "Required", -// // "default": "Default Answer" -// // }, -// // html = '
'; - -// // for (key in data) { -// // html+='
'+data[key]+'
\n'; -// // } - -// // html+='
'; - -// // $('#finalized_questions').before(html); -// // $('#add_question_btn').show(); -// // $('#add_question_btn').removeAttr('disabled'); -// // $('#survey_maker_save_btn').removeAttr('disabled'); -// // }; - -// // $('#add_question_btn').on("click" , function(){ -// // $scope.addQuestion(); -// // $('#add_question_btn').attr('disabled', 'disabled'); -// // }); - -// // Wait('start'); - -// // if($scope.Store("saved_job_template_for_survey") && $scope.Store("saved_job_template_for_survey").editing_survey===true){ -// // data = $scope.Store("survey_for_new_job_template"); -// // $scope.survey_name = data.name; -// // $scope.survey_description = data.description; -// // $scope.survey_questions = data.spec; -// // for(i=0; i<$scope.survey_questions.length; i++){ -// // $scope.finalizeQuestion($scope.survey_questions[i]); -// // } -// // Wait('stop'); -// // } -// // else{ -// // Rest.setUrl(GetBasePath(base)+ id + '/survey_spec/'); -// // Rest.get() -// // .success(function (data) { -// // var i; -// // $scope.survey_name = data.name; -// // $scope.survey_description = data.description; -// // $scope.survey_questions = data.spec; -// // for(i=0; i<$scope.survey_questions.length; i++){ -// // $scope.finalizeQuestion($scope.survey_questions[i]); -// // } -// // Wait('stop'); -// // // LoadBreadCrumbs({ path: '/organizations/' + id, title: data.name }); -// // // for (fld in form.fields) { -// // // if (data[fld]) { -// // // $scope[fld] = data[fld]; -// // // master[fld] = data[fld]; -// // // } -// // // } - -// // // related = data.related; -// // // for (set in form.related) { -// // // if (related[set]) { -// // // relatedSets[set] = { -// // // url: related[set], -// // // iterator: form.related[set].iterator -// // // }; -// // // } -// // // } - -// // // Initialize related search functions. Doing it here to make sure relatedSets object is populated. -// // // RelatedSearchInit({ scope: $scope, form: form, relatedSets: relatedSets }); -// // // RelatedPaginateInit({ scope: $scope, relatedSets: relatedSets }); -// // // $scope.$emit('organizationLoaded'); -// // }) -// // .error(function (data, status) { -// // ProcessErrors($scope, data, status, form, { hdr: 'Error!', -// // msg: 'Failed to retrieve organization: ' + $routeParams.id + '. GET status: ' + status }); -// // }); -// // } -// // $scope.submitQuestion = function(){ -// // var form = SurveyQuestionForm, -// // data = {}, -// // labels={}, -// // min= "min", -// // max = "max", -// // fld; -// // //generator.clearApiErrors(); -// // Wait('start'); - -// // try { -// // for (fld in form.fields) { -// // if($scope[fld]){ -// // if(fld === "type"){ -// // data[fld] = $scope[fld].type; -// // if($scope[fld].type==="integer" || $scope[fld].type==="float"){ -// // data[min] = $('#answer_min').val(); -// // data[max] = $('#answer_max').val(); -// // labels[min]= "Min"; -// // labels[max]= "Max"; -// // } -// // } -// // else{ -// // data[fld] = $scope[fld]; -// // } -// // labels[fld] = form.fields[fld].label; -// // } -// // } -// // Wait('stop'); -// // $scope.survey_questions.push(data); -// // $('#new_question .aw-form-well').remove(); -// // // for(fld in form.fields){ -// // // $scope[fld] = ''; -// // // } -// // $scope.finalizeQuestion(data , labels); - -// // } catch (err) { -// // Wait('stop'); -// // Alert("Error", "Error parsing extra variables. Parser returned: " + err); -// // } -// // }; -// // // Save -// // $scope.formSave = function () { -// // generator.clearApiErrors(); -// // Wait('start'); -// // var url; -// // if($scope.Store("survey_for_new_job_template") && $scope.Store("survey_for_new_job_template")!==false){ -// // $scope.Store('survey_for_new_job_template', { -// // // survey_created: true, -// // name: $scope.survey_name, -// // description: $scope.survey_description, -// // spec:$scope.survey_questions -// // }); -// // Wait('stop'); -// // $location.path("/job_templates/add/"); -// // } -// // else { -// // url = GetBasePath(base)+ id + '/survey_spec/'; - -// // Rest.setUrl(url); -// // Rest.post({ name: $scope.survey_name, description: $scope.survey_description, spec:$scope.survey_questions }) -// // .success(function () { -// // Wait('stop'); -// // $location.path("/job_templates/"+id); -// // }) -// // .error(function (data, status) { -// // ProcessErrors($scope, data, status, form, { hdr: 'Error!', -// // msg: 'Failed to add new survey. Post returned status: ' + status }); -// // }); -// // } -// // }; - -// // // Cancel -// // $scope.formReset = function () { -// // $rootScope.flashMessage = null; -// // generator.reset(); -// // }; -// // } diff --git a/awx/ui/static/js/controllers/Teams.js b/awx/ui/static/js/controllers/Teams.js index ec63530016..cd60103dbe 100644 --- a/awx/ui/static/js/controllers/Teams.js +++ b/awx/ui/static/js/controllers/Teams.js @@ -1,12 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - * Teams.js - * - * Controller functions for the Team model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Teams diff --git a/awx/ui/static/js/controllers/Users.js b/awx/ui/static/js/controllers/Users.js index c1a7eb32fb..b2b9794378 100644 --- a/awx/ui/static/js/controllers/Users.js +++ b/awx/ui/static/js/controllers/Users.js @@ -1,11 +1,9 @@ -/******************************************** - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Users.js - * - * Controller functions for User model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name controllers.function:Users diff --git a/awx/ui/static/js/dashboard/graphs/graph-helpers/adjust-graph-size.service.js b/awx/ui/static/js/dashboard/graphs/graph-helpers/adjust-graph-size.service.js index 97d6803219..4eb3f916dd 100644 --- a/awx/ui/static/js/dashboard/graphs/graph-helpers/adjust-graph-size.service.js +++ b/awx/ui/static/js/dashboard/graphs/graph-helpers/adjust-graph-size.service.js @@ -1,3 +1,10 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + export default function() { diff --git a/awx/ui/static/js/dashboard/graphs/graph-helpers/auto-size.directive.js b/awx/ui/static/js/dashboard/graphs/graph-helpers/auto-size.directive.js index fa7e7424bc..3c6657e5bd 100644 --- a/awx/ui/static/js/dashboard/graphs/graph-helpers/auto-size.directive.js +++ b/awx/ui/static/js/dashboard/graphs/graph-helpers/auto-size.directive.js @@ -1,4 +1,10 @@ -export default +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + export default [ '$window', AutoSizeModule ]; diff --git a/awx/ui/static/js/dashboard/graphs/host-status/host-status-graph.directive.js b/awx/ui/static/js/dashboard/graphs/host-status/host-status-graph.directive.js index 1c467d2d9b..34a3d65fb0 100644 --- a/awx/ui/static/js/dashboard/graphs/host-status/host-status-graph.directive.js +++ b/awx/ui/static/js/dashboard/graphs/host-status/host-status-graph.directive.js @@ -1,4 +1,10 @@ -export default +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + export default [ '$compile', '$window', 'adjustGraphSize', diff --git a/awx/ui/static/js/dashboard/graphs/job-status/job-status-graph.directive.js b/awx/ui/static/js/dashboard/graphs/job-status/job-status-graph.directive.js index 3b5fe958c0..1d233ab42f 100644 --- a/awx/ui/static/js/dashboard/graphs/job-status/job-status-graph.directive.js +++ b/awx/ui/static/js/dashboard/graphs/job-status/job-status-graph.directive.js @@ -1,4 +1,10 @@ -export default +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + export default [ '$rootScope', '$compile', '$location' , diff --git a/awx/ui/static/js/dashboard/graphs/job-status/job-status-graph.service.js b/awx/ui/static/js/dashboard/graphs/job-status/job-status-graph.service.js index 85152f2825..4f659a511b 100644 --- a/awx/ui/static/js/dashboard/graphs/job-status/job-status-graph.service.js +++ b/awx/ui/static/js/dashboard/graphs/job-status/job-status-graph.service.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default ["Rest", "GetBasePath", diff --git a/awx/ui/static/js/debug.js b/awx/ui/static/js/debug.js index 66333d35b9..81c5624587 100644 --- a/awx/ui/static/js/debug.js +++ b/awx/ui/static/js/debug.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /********************************************* * @ngdoc function * @name __deferLoadIfEnabled diff --git a/awx/ui/static/js/docs.js b/awx/ui/static/js/docs.js index 6011068888..d851933707 100644 --- a/awx/ui/static/js/docs.js +++ b/awx/ui/static/js/docs.js @@ -1,2 +1,8 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import 'tower/shared/multi-select-list/main.js'; import 'tower/shared/route-extensions/main.js'; diff --git a/awx/ui/static/js/filters.js b/awx/ui/static/js/filters.js index 676295312d..1f9fd75fd6 100644 --- a/awx/ui/static/js/filters.js +++ b/awx/ui/static/js/filters.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import sanitizeFilter from 'tower/shared/xss-sanitizer.filter'; import capitalizeFilter from 'tower/shared/capitalize.filter'; import longDateFilter from 'tower/shared/long-date.filter'; diff --git a/awx/ui/static/js/forms.js b/awx/ui/static/js/forms.js index 7caad49713..031b77e5a4 100644 --- a/awx/ui/static/js/forms.js +++ b/awx/ui/static/js/forms.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import ActivityDetail from "tower/forms/ActivityDetail"; import Credentials from "tower/forms/Credentials"; import Adhoc from "tower/forms/Adhoc"; diff --git a/awx/ui/static/js/forms/ActivityDetail.js b/awx/ui/static/js/forms/ActivityDetail.js index 140fd389d9..87abcc629d 100644 --- a/awx/ui/static/js/forms/ActivityDetail.js +++ b/awx/ui/static/js/forms/ActivityDetail.js @@ -1,10 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * ActivityDetail.js - * Form definition for Activity Stream detail - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc overview * @name forms diff --git a/awx/ui/static/js/forms/Adhoc.js b/awx/ui/static/js/forms/Adhoc.js index c64c90536a..3c4a5e1745 100644 --- a/awx/ui/static/js/forms/Adhoc.js +++ b/awx/ui/static/js/forms/Adhoc.js @@ -1,10 +1,9 @@ -/********************************************* - * Copyright (c) 2015 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Adhoc.js - * Form definition for the Adhoc model. - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Adhoc diff --git a/awx/ui/static/js/forms/Credentials.js b/awx/ui/static/js/forms/Credentials.js index fe2e7ada65..15a33fc65d 100644 --- a/awx/ui/static/js/forms/Credentials.js +++ b/awx/ui/static/js/forms/Credentials.js @@ -1,10 +1,9 @@ -/********************************************* - * Copyright (c) 2015 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Credentials.js - * Form definition for Credential model - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Credentials diff --git a/awx/ui/static/js/forms/CustomInventory.js b/awx/ui/static/js/forms/CustomInventory.js index df9aaf9f23..4a69431954 100644 --- a/awx/ui/static/js/forms/CustomInventory.js +++ b/awx/ui/static/js/forms/CustomInventory.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Organization.js - * Form definition for Organization model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:CustomInventory diff --git a/awx/ui/static/js/forms/EventsViewer.js b/awx/ui/static/js/forms/EventsViewer.js index 7755397b84..5f153d9f9f 100644 --- a/awx/ui/static/js/forms/EventsViewer.js +++ b/awx/ui/static/js/forms/EventsViewer.js @@ -1,9 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobEventsForm.js - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:EventsViewer diff --git a/awx/ui/static/js/forms/Groups.js b/awx/ui/static/js/forms/Groups.js index 7473123296..f749815e2e 100644 --- a/awx/ui/static/js/forms/Groups.js +++ b/awx/ui/static/js/forms/Groups.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Groups.js - * Form definition for Group model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Groups diff --git a/awx/ui/static/js/forms/HostGroups.js b/awx/ui/static/js/forms/HostGroups.js index 09529c5c8c..3418726c34 100644 --- a/awx/ui/static/js/forms/HostGroups.js +++ b/awx/ui/static/js/forms/HostGroups.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * HostGroups.js - * Form definition for Host model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:HostGroups @@ -56,4 +54,3 @@ export default related: { } }); //UserForm - diff --git a/awx/ui/static/js/forms/Hosts.js b/awx/ui/static/js/forms/Hosts.js index 4158978420..15bc3d875c 100644 --- a/awx/ui/static/js/forms/Hosts.js +++ b/awx/ui/static/js/forms/Hosts.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Hosts.js - * Form definition for Host model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Hosts diff --git a/awx/ui/static/js/forms/Inventories.js b/awx/ui/static/js/forms/Inventories.js index bc0e957df9..35b685b402 100644 --- a/awx/ui/static/js/forms/Inventories.js +++ b/awx/ui/static/js/forms/Inventories.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Inventories.js - * Form definition for User model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Inventories diff --git a/awx/ui/static/js/forms/InventoryStatus.js b/awx/ui/static/js/forms/InventoryStatus.js index cbd9263bea..a8937db74b 100644 --- a/awx/ui/static/js/forms/InventoryStatus.js +++ b/awx/ui/static/js/forms/InventoryStatus.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * InventoryStatus.js - * - * Use to show inventory sync status - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:InventoryStatus diff --git a/awx/ui/static/js/forms/JobEventData.js b/awx/ui/static/js/forms/JobEventData.js index b396d4be8c..221eeca1d8 100644 --- a/awx/ui/static/js/forms/JobEventData.js +++ b/awx/ui/static/js/forms/JobEventData.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobEventData.js - * Form definition for Job Events -JSON view - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:JobEventData diff --git a/awx/ui/static/js/forms/JobSummary.js b/awx/ui/static/js/forms/JobSummary.js index b40424deaf..c211d8de34 100644 --- a/awx/ui/static/js/forms/JobSummary.js +++ b/awx/ui/static/js/forms/JobSummary.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobSummary.js - * - * Display job status info in a dialog - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:JobSummary diff --git a/awx/ui/static/js/forms/JobTemplates.js b/awx/ui/static/js/forms/JobTemplates.js index 62b72f7617..0d89949602 100644 --- a/awx/ui/static/js/forms/JobTemplates.js +++ b/awx/ui/static/js/forms/JobTemplates.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobTemplates.js - * Form definition for Job Template model - * - * To get the JobTemplateForm object: JobTemplateForm(); - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:JobTemplate diff --git a/awx/ui/static/js/forms/JobVarsPrompt.js b/awx/ui/static/js/forms/JobVarsPrompt.js index cd35b228d7..a7fe5d673f 100644 --- a/awx/ui/static/js/forms/JobVarsPrompt.js +++ b/awx/ui/static/js/forms/JobVarsPrompt.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobVarsPrompt.js - * - * Form definition used during job submission to prompt for extra vars - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:JobVarsPrompt diff --git a/awx/ui/static/js/forms/Jobs.js b/awx/ui/static/js/forms/Jobs.js index 576599786f..0a19dc13de 100644 --- a/awx/ui/static/js/forms/Jobs.js +++ b/awx/ui/static/js/forms/Jobs.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Jobs.js - * Form definition for Jobs model - * - * @dict - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Jobs diff --git a/awx/ui/static/js/forms/LicenseForm.js b/awx/ui/static/js/forms/LicenseForm.js index 5859dbe189..80b1f07e7b 100644 --- a/awx/ui/static/js/forms/LicenseForm.js +++ b/awx/ui/static/js/forms/LicenseForm.js @@ -1,10 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * LicenseForm.js - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:LicenseForm diff --git a/awx/ui/static/js/forms/LicenseUpdate.js b/awx/ui/static/js/forms/LicenseUpdate.js index 380869edc8..ea4e230fe2 100644 --- a/awx/ui/static/js/forms/LicenseUpdate.js +++ b/awx/ui/static/js/forms/LicenseUpdate.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * License.js - * Form definition for Organization model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:LicenseUpdate diff --git a/awx/ui/static/js/forms/LogViewerOptions.js b/awx/ui/static/js/forms/LogViewerOptions.js index d81fb5ae5f..d2f64c2752 100644 --- a/awx/ui/static/js/forms/LogViewerOptions.js +++ b/awx/ui/static/js/forms/LogViewerOptions.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * LogViewerOptions.js - * - * Form definition for LogViewer.js helper - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:LogViewerOptions diff --git a/awx/ui/static/js/forms/LogViewerStatus.js b/awx/ui/static/js/forms/LogViewerStatus.js index a1b25e1e72..098e0b6511 100644 --- a/awx/ui/static/js/forms/LogViewerStatus.js +++ b/awx/ui/static/js/forms/LogViewerStatus.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * LogViewerStatus.js - * - * Form definition for LogViewer.js helper - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:LogViewerStatus diff --git a/awx/ui/static/js/forms/Organizations.js b/awx/ui/static/js/forms/Organizations.js index a25ee330fa..948f23ed2c 100644 --- a/awx/ui/static/js/forms/Organizations.js +++ b/awx/ui/static/js/forms/Organizations.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Organization.js - * Form definition for Organization model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Organizations diff --git a/awx/ui/static/js/forms/Permissions.js b/awx/ui/static/js/forms/Permissions.js index a09c1ec1f8..3072366981 100644 --- a/awx/ui/static/js/forms/Permissions.js +++ b/awx/ui/static/js/forms/Permissions.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Permissions.js - * - * Form definition for Projects model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Permissions diff --git a/awx/ui/static/js/forms/ProjectStatus.js b/awx/ui/static/js/forms/ProjectStatus.js index 6a66fa3efb..44314b0233 100644 --- a/awx/ui/static/js/forms/ProjectStatus.js +++ b/awx/ui/static/js/forms/ProjectStatus.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * ProjectStatus.js - * Form definition for Project Status -JSON view - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:ProjectStatus diff --git a/awx/ui/static/js/forms/Projects.js b/awx/ui/static/js/forms/Projects.js index e56095bcf3..0ff2fa9b43 100644 --- a/awx/ui/static/js/forms/Projects.js +++ b/awx/ui/static/js/forms/Projects.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Projects.js - * - * Form definition for Projects model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Projects diff --git a/awx/ui/static/js/forms/Source.js b/awx/ui/static/js/forms/Source.js index 672dbf60c3..18e298f758 100644 --- a/awx/ui/static/js/forms/Source.js +++ b/awx/ui/static/js/forms/Source.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Groups.js - * Form definition for Group model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Source @@ -117,7 +115,7 @@ export default ngShow: "source && source.value === 'custom'", sourceModel: 'source_script', sourceField: 'name', - ngClick: 'lookUpSource_script()' , + ngClick: 'lookUpSource_script()' , addRequired: false, editRequired: false, ngRequired: "source && source.value === 'custom'", diff --git a/awx/ui/static/js/forms/SurveyMaker.js b/awx/ui/static/js/forms/SurveyMaker.js index be78dba0b1..3565d045c4 100644 --- a/awx/ui/static/js/forms/SurveyMaker.js +++ b/awx/ui/static/js/forms/SurveyMaker.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * SurveyMaker.js - * Form definition for survey maker model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:SurveyMaker diff --git a/awx/ui/static/js/forms/SurveyQuestion.js b/awx/ui/static/js/forms/SurveyQuestion.js index e6717897b0..523dff3a2a 100644 --- a/awx/ui/static/js/forms/SurveyQuestion.js +++ b/awx/ui/static/js/forms/SurveyQuestion.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Inventories.js - * Form definition for question model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Questions diff --git a/awx/ui/static/js/forms/Teams.js b/awx/ui/static/js/forms/Teams.js index 8783401631..7da930b9db 100644 --- a/awx/ui/static/js/forms/Teams.js +++ b/awx/ui/static/js/forms/Teams.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Teams.js - * - * Form definition for Team model - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Teams diff --git a/awx/ui/static/js/forms/Users.js b/awx/ui/static/js/forms/Users.js index 86793fd90e..b02b4c0071 100644 --- a/awx/ui/static/js/forms/Users.js +++ b/awx/ui/static/js/forms/Users.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Users.js - * Form definition for User model - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name forms.function:Users diff --git a/awx/ui/static/js/help.js b/awx/ui/static/js/help.js index 41c7acf81a..bf95a791eb 100644 --- a/awx/ui/static/js/help.js +++ b/awx/ui/static/js/help.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import "tower/help/ChromeSocketHelp"; import "tower/help/FirefoxSocketHelp"; import "tower/help/InventoryGroups"; diff --git a/awx/ui/static/js/help/ChromeSocketHelp.js b/awx/ui/static/js/help/ChromeSocketHelp.js index b9352694b6..d2ea6ef44a 100644 --- a/awx/ui/static/js/help/ChromeSocketHelp.js +++ b/awx/ui/static/js/help/ChromeSocketHelp.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * ChromeSocketHelp.js - * - * Help object for socket connection troubleshooting - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc overview diff --git a/awx/ui/static/js/help/FirefoxSocketHelp.js b/awx/ui/static/js/help/FirefoxSocketHelp.js index 425d2c7118..989bb2fb87 100644 --- a/awx/ui/static/js/help/FirefoxSocketHelp.js +++ b/awx/ui/static/js/help/FirefoxSocketHelp.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * FirefoxSocketHelp.js - * - * Help object for socket connection troubleshooting - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name help.function:FirefoxSocketHelp diff --git a/awx/ui/static/js/help/InventoryGroups.js b/awx/ui/static/js/help/InventoryGroups.js index fe3b0b7deb..1d6b185fa3 100644 --- a/awx/ui/static/js/help/InventoryGroups.js +++ b/awx/ui/static/js/help/InventoryGroups.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * InventoryGroups.js - * - * Help object for inventory groups/hosts page. - * - * @dict - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name help.function:InventoryGroups diff --git a/awx/ui/static/js/help/SafariSocketHelp.js b/awx/ui/static/js/help/SafariSocketHelp.js index f8841fafde..46b9cf48b0 100644 --- a/awx/ui/static/js/help/SafariSocketHelp.js +++ b/awx/ui/static/js/help/SafariSocketHelp.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * SafairSocketHelp.js - * - * Help object for socket connection troubleshooting - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name help.function:SafariSocketHelp diff --git a/awx/ui/static/js/helpers.js b/awx/ui/static/js/helpers.js index 7cf2590449..8a7c422697 100644 --- a/awx/ui/static/js/helpers.js +++ b/awx/ui/static/js/helpers.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import 'tower/forms'; import 'tower/lists'; diff --git a/awx/ui/static/js/helpers/AboutAnsible.js b/awx/ui/static/js/helpers/AboutAnsible.js index d548bbdacd..40b7e790a9 100644 --- a/awx/ui/static/js/helpers/AboutAnsible.js +++ b/awx/ui/static/js/helpers/AboutAnsible.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * aboutansible.js - * - * The new about menu - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc overview * @name helpers diff --git a/awx/ui/static/js/helpers/Access.js b/awx/ui/static/js/helpers/Access.js index 393aedb655..055c0e00d7 100644 --- a/awx/ui/static/js/helpers/Access.js +++ b/awx/ui/static/js/helpers/Access.js @@ -1,11 +1,9 @@ -/****************************************************** - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * helpers/Access.js - * - * Routines for checking user access - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Access diff --git a/awx/ui/static/js/helpers/Adhoc.js b/awx/ui/static/js/helpers/Adhoc.js index ffcbbc49ba..3924416d98 100644 --- a/awx/ui/static/js/helpers/Adhoc.js +++ b/awx/ui/static/js/helpers/Adhoc.js @@ -1,10 +1,9 @@ -/********************************************* - * Copyright (c) 2015 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * AdhocHelper - * - * Routines shared by adhoc related controllers: - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Adhoc diff --git a/awx/ui/static/js/helpers/Children.js b/awx/ui/static/js/helpers/Children.js index 3393f0c734..7c8246dd62 100644 --- a/awx/ui/static/js/helpers/Children.js +++ b/awx/ui/static/js/helpers/Children.js @@ -1,9 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * ChildrenHelper - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Children diff --git a/awx/ui/static/js/helpers/ConfigureTower.js b/awx/ui/static/js/helpers/ConfigureTower.js index e3371c1c06..e33281bbf1 100644 --- a/awx/ui/static/js/helpers/ConfigureTower.js +++ b/awx/ui/static/js/helpers/ConfigureTower.js @@ -1,7 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ - /** +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + +/** * @ngdoc function * @name helpers.function:ConfigureTower * @description diff --git a/awx/ui/static/js/helpers/Credentials.js b/awx/ui/static/js/helpers/Credentials.js index c13fe4f6cc..a6edd56281 100644 --- a/awx/ui/static/js/helpers/Credentials.js +++ b/awx/ui/static/js/helpers/Credentials.js @@ -1,10 +1,9 @@ -/********************************************* - * Copyright (c) 2015 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Credentials.js - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Credentials diff --git a/awx/ui/static/js/helpers/CustomInventory.js b/awx/ui/static/js/helpers/CustomInventory.js index b5a7167efb..748043ebf5 100644 --- a/awx/ui/static/js/helpers/CustomInventory.js +++ b/awx/ui/static/js/helpers/CustomInventory.js @@ -1,7 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ - /** +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + +/** * @ngdoc function * @name helpers.function:CustomInventory * @description diff --git a/awx/ui/static/js/helpers/EventViewer.js b/awx/ui/static/js/helpers/EventViewer.js index 65a7ab2452..5895f90716 100644 --- a/awx/ui/static/js/helpers/EventViewer.js +++ b/awx/ui/static/js/helpers/EventViewer.js @@ -1,9 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * EventsViewer.js - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:EventViewer diff --git a/awx/ui/static/js/helpers/Events.js b/awx/ui/static/js/helpers/Events.js index 3b9909f7f0..29e1f7803c 100644 --- a/awx/ui/static/js/helpers/Events.js +++ b/awx/ui/static/js/helpers/Events.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * EventsHelper - * - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Events diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index aa4cd1f0cc..9dd2a68073 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2015 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * GroupsHelper - * - * Routines that handle group add/edit/delete on the Inventory tree widget. - * - */ + * All Rights Reserved + *************************************************/ + 'use strict'; /** diff --git a/awx/ui/static/js/helpers/HostEventsViewer.js b/awx/ui/static/js/helpers/HostEventsViewer.js index 6e035df035..e8fc5a940a 100644 --- a/awx/ui/static/js/helpers/HostEventsViewer.js +++ b/awx/ui/static/js/helpers/HostEventsViewer.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * HostEventsViewer.js - * - * View a list of events for a given job and host - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:HostEventsViewer diff --git a/awx/ui/static/js/helpers/Hosts.js b/awx/ui/static/js/helpers/Hosts.js index 0d531262f9..a12acd7b1d 100644 --- a/awx/ui/static/js/helpers/Hosts.js +++ b/awx/ui/static/js/helpers/Hosts.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * HostsHelper - * - * Routines that handle host add/edit/delete on the Inventory detail page. - * - */ + * All Rights Reserved + *************************************************/ + /* jshint loopfunc: true */ /** diff --git a/awx/ui/static/js/helpers/JobDetail.js b/awx/ui/static/js/helpers/JobDetail.js index 2cfd32f7b3..86f5c60028 100644 --- a/awx/ui/static/js/helpers/JobDetail.js +++ b/awx/ui/static/js/helpers/JobDetail.js @@ -1,11 +1,9 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobDetail.js - * - * Helper moduler for JobDetails controller - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:JobDetail @@ -1135,11 +1133,12 @@ export default }; }]) - .factory('DrawGraph', [ function() { + + .factory('DrawGraph', ['DonutChart', function(DonutChart) { return function(params) { var scope = params.scope, resize = params.resize, - width, height, svg_height, svg_width, svg_radius, svg, graph_data = []; + width, height, svg_height, svg_width, svg_radius, graph_data = []; // Ready the data if (scope.host_summary.ok) { @@ -1178,27 +1177,151 @@ export default scope.total_count_for_graph = total_count; // Adjust the size width = $('#job-summary-container .job_well').width(); - height = $('#job-summary-container .job_well').height() - $('#summary-well-top-section').height() - $('#graph-section .header').outerHeight() - 15; + height = $('#job-summary-container .job_well').height() - $('#summary-well-top-section').height() - $('#graph-section .header').outerHeight() - 80; svg_radius = Math.min(width, height); svg_width = width; svg_height = height; if (svg_height > 0 && svg_width > 0) { if (!resize && $('#graph-section svg').length > 0) { - Donut3D.transition("completedHostsDonut", graph_data, Math.floor(svg_radius * 0.50), Math.floor(svg_radius * 0.25), 18, 0.4); + // Donut3D.transition("completedHostsDonut", graph_data, Math.floor(svg_radius * 0.50), Math.floor(svg_radius * 0.25), 18, 0.4); + DonutChart({ + target: '#graph-section', + height: height, + width: width, + data: graph_data, + radius: svg_radius + }); } else { if ($('#graph-section svg').length > 0) { $('#graph-section svg').remove(); } - svg = d3.select("#graph-section").append("svg").attr("width", svg_width).attr("height", svg_height); - svg.append("g").attr("id","completedHostsDonut"); - Donut3D.draw("completedHostsDonut", graph_data, Math.floor(svg_width / 2), Math.floor(svg_height / 2) - 35, Math.floor(svg_radius * 0.50), Math.floor(svg_radius * 0.25), 18, 0.4); + // svg = d3.select("#graph-section").append("svg").attr("width", svg_width).attr("height", svg_height); + // svg.append("g").attr("id","completedHostsDonut"); + // Donut3D.draw("completedHostsDonut", graph_data, Math.floor(svg_width / 2), Math.floor(svg_height / 2) - 35, Math.floor(svg_radius * 0.50), Math.floor(svg_radius * 0.25), 18, 0.4); + DonutChart({ + target: '#graph-section', + height: height, + width: width, + data: graph_data, + radius: svg_radius + }); $('#graph-section .header .legend').show(); } } }; }]) + .factory('DonutChart', [function() { + return function(params) { + var target = params.target, + height = params.height, + width = params.width, + dataset = params.data, + outerRadius = Math.min(width, height) / 2, + innerRadius = (outerRadius/3), + svg, arc, pie, legend, color, + tooltip, path, + legendRectSize = 18, + legendSpacing = 4; + + color = d3.scale.ordinal() + .range(['#60D66F', '#FF9900', '#FF0000', '#ff5850']); + svg = d3.select(target) + .append('svg') + .data([dataset]) + .attr('width', width) + .attr('height', height) + .append('g') + .attr('transform', 'translate(' + (width / 2) + + ',' + (height / 2) + ')'); + + arc = d3.svg.arc() + .innerRadius(outerRadius - innerRadius) + .outerRadius(outerRadius); + + pie = d3.layout.pie() + .value(function(d) { return d.value; }) + .sort(function() {return null; }); + + // arcs = svg.selectAll("g.slice") + // .data(pie) + // .enter() + // .append("g") + // .attr("class", "slice"); + + tooltip = d3.select(target) + .append('div') + .attr('class', 'tooltip'); + + tooltip.append('div') + .attr('class', 'label'); + + tooltip.append('div') + .attr('class', 'count'); + + tooltip.append('div') + .attr('class', 'percent'); + + path = svg.selectAll('path') + .data(pie(dataset)) + .enter() + .append('path') + .attr('d', arc) + .attr('fill', function(d) { + return color(d.data.label); + }); + + path.on('mouseenter', function(d) { + var total = d3.sum(dataset.map(function(d) { + return d.value; + })); + var percent = Math.round(1000 * d.data.value / total) / 10; + tooltip.select('.label').html(d.data.label) + .attr('style', 'color:black'); + tooltip.select('.count').html(d.data.value); + tooltip.select('.percent').html(percent + '%'); + tooltip.style('display', 'block'); + }); + + path.on('mouseleave', function() { + tooltip.style('display', 'none'); + }); + + // path.on('mousemove', function(d) { + // tooltip.style('top', (d3.event.pageY + 10) + 'px') + // .style('left', (d3.event.pageX + 10) + 'px'); + // }); + + legend = svg.selectAll('.legend') + .data(color.domain()) + .enter() + .append('g') + .attr('class', 'legend') + .attr('transform', function(d, i) { + var height = legendRectSize + legendSpacing; + var offset = height * color.domain().length / 2; + var horz = -2 * legendRectSize; + var vert = i * height - offset; + return 'translate(' + horz + ',' + vert + ')'; + }); + + legend.append('rect') + .attr('width', legendRectSize) + .attr('height', legendRectSize) + .style('fill', color) + .style('stroke', color); + + legend.append('text') + .attr('x', legendRectSize + legendSpacing) + .attr('y', legendRectSize - legendSpacing) + .text(function(d) { + return d; + }); + }; + }]) + + .factory('DrawPlays', [function() { return function(params) { var scope = params.scope, diff --git a/awx/ui/static/js/helpers/JobDetail.js.old b/awx/ui/static/js/helpers/JobDetail.js.old deleted file mode 100644 index 35c935fe46..0000000000 --- a/awx/ui/static/js/helpers/JobDetail.js.old +++ /dev/null @@ -1,1017 +0,0 @@ -/************************************ - * Copyright (c) 2014 AnsibleWorks, Inc. - * - * JobDetail.js - * - * Helper moduler for JobDetails controller - * - */ - -/* - # Playbook events will be structured to form the following hierarchy: - # - playbook_on_start (once for each playbook file) - # - playbook_on_vars_prompt (for each play, but before play starts, we - # currently don't handle responding to these prompts) - # - playbook_on_play_start (once for each play) - # - playbook_on_import_for_host - # - playbook_on_not_import_for_host - # - playbook_on_no_hosts_matched - # - playbook_on_no_hosts_remaining - # - playbook_on_setup - # - runner_on* - # - playbook_on_task_start (once for each task within a play) - # - runner_on_failed - # - runner_on_ok - # - runner_on_error - # - runner_on_skipped - # - runner_on_unreachable - # - runner_on_no_hosts - # - runner_on_async_poll - # - runner_on_async_ok - # - runner_on_async_failed - # - runner_on_file_diff - # - playbook_on_notify (once for each notification from the play) - # - playbook_on_stats - -*/ - -'use strict'; - -angular.module('JobDetailHelper', ['Utilities', 'RestServices']) - -.factory('DigestEvents', ['$rootScope', '$log', 'UpdatePlayStatus', 'UpdateHostStatus', 'AddHostResult', 'SelectPlay', 'SelectTask', - 'GetHostCount', 'GetElapsed', 'UpdateTaskStatus', 'DrawGraph', 'LoadHostSummary', 'JobIsFinished', -function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, SelectPlay, SelectTask, GetHostCount, GetElapsed, - UpdateTaskStatus, DrawGraph, LoadHostSummary, JobIsFinished) { - return function(params) { - - var scope = params.scope, - queue = params.queue, - lastEventId = params.lastEventId; - - function popEvent() { - $log.debug('queue length: ' + queue.length); - if (queue.length > 0) { - var event = queue.splice(0,1); - if (event[0].id > lastEventId) { - $log.debug('processing event: ' + event[0].id); - scope.$emit('ProcessEvent', event[0]); - } - } - } - - if (scope.removeGetNextEvent) { - scope.removeGetNextEvent(); - } - scope.removeGetNextEvent = scope.$on('GetNextEvent', function() { - if ($rootScope.myInterval) { - window.clearInterval(scope.myInterval); - } - if (!JobIsFinished(scope)) { - $rootScope.myInterval = window.setInterval(function() { - popEvent(); - }, 300); - } - }); - - if (scope.removeProcessEvent) { - scope.removeProcessEvent(); - } - scope.removeProcessEvent = scope.$on('ProcessEvent', function(e, event) { - var hostCount; - $log.debug('handling event: ' + event.id); - if (event.event === 'playbook_on_start') { - if (!JobIsFinished(scope)) { - scope.job_status.started = event.created; - scope.job_status.status = 'running'; - } - } - - if (event.event === 'playbook_on_play_start') { - scope.plays[event.id] = { - id: event.id, - name: event.play, - created: event.created, - status: (event.failed) ? 'failed' : (event.changed) ? 'changed' : 'none', - elapsed: '00:00:00' - }; - if (scope.plays.length > 1) { - DrawGraph({ scope: scope, resize: false }); - } - SelectPlay({ - scope: scope, - id: event.id - }); - } - if (event.event === 'playbook_on_setup') { - if (scope.activePlay === event.parent) { - hostCount = GetHostCount({ - scope: scope, - play_id: event.parent - }); - scope.tasks[event.id] = { - id: event.id, - play_id: event.parent, - name: event.event_display, - status: ( (event.failed) ? 'failed' : (event.changed) ? 'changed' : 'successful' ), - created: event.created, - modified: event.modified, - hostCount: hostCount, - reportedHosts: 0, - successfulCount: 0, - failedCount: 0, - changedCount: 0, - skippedCount: 0, - successfulStyle: { display: 'none'}, - failedStyle: { display: 'none' }, - changedStyle: { display: 'none' }, - skippedStyle: { display: 'none' } - }; - SelectTask({ - scope: scope, - id: event.id - }); - } - UpdatePlayStatus({ - scope: scope, - play_id: event.parent, - failed: event.failed, - changed: event.changed, - modified: event.modified - }); - } - if (event.event === 'playbook_on_no_hosts_matched') { - UpdatePlayStatus({ - scope: scope, - play_id: event.parent, - failed: true, - changed: false, - modified: event.modified, - status_text: 'failed- no hosts matched' - }); - } - if (event.event === 'playbook_on_task_start') { - if (scope.activePlay === event.parent) { - hostCount = GetHostCount({ - scope: scope, - play_id: event.parent - }); - - scope.tasks[event.id] = { - id: event.id, - name: event.task, - play_id: event.parent, - status: ( (event.failed) ? 'failed' : (event.changed) ? 'changed' : 'successful' ), - role: event.role, - created: event.created, - modified: event.modified, - hostCount: hostCount, - reportedHosts: 0, - successfulCount: 0, - failedCount: 0, - changedCount: 0, - skippedCount: 0, - successfulStyle: { display: 'none'}, - failedStyle: { display: 'none' }, - changedStyle: { display: 'none' }, - skippedStyle: { display: 'none' } - }; - SelectTask({ - scope: scope, - id: event.id - }); - } - if (event.role) { - scope.hasRoles = true; - } - UpdatePlayStatus({ - scope: scope, - play_id: event.parent, - failed: event.failed, - changed: event.changed, - modified: event.modified - }); - } - - if (event.event === 'runner_on_unreachable') { - UpdateHostStatus({ - scope: scope, - name: event.event_data.host, - host_id: event.host, - task_id: event.parent, - status: 'unreachable', - event_id: event.id, - created: event.created, - modified: event.modified, - message: ( (event.event_data && event.event_data.res) ? event.event_data.res.msg : '' ) - }); - } - if (event.event === 'runner_on_error' || event.event === 'runner_on_async_failed') { - UpdateHostStatus({ - scope: scope, - name: event.event_data.host, - host_id: event.host, - task_id: event.parent, - status: 'failed', - event_id: event.id, - created: event.created, - modified: event.modified, - message: (event.event_data && event.event_data.res) ? event.event_data.res.msg : '' - }); - } - if (event.event === 'runner_on_no_hosts') { - UpdateTaskStatus({ - scope: scope, - failed: event.failed, - changed: event.changed, - task_id: event.parent, - modified: event.modified, - no_hosts: true - }); - } - if (event.event === 'runner_on_skipped') { - UpdateHostStatus({ - scope: scope, - name: event.event_data.host, - host_id: event.host, - task_id: event.parent, - status: 'skipped', - event_id: event.id, - created: event.created, - modified: event.modified, - message: (event.event_data && event.event_data.res) ? event.event_data.res.msg : '' - }); - } - if (event.event === 'runner_on_ok' || event.event === 'runner_on_async_ok') { - UpdateHostStatus({ - scope: scope, - name: event.event_data.host, - host_id: event.host, - task_id: event.parent, - status: ( (event.failed) ? 'failed' : (event.changed) ? 'changed' : 'successful' ), - event_id: event.id, - created: event.created, - modified: event.modified, - message: (event.event_data && event.event_data.res) ? event.event_data.res.msg : '' - }); - } - if (event.event === 'playbook_on_stats') { - scope.job_status.finished = event.modified; - scope.job_status.elapsed = GetElapsed({ - start: scope.job_status.started, - end: scope.job_status.finished - }); - scope.job_status.status = (event.failed) ? 'failed' : 'successful'; - scope.job_status.status_class = ""; - scope.host_summary = {}; - LoadHostSummary({ scope: scope, data: event.event_data }); - DrawGraph({ scope: scope, resize: true }); - } - }); - - scope.$emit('GetNextEvent'); // Start checking the queue - - }; -}]) - -.factory('JobIsFinished', [ function() { - return function(scope) { - return (scope.job_status.status === 'failed' || scope.job_status.status === 'canceled' || - scope.job_status.status === 'error' || scope.job_status.status === 'successful'); - }; -}]) - -//Get the # of expected hosts for a task by looking at the number -//on the very first task for a play -.factory('GetHostCount', [ 'FindFirstTaskofPlay', function(FindFirstTaskofPlay) { - return function(params) { - var scope = params.scope, - task_id = FindFirstTaskofPlay({ scope: scope }); - if (task_id) { - return scope.tasks[task_id].hostCount; - } - return 0; - }; -}]) - -.factory('FindFirstTaskofPlay', function() { - return function(params) { - var scope = params.scope, - taskIds; - taskIds = Object.keys(scope.tasks); - return (taskIds.length > 0) ? scope.tasks[taskIds[0]].id : null; - }; -}) - -.factory('GetElapsed', [ function() { - return function(params) { - var start = params.start, - end = params.end, - dt1, dt2, sec, hours, min; - dt1 = new Date(start); - dt2 = new Date(end); - if ( dt2.getTime() !== dt1.getTime() ) { - sec = Math.floor( (dt2.getTime() - dt1.getTime()) / 1000 ); - hours = Math.floor(sec / 3600); - sec = sec - (hours * 3600); - if (('' + hours).length < 2) { - hours = ('00' + hours).substr(-2, 2); - } - min = Math.floor(sec / 60); - sec = sec - (min * 60); - min = ('00' + min).substr(-2,2); - sec = ('00' + sec).substr(-2,2); - return hours + ':' + min + ':' + sec; - } - else { - return '00:00:00'; - } - }; -}]) - -.factory('UpdateJobStatus', ['GetElapsed', 'Empty', function(GetElapsed, Empty) { - return function(params) { - var scope = params.scope, - failed = params.failed, - modified = params.modified, - started = params.started; - - if (failed && scope.job_status.status !== 'failed' && scope.job_status.status !== 'error' && - scope.job_status.status !== 'canceled') { - scope.job_status.status = 'failed'; - } - if (!Empty(modified)) { - scope.job_status.finished = modified; - } - if (!Empty(started) && Empty(scope.job_status.started)) { - scope.job_status.started = started; - } - if (!Empty(scope.job_status.finished) && !Empty(scope.job_status.started)) { - scope.job_status.elapsed = GetElapsed({ - start: scope.job_status.started, - end: scope.job_status.finished - }); - } - }; -}]) - -// Update the status of a play -.factory('UpdatePlayStatus', ['GetElapsed', 'UpdateJobStatus', function(GetElapsed, UpdateJobStatus) { - return function(params) { - var scope = params.scope, - failed = params.failed, - changed = params.changed, - id = params.play_id, - modified = params.modified, - no_hosts = params.no_hosts, - status_text = params.status_text, - play = scope.plays[id]; - - if (scope.plays[id]) { - if (failed) { - scope.plays[id].status = 'failed'; - } - else if (play.status !== 'changed' && play.status !== 'failed') { - // once the status becomes 'changed' or 'failed' don't modify it - if (no_hosts) { - scope.plays[id].status = 'no-matching-hosts'; - } - else { - scope.plays[id].status = (changed) ? 'changed' : (failed) ? 'failed' : 'successful'; - } - } - scope.plays[id].finished = modified; - scope.plays[id].elapsed = GetElapsed({ - start: play.created, - end: modified - }); - scope.plays[id].status_text = (status_text) ? status_text : scope.plays[id].status; - } - - UpdateJobStatus({ - scope: scope, - failed: null, - modified: modified - }); - }; -}]) - -.factory('UpdateTaskStatus', ['UpdatePlayStatus', 'GetElapsed', function(UpdatePlayStatus, GetElapsed) { - return function(params) { - var scope = params.scope, - failed = params.failed, - changed = params.changed, - id = params.task_id, - modified = params.modified, - no_hosts = params.no_hosts, - task = scope.tasks[id]; - - if (scope.tasks[id]) { - if (no_hosts){ - task.status = 'no-matching-hosts'; - } - else if (failed) { - task.status = 'failed'; - } - else if (task.status !== 'changed' && task.status !== 'failed') { - // once the status becomes 'changed' or 'failed' don't modify it - task.status = (failed) ? 'failed' : (changed) ? 'changed' : 'successful'; - } - task.finished = params.modified; - task.elapsed = GetElapsed({ - start: task.created, - end: modified - }); - - UpdatePlayStatus({ - scope: scope, - failed: failed, - changed: changed, - play_id: task.play_id, - modified: modified, - no_hosts: no_hosts - }); - } - }; -}]) - -// Each time a runner event is received update host summary totals and the parent task -.factory('UpdateHostStatus', ['UpdateTaskStatus', 'AddHostResult', - function(UpdateTaskStatus, AddHostResult) { - return function(params) { - var scope = params.scope, - status = params.status, // successful, changed, unreachable, failed, skipped - name = params.name, - event_id = params.event_id, - host_id = params.host_id, - task_id = params.task_id, - modified = params.modified, - created = params.created, - msg = params.message, - host; - - if (scope.hostsMap[host_id]) { - host = scope.hosts[scope.hostsMap[host_id]]; - host.ok += (status === 'successful') ? 1 : 0; - host.changed += (status === 'changed') ? 1 : 0; - host.unreachable += (status === 'unreachable') ? 1 : 0; - host.failed += (status === 'failed') ? 1 : 0; - } - else { - // Totals for the summary graph - scope.host_summary.total += 1; - scope.host_summary.ok += (status === 'successful') ? 1 : 0; - scope.host_summary.changed += (status === 'changed') ? 1 : 0; - scope.host_summary.unreachable += (status === 'unreachable') ? 1 : 0; - scope.host_summary.failed += (status === 'failed') ? 1 : 0; - - scope.hosts.push({ - id: host_id, - name: name, - ok: (status === 'successful') ? 1 : 0, - changed: (status === 'changed') ? 1 : 0, - unreachable: (status === 'unreachable') ? 1 : 0, - failed: (status === 'failed') ? 1 : 0 - }); - - scope.hosts.sort(function (a, b) { - if (a.name > b.name) - return 1; - if (a.name < b.name) - return -1; - // a must be equal to b - return 0; - }); - - // prune the hosts array and rebuild the map - if (scope.hosts.length > scope.hostSummaryTableRows) { - scope.hosts.pop(); - } - scope.hostsMap = {}; - scope.hosts.forEach(function(host, idx){ - scope.hostsMap[host.id] = idx; - }); - $('#tasks-table-detail').mCustomScrollbar("update"); - } - - UpdateTaskStatus({ - scope: scope, - task_id: task_id, - failed: ((status === 'failed' || status === 'unreachable') ? true :false), - changed: ((status === 'changed') ? true : false), - modified: modified - }); - - AddHostResult({ - scope: scope, - task_id: task_id, - host_id: host_id, - event_id: event_id, - status: status, - name: name, - created: created, - message: msg - }); - }; -}]) - -// Add a new host result -.factory('AddHostResult', ['FindFirstTaskofPlay', 'SetTaskStyles', function(FindFirstTaskofPlay, SetTaskStyles) { - return function(params) { - var scope = params.scope, - task_id = params.task_id, - host_id = params.host_id, - event_id = params.event_id, - status = params.status, - created = params.created, - name = params.name, - msg = params.message, - play_id, first; - - if (scope.activeTask === task_id && !scope.hostResultsMap[host_id]) { - // the event applies to the currently selected task - scope.hostResults.push({ - id: event_id, - status: status, - host_id: host_id, - task_id: task_id, - name: name, - created: created, - msg: msg - }); - scope.hostResults.sort(function(a,b) { - if (a.name < b.name) { - return -1; - } - if (a.name > b.name) { - return 1; - } - return 0; - }); - // Keep the list pruned to a limited # of hosts - if (scope.hostResults.length > scope.hostTableRows) { - scope.hostResults.splice(0,1); - } - // Refresh the map - scope.hostResultsMap = {}; - scope.hostResults.forEach(function(result, idx) { - scope.hostResultsMap[result.id] = idx; - }); - } - - // update the task - if (scope.tasks[task_id]) { - play_id = scope.tasks[task_id].play_id; - - first = FindFirstTaskofPlay({ - scope: scope, - play_id: play_id - }); - if (task_id === first) { - scope.tasks[task_id].hostCount += 1; - } - scope.tasks[task_id].reportedHosts += 1; - scope.tasks[task_id].failedCount += (status === 'failed' || status === 'unreachable') ? 1 : 0; - scope.tasks[task_id].changedCount += (status === 'changed') ? 1 : 0; - scope.tasks[task_id].successfulCount += (status === 'successful') ? 1 : 0; - scope.tasks[task_id].skippedCount += (status === 'skipped') ? 1 : 0; - SetTaskStyles({ - scope: scope, - task_id: task_id - }); - } - }; -}]) - -.factory('SetTaskStyles', [ function() { - return function(params) { - var task_id = params.task_id, - scope = params.scope, - diff; - scope.tasks[task_id].failedPct = (scope.tasks[task_id].hostCount > 0) ? Math.ceil((100 * (scope.tasks[task_id].failedCount / scope.tasks[task_id].hostCount))) : 0; - scope.tasks[task_id].changedPct = (scope.tasks[task_id].hostCount > 0) ? Math.ceil((100 * (scope.tasks[task_id].changedCount / scope.tasks[task_id].hostCount))) : 0; - scope.tasks[task_id].skippedPct = (scope.tasks[task_id].hostCount > 0) ? Math.ceil((100 * (scope.tasks[task_id].skippedCount / scope.tasks[task_id].hostCount))) : 0; - scope.tasks[task_id].successfulPct = (scope.tasks[task_id].hostCount > 0) ? Math.ceil((100 * (scope.tasks[task_id].successfulCount / scope.tasks[task_id].hostCount))) : 0; - - diff = (scope.tasks[task_id].failedPct + scope.tasks[task_id].changedPct + scope.tasks[task_id].skippedPct + scope.tasks[task_id].successfulPct) - 100; - if (diff > 0) { - if (scope.tasks[task_id].failedPct > diff) { - scope.tasks[task_id].failedPct = scope.tasks[task_id].failedPct - diff; - } - else if (scope.tasks[task_id].changedPct > diff) { - scope.tasks[task_id].changedPct = scope.tasks[task_id].changedPct - diff; - } - else if (scope.tasks[task_id].skippedPct > diff) { - scope.tasks[task_id].skippedPct = scope.tasks[task_id].skippedPct - diff; - } - else if (scope.tasks[task_id].successfulPct > diff) { - scope.tasks[task_id].successfulPct = scope.tasks[task_id].successfulPct - diff; - } - } - scope.tasks[task_id].successfulStyle = (scope.tasks[task_id].successfulPct > 0) ? { 'display': 'inline-block', 'width': scope.tasks[task_id].successfulPct + "%" } : { 'display': 'none' }; - scope.tasks[task_id].changedStyle = (scope.tasks[task_id].changedPct > 0) ? { 'display': 'inline-block', 'width': scope.tasks[task_id].changedPct + "%" } : { 'display': 'none' }; - scope.tasks[task_id].skippedStyle = (scope.tasks[task_id].skippedPct > 0) ? { 'display': 'inline-block', 'width': scope.tasks[task_id].skippedPct + "%" } : { 'display': 'none' }; - scope.tasks[task_id].failedStyle = (scope.tasks[task_id].failedPct > 0) ? { 'display': 'inline-block', 'width': scope.tasks[task_id].failedPct + "%" } : { 'display': 'none' }; - }; -}]) - -// Call SelectPlay whenever the the activePlay needs to change -.factory('SelectPlay', ['SelectTask', 'LoadTasks', function(SelectTask, LoadTasks) { - return function(params) { - var scope = params.scope, - id = params.id, - callback = params.callback; - - if (scope.plays[scope.activePlay]) { - scope.plays[scope.activePlay].playActiveClass = ''; - } - if (id) { - scope.plays[id].playActiveClass = 'active'; - } - scope.activePlay = id; - - LoadTasks({ - scope: scope, - callback: callback - }); - }; -}]) - -.factory('LoadTasks', ['Rest', 'ProcessErrors', 'GetElapsed', 'SelectTask', 'SetTaskStyles', function(Rest, ProcessErrors, GetElapsed, SelectTask, SetTaskStyles) { - return function(params) { - var scope = params.scope, - callback = params.callback, - url, tIds, lastId; - - if (scope.activePlay) { - url = scope.job.url + 'job_tasks/?event_id=' + scope.activePlay; - // job_tasks seems to ignore all query predicates other than event_id - //+ '&'; - //url += (scope.search_all_plays.length > 0) ? 'event_id__in=' + scope.search_all_plays.join() + '&' : ''; - //url += (scope.searchAllStatus === 'failed') ? 'failed=true&' : ''; - //url += 'order_by=id'; - - Rest.setUrl(url); - Rest.get() - .success(function(data) { - scope.tasks = {}; - data.forEach(function(event, idx) { - var end, elapsed; - if ((!scope.searchAllStatus) || (scope.searchAllStatus === 'failed' && event.failed) && - ((scope.search_all_tasks.length === 0) || (scope.searchAllTasks.indexOf(event.id)))) { - - if (idx < data.length - 1) { - // end date = starting date of the next event - end = data[idx + 1].created; - } - else { - // no next event (task), get the end time of the play - end = scope.plays[scope.activePlay].finished; - } - - if (end) { - elapsed = GetElapsed({ - start: event.created, - end: end - }); - } - else { - elapsed = '00:00:00'; - } - - scope.tasks[event.id] = { - id: event.id, - play_id: scope.activePlay, - name: event.name, - status: ( (event.failed) ? 'failed' : (event.changed) ? 'changed' : 'successful' ), - created: event.created, - modified: event.modified, - finished: end, - elapsed: elapsed, - hostCount: event.host_count, // hostCount, - reportedHosts: event.reported_hosts, - successfulCount: event.successful_count, - failedCount: event.failed_count, - changedCount: event.changed_count, - skippedCount: event.skipped_count, - taskActiveClass: '' - }; - - SetTaskStyles({ - scope: scope, - task_id: event.id - }); - } - }); - - // set the active task - tIds = Object.keys(scope.tasks); - lastId = (tIds.length > 0) ? tIds[tIds.length - 1] : null; - SelectTask({ - scope: scope, - id: lastId, - callback: callback - }); - }) - .error(function(data) { - ProcessErrors(scope, data, status, null, { hdr: 'Error!', - msg: 'Call to ' + url + '. GET returned: ' + status }); - }); - } - else { - // set the active task - tIds = Object.keys(scope.tasks); - lastId = (tIds.length > 0) ? tIds[tIds.length - 1] : null; - SelectTask({ - scope: scope, - id: lastId, - callback: callback - }); - } - }; -}]) - -// Call SelectTask whenever the activeTask needs to change -.factory('SelectTask', ['LoadHosts', function(LoadHosts) { - return function(params) { - var scope = params.scope, - id = params.id, - callback = params.callback; - - if (scope.activeTask && scope.tasks[scope.activeTask]) { - scope.tasks[scope.activeTask].taskActiveClass = ''; - } - - if (id) { - scope.tasks[id].taskActiveClass = 'active'; - scope.activeTaskName = scope.tasks[id].name; - } - scope.activeTask = id; - - $('#tasks-table-detail').mCustomScrollbar("update"); - setTimeout( function() { - scope.auto_scroll = true; - $('#tasks-table-detail').mCustomScrollbar("scrollTo", "bottom"); - - }, 1500); - LoadHosts({ - scope: scope, - callback: callback - }); - }; -}]) - -// Refresh the list of hosts -.factory('LoadHosts', ['Rest', 'ProcessErrors', 'SelectHost', function(Rest, ProcessErrors, SelectHost) { - return function(params) { - var scope = params.scope, - callback = params.callback, - url; - scope.hostResults = []; - scope.hostResultsMap = {}; - if (scope.activeTask) { - // If we have a selected task, then get the list of hosts - url = scope.job.related.job_events + '?parent=' + scope.activeTask + '&'; - url += (scope.search_all_hosts_name) ? 'host__name__icontains=' + scope.search_all_hosts_name + '&' : ''; - url += (scope.searchAllStatus === 'failed') ? 'failed=true&' : ''; - url += 'host__isnull=false&page_size=' + scope.hostTableRows + '&order_by=host__name'; - Rest.setUrl(url); - Rest.get() - .success(function(data) { - data.results.forEach(function(event) { - scope.hostResults.push({ - id: event.id, - status: ( (event.failed) ? 'failed' : (event.changed) ? 'changed' : 'successful' ), - host_id: event.host, - task_id: event.parent, - name: event.event_data.host, - created: event.created, - msg: ( (event.event_data && event.event_data.res) ? event.event_data.res.msg : '' ) - }); - scope.hostResultsMap[event.id] = scope.hostResults.length - 1; - }); - if (callback) { - scope.$emit(callback); - } - SelectHost({ scope: scope }); - }) - .error(function(data, status) { - ProcessErrors(scope, data, status, null, { hdr: 'Error!', - msg: 'Call to ' + url + '. GET returned: ' + status }); - }); - } - else { - if (callback) { - scope.$emit(callback); - } - SelectHost({ scope: scope }); - } - }; -}]) - -.factory('SelectHost', [ function() { - return function(params) { - var scope = params.scope; - $('#tasks-table-detail').mCustomScrollbar("update"); - setTimeout( function() { - scope.auto_scroll = true; - $('#hosts-table-detail').mCustomScrollbar("scrollTo", "bottom"); - }, 700); - }; -}]) - -// Refresh the list of hosts in the hosts summary section -.factory('ReloadHostSummaryList', ['Rest', 'ProcessErrors', function(Rest, ProcessErrors) { - return function(params) { - var scope = params.scope, - callback = params.callback, - url; - scope.hosts = []; - scope.hostsMap = {}; - url = scope.job.related.job_host_summaries + '?'; - url += (scope.search_all_hosts_name) ? 'host__name__icontains=' + scope.search_all_hosts_name + '&': ''; - url += (scope.searchAllStatus === 'failed') ? 'failed=true&' : ''; - url += 'page_size=' + scope.hostSummaryTableRows + '&order_by=host__name'; - Rest.setUrl(url); - Rest.get() - .success(function(data) { - data.results.forEach(function(event) { - scope.hosts.push({ - id: event.host, - name: event.summary_fields.host.name, - ok: event.ok, - changed: event.changed, - unreachable: event.dark, - failed: event.failures - }); - scope.hostsMap[event.id] = scope.hosts.length - 1; - }); - $('#hosts-summary-table').mCustomScrollbar("update"); - if (callback) { - scope.$emit(callback); - } - }) - .error(function(data, status) { - ProcessErrors(scope, data, status, null, { hdr: 'Error!', - msg: 'Call to ' + url + '. GET returned: ' + status }); - }); - }; -}]) - -.factory('LoadHostSummary', [ function() { - return function(params) { - var scope = params.scope, - data = params.data; - scope.host_summary.ok = Object.keys(data.ok).length; - scope.host_summary.changed = Object.keys(data.changed).length; - scope.host_summary.unreachable = Object.keys(data.dark).length; - scope.host_summary.failed = Object.keys(data.failures).length; - scope.host_summary.total = scope.host_summary.ok + scope.host_summary.changed + - scope.host_summary.unreachable + scope.host_summary.failed; - }; -}]) - -.factory('DrawGraph', [ function() { - return function(params) { - var scope = params.scope, - resize = params.resize, - width, height, svg_height, svg_width, svg_radius, svg, graph_data = []; - - // Ready the data - if (scope.host_summary.ok) { - graph_data.push({ - label: 'OK', - value: (scope.host_summary.ok === scope.host_summary.total) ? 1 : scope.host_summary.ok, - color: '#5bb75b' - }); - } - if (scope.host_summary.changed) { - graph_data.push({ - label: 'Changed', - value: (scope.host_summary.changed === scope.host_summary.total) ? 1 : scope.host_summary.changed, - color: '#FF9900' - }); - } - if (scope.host_summary.unreachable) { - graph_data.push({ - label: 'Unreachable', - value: (scope.host_summary.unreachable === scope.host_summary.total) ? 1 : scope.host_summary.unreachable, - color: '#A9A9A9' - }); - } - if (scope.host_summary.failed) { - graph_data.push({ - label: 'Failed', - value: (scope.host_summary.failed === scope.host_summary.total) ? 1 : scope.host_summary.failed, - color: '#DA4D49' - }); - } - - // Adjust the size - width = $('#job-summary-container .job_well').width(); - height = $('#job-summary-container .job_well').height() - $('#summary-well-top-section').height() - $('#graph-section .header').outerHeight() - 15; - svg_radius = Math.min(width, height); - svg_width = width; - svg_height = height; - if (svg_height > 0 && svg_width > 0) { - if (!resize && $('#graph-section svg').length > 0) { - Donut3D.transition("completedHostsDonut", graph_data, Math.floor(svg_radius * 0.50), Math.floor(svg_radius * 0.25), 18, 0.4); - } - else { - if ($('#graph-section svg').length > 0) { - $('#graph-section svg').remove(); - } - svg = d3.select("#graph-section").append("svg").attr("width", svg_width).attr("height", svg_height); - svg.append("g").attr("id","completedHostsDonut"); - Donut3D.draw("completedHostsDonut", graph_data, Math.floor(svg_width / 2), Math.floor(svg_height / 2), Math.floor(svg_radius * 0.50), Math.floor(svg_radius * 0.25), 18, 0.4); - $('#graph-section .header .legend').show(); - } - } - }; -}]) - -.factory('FilterAllByHostName', ['Rest', 'GetBasePath', 'ProcessErrors', 'SelectPlay', function(Rest, GetBasePath, ProcessErrors, SelectPlay) { - return function(params) { - var scope = params.scope, - host = params.host, - newActivePlay, - url = scope.job.related.job_events + '?event__icontains=runner&host_name__icontains=' + host + '&parent__isnull=false'; - - scope.search_all_tasks = []; - scope.search_all_plays = []; - - if (scope.removeAllPlaysReady) { - scope.removeAllPlaysReady(); - } - scope.removeAllPlaysReady = scope.$on('AllPlaysReady', function() { - if (scope.activePlay) { - setTimeout(function() { - SelectPlay({ - scope: scope, - id: newActivePlay - }); - }, 500); - } - else { - scope.tasks = {}; - scope.hostResults = []; - } - }); - - if (scope.removeAllTasksReady) { - scope.removeAllTasksReady(); - } - scope.removeAllTasksReady = scope.$on('AllTasksReady', function() { - url = scope.job.related.job_events + '?id__in=' + scope.search_all_tasks.join(); - Rest.setUrl(url); - Rest.get() - .success(function(data) { - if (data.count > 0) { - data.results.forEach(function(row) { - if (row.parent) { - scope.search_all_plays.push(row.parent); - } - }); - if (scope.search_all_plays.length > 0) { - scope.search_all_plays.sort(); - newActivePlay = scope.search_all_plays[scope.search_all_plays.length - 1]; - } - else { - newActivePlay = null; - } - } - else { - scope.search_all_plays.push(0); - } - scope.$emit('AllPlaysReady'); - }) - .error(function(data, status) { - ProcessErrors(scope, data, status, null, { hdr: 'Error!', - msg: 'Call to ' + url + '. GET returned: ' + status }); - }); - }); - - Rest.setUrl(url); - Rest.get() - .success(function(data) { - if (data.count > 0) { - data.results.forEach(function(row) { - if (row.parent) { - scope.search_all_tasks.push(row.parent); - } - }); - if (scope.search_all_tasks.length > 0) { - scope.search_all_tasks.sort(); - } - } - else { - scope.search_all_tasks.push(0); - } - scope.$emit('AllTasksReady'); - }) - .error(function(data, status) { - ProcessErrors(scope, data, status, null, { hdr: 'Error!', - msg: 'Call to ' + url + '. GET returned: ' + status }); - }); - }; -}]); \ No newline at end of file diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js index 0185f59ac8..30cf5cacf7 100644 --- a/awx/ui/static/js/helpers/JobSubmission.js +++ b/awx/ui/static/js/helpers/JobSubmission.js @@ -1,9 +1,9 @@ -/********************************************* -* Copyright (c) 2014 AnsibleWorks, Inc. -* -* JobSubmission.js -* -*/ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:JobSubmission diff --git a/awx/ui/static/js/helpers/JobTemplates.js b/awx/ui/static/js/helpers/JobTemplates.js index 0e983e6fd2..0e83ef0ac1 100644 --- a/awx/ui/static/js/helpers/JobTemplates.js +++ b/awx/ui/static/js/helpers/JobTemplates.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobTemplatesHelper - * - * Routines shared by job related controllers - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:JobTemplatesHelper diff --git a/awx/ui/static/js/helpers/Jobs.js b/awx/ui/static/js/helpers/Jobs.js index 591a2bda1b..0c74d5f7fb 100644 --- a/awx/ui/static/js/helpers/Jobs.js +++ b/awx/ui/static/js/helpers/Jobs.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobsHelper - * - * Routines shared by job related controllers - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Jobs diff --git a/awx/ui/static/js/helpers/License.js b/awx/ui/static/js/helpers/License.js index 92335a1791..08a259aeca 100644 --- a/awx/ui/static/js/helpers/License.js +++ b/awx/ui/static/js/helpers/License.js @@ -1,11 +1,9 @@ -/****************************************************** - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * helpers/License.js - * - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:License diff --git a/awx/ui/static/js/helpers/LoadConfig.js b/awx/ui/static/js/helpers/LoadConfig.js index 668192b04b..f2ac3df989 100644 --- a/awx/ui/static/js/helpers/LoadConfig.js +++ b/awx/ui/static/js/helpers/LoadConfig.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:LoadConfig diff --git a/awx/ui/static/js/helpers/LogViewer.js b/awx/ui/static/js/helpers/LogViewer.js index 88b548162c..41aee6384d 100644 --- a/awx/ui/static/js/helpers/LogViewer.js +++ b/awx/ui/static/js/helpers/LogViewer.js @@ -1,9 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * LogViewer.js - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:LogViewer diff --git a/awx/ui/static/js/helpers/Lookup.js b/awx/ui/static/js/helpers/Lookup.js index 0dceb91511..e47168545a 100644 --- a/awx/ui/static/js/helpers/Lookup.js +++ b/awx/ui/static/js/helpers/Lookup.js @@ -1,9 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * LookupHelper - * Build a lookup dialog - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function diff --git a/awx/ui/static/js/helpers/PaginationHelpers.js b/awx/ui/static/js/helpers/PaginationHelpers.js index 47239d4bff..1f35ad70ae 100644 --- a/awx/ui/static/js/helpers/PaginationHelpers.js +++ b/awx/ui/static/js/helpers/PaginationHelpers.js @@ -1,9 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * PaginationHelpers.js - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:PaginationHelpers diff --git a/awx/ui/static/js/helpers/Parse.js b/awx/ui/static/js/helpers/Parse.js index fe4669492e..eb79800bd1 100644 --- a/awx/ui/static/js/helpers/Parse.js +++ b/awx/ui/static/js/helpers/Parse.js @@ -1,8 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * ParseHelper - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Parse diff --git a/awx/ui/static/js/helpers/Permissions.js b/awx/ui/static/js/helpers/Permissions.js index 056f11bb10..565b755b0a 100644 --- a/awx/ui/static/js/helpers/Permissions.js +++ b/awx/ui/static/js/helpers/Permissions.js @@ -1,8 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Permissions.js - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Permissions diff --git a/awx/ui/static/js/helpers/ProjectPath.js b/awx/ui/static/js/helpers/ProjectPath.js index 66d7eac683..91761fce0e 100644 --- a/awx/ui/static/js/helpers/ProjectPath.js +++ b/awx/ui/static/js/helpers/ProjectPath.js @@ -1,8 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * ProjectPathHelper - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:ProjectPath diff --git a/awx/ui/static/js/helpers/Projects.js b/awx/ui/static/js/helpers/Projects.js index 519af33e98..69e267b102 100644 --- a/awx/ui/static/js/helpers/Projects.js +++ b/awx/ui/static/js/helpers/Projects.js @@ -1,8 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * ProjectsHelper - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Projects diff --git a/awx/ui/static/js/helpers/Schedules.js b/awx/ui/static/js/helpers/Schedules.js index a32ea1abc2..53e26d4def 100644 --- a/awx/ui/static/js/helpers/Schedules.js +++ b/awx/ui/static/js/helpers/Schedules.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Schedules diff --git a/awx/ui/static/js/helpers/Selection.js b/awx/ui/static/js/helpers/Selection.js index 8506812807..b45d1e4ee2 100644 --- a/awx/ui/static/js/helpers/Selection.js +++ b/awx/ui/static/js/helpers/Selection.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Selection diff --git a/awx/ui/static/js/helpers/SocketHelper.js b/awx/ui/static/js/helpers/SocketHelper.js index 2c1ba6a50b..ea0110cf01 100644 --- a/awx/ui/static/js/helpers/SocketHelper.js +++ b/awx/ui/static/js/helpers/SocketHelper.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:SocketHelper diff --git a/awx/ui/static/js/helpers/Survey.js b/awx/ui/static/js/helpers/Survey.js index a5636feb51..5e740ea7c4 100644 --- a/awx/ui/static/js/helpers/Survey.js +++ b/awx/ui/static/js/helpers/Survey.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Survey @@ -492,7 +495,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', scope.removeGenerateForm = scope.$on('GenerateForm', function() { tmpVar = scope.mode; GenerateForm.inject(form, { id: 'question_'+index, mode: 'edit' , related: false, scope:scope, breadCrumbs: false}); - scope.mode = tmpVar; + scope.mode = tmpVar; scope.$emit('FillQuestionForm'); }); diff --git a/awx/ui/static/js/helpers/Users.js b/awx/ui/static/js/helpers/Users.js index 2b1da18180..61ddaa4ed9 100644 --- a/awx/ui/static/js/helpers/Users.js +++ b/awx/ui/static/js/helpers/Users.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Users diff --git a/awx/ui/static/js/helpers/Variables.js b/awx/ui/static/js/helpers/Variables.js index 0979f9be73..75e9176630 100644 --- a/awx/ui/static/js/helpers/Variables.js +++ b/awx/ui/static/js/helpers/Variables.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Variables diff --git a/awx/ui/static/js/helpers/api-defaults.js b/awx/ui/static/js/helpers/api-defaults.js index 67804054d9..bf9308b0da 100644 --- a/awx/ui/static/js/helpers/api-defaults.js +++ b/awx/ui/static/js/helpers/api-defaults.js @@ -1,10 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * APIDefaults - * - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:api-defaults diff --git a/awx/ui/static/js/helpers/inventory.js b/awx/ui/static/js/helpers/inventory.js index 04be9a966b..4f574d5eef 100644 --- a/awx/ui/static/js/helpers/inventory.js +++ b/awx/ui/static/js/helpers/inventory.js @@ -1,7 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:Inventory @@ -17,7 +19,7 @@ export default angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationListDefinition', listGenerator.name, 'AuthService', 'InventoryHelper', 'InventoryFormDefinition', 'ParseHelper', 'SearchHelper', 'VariablesHelper', ]) - + .factory('SaveInventory', ['InventoryForm', 'Rest', 'Alert', 'ProcessErrors', 'LookUpInit', 'OrganizationList', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', function (InventoryForm, Rest, Alert, ProcessErrors, LookUpInit, OrganizationList, GetBasePath, ParseTypeChange, Wait, diff --git a/awx/ui/static/js/helpers/md5.js b/awx/ui/static/js/helpers/md5.js index 0a097d750e..fc87c3e66d 100644 --- a/awx/ui/static/js/helpers/md5.js +++ b/awx/ui/static/js/helpers/md5.js @@ -1,9 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * md5helper - * - */ + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:md5 diff --git a/awx/ui/static/js/helpers/refresh-related.js b/awx/ui/static/js/helpers/refresh-related.js index fa52fcda66..0ff02a561f 100644 --- a/awx/ui/static/js/helpers/refresh-related.js +++ b/awx/ui/static/js/helpers/refresh-related.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:refresh-related diff --git a/awx/ui/static/js/helpers/refresh.js b/awx/ui/static/js/helpers/refresh.js index 37f625dcfa..23a1f905e5 100644 --- a/awx/ui/static/js/helpers/refresh.js +++ b/awx/ui/static/js/helpers/refresh.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:refresh diff --git a/awx/ui/static/js/helpers/related-search.js b/awx/ui/static/js/helpers/related-search.js index ca3a116c75..09df5cb4d3 100644 --- a/awx/ui/static/js/helpers/related-search.js +++ b/awx/ui/static/js/helpers/related-search.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:related-search diff --git a/awx/ui/static/js/helpers/search.js b/awx/ui/static/js/helpers/search.js index ccac5531b0..1f736e4589 100644 --- a/awx/ui/static/js/helpers/search.js +++ b/awx/ui/static/js/helpers/search.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:search diff --git a/awx/ui/static/js/helpers/teams.js b/awx/ui/static/js/helpers/teams.js index 7b9b7af545..2d7e0a05ab 100644 --- a/awx/ui/static/js/helpers/teams.js +++ b/awx/ui/static/js/helpers/teams.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name helpers.function:teams diff --git a/awx/ui/static/js/job-templates/delete-job-template.service.js b/awx/ui/static/js/job-templates/delete-job-template.service.js index a61754b460..64a6da8dac 100644 --- a/awx/ui/static/js/job-templates/delete-job-template.service.js +++ b/awx/ui/static/js/job-templates/delete-job-template.service.js @@ -1,4 +1,10 @@ -var rest, getBasePath; +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + var rest, getBasePath; export default [ 'Rest', diff --git a/awx/ui/static/js/job-templates/main.js b/awx/ui/static/js/job-templates/main.js index 3daabbf1d6..f38fce2023 100644 --- a/awx/ui/static/js/job-templates/main.js +++ b/awx/ui/static/js/job-templates/main.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import deleteJobTemplate from './delete-job-template.service'; export default diff --git a/awx/ui/static/js/jobs/standard-out-details.block.less b/awx/ui/static/js/jobs/standard-out-details.block.less index a81638fd65..99958e9808 100644 --- a/awx/ui/static/js/jobs/standard-out-details.block.less +++ b/awx/ui/static/js/jobs/standard-out-details.block.less @@ -1,4 +1,10 @@ -/** @define StandardOutDetails */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** @define StandardOutDetails */ // Some of these are left empty as a helpful measure so that you can see how the new // SuitCSS styling should work. They can be removed once we've done more diff --git a/awx/ui/static/js/lists.js b/awx/ui/static/js/lists.js index fefa73d0d1..32606839f1 100644 --- a/awx/ui/static/js/lists.js +++ b/awx/ui/static/js/lists.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import Admins from "tower/lists/Admins"; import CloudCredentials from "tower/lists/CloudCredentials"; import CompletedJobs from "tower/lists/CompletedJobs"; diff --git a/awx/ui/static/js/lists/Admins.js b/awx/ui/static/js/lists/Admins.js index bd3e2da532..e1c49772f0 100644 --- a/awx/ui/static/js/lists/Admins.js +++ b/awx/ui/static/js/lists/Admins.js @@ -1,13 +1,8 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Admins.js - * List view object for Admins data model. - * - * @dict - */ - - + * All Rights Reserved + *************************************************/ export default angular.module('AdminListDefinition', []) @@ -39,4 +34,4 @@ export default actions: {}, fieldActions: {} - }); \ No newline at end of file + }); diff --git a/awx/ui/static/js/lists/AllJobs.js b/awx/ui/static/js/lists/AllJobs.js index 3cc5b0e7b5..a673b569e6 100644 --- a/awx/ui/static/js/lists/AllJobs.js +++ b/awx/ui/static/js/lists/AllJobs.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * AllJobs.js - * - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('AllJobsDefinition', ['sanitizeFilter', 'capitalizeFilter']) diff --git a/awx/ui/static/js/lists/CloudCredentials.js b/awx/ui/static/js/lists/CloudCredentials.js index 882e47cc82..a676db2719 100644 --- a/awx/ui/static/js/lists/CloudCredentials.js +++ b/awx/ui/static/js/lists/CloudCredentials.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * CloudCredentials.js - * List view object for Credential data model. - * - * @dict - */ + * All Rights Reserved + *************************************************/ + diff --git a/awx/ui/static/js/lists/CompletedJobs.js b/awx/ui/static/js/lists/CompletedJobs.js index e62ce0dc20..cc202fd689 100644 --- a/awx/ui/static/js/lists/CompletedJobs.js +++ b/awx/ui/static/js/lists/CompletedJobs.js @@ -1,10 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * CompletedJobs.js - * - * - */ + * All Rights Reserved + *************************************************/ + diff --git a/awx/ui/static/js/lists/ConfigureTowerJobs.js b/awx/ui/static/js/lists/ConfigureTowerJobs.js index ebd6a4d727..cbb5150168 100644 --- a/awx/ui/static/js/lists/ConfigureTowerJobs.js +++ b/awx/ui/static/js/lists/ConfigureTowerJobs.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobTemplates.js - * List view object for Job Templates data model. - * - * - */ + * All Rights Reserved + *************************************************/ + diff --git a/awx/ui/static/js/lists/Credentials.js b/awx/ui/static/js/lists/Credentials.js index 47d79677df..47a3b7fbf8 100644 --- a/awx/ui/static/js/lists/Credentials.js +++ b/awx/ui/static/js/lists/Credentials.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Credentials.js - * List view object for Credential data model. - * - * @dict - */ + * All Rights Reserved + *************************************************/ + diff --git a/awx/ui/static/js/lists/CustomInventory.js b/awx/ui/static/js/lists/CustomInventory.js index 03c993c646..2fa4b4f2e9 100644 --- a/awx/ui/static/js/lists/CustomInventory.js +++ b/awx/ui/static/js/lists/CustomInventory.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Credentials.js - * List view object for Credential data model. - * - * @dict - */ - + * All Rights Reserved + *************************************************/ + export default diff --git a/awx/ui/static/js/lists/Groups.js b/awx/ui/static/js/lists/Groups.js index 0f91930d6b..33bf611371 100644 --- a/awx/ui/static/js/lists/Groups.js +++ b/awx/ui/static/js/lists/Groups.js @@ -1,11 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Groups.js - * List view object for Group data model. - * - * - */ + * All Rights Reserved + *************************************************/ + @@ -48,4 +46,4 @@ export default dataPlacement: 'top' } } - }); \ No newline at end of file + }); diff --git a/awx/ui/static/js/lists/HomeGroups.js b/awx/ui/static/js/lists/HomeGroups.js index 20c283b655..51730f7ef6 100644 --- a/awx/ui/static/js/lists/HomeGroups.js +++ b/awx/ui/static/js/lists/HomeGroups.js @@ -1,14 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * HomeGroups.js - * - * List view object for Group data model. Used - * on the home tab. - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('HomeGroupListDefinition', []) diff --git a/awx/ui/static/js/lists/HomeHosts.js b/awx/ui/static/js/lists/HomeHosts.js index 3e7a15e3fa..6ec1b04b14 100644 --- a/awx/ui/static/js/lists/HomeHosts.js +++ b/awx/ui/static/js/lists/HomeHosts.js @@ -1,14 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * HomeHosts.js - * - * List view object for Hosts data model. Used - * on the home tab. - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('HomeHostListDefinition', []) diff --git a/awx/ui/static/js/lists/Hosts.js b/awx/ui/static/js/lists/Hosts.js index be43155f53..5dc875f6af 100644 --- a/awx/ui/static/js/lists/Hosts.js +++ b/awx/ui/static/js/lists/Hosts.js @@ -1,14 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Hosts.js - * List view object for Hosts data model. - * - * - */ - - - + * All Rights Reserved + *************************************************/ + export default angular.module('HostListDefinition', []) .value('HostList', { @@ -30,4 +25,4 @@ export default actions: { }, fieldActions: { } - }); \ No newline at end of file + }); diff --git a/awx/ui/static/js/lists/Inventories.js b/awx/ui/static/js/lists/Inventories.js index 5091c344a3..c2dec0758f 100644 --- a/awx/ui/static/js/lists/Inventories.js +++ b/awx/ui/static/js/lists/Inventories.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Inventories.js - * List view object for Inventories data model. - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('InventoriesListDefinition', []) diff --git a/awx/ui/static/js/lists/InventoryGroups.js b/awx/ui/static/js/lists/InventoryGroups.js index 751ecdb900..4dec82a85c 100644 --- a/awx/ui/static/js/lists/InventoryGroups.js +++ b/awx/ui/static/js/lists/InventoryGroups.js @@ -1,9 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * InventoryGroups.js - * - */ + * All Rights Reserved + *************************************************/ + export default angular.module('InventoryGroupsDefinition', []) .value('InventoryGroups', { diff --git a/awx/ui/static/js/lists/InventoryHosts.js b/awx/ui/static/js/lists/InventoryHosts.js index fbb06a13f0..7fde554088 100644 --- a/awx/ui/static/js/lists/InventoryHosts.js +++ b/awx/ui/static/js/lists/InventoryHosts.js @@ -1,14 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * InventoryHosts.js - * - * Right side of /inventories/N page, showing hosts in the selected group. - * - */ - - - + * All Rights Reserved + *************************************************/ + export default angular.module('InventoryHostsDefinition', []) .value('InventoryHosts', { diff --git a/awx/ui/static/js/lists/JobEvents.js b/awx/ui/static/js/lists/JobEvents.js index 10248032aa..2fbfd9b0cd 100644 --- a/awx/ui/static/js/lists/JobEvents.js +++ b/awx/ui/static/js/lists/JobEvents.js @@ -1,13 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Jobs.js - * List view object for Team data model. - * - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('JobEventsListDefinition', []) @@ -116,4 +112,4 @@ export default dataPlacement: 'top' } } - }); \ No newline at end of file + }); diff --git a/awx/ui/static/js/lists/JobHosts.js b/awx/ui/static/js/lists/JobHosts.js index 1606ef5c65..4b9f53f66d 100644 --- a/awx/ui/static/js/lists/JobHosts.js +++ b/awx/ui/static/js/lists/JobHosts.js @@ -1,13 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobHosts.js - * List view object for Job Host Summary data model. - * - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('JobHostDefinition', []) @@ -132,4 +128,4 @@ export default //fieldActions: {} - }); \ No newline at end of file + }); diff --git a/awx/ui/static/js/lists/JobTemplates.js b/awx/ui/static/js/lists/JobTemplates.js index 6c2822c04e..5b3e24e6c3 100644 --- a/awx/ui/static/js/lists/JobTemplates.js +++ b/awx/ui/static/js/lists/JobTemplates.js @@ -1,13 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * JobTemplates.js - * List view object for Job Templates data model. - * - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('JobTemplatesListDefinition', []) diff --git a/awx/ui/static/js/lists/Jobs.js b/awx/ui/static/js/lists/Jobs.js index b7548d54d6..4ad8f7ac18 100644 --- a/awx/ui/static/js/lists/Jobs.js +++ b/awx/ui/static/js/lists/Jobs.js @@ -1,15 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Jobs.js - * List view object for job data model. - * - * Used on dashboard to provide a list of all jobs, regardless of - * status. - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('JobsListDefinition', []) diff --git a/awx/ui/static/js/lists/Organizations.js b/awx/ui/static/js/lists/Organizations.js index 7acea076dc..2a2e6a6fd6 100644 --- a/awx/ui/static/js/lists/Organizations.js +++ b/awx/ui/static/js/lists/Organizations.js @@ -1,13 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Organizations.js - * List view object for Organizations data model. - * - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('OrganizationListDefinition', []) diff --git a/awx/ui/static/js/lists/Permissions.js b/awx/ui/static/js/lists/Permissions.js index da2d362ffd..9938c6fdc7 100644 --- a/awx/ui/static/js/lists/Permissions.js +++ b/awx/ui/static/js/lists/Permissions.js @@ -1,13 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Permissions.js - * List view object for Permissions data model. - * - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('PermissionListDefinition', []) diff --git a/awx/ui/static/js/lists/PortalJobTemplates.js b/awx/ui/static/js/lists/PortalJobTemplates.js index ffceace304..e9290e0f44 100644 --- a/awx/ui/static/js/lists/PortalJobTemplates.js +++ b/awx/ui/static/js/lists/PortalJobTemplates.js @@ -1,13 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * PoralJobTemplates.js - * List view object for Job Templates data model. - * - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('PortalJobTemplatesListDefinition', []) diff --git a/awx/ui/static/js/lists/PortalJobs.js b/awx/ui/static/js/lists/PortalJobs.js index 7828593757..457e240d84 100644 --- a/awx/ui/static/js/lists/PortalJobs.js +++ b/awx/ui/static/js/lists/PortalJobs.js @@ -1,15 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * PortalJobs.js - * List view object for portal job data model. - * - * Used on dashboard to provide a list of all jobs, regardless of - * status. - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('PortalJobsListDefinition', []) diff --git a/awx/ui/static/js/lists/Projects.js b/awx/ui/static/js/lists/Projects.js index 1e6552debc..daad0ba239 100644 --- a/awx/ui/static/js/lists/Projects.js +++ b/awx/ui/static/js/lists/Projects.js @@ -1,13 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Projects.js - * List view object for Project data model. - * - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('ProjectsListDefinition', []) diff --git a/awx/ui/static/js/lists/ScanJobs.js b/awx/ui/static/js/lists/ScanJobs.js index 319a0873b6..4f19054404 100644 --- a/awx/ui/static/js/lists/ScanJobs.js +++ b/awx/ui/static/js/lists/ScanJobs.js @@ -1,15 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Jobs.js - * List view object for job data model. - * - * Used on dashboard to provide a list of all jobs, regardless of - * status. - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('ScanJobsListDefinition', []) diff --git a/awx/ui/static/js/lists/ScheduledJobs.js b/awx/ui/static/js/lists/ScheduledJobs.js index 2ab51d6daf..a293b15ce2 100644 --- a/awx/ui/static/js/lists/ScheduledJobs.js +++ b/awx/ui/static/js/lists/ScheduledJobs.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * ScheduledJobs.js - * - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('ScheduledJobsDefinition', ['sanitizeFilter']) @@ -92,4 +89,4 @@ export default dataPlacement: 'top' } } - }); \ No newline at end of file + }); diff --git a/awx/ui/static/js/lists/Schedules.js b/awx/ui/static/js/lists/Schedules.js index 1e2bab46b4..ba63031068 100644 --- a/awx/ui/static/js/lists/Schedules.js +++ b/awx/ui/static/js/lists/Schedules.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Schedules.js - * List object for Schedule data model. - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('SchedulesListDefinition', []) @@ -96,4 +93,4 @@ export default dataPlacement: 'top' } } - }); \ No newline at end of file + }); diff --git a/awx/ui/static/js/lists/Streams.js b/awx/ui/static/js/lists/Streams.js index fb760d0848..3c9d8c8c48 100644 --- a/awx/ui/static/js/lists/Streams.js +++ b/awx/ui/static/js/lists/Streams.js @@ -1,13 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Streams.js - * List view object for activity stream data model. - * - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('StreamListDefinition', []) @@ -281,4 +277,4 @@ export default } } - }); \ No newline at end of file + }); diff --git a/awx/ui/static/js/lists/Teams.js b/awx/ui/static/js/lists/Teams.js index c159786ab4..9dedb28a55 100644 --- a/awx/ui/static/js/lists/Teams.js +++ b/awx/ui/static/js/lists/Teams.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Teams.js - * List view object for Team data model. - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('TeamsListDefinition', []) diff --git a/awx/ui/static/js/lists/Users.js b/awx/ui/static/js/lists/Users.js index 0e5d4b078f..a454112654 100644 --- a/awx/ui/static/js/lists/Users.js +++ b/awx/ui/static/js/lists/Users.js @@ -1,12 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Users.js - * List view object for Users data model. - * - */ - - + * All Rights Reserved + *************************************************/ + export default angular.module('UserListDefinition', []) diff --git a/awx/ui/static/js/ng-console.js b/awx/ui/static/js/ng-console.js index 1de0b9d89a..98c186ffec 100644 --- a/awx/ui/static/js/ng-console.js +++ b/awx/ui/static/js/ng-console.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + // THIS FILE ONLY INCLUDED IN DEBUG BUILDS // // To use: @@ -13,35 +19,34 @@ // using the variable $scope. // var ngAppElem = angular.element(document.querySelector('[ng-app]') || document); - + window.injector = ngAppElem.injector(); window.inject = window.injector.invoke; window.$rootScope = ngAppElem.scope(); - + // getService('auth') will create a variable `auth` assigned to the service `auth`. // window.getService = function getService(serviceName) { window.inject([serviceName, function (s) {window[serviceName] = s;}]); }; - + Object.defineProperty(window, '$scope', { get: function () { var elem = angular.element(window.__commandLineAPI.$0); return elem.isolateScope() || elem.scope(); }, }); - + /** * USAGE - * + * * First copy the script and paste it in Chrome DevTools in Sources -> left pane -> Snippets. * Then, after loading an Angular page, right click on the snippet and choose "run". * Afterwards, you have the following available in the console: - * + * * 1) $rootScope * 2) inject(function ($q, $compile) { ...use $q and $compile here... }); * 3) click on an element in DevTools; now $scope in the console points at the element scope (isolate if one exists). - * + * * Enjoy! */ - diff --git a/awx/ui/static/js/shared/AuthService.js b/awx/ui/static/js/shared/AuthService.js index 209fea2250..b83c22ae19 100644 --- a/awx/ui/static/js/shared/AuthService.js +++ b/awx/ui/static/js/shared/AuthService.js @@ -1,6 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name shared.function:AuthService diff --git a/awx/ui/static/js/shared/InventoryTree.js b/awx/ui/static/js/shared/InventoryTree.js index eecc1bef51..f6c9ecb925 100644 --- a/awx/ui/static/js/shared/InventoryTree.js +++ b/awx/ui/static/js/shared/InventoryTree.js @@ -1,7 +1,10 @@ -/************************************ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Copyright (c) 2014 AnsibleWorks, Inc. - */ + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name shared.function:inventoryTree diff --git a/awx/ui/static/js/shared/Modal.js b/awx/ui/static/js/shared/Modal.js index e0fcc028d5..772ba532af 100644 --- a/awx/ui/static/js/shared/Modal.js +++ b/awx/ui/static/js/shared/Modal.js @@ -1,8 +1,10 @@ -/************************************ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Copyright (c) 2014 AnsibleWorks, Inc. - */ - /** + * All Rights Reserved + *************************************************/ + +/** * @ngdoc function * @name shared.function:Modal * @description diff --git a/awx/ui/static/js/shared/RestServices.js b/awx/ui/static/js/shared/RestServices.js index 519f17e3e5..9f91b6bb35 100644 --- a/awx/ui/static/js/shared/RestServices.js +++ b/awx/ui/static/js/shared/RestServices.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name shared.function:RestServices diff --git a/awx/ui/static/js/shared/Socket.js b/awx/ui/static/js/shared/Socket.js index 083d1badca..079eb488bc 100644 --- a/awx/ui/static/js/shared/Socket.js +++ b/awx/ui/static/js/shared/Socket.js @@ -1,6 +1,9 @@ -/************************************************** - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name shared.function:Socket diff --git a/awx/ui/static/js/shared/Timer.js b/awx/ui/static/js/shared/Timer.js index 42ce09df07..e9b3de4008 100644 --- a/awx/ui/static/js/shared/Timer.js +++ b/awx/ui/static/js/shared/Timer.js @@ -1,6 +1,9 @@ -/************************************************** - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name shared.function:Timer diff --git a/awx/ui/static/js/shared/Utilities.js b/awx/ui/static/js/shared/Utilities.js index eceeb62c43..72a8c80a20 100644 --- a/awx/ui/static/js/shared/Utilities.js +++ b/awx/ui/static/js/shared/Utilities.js @@ -1,7 +1,10 @@ -/************************************ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * Copyright (c) 2014 AnsibleWorks, Inc. - */ + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name shared.function:Utilities diff --git a/awx/ui/static/js/shared/api-loader.js b/awx/ui/static/js/shared/api-loader.js index cd63fb1676..abfe73ab6d 100644 --- a/awx/ui/static/js/shared/api-loader.js +++ b/awx/ui/static/js/shared/api-loader.js @@ -1,8 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. +/************************************************* + * Copyright (c) 2015 Ansible, Inc. * - * - */ + * All Rights Reserved + *************************************************/ + + /** * @ngdoc overview * @name shared diff --git a/awx/ui/static/js/shared/breadcrumbs/breadcrumb.directive.js b/awx/ui/static/js/shared/breadcrumbs/breadcrumb.directive.js index 7b223e6b7a..85af486323 100644 --- a/awx/ui/static/js/shared/breadcrumbs/breadcrumb.directive.js +++ b/awx/ui/static/js/shared/breadcrumbs/breadcrumb.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default function() { return { diff --git a/awx/ui/static/js/shared/breadcrumbs/breadcrumbs.controller.js b/awx/ui/static/js/shared/breadcrumbs/breadcrumbs.controller.js index 6429007556..62e892b8e3 100644 --- a/awx/ui/static/js/shared/breadcrumbs/breadcrumbs.controller.js +++ b/awx/ui/static/js/shared/breadcrumbs/breadcrumbs.controller.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default [ '$scope', '$rootScope', diff --git a/awx/ui/static/js/shared/breadcrumbs/breadcrumbs.directive.js b/awx/ui/static/js/shared/breadcrumbs/breadcrumbs.directive.js index 39d5cd5ae4..ae1f3fd85c 100644 --- a/awx/ui/static/js/shared/breadcrumbs/breadcrumbs.directive.js +++ b/awx/ui/static/js/shared/breadcrumbs/breadcrumbs.directive.js @@ -1,4 +1,10 @@ -/* jshint unused: vars */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /* jshint unused: vars */ import controller from './breadcrumbs.controller'; import 'tower/shared/generator-helpers'; diff --git a/awx/ui/static/js/shared/breadcrumbs/main.js b/awx/ui/static/js/shared/breadcrumbs/main.js index 47b9761549..7396a2c3f9 100644 --- a/awx/ui/static/js/shared/breadcrumbs/main.js +++ b/awx/ui/static/js/shared/breadcrumbs/main.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import breadcrumbs from './breadcrumbs.directive'; import breadcrumb from './breadcrumb.directive'; diff --git a/awx/ui/static/js/shared/capitalize.filter.js b/awx/ui/static/js/shared/capitalize.filter.js index bbb392e0e4..8f0b580d58 100644 --- a/awx/ui/static/js/shared/capitalize.filter.js +++ b/awx/ui/static/js/shared/capitalize.filter.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + angular.module('capitalizeFilter', []).filter('capitalize', function() { return function(input) { input = input.charAt(0).toUpperCase() + input.substr(1).toLowerCase(); diff --git a/awx/ui/static/js/shared/directives.js b/awx/ui/static/js/shared/directives.js index 6401f6517c..9226ecfd16 100644 --- a/awx/ui/static/js/shared/directives.js +++ b/awx/ui/static/js/shared/directives.js @@ -1,6 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name shared.function:directives diff --git a/awx/ui/static/js/shared/features/features.controller.js b/awx/ui/static/js/shared/features/features.controller.js index 6f1a62ae54..198ac661d2 100644 --- a/awx/ui/static/js/shared/features/features.controller.js +++ b/awx/ui/static/js/shared/features/features.controller.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default ['$rootScope', function ($rootScope) { this.isFeatureEnabled = function(feature){ diff --git a/awx/ui/static/js/shared/features/features.directive.js b/awx/ui/static/js/shared/features/features.directive.js index 7f349cc00a..b77aa12776 100644 --- a/awx/ui/static/js/shared/features/features.directive.js +++ b/awx/ui/static/js/shared/features/features.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc overview * @name features @@ -11,7 +17,7 @@ * DOM if it is a feature not supported by the user's license. * For example, adding `aw-feature="system-tracking"` will enable or disable * the system tracking button based on the license configuration on the - * /config endpoint. + * /config endpoint. * * */ diff --git a/awx/ui/static/js/shared/features/features.service.js b/awx/ui/static/js/shared/features/features.service.js index 2251e561b6..0f2010e59f 100644 --- a/awx/ui/static/js/shared/features/features.service.js +++ b/awx/ui/static/js/shared/features/features.service.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default ['$rootScope', 'Rest', 'GetBasePath', 'ProcessErrors', '$http', '$q', function ($rootScope, Rest, GetBasePath, ProcessErrors, $http, $q) { return { diff --git a/awx/ui/static/js/shared/features/main.js b/awx/ui/static/js/shared/features/main.js index f94224864d..9dd9c20f90 100644 --- a/awx/ui/static/js/shared/features/main.js +++ b/awx/ui/static/js/shared/features/main.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import awFeatureDirective from 'tower/shared/features/features.directive'; import FeaturesService from 'tower/shared/features/features.service'; diff --git a/awx/ui/static/js/shared/filters.js b/awx/ui/static/js/shared/filters.js index dca6168266..2531f1da35 100644 --- a/awx/ui/static/js/shared/filters.js +++ b/awx/ui/static/js/shared/filters.js @@ -1,6 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name shared.function:filters diff --git a/awx/ui/static/js/shared/form-generator.js b/awx/ui/static/js/shared/form-generator.js index 4a791ef370..49740c3002 100644 --- a/awx/ui/static/js/shared/form-generator.js +++ b/awx/ui/static/js/shared/form-generator.js @@ -1,6 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name shared.function:form-generator diff --git a/awx/ui/static/js/shared/generator-helpers.js b/awx/ui/static/js/shared/generator-helpers.js index d6549ba24f..55afd982ca 100644 --- a/awx/ui/static/js/shared/generator-helpers.js +++ b/awx/ui/static/js/shared/generator-helpers.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name shared.function:generator-helpers diff --git a/awx/ui/static/js/shared/list-generator/list-generator.factory.js b/awx/ui/static/js/shared/list-generator/list-generator.factory.js index 8dabd91a4e..0cb6b30d89 100644 --- a/awx/ui/static/js/shared/list-generator/list-generator.factory.js +++ b/awx/ui/static/js/shared/list-generator/list-generator.factory.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name shared.function:list-generator diff --git a/awx/ui/static/js/shared/list-generator/main.js b/awx/ui/static/js/shared/list-generator/main.js index 85b21247eb..21ef3be575 100644 --- a/awx/ui/static/js/shared/list-generator/main.js +++ b/awx/ui/static/js/shared/list-generator/main.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import generateList from './list-generator.factory'; import toolbarButton from './toolbar-button.directive'; import generatorHelpers from 'tower/shared/generator-helpers'; diff --git a/awx/ui/static/js/shared/list-generator/toolbar-button.directive.js b/awx/ui/static/js/shared/list-generator/toolbar-button.directive.js index a997ab0776..c58150609d 100644 --- a/awx/ui/static/js/shared/list-generator/toolbar-button.directive.js +++ b/awx/ui/static/js/shared/list-generator/toolbar-button.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default ['$compile', 'Attr', 'SelectIcon', function($compile, Attr, SelectIcon) { return { restrict: 'A', diff --git a/awx/ui/static/js/shared/lodash-as-promised.js b/awx/ui/static/js/shared/lodash-as-promised.js index 196248db8d..ef0f77029a 100644 --- a/awx/ui/static/js/shared/lodash-as-promised.js +++ b/awx/ui/static/js/shared/lodash-as-promised.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + function lodashAsPromised($q) { var lodash = _.runInContext(); diff --git a/awx/ui/static/js/shared/long-date.filter.js b/awx/ui/static/js/shared/long-date.filter.js index 5148dc2ee7..845ed86491 100644 --- a/awx/ui/static/js/shared/long-date.filter.js +++ b/awx/ui/static/js/shared/long-date.filter.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + angular.module('longDateFilter', []).filter('longDate', function() { return function(input) { diff --git a/awx/ui/static/js/shared/main.js b/awx/ui/static/js/shared/main.js index e0bdc363c1..8dbe63b7a7 100644 --- a/awx/ui/static/js/shared/main.js +++ b/awx/ui/static/js/shared/main.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import listGenerator from './list-generator/main'; import title from './title.directive'; import lodashAsPromised from './lodash-as-promised'; diff --git a/awx/ui/static/js/shared/multi-select-list/main.js b/awx/ui/static/js/shared/multi-select-list/main.js index 41dbe0d572..089fc7cd7b 100644 --- a/awx/ui/static/js/shared/multi-select-list/main.js +++ b/awx/ui/static/js/shared/multi-select-list/main.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import multiSelect from './multi-select-list.directive'; import selectAll from './select-all.directive'; import selectListItem from './select-list-item.directive'; diff --git a/awx/ui/static/js/shared/multi-select-list/multi-select-list.controller.js b/awx/ui/static/js/shared/multi-select-list/multi-select-list.controller.js index 0af01b9eb8..c583e83032 100644 --- a/awx/ui/static/js/shared/multi-select-list/multi-select-list.controller.js +++ b/awx/ui/static/js/shared/multi-select-list/multi-select-list.controller.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc object * @name multiSelectList.controller:multiSelectList diff --git a/awx/ui/static/js/shared/multi-select-list/multi-select-list.directive.js b/awx/ui/static/js/shared/multi-select-list/multi-select-list.directive.js index 3a9e0f8ae7..71424d3cbe 100644 --- a/awx/ui/static/js/shared/multi-select-list/multi-select-list.directive.js +++ b/awx/ui/static/js/shared/multi-select-list/multi-select-list.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc overview * @name multiSelectList diff --git a/awx/ui/static/js/shared/multi-select-list/select-all.directive.js b/awx/ui/static/js/shared/multi-select-list/select-all.directive.js index 57e25eae80..251fd6a008 100644 --- a/awx/ui/static/js/shared/multi-select-list/select-all.directive.js +++ b/awx/ui/static/js/shared/multi-select-list/select-all.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc directive * @name multiSelectList.directive:selectAll diff --git a/awx/ui/static/js/shared/multi-select-list/select-list-item.directive.js b/awx/ui/static/js/shared/multi-select-list/select-list-item.directive.js index 726fb044a0..06abd35d25 100644 --- a/awx/ui/static/js/shared/multi-select-list/select-list-item.directive.js +++ b/awx/ui/static/js/shared/multi-select-list/select-list-item.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc directive * @name multiSelectList.directive:selectListItem diff --git a/awx/ui/static/js/shared/prompt-dialog.js b/awx/ui/static/js/shared/prompt-dialog.js index d083045a60..602368efe7 100644 --- a/awx/ui/static/js/shared/prompt-dialog.js +++ b/awx/ui/static/js/shared/prompt-dialog.js @@ -1,6 +1,9 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** * @ngdoc function * @name shared.function:prompt-dialog diff --git a/awx/ui/static/js/shared/pwdmeter.js b/awx/ui/static/js/shared/pwdmeter.js deleted file mode 100644 index 66049eb8fa..0000000000 --- a/awx/ui/static/js/shared/pwdmeter.js +++ /dev/null @@ -1,327 +0,0 @@ -/* -** Created by: Jeff Todnem (http://www.todnem.com/) -** Created on: 2007-08-14 -** Modified: 2013-07-31 by James Cammarata -** -** License Information: -** ------------------------------------------------------------------------- -** Copyright (C) 2007 Jeff Todnem -** -** This program is free software; you can redistribute it and/or modify it -** under the terms of the GNU General Public License as published by the -** Free Software Foundation; either version 2 of the License, or (at your -** option) any later version. -** -** This program is distributed in the hope that it will be useful, but -** WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** You should have received a copy of the GNU General Public License along -** with this program; if not, write to the Free Software Foundation, Inc., -** 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -** -**/ - /** - * @ngdoc function - * @name shared.function:pwdmeter - * @description -** CLH 09/05/13 - Set required strength in config.js -** 02/10/14 - Applied jsHint -*/ - -/*jshint eqeqeq:false, unused:false */ - -String.prototype.strReverse = function () { - var newstring = "", s; - for (s = 0; s < this.length; s++) { - newstring = this.charAt(s) + newstring; - } - return newstring; -}; - -var nScore = 0; - -export function chkPass(pwd) { - // Simultaneous variable declaration and value assignment aren't supported in IE apparently - // so I'm forced to assign the same value individually per var to support a crappy browser *sigh* - var nLength = 0, - nAlphaUC = 0, - nAlphaLC = 0, - nNumber = 0, - nSymbol = 0, - nMidChar = 0, - nRequirements = 0, - nAlphasOnly = 0, - nNumbersOnly = 0, - nUnqChar = 0, - nRepChar = 0, - nRepInc = 0, - nConsecAlphaUC = 0, - nConsecAlphaLC = 0, - nConsecNumber = 0, - nConsecSymbol = 0, - nConsecCharType = 0, - nSeqAlpha = 0, - nSeqNumber = 0, - nSeqSymbol = 0, - nSeqChar = 0, - nReqChar = 0, - nMultConsecCharType = 0, - nMultRepChar = 1, - nMultConsecSymbol = 1, - nMultMidChar = 2, - nMultRequirements = 2, - nMultConsecAlphaUC = 2, - nMultConsecAlphaLC = 2, - nMultConsecNumber = 2, - nReqCharType = 3, - nMultAlphaUC = 3, - nMultAlphaLC = 3, - nMultSeqAlpha = 3, - nMultSeqNumber = 3, - nMultSeqSymbol = 3, - nMultLength = 4, - nMultNumber = 4, - nMultSymbol = 6, - nTmpAlphaUC = "", - nTmpAlphaLC = "", - nTmpNumber = "", - nTmpSymbol = "", - sAlphaUC = "0", - sAlphaLC = "0", - sNumber = "0", - sSymbol = "0", - sMidChar = "0", - sRequirements = "0", - sAlphasOnly = "0", - sNumbersOnly = "0", - sRepChar = "0", - sConsecAlphaUC = "0", - sConsecAlphaLC = "0", - sConsecNumber = "0", - sSeqAlpha = "0", - sSeqNumber = "0", - sSeqSymbol = "0", - sAlphas = "abcdefghijklmnopqrstuvwxyz", - sNumerics = "01234567890", - sSymbols = ")_!@#$%^&*()", - sComplexity = "Too Short", - sStandards = "Below", - nMinPwdLen = 8, - a, nd, arrPwd, arrPwdLen,bCharExists,b,s,sFwd,sRev,progbar,required_strength,warning_level; - - if (document.all) { - nd = 0; - } else { - nd = 1; - } - if (pwd) { - nScore = parseInt(pwd.length * nMultLength); - nLength = pwd.length; - arrPwd = pwd.replace(/\s+/g, "").split(/\s*/); - arrPwdLen = arrPwd.length; - - /* Loop through password to check for Symbol, Numeric, Lowercase and Uppercase pattern matches */ - for (a = 0; a < arrPwdLen; a++) { - if (arrPwd[a].match(/[A-Z]/g)) { - if (nTmpAlphaUC !== "") { - if ((nTmpAlphaUC + 1) == a) { - nConsecAlphaUC++; - nConsecCharType++; - } - } - nTmpAlphaUC = a; - nAlphaUC++; - } else if (arrPwd[a].match(/[a-z]/g)) { - if (nTmpAlphaLC !== "") { - if ((nTmpAlphaLC + 1) == a) { - nConsecAlphaLC++; - nConsecCharType++; - } - } - nTmpAlphaLC = a; - nAlphaLC++; - } else if (arrPwd[a].match(/[0-9]/g)) { - if (a > 0 && a < (arrPwdLen - 1)) { - nMidChar++; - } - if (nTmpNumber !== "") { - if ((nTmpNumber + 1) == a) { - nConsecNumber++; - nConsecCharType++; - } - } - nTmpNumber = a; - nNumber++; - } else if (arrPwd[a].match(/[^a-zA-Z0-9_]/g)) { - if (a > 0 && a < (arrPwdLen - 1)) { - nMidChar++; - } - if (nTmpSymbol !== "") { - if ((nTmpSymbol + 1) == a) { - nConsecSymbol++; - nConsecCharType++; - } - } - nTmpSymbol = a; - nSymbol++; - } - - /* Internal loop through password to check for repeat characters */ - bCharExists = false; - for (b = 0; b < arrPwdLen; b++) { - if (arrPwd[a] == arrPwd[b] && a != b) { /* repeat character exists */ - bCharExists = true; - /* - Calculate icrement deduction based on proximity to identical characters - Deduction is incremented each time a new match is discovered - Deduction amount is based on total password length divided by the - difference of distance between currently selected match - */ - nRepInc += Math.abs(arrPwdLen / (b - a)); - } - } - if (bCharExists) { - nRepChar++; - nUnqChar = arrPwdLen - nRepChar; - nRepInc = (nUnqChar) ? Math.ceil(nRepInc / nUnqChar) : Math.ceil(nRepInc); - } - } - - /* Check for sequential alpha string patterns (forward and reverse) */ - for (s = 0; s < 23; s++) { - sFwd = sAlphas.substring(s, parseInt(s + 3)); - sRev = sFwd.strReverse(); - if (pwd.toLowerCase().indexOf(sFwd) != -1 || pwd.toLowerCase().indexOf(sRev) != -1) { - nSeqAlpha++; - nSeqChar++; - } - } - - /* Check for sequential numeric string patterns (forward and reverse) */ - for (s = 0; s < 8; s++) { - sFwd = sNumerics.substring(s, parseInt(s + 3)); - sRev = sFwd.strReverse(); - if (pwd.toLowerCase().indexOf(sFwd) != -1 || pwd.toLowerCase().indexOf(sRev) != -1) { - nSeqNumber++; - nSeqChar++; - } - } - - /* Check for sequential symbol string patterns (forward and reverse) */ - for (s = 0; s < 8; s++) { - sFwd = sSymbols.substring(s, parseInt(s + 3)); - sRev = sFwd.strReverse(); - if (pwd.toLowerCase().indexOf(sFwd) != -1 || pwd.toLowerCase().indexOf(sRev) != -1) { - nSeqSymbol++; - nSeqChar++; - } - } - - /* Modify overall score value based on usage vs requirements */ - - /* General point assignment */ - if (nAlphaUC > 0 && nAlphaUC < nLength) { - nScore = parseInt(nScore + ((nLength - nAlphaUC) * 2)); - sAlphaUC = "+ " + parseInt((nLength - nAlphaUC) * 2); - } - if (nAlphaLC > 0 && nAlphaLC < nLength) { - nScore = parseInt(nScore + ((nLength - nAlphaLC) * 2)); - sAlphaLC = "+ " + parseInt((nLength - nAlphaLC) * 2); - } - if (nNumber > 0 && nNumber < nLength) { - nScore = parseInt(nScore + (nNumber * nMultNumber)); - sNumber = "+ " + parseInt(nNumber * nMultNumber); - } - if (nSymbol > 0) { - nScore = parseInt(nScore + (nSymbol * nMultSymbol)); - sSymbol = "+ " + parseInt(nSymbol * nMultSymbol); - } - if (nMidChar > 0) { - nScore = parseInt(nScore + (nMidChar * nMultMidChar)); - sMidChar = "+ " + parseInt(nMidChar * nMultMidChar); - } - - /* Point deductions for poor practices */ - if ((nAlphaLC > 0 || nAlphaUC > 0) && nSymbol === 0 && nNumber === 0) { // Only Letters - nScore = parseInt(nScore - nLength); - nAlphasOnly = nLength; - sAlphasOnly = "- " + nLength; - } - if (nAlphaLC === 0 && nAlphaUC === 0 && nSymbol === 0 && nNumber > 0) { // Only Numbers - nScore = parseInt(nScore - nLength); - nNumbersOnly = nLength; - sNumbersOnly = "- " + nLength; - } - if (nRepChar > 0) { // Same character exists more than once - nScore = parseInt(nScore - nRepInc); - sRepChar = "- " + nRepInc; - } - if (nConsecAlphaUC > 0) { // Consecutive Uppercase Letters exist - nScore = parseInt(nScore - (nConsecAlphaUC * nMultConsecAlphaUC)); - sConsecAlphaUC = "- " + parseInt(nConsecAlphaUC * nMultConsecAlphaUC); - } - if (nConsecAlphaLC > 0) { // Consecutive Lowercase Letters exist - nScore = parseInt(nScore - (nConsecAlphaLC * nMultConsecAlphaLC)); - sConsecAlphaLC = "- " + parseInt(nConsecAlphaLC * nMultConsecAlphaLC); - } - if (nConsecNumber > 0) { // Consecutive Numbers exist - nScore = parseInt(nScore - (nConsecNumber * nMultConsecNumber)); - sConsecNumber = "- " + parseInt(nConsecNumber * nMultConsecNumber); - } - if (nSeqAlpha > 0) { // Sequential alpha strings exist (3 characters or more) - nScore = parseInt(nScore - (nSeqAlpha * nMultSeqAlpha)); - sSeqAlpha = "- " + parseInt(nSeqAlpha * nMultSeqAlpha); - } - if (nSeqNumber > 0) { // Sequential numeric strings exist (3 characters or more) - nScore = parseInt(nScore - (nSeqNumber * nMultSeqNumber)); - sSeqNumber = "- " + parseInt(nSeqNumber * nMultSeqNumber); - } - if (nSeqSymbol > 0) { // Sequential symbol strings exist (3 characters or more) - nScore = parseInt(nScore - (nSeqSymbol * nMultSeqSymbol)); - sSeqSymbol = "- " + parseInt(nSeqSymbol * nMultSeqSymbol); - } - - progbar = $("#progbar"); - required_strength = $AnsibleConfig.password_strength; - warning_level = ($AnsibleConfig.password_strength - 15 < 0) ? 0 : $AnsibleConfig.password_strength - 15; - - /* Enforce a minimum length of 8 */ - if (nLength < 8) { - nScore = 0; - } - - /* Determine complexity based on overall score */ - if (nScore > 100) { - nScore = 100; - } else if (nScore < 0) { - nScore = 0; - } else if (nScore >= required_strength) { - nScore = 100; //a green progress bar should be at 100% - } - - progbar.css("width", nScore + '%'); - - if (nScore >= 0 && nScore <= warning_level) { - sComplexity = 'Weak'; - progbar.addClass('progress-bar-danger'); - progbar.removeClass('progress-bar-success progress-bar-warning'); - } else if (nScore > warning_level && nScore <= required_strength) { - sComplexity = 'Good'; - progbar.addClass('progress-bar-warning'); - progbar.removeClass('progress-bar-success progress-bar-danger'); - } else if (nScore > required_strength) { - sComplexity = "Strong"; - progbar.addClass('progress-bar-success'); - progbar.removeClass('progress-bar-warning progress-bar-danger'); - } - } else { - /* no password, so reset the displays */ - progbar = $("#progbar"); - progbar.css("width", '0%'); - progbar.removeClass('progress-bar-success progress-bar-warning'); - } - - return nScore; -} diff --git a/awx/ui/static/js/shared/route-extensions/link-to.directive.js b/awx/ui/static/js/shared/route-extensions/link-to.directive.js index 42d83ede9f..a27782a6bc 100644 --- a/awx/ui/static/js/shared/route-extensions/link-to.directive.js +++ b/awx/ui/static/js/shared/route-extensions/link-to.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /* jshint unused: vars */ import {lookupRouteUrl} from './lookup-route-url'; diff --git a/awx/ui/static/js/shared/route-extensions/lookup-route-url.js b/awx/ui/static/js/shared/route-extensions/lookup-route-url.js index e2b0b8ffd5..25e0b9b9b0 100644 --- a/awx/ui/static/js/shared/route-extensions/lookup-route-url.js +++ b/awx/ui/static/js/shared/route-extensions/lookup-route-url.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export function lookupRouteUrl(name, routes, models, html5Mode) { var route = _.find(routes, {name: name}); diff --git a/awx/ui/static/js/shared/route-extensions/main.js b/awx/ui/static/js/shared/route-extensions/main.js index f041598bd9..859a3a2969 100644 --- a/awx/ui/static/js/shared/route-extensions/main.js +++ b/awx/ui/static/js/shared/route-extensions/main.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import linkTo from './link-to.directive'; import transitionTo from './transition-to.factory'; import modelListener from './model-listener.config'; diff --git a/awx/ui/static/js/shared/route-extensions/model-listener.config.js b/awx/ui/static/js/shared/route-extensions/model-listener.config.js index 7f7112f08a..78feebb8f9 100644 --- a/awx/ui/static/js/shared/route-extensions/model-listener.config.js +++ b/awx/ui/static/js/shared/route-extensions/model-listener.config.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default [ '$rootScope', '$routeParams', diff --git a/awx/ui/static/js/shared/route-extensions/route-params.decorator.js b/awx/ui/static/js/shared/route-extensions/route-params.decorator.js index e1b68484be..3597816c19 100644 --- a/awx/ui/static/js/shared/route-extensions/route-params.decorator.js +++ b/awx/ui/static/js/shared/route-extensions/route-params.decorator.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export function wrapDelegate($delegate) { $delegate.hasModelKey = function hasModelKey(key) { return $delegate.hasOwnProperty('model') && diff --git a/awx/ui/static/js/shared/route-extensions/transition-to.factory.js b/awx/ui/static/js/shared/route-extensions/transition-to.factory.js index 17558a8397..aeec18e43e 100644 --- a/awx/ui/static/js/shared/route-extensions/transition-to.factory.js +++ b/awx/ui/static/js/shared/route-extensions/transition-to.factory.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import {lookupRouteUrl} from './lookup-route-url'; /** diff --git a/awx/ui/static/js/shared/text-label.less b/awx/ui/static/js/shared/text-label.less index 66ef5f3fec..91ff0f1a65 100644 --- a/awx/ui/static/js/shared/text-label.less +++ b/awx/ui/static/js/shared/text-label.less @@ -16,5 +16,3 @@ padding-bottom: 0.2em; line-height: 1.1; } - - diff --git a/awx/ui/static/js/shared/title.directive.js b/awx/ui/static/js/shared/title.directive.js index e0f1d0c13b..717b0912b7 100644 --- a/awx/ui/static/js/shared/title.directive.js +++ b/awx/ui/static/js/shared/title.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /* jshint unused: vars */ export default function() { @@ -9,4 +15,3 @@ export default function() { element.tooltip(); }; } - diff --git a/awx/ui/static/js/shared/xss-sanitizer.filter.js b/awx/ui/static/js/shared/xss-sanitizer.filter.js index 0ed767aacb..b5303672f0 100644 --- a/awx/ui/static/js/shared/xss-sanitizer.filter.js +++ b/awx/ui/static/js/shared/xss-sanitizer.filter.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + angular.module('sanitizeFilter', []).filter('sanitize', function() { return function(input) { input = input.replace(//g, ">").replace(/'/g, "'").replace(/"/g, """); diff --git a/awx/ui/static/js/smart-status/main.js b/awx/ui/static/js/smart-status/main.js index 2eaeb06ad1..f863768e88 100644 --- a/awx/ui/static/js/smart-status/main.js +++ b/awx/ui/static/js/smart-status/main.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import smartStatusDirective from 'tower/smart-status/smart-status.directive'; export default angular.module('systemStatus', []) diff --git a/awx/ui/static/js/smart-status/smart-status.controller.js b/awx/ui/static/js/smart-status/smart-status.controller.js index 81f629308f..714445ad45 100644 --- a/awx/ui/static/js/smart-status/smart-status.controller.js +++ b/awx/ui/static/js/smart-status/smart-status.controller.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default ['$scope', function ($scope) { var recentJobs = $scope.jobs; diff --git a/awx/ui/static/js/smart-status/smart-status.directive.js b/awx/ui/static/js/smart-status/smart-status.directive.js index 73f60f7bdc..a36e692f97 100644 --- a/awx/ui/static/js/smart-status/smart-status.directive.js +++ b/awx/ui/static/js/smart-status/smart-status.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import smartStatusController from 'tower/smart-status/smart-status.controller'; export default [ function() { return { diff --git a/awx/ui/static/js/system-tracking/compare-facts.js b/awx/ui/static/js/system-tracking/compare-facts.js index c7f7f85f63..e3c9721fed 100644 --- a/awx/ui/static/js/system-tracking/compare-facts.js +++ b/awx/ui/static/js/system-tracking/compare-facts.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import compareNestedFacts from './compare-facts/nested'; import compareFlatFacts from './compare-facts/flat'; diff --git a/awx/ui/static/js/system-tracking/compare-facts/flat.js b/awx/ui/static/js/system-tracking/compare-facts/flat.js index 747def2b77..449db66e7c 100644 --- a/awx/ui/static/js/system-tracking/compare-facts/flat.js +++ b/awx/ui/static/js/system-tracking/compare-facts/flat.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default function flatCompare(facts, nameKey, compareKeys) { diff --git a/awx/ui/static/js/system-tracking/compare-facts/nested-helpers.js b/awx/ui/static/js/system-tracking/compare-facts/nested-helpers.js index ba3e9c99e7..902d1a67ca 100644 --- a/awx/ui/static/js/system-tracking/compare-facts/nested-helpers.js +++ b/awx/ui/static/js/system-tracking/compare-facts/nested-helpers.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export function formatFacts(diffedResults) { var loggingEnabled = false; diff --git a/awx/ui/static/js/system-tracking/compare-facts/nested.js b/awx/ui/static/js/system-tracking/compare-facts/nested.js index 7c5955e48b..0261044ccc 100644 --- a/awx/ui/static/js/system-tracking/compare-facts/nested.js +++ b/awx/ui/static/js/system-tracking/compare-facts/nested.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import {formatFacts, findFacts} from './nested-helpers'; export default function nestedCompare(factsList) { diff --git a/awx/ui/static/js/system-tracking/data-services/fact-scan-data.service.js b/awx/ui/static/js/system-tracking/data-services/fact-scan-data.service.js index 018f3d098b..01d582680f 100644 --- a/awx/ui/static/js/system-tracking/data-services/fact-scan-data.service.js +++ b/awx/ui/static/js/system-tracking/data-services/fact-scan-data.service.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default ['Rest', 'GetBasePath', 'ProcessErrors', 'lodashAsPromised', function (Rest, GetBasePath, ProcessErrors, _) { return { diff --git a/awx/ui/static/js/system-tracking/data-services/get-data-for-comparison.factory.js b/awx/ui/static/js/system-tracking/data-services/get-data-for-comparison.factory.js index e6f0cb2ec9..1eea1edc54 100644 --- a/awx/ui/static/js/system-tracking/data-services/get-data-for-comparison.factory.js +++ b/awx/ui/static/js/system-tracking/data-services/get-data-for-comparison.factory.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default [ 'factScanDataService', 'lodashAsPromised', diff --git a/awx/ui/static/js/system-tracking/date-picker/date-picker.directive.js b/awx/ui/static/js/system-tracking/date-picker/date-picker.directive.js index c7820b50b7..550a7bebd4 100644 --- a/awx/ui/static/js/system-tracking/date-picker/date-picker.directive.js +++ b/awx/ui/static/js/system-tracking/date-picker/date-picker.directive.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /* jshint unused: vars */ export default diff --git a/awx/ui/static/js/system-tracking/date-picker/main.js b/awx/ui/static/js/system-tracking/date-picker/main.js index f2d536cdd3..21bbf0432b 100644 --- a/awx/ui/static/js/system-tracking/date-picker/main.js +++ b/awx/ui/static/js/system-tracking/date-picker/main.js @@ -1,7 +1,12 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import datePicker from './date-picker.directive'; export default angular.module('systemTracking.datePicker', []) .directive('datePicker', datePicker); - diff --git a/awx/ui/static/js/system-tracking/fact-data-group.block.less b/awx/ui/static/js/system-tracking/fact-data-group.block.less index 9d62b689ef..546e787b95 100644 --- a/awx/ui/static/js/system-tracking/fact-data-group.block.less +++ b/awx/ui/static/js/system-tracking/fact-data-group.block.less @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + /** @define FactDataGroup */ @import 'shared/text-label.less'; diff --git a/awx/ui/static/js/system-tracking/main.js b/awx/ui/static/js/system-tracking/main.js index 0361ab502c..7f20e86d89 100644 --- a/awx/ui/static/js/system-tracking/main.js +++ b/awx/ui/static/js/system-tracking/main.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import route from './system-tracking.route'; import factScanDataService from './data-services/fact-scan-data.service'; import getDataForComparison from './data-services/get-data-for-comparison.factory'; diff --git a/awx/ui/static/js/system-tracking/search-date-range.js b/awx/ui/static/js/system-tracking/search-date-range.js index ed2a36e0e4..6fe497b18b 100644 --- a/awx/ui/static/js/system-tracking/search-date-range.js +++ b/awx/ui/static/js/system-tracking/search-date-range.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export function searchDateRange(date) { return { from: moment(date).startOf('day'), diff --git a/awx/ui/static/js/system-tracking/string-or-date.filter.js b/awx/ui/static/js/system-tracking/string-or-date.filter.js index 487af2190b..4c0cc65160 100644 --- a/awx/ui/static/js/system-tracking/string-or-date.filter.js +++ b/awx/ui/static/js/system-tracking/string-or-date.filter.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + export default [ 'amDateFormatFilter', function(dateFormat) { diff --git a/awx/ui/static/js/system-tracking/system-tracking.controller.js b/awx/ui/static/js/system-tracking/system-tracking.controller.js index 9cb44062ef..493bdc5118 100644 --- a/awx/ui/static/js/system-tracking/system-tracking.controller.js +++ b/awx/ui/static/js/system-tracking/system-tracking.controller.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import {searchDateRange} from './search-date-range'; import {compareFacts} from './compare-facts'; diff --git a/awx/ui/static/js/system-tracking/system-tracking.route.js b/awx/ui/static/js/system-tracking/system-tracking.route.js index cb3eb0f5a6..ca78ed6b61 100644 --- a/awx/ui/static/js/system-tracking/system-tracking.route.js +++ b/awx/ui/static/js/system-tracking/system-tracking.route.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import {searchDateRange} from './search-date-range'; export default { diff --git a/awx/ui/static/js/widgets.js b/awx/ui/static/js/widgets.js index f173fb5c79..458947e5b5 100644 --- a/awx/ui/static/js/widgets.js +++ b/awx/ui/static/js/widgets.js @@ -1,3 +1,9 @@ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + import "tower/widgets/InventorySyncStatus"; import "tower/widgets/JobStatus"; import "tower/widgets/ObjectCount"; diff --git a/awx/ui/static/js/widgets/InventorySyncStatus.js b/awx/ui/static/js/widgets/InventorySyncStatus.js index 230ad6513e..75438f03de 100644 --- a/awx/ui/static/js/widgets/InventorySyncStatus.js +++ b/awx/ui/static/js/widgets/InventorySyncStatus.js @@ -1,6 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name widgets.function:InventorySyncStatus @@ -108,4 +112,4 @@ angular.module('InventorySyncStatusWidget', ['RestServices', 'Utilities']) }; } -]); \ No newline at end of file +]); diff --git a/awx/ui/static/js/widgets/JobStatus.js b/awx/ui/static/js/widgets/JobStatus.js index ef1baca2b9..2ec89936a3 100644 --- a/awx/ui/static/js/widgets/JobStatus.js +++ b/awx/ui/static/js/widgets/JobStatus.js @@ -1,6 +1,10 @@ -/********************************************* -* Copyright (c) 2014 AnsibleWorks, Inc. -*/ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name widgets.function:JobStatus @@ -100,4 +104,4 @@ angular.module('JobStatusWidget', ['RestServices', 'Utilities']) }; } - ]); \ 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 55dba49bd3..84ddd6fb80 100644 --- a/awx/ui/static/js/widgets/ObjectCount.js +++ b/awx/ui/static/js/widgets/ObjectCount.js @@ -1,6 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name widgets.function:ObjectCount @@ -71,4 +75,4 @@ angular.module('ObjectCountWidget', ['RestServices', 'Utilities']) scope.$emit('WidgetLoaded'); }; } - ]); \ No newline at end of file + ]); diff --git a/awx/ui/static/js/widgets/PortalJobs.js b/awx/ui/static/js/widgets/PortalJobs.js index 0fc0277f2e..8bb7a92001 100644 --- a/awx/ui/static/js/widgets/PortalJobs.js +++ b/awx/ui/static/js/widgets/PortalJobs.js @@ -1,6 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name widgets.function:PortalJobs diff --git a/awx/ui/static/js/widgets/SCMSyncStatus.js b/awx/ui/static/js/widgets/SCMSyncStatus.js index cbe3167a02..b4d452f06a 100644 --- a/awx/ui/static/js/widgets/SCMSyncStatus.js +++ b/awx/ui/static/js/widgets/SCMSyncStatus.js @@ -1,6 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name widgets.function:SCMSyncStatus @@ -101,4 +105,4 @@ angular.module('SCMSyncStatusWidget', ['RestServices', 'Utilities']) }; } - ]); \ No newline at end of file + ]); diff --git a/awx/ui/static/js/widgets/Stream.js b/awx/ui/static/js/widgets/Stream.js index 5afcd6d165..02394ca5d9 100644 --- a/awx/ui/static/js/widgets/Stream.js +++ b/awx/ui/static/js/widgets/Stream.js @@ -1,6 +1,10 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - */ +/************************************************* + * Copyright (c) 2015 Ansible, Inc. + * + * All Rights Reserved + *************************************************/ + + /** * @ngdoc function * @name widgets.function:Stream diff --git a/awx/ui/static/less/job-details.less b/awx/ui/static/less/job-details.less index b221ce06c2..0762bf8448 100644 --- a/awx/ui/static/less/job-details.less +++ b/awx/ui/static/less/job-details.less @@ -475,40 +475,69 @@ } } - .legend-row { - margin-bottom: 15px; - } + // .legend-row { + // margin-bottom: 15px; + // } - .legend { - display: inline-block; - font-size: 12px; - text-align: center; - i { - font-size: 10px; - margin-left: 5px; - } - i:first-child { - margin-left: 0; - } - } + // .legend { + // display: inline-block; + // font-size: 12px; + // text-align: center; + // i { + // font-size: 10px; + // margin-left: 5px; + // } + // i:first-child { + // margin-left: 0; + // } + // } #graph-section { position: relative; - width: 100%; .legend { - margin-top: 15px; + font-size: 12px; + font-family: 'Open Sans'; } - .header { - margin-top: 20px; - .legend { - i { - margin-left: 10px - } - i:first-child { - margin-left: 0; - } - } + rect { + stroke-width: 2; } + .tooltip { + background: #eee; + box-shadow: 0 0 5px #999999; + color: 'black'; + display: none; + font-size: 12px; + font-family: 'Open Sans'; + left: 280px; + padding: 10px; + position: absolute; + text-align: center; + top: 85px; + width: 80px; + z-index: 10; + } + // position: relative; + // width: 100%; + // .legend { + // margin-top: 15px; + // } + // .header { + // margin-top: 20px; + // .legend { + // i { + // margin-left: 10px + // } + // i:first-child { + // margin-left: 0; + // } + // } + // } + } + + + + #graph-section svg{ + margin-top: 15px; } path.slice{ diff --git a/awx/ui/static/lib/d3Donut/d3Donut.js b/awx/ui/static/lib/d3Donut/d3Donut.js deleted file mode 100644 index b31f205abb..0000000000 --- a/awx/ui/static/lib/d3Donut/d3Donut.js +++ /dev/null @@ -1,123 +0,0 @@ -!function(){ - var Donut3D={}; - - function pieTop(d, rx, ry, ir ){ - if(d.endAngle - d.startAngle == 0 ) return "M 0 0"; - var sx = rx*Math.cos(d.startAngle), - sy = ry*Math.sin(d.startAngle), - ex = rx*Math.cos(d.endAngle), - ey = ry*Math.sin(d.endAngle); - - var ret =[]; - ret.push("M",sx,sy,"A",rx,ry,"0",(d.endAngle-d.startAngle > Math.PI? 1: 0),"1",ex,ey,"L",ir*ex,ir*ey); - ret.push("A",ir*rx,ir*ry,"0",(d.endAngle-d.startAngle > Math.PI? 1: 0), "0",ir*sx,ir*sy,"z"); - return ret.join(" "); - } - - function pieOuter(d, rx, ry, h ){ - var startAngle = (d.startAngle > Math.PI ? Math.PI : d.startAngle); - var endAngle = (d.endAngle > Math.PI ? Math.PI : d.endAngle); - - var sx = rx*Math.cos(startAngle), - sy = ry*Math.sin(startAngle), - ex = rx*Math.cos(endAngle), - ey = ry*Math.sin(endAngle); - - var ret =[]; - ret.push("M",sx,h+sy,"A",rx,ry,"0 0 1",ex,h+ey,"L",ex,ey,"A",rx,ry,"0 0 0",sx,sy,"z"); - return ret.join(" "); - } - - function pieInner(d, rx, ry, h, ir ){ - var startAngle = (d.startAngle < Math.PI ? Math.PI : d.startAngle); - var endAngle = (d.endAngle < Math.PI ? Math.PI : d.endAngle); - - var sx = ir*rx*Math.cos(startAngle), - sy = ir*ry*Math.sin(startAngle), - ex = ir*rx*Math.cos(endAngle), - ey = ir*ry*Math.sin(endAngle); - - var ret =[]; - ret.push("M",sx, sy,"A",ir*rx,ir*ry,"0 0 1",ex,ey, "L",ex,h+ey,"A",ir*rx, ir*ry,"0 0 0",sx,h+sy,"z"); - return ret.join(" "); - } - - function getPercent(d){ - return (d.endAngle-d.startAngle > 0.2 ? - Math.round(1000*(d.endAngle-d.startAngle)/(Math.PI*2))/10+'%' : ''); - } - - Donut3D.transition = function(id, data, rx, ry, h, ir){ - function arcTweenInner(a) { - var i = d3.interpolate(this._current, a); - this._current = i(0); - return function(t) { return pieInner(i(t), rx+0.5, ry+0.5, h, ir); }; - } - function arcTweenTop(a) { - var i = d3.interpolate(this._current, a); - this._current = i(0); - return function(t) { return pieTop(i(t), rx, ry, ir); }; - } - function arcTweenOuter(a) { - var i = d3.interpolate(this._current, a); - this._current = i(0); - return function(t) { return pieOuter(i(t), rx-.5, ry-.5, h); }; - } - function textTweenX(a) { - var i = d3.interpolate(this._current, a); - this._current = i(0); - return function(t) { return 0.6*rx*Math.cos(0.5*(i(t).startAngle+i(t).endAngle)); }; - } - function textTweenY(a) { - var i = d3.interpolate(this._current, a); - this._current = i(0); - return function(t) { return 0.6*rx*Math.sin(0.5*(i(t).startAngle+i(t).endAngle)); }; - } - - var _data = d3.layout.pie().sort(null).value(function(d) {return d.value;})(data); - - d3.select("#"+id).selectAll(".innerSlice").data(_data) - .transition().duration(750).attrTween("d", arcTweenInner); - - d3.select("#"+id).selectAll(".topSlice").data(_data) - .transition().duration(750).attrTween("d", arcTweenTop); - - d3.select("#"+id).selectAll(".outerSlice").data(_data) - .transition().duration(750).attrTween("d", arcTweenOuter); - - d3.select("#"+id).selectAll(".percent").data(_data).transition().duration(750) - .attrTween("x",textTweenX).attrTween("y",textTweenY).text(getPercent); - } - - Donut3D.draw=function(id, data, x /*center x*/, y/*center y*/, - rx/*radius x*/, ry/*radius y*/, h/*height*/, ir/*inner radius*/){ - - var _data = d3.layout.pie().sort(null).value(function(d) {return d.value;})(data); - - var slices = d3.select("#"+id).append("g").attr("transform", "translate(" + x + "," + y + ")") - .attr("class", "slices"); - - slices.selectAll(".innerSlice").data(_data).enter().append("path").attr("class", "innerSlice") - .style("fill", function(d) { return d3.hsl(d.data.color).darker(0.7); }) - .attr("d",function(d){ return pieInner(d, rx+0.5,ry+0.5, h, ir);}) - .each(function(d){this._current=d;}); - - slices.selectAll(".topSlice").data(_data).enter().append("path").attr("class", "topSlice") - .style("fill", function(d) { return d.data.color; }) - .style("stroke", function(d) { return d.data.color; }) - .attr("d",function(d){ return pieTop(d, rx, ry, ir);}) - .each(function(d){this._current=d;}); - - slices.selectAll(".outerSlice").data(_data).enter().append("path").attr("class", "outerSlice") - .style("fill", function(d) { return d3.hsl(d.data.color).darker(0.7); }) - .attr("d",function(d){ return pieOuter(d, rx-.5,ry-.5, h);}) - .each(function(d){this._current=d;}); - - slices.selectAll(".percent").data(_data).enter().append("text").attr("class", "percent") - .attr("x",function(d){ return 0.6*rx*Math.cos(0.5*(d.startAngle+d.endAngle));}) - .attr("y",function(d){ return 0.6*ry*Math.sin(0.5*(d.startAngle+d.endAngle));}) - .text(getPercent).each(function(d){this._current=d;}); - } - - this.Donut3D = Donut3D; -}(); \ No newline at end of file diff --git a/awx/ui/static/partials/job_detail.html b/awx/ui/static/partials/job_detail.html index 371b143ab3..7c1152fd43 100644 --- a/awx/ui/static/partials/job_detail.html +++ b/awx/ui/static/partials/job_detail.html @@ -449,15 +449,15 @@
Host Summary
-
+
-
-
+
+