diff --git a/.gitignore b/.gitignore index 0f07b6eaa4..1160400a8f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ awx/tower_warnings.log tower/tower_warnings.log celerybeat-schedule awx/ui/static/docs +awx/ui/static/dist # Python & setuptools __pycache__ @@ -28,9 +29,14 @@ tar-build # JavaScript /Gruntfile.js +/Brocfile.js /bower.json /package.json node_modules/** +/tmp + +# UI build debugging +/DEBUG-* # Testing .coverage @@ -62,3 +68,4 @@ setup/inventory env/* nohup.out reports + diff --git a/.jshintrc b/.jshintrc index 8562d25f2e..a69ddcc652 100644 --- a/.jshintrc +++ b/.jshintrc @@ -8,6 +8,7 @@ "latedef": "nofunc", "noarg": true, "nonew": true, + "maxerr": 10000, "notypeof": true, "globals": { "angular":false, diff --git a/MANIFEST.in b/MANIFEST.in index 504417d9ce..dfa5d45237 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,7 +3,7 @@ recursive-include awx/static *.ico recursive-include awx/templates *.html recursive-include awx/api/templates *.md recursive-include awx/ui *.html -recursive-include awx/ui/static *.css *.ico *.png *.gif *.jpg +recursive-include awx/ui/static *.css *.ico *.png *.gif *.jpg *.gz recursive-include awx/ui/static *.eot *.svg *.ttf *.woff *.otf recursive-include awx/ui/static/lib * recursive-include awx/playbooks *.yml @@ -16,7 +16,8 @@ recursive-exclude awx/api/tests * recursive-exclude awx/main/tests * recursive-exclude awx/ui/static/lib/ansible * recursive-exclude awx/settings local_settings.py* -include awx/ui/static/js/awx.min.js +include awx/ui/static/dist/tower.concat.js +include awx/ui/static/dist/tower.concat.js.gz include awx/ui/static/js/config.js include tools/scripts/request_tower_configuration.sh include tools/scripts/ansible-tower diff --git a/Makefile b/Makefile index 8904ed7f56..fed070e6f9 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ SITELIB=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; pr OFFICIAL ?= no PACKER ?= packer GRUNT ?= $(shell [ -t 0 ] && echo "grunt" || echo "grunt --no-color") +BROCCOLI ?= ./node_modules/.bin/broccoli # Get the branch information from git GIT_DATE := $(shell git log -n 1 --format="%ai") @@ -84,12 +85,12 @@ clean-deb: # Remove grunt build files clean-grunt: - rm -f package.json Gruntfile.js bower.json + rm -f package.json Gruntfile.js Brocfile.js bower.json rm -rf node_modules # Remove UI build files clean-ui: - rm -f awx/ui/static/{js,css}/awx*.{js,css} + rm -rf awx/ui/static/dist rm -rf awx/ui/static/docs # Remove temporary build files, compiled Python files. @@ -261,6 +262,9 @@ test_jenkins: Gruntfile.js: cp packaging/grunt/$@ $@ +Brocfile.js: + cp packaging/grunt/$@ $@ + bower.json: cp packaging/grunt/$@ $@ @@ -268,12 +272,14 @@ package.json: sed -e 's#%NAME%#$(NAME)#;s#%VERSION%#$(VERSION)#;s#%GIT_REMOTE_URL%#$(GIT_REMOTE_URL)#;' packaging/grunt/package.template > $@ # Update local npm install -node_modules: Gruntfile.js bower.json package.json +node_modules: Gruntfile.js Brocfile.js bower.json package.json npm install +devjs: node_modules clean-ui + $(BROCCOLI) build awx/ui/static/dist -- --debug # Build minified JS/CSS. -minjs: node_modules - $(GRUNT) +minjs: node_modules clean-ui + $(BROCCOLI) build awx/ui/static/dist -- --silent --no-debug --no-tests --compress # Check .js files for errors and lint jshint: node_modules diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index 965ca96f6f..80c0b1bf7e 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -7,8 +7,7 @@ * */ -var urlPrefix, - $AnsibleConfig; +var urlPrefix; if ($basePath) { urlPrefix = $basePath; @@ -18,17 +17,46 @@ if ($basePath) { urlPrefix = $basePath; } +import 'tower/helpers'; +import 'tower/forms'; +import 'tower/lists'; +import 'tower/widgets'; +import 'tower/help'; +import {Home, HomeGroups, HomeHosts} from 'tower/controllers/Home'; +import {SocketsController} from 'tower/controllers/Sockets'; +import {Authenticate} from 'tower/controllers/Authentication'; +import {CredentialsAdd, CredentialsEdit, CredentialsList} from 'tower/controllers/Credentials'; +import {JobsListController} from 'tower/controllers/Jobs'; +import {PortalController} from 'tower/controllers/Portal'; -angular.module('Tower', [ +import dataServices from 'tower/services/_data-services'; +import dashboardGraphs from 'tower/directives/_dashboard-graphs'; + + +import {JobDetailController} from 'tower/controllers/JobDetail'; +import {JobStdoutController} from 'tower/controllers/JobStdout'; +import {JobTemplatesList, JobTemplatesAdd, JobTemplatesEdit} from 'tower/controllers/JobTemplates'; +import {ScheduleEditController} from 'tower/controllers/Schedules'; +import {ProjectsList, ProjectsAdd, ProjectsEdit} from 'tower/controllers/Projects'; +import {OrganizationsList, OrganizationsAdd, OrganizationsEdit} from 'tower/controllers/Organizations'; +import {InventoriesList, InventoriesAdd, InventoriesEdit} from 'tower/controllers/Inventories'; +import {AdminsList} from 'tower/controllers/Admins'; +import {UsersList, UsersAdd, UsersEdit} from 'tower/controllers/Users'; +import {TeamsList, TeamsAdd, TeamsEdit} from 'tower/controllers/Teams'; +import {PermissionsAdd, PermissionsList, PermissionsEdit} from 'tower/controllers/Permissions'; + + + +var tower = angular.module('Tower', [ 'ngRoute', 'ngSanitize', 'ngCookies', 'RestServices', - 'DataServices', - 'DashboardGraphs', + dataServices.name, + dashboardGraphs.name, 'AuthService', 'Utilities', - 'LicenseHelper', + 'License', 'OrganizationFormDefinition', 'UserFormDefinition', 'FormGenerator', @@ -138,267 +166,267 @@ angular.module('Tower', [ when('/jobs', { templateUrl: urlPrefix + 'partials/jobs.html', - controller: 'JobsListController' + controller: JobsListController }). when('/portal', { templateUrl: urlPrefix + 'partials/portal.html', - controller: 'PortalController' + controller: PortalController }). when('/jobs/:id', { templateUrl: urlPrefix + 'partials/job_detail.html', - controller: 'JobDetailController' + controller: JobDetailController }). when('/jobs/:id/stdout', { templateUrl: urlPrefix + 'partials/job_stdout.html', - controller: 'JobStdoutController' + controller: JobStdoutController }). when('/job_templates', { templateUrl: urlPrefix + 'partials/job_templates.html', - controller: 'JobTemplatesList' + controller: JobTemplatesList }). when('/job_templates/add', { templateUrl: urlPrefix + 'partials/job_templates.html', - controller: 'JobTemplatesAdd' + controller: JobTemplatesAdd }). when('/job_templates/:template_id', { templateUrl: urlPrefix + 'partials/job_templates.html', - controller: 'JobTemplatesEdit' + controller: JobTemplatesEdit }). when('/job_templates/:id/schedules', { templateUrl: urlPrefix + 'partials/schedule_detail.html', - controller: 'ScheduleEditController' + controller: ScheduleEditController }). when('/projects', { templateUrl: urlPrefix + 'partials/projects.html', - controller: 'ProjectsList' + controller: ProjectsList }). when('/projects/add', { templateUrl: urlPrefix + 'partials/projects.html', - controller: 'ProjectsAdd' + controller: ProjectsAdd }). when('/projects/:id', { templateUrl: urlPrefix + 'partials/projects.html', - controller: 'ProjectsEdit' + controller: ProjectsEdit }). when('/projects/:id/schedules', { templateUrl: urlPrefix + 'partials/schedule_detail.html', - controller: 'ScheduleEditController' + controller: ScheduleEditController }). when('/projects/:project_id/organizations', { templateUrl: urlPrefix + 'partials/projects.html', - controller: 'OrganizationsList' + controller: OrganizationsList }). when('/projects/:project_id/organizations/add', { templateUrl: urlPrefix + 'partials/projects.html', - controller: 'OrganizationsAdd' + controller: OrganizationsAdd }). when('/inventories', { templateUrl: urlPrefix + 'partials/inventories.html', - controller: 'InventoriesList' + controller: InventoriesList }). when('/inventories/add', { templateUrl: urlPrefix + 'partials/inventories.html', - controller: 'InventoriesAdd' + controller: InventoriesAdd }). when('/inventories/:inventory_id', { templateUrl: urlPrefix + 'partials/inventory-edit.html', - controller: 'InventoriesEdit' + controller: InventoriesEdit }). when('/organizations', { templateUrl: urlPrefix + 'partials/organizations.html', - controller: 'OrganizationsList' + controller: OrganizationsList }). when('/organizations/add', { templateUrl: urlPrefix + 'partials/organizations.html', - controller: 'OrganizationsAdd' + controller: OrganizationsAdd }). when('/organizations/:organization_id', { templateUrl: urlPrefix + 'partials/organizations.html', - controller: 'OrganizationsEdit' + controller: OrganizationsEdit }). when('/organizations/:organization_id/admins', { templateUrl: urlPrefix + 'partials/organizations.html', - controller: 'AdminsList' + controller: AdminsList }). when('/organizations/:organization_id/users', { templateUrl: urlPrefix + 'partials/users.html', - controller: 'UsersList' + controller: UsersList }). when('/organizations/:organization_id/users/add', { templateUrl: urlPrefix + 'partials/users.html', - controller: 'UsersAdd' + controller: UsersAdd }). when('/organizations/:organization_id/users/:user_id', { templateUrl: urlPrefix + 'partials/users.html', - controller: 'UsersEdit' + controller: UsersEdit }). when('/teams', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'TeamsList' + controller: TeamsList }). when('/teams/add', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'TeamsAdd' + controller: TeamsAdd }). when('/teams/:team_id', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'TeamsEdit' + controller: TeamsEdit }). when('/teams/:team_id/permissions/add', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'PermissionsAdd' + controller: PermissionsAdd }). when('/teams/:team_id/permissions', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'PermissionsList' + controller: PermissionsList }). when('/teams/:team_id/permissions/:permission_id', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'PermissionsEdit' + controller: PermissionsEdit }). when('/teams/:team_id/users', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'UsersList' + controller: UsersList }). when('/teams/:team_id/users/:user_id', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'UsersEdit' + controller: UsersEdit }). when('/teams/:team_id/projects', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'ProjectsList' + controller: ProjectsList }). when('/teams/:team_id/projects/add', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'ProjectsAdd' + controller: ProjectsAdd }). when('/teams/:team_id/projects/:project_id', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'ProjectsEdit' + controller: ProjectsEdit }). when('/teams/:team_id/credentials', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'CredentialsList' + controller: CredentialsList }). when('/teams/:team_id/credentials/add', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'CredentialsAdd' + controller: CredentialsAdd }). when('/teams/:team_id/credentials/:credential_id', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'CredentialsEdit' + controller: CredentialsEdit }). when('/credentials', { templateUrl: urlPrefix + 'partials/credentials.html', - controller: 'CredentialsList' + controller: CredentialsList }). when('/credentials/add', { templateUrl: urlPrefix + 'partials/credentials.html', - controller: 'CredentialsAdd' + controller: CredentialsAdd }). when('/credentials/:credential_id', { templateUrl: urlPrefix + 'partials/credentials.html', - controller: 'CredentialsEdit' + controller: CredentialsEdit }). when('/users', { templateUrl: urlPrefix + 'partials/users.html', - controller: 'UsersList' + controller: UsersList }). when('/users/add', { templateUrl: urlPrefix + 'partials/users.html', - controller: 'UsersAdd' + controller: UsersAdd }). when('/users/:user_id', { templateUrl: urlPrefix + 'partials/users.html', - controller: 'UsersEdit' + controller: UsersEdit }). when('/users/:user_id/credentials', { templateUrl: urlPrefix + 'partials/users.html', - controller: 'CredentialsList' + controller: CredentialsList }). when('/users/:user_id/permissions/add', { templateUrl: urlPrefix + 'partials/users.html', - controller: 'PermissionsAdd' + controller: PermissionsAdd }). when('/users/:user_id/permissions', { templateUrl: urlPrefix + 'partials/users.html', - controller: 'PermissionsList' + controller: PermissionsList }). when('/users/:user_id/permissions/:permission_id', { templateUrl: urlPrefix + 'partials/users.html', - controller: 'PermissionsEdit' + controller: PermissionsEdit }). when('/users/:user_id/credentials/add', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'CredentialsAdd' + controller: CredentialsAdd }). when('/teams/:user_id/credentials/:credential_id', { templateUrl: urlPrefix + 'partials/teams.html', - controller: 'CredentialsEdit' + controller: CredentialsEdit }). when('/login', { templateUrl: urlPrefix + 'partials/blank.html', - controller: 'Authenticate' + controller: Authenticate }). when('/logout', { templateUrl: urlPrefix + 'partials/blank.html', - controller: 'Authenticate' + controller: Authenticate }). when('/home', { templateUrl: urlPrefix + 'partials/home.html', - controller: 'Home', + controller: Home, resolve: { graphData: ['$q', 'jobStatusGraphData', 'hostCountGraphData', function($q, jobStatusGraphData, hostCountGraphData) { return $q.all({ @@ -411,17 +439,17 @@ angular.module('Tower', [ when('/home/groups', { templateUrl: urlPrefix + 'partials/subhome.html', - controller: 'HomeGroups' + controller: HomeGroups }). when('/home/hosts', { templateUrl: urlPrefix + 'partials/subhome.html', - controller: 'HomeHosts' + controller: HomeHosts }). when('/sockets', { templateUrl: urlPrefix + 'partials/sockets.html', - controller: 'SocketsController' + controller: SocketsController }). otherwise({ @@ -756,3 +784,6 @@ angular.module('Tower', [ LoadConfig(); } ]); + +export default tower; + diff --git a/awx/ui/static/js/controllers/Admins.js b/awx/ui/static/js/controllers/Admins.js index 813ddc7f87..fe30a42444 100644 --- a/awx/ui/static/js/controllers/Admins.js +++ b/awx/ui/static/js/controllers/Admins.js @@ -17,9 +17,9 @@ * Controller functions for ading Admins to an Organization. * */ -'use strict'; -function AdminsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, AdminList, GenerateList, LoadBreadCrumbs, + +export function AdminsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, AdminList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, GetBasePath, SelectionInit) { var list = AdminList, diff --git a/awx/ui/static/js/controllers/Authentication.js b/awx/ui/static/js/controllers/Authentication.js index 8109981693..8460ff2df6 100644 --- a/awx/ui/static/js/controllers/Authentication.js +++ b/awx/ui/static/js/controllers/Authentication.js @@ -57,9 +57,9 @@ * @Usage * This is usage information. */ -'use strict'; -function Authenticate($log, $cookieStore, $compile, $window, $rootScope, $location, Authorization, ToggleClass, Alert, Wait, + +export function Authenticate($log, $cookieStore, $compile, $window, $rootScope, $location, Authorization, ToggleClass, Alert, Wait, Timer, Empty, ClearScope) { var setLoginFocus, lastPath, sessionExpired, loginAgain, diff --git a/awx/ui/static/js/controllers/Credentials.js b/awx/ui/static/js/controllers/Credentials.js index 3b929dc8a1..aca4a0899d 100644 --- a/awx/ui/static/js/controllers/Credentials.js +++ b/awx/ui/static/js/controllers/Credentials.js @@ -11,9 +11,9 @@ * @name controllers.function:Credentials * @description This controller's for the credentials page */ -'use strict'; -function CredentialsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, CredentialList, + +export function CredentialsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, CredentialList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, SelectionInit, GetChoices, Wait, Stream) { @@ -134,7 +134,7 @@ CredentialsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeP ]; -function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $routeParams, CredentialForm, GenerateForm, Rest, Alert, +export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $routeParams, CredentialForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GenerateList, SearchInit, PaginateInit, LookUpInit, UserList, TeamList, GetBasePath, GetChoices, Empty, KindChange, OwnerChange, LoginMethodChange, FormSave) { @@ -286,7 +286,7 @@ CredentialsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log ]; -function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, CredentialForm, GenerateForm, Rest, Alert, +export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, CredentialForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, Prompt, GetBasePath, GetChoices, KindChange, UserList, TeamList, LookUpInit, Empty, OwnerChange, LoginMethodChange, FormSave, Stream, Wait) { diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js index 5a9d28866f..4b74d4cd3f 100644 --- a/awx/ui/static/js/controllers/Home.js +++ b/awx/ui/static/js/controllers/Home.js @@ -14,7 +14,7 @@ * @name controllers.function:Home * @description This controller's for the dashboard */ -'use strict'; + /** * @ngdoc method @@ -25,7 +25,8 @@ * Host count graph should only be loaded if the user is a super user * */ -function Home($scope, $compile, $routeParams, $rootScope, $location, $log, Wait, DashboardCounts, DashboardJobs, + +export function Home($scope, $compile, $routeParams, $rootScope, $location, $log, Wait, DashboardCounts, DashboardJobs, ClearScope, Stream, Rest, GetBasePath, ProcessErrors, Button, $window, graphData){ ClearScope('home'); @@ -136,7 +137,7 @@ Home.$inject = ['$scope', '$compile', '$routeParams', '$rootScope', '$location', * @description This controls the 'home/groups' page that is loaded from the dashboard * */ -function HomeGroups($log, $scope, $filter, $compile, $location, $routeParams, LogViewer, HomeGroupList, GenerateList, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, +export function HomeGroups($log, $scope, $filter, $compile, $location, $routeParams, LogViewer, HomeGroupList, GenerateList, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath, SearchInit, PaginateInit, FormatDate, GetHostsStatusMsg, GetSyncStatusMsg, ViewUpdateStatus, Stream, GroupsEdit, Wait, Alert, Rest, Empty, InventoryUpdate, Find, GroupsCancelUpdate, Store, Socket) { @@ -572,7 +573,8 @@ HomeGroups.$inject = ['$log', '$scope', '$filter', '$compile', '$location', '$ro * @description This loads the page for 'home/hosts' * */ -function HomeHosts($scope, $location, $routeParams, HomeHostList, GenerateList, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, + +export function HomeHosts($scope, $location, $routeParams, HomeHostList, GenerateList, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath, SearchInit, PaginateInit, FormatDate, SetStatus, ToggleHostEnabled, HostsEdit, Stream, Find, ShowJobSummary, ViewJob) { ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js index b8bbb36c1a..e0ff5c5e4e 100644 --- a/awx/ui/static/js/controllers/Inventories.js +++ b/awx/ui/static/js/controllers/Inventories.js @@ -12,9 +12,9 @@ * @name controllers.function:Inventories * @description This controller's for the Inventory page */ -'use strict'; -function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $compile, $filter, Rest, Alert, InventoryList, GenerateList, + +export function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $compile, $filter, Rest, Alert, InventoryList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, Wait, Stream, EditInventoryProperties, Find, Empty, LogViewer) { @@ -368,7 +368,7 @@ InventoriesList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeP ]; -function InventoriesAdd($scope, $rootScope, $compile, $location, $log, $routeParams, InventoryForm, GenerateForm, Rest, +export function InventoriesAdd($scope, $rootScope, $compile, $location, $log, $routeParams, InventoryForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GenerateList, OrganizationList, SearchInit, PaginateInit, LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON) { @@ -478,7 +478,7 @@ InventoriesAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log -function InventoriesEdit ($log, $scope, $location, $routeParams, $compile, GenerateList, ClearScope, Empty, Wait, Rest, Alert, LoadBreadCrumbs, GetBasePath, ProcessErrors, +export function InventoriesEdit ($log, $scope, $location, $routeParams, $compile, GenerateList, ClearScope, Empty, Wait, Rest, Alert, LoadBreadCrumbs, GetBasePath, ProcessErrors, Breadcrumbs, InventoryGroups, InjectHosts, Find, HostsReload, SearchInit, PaginateInit, GetSyncStatusMsg, GetHostsStatusMsg, GroupsEdit, InventoryUpdate, GroupsCancelUpdate, ViewUpdateStatus, GroupsDelete, Store, HostsEdit, HostsDelete, EditInventoryProperties, ToggleHostEnabled, Stream, ShowJobSummary, InventoryGroupsHelp, HelpDialog, ViewJob, WatchInventoryWindowResize, GetHostContainerRows, GetGroupContainerRows, GetGroupContainerHeight, diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index d2b3d6393a..b8e0a9a194 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -9,9 +9,9 @@ * @name controllers.function:JobDetail * @description This controller's for the Job Detail Page */ -'use strict'; -function JobDetailController ($location, $rootScope, $scope, $compile, $routeParams, $log, ClearScope, Breadcrumbs, LoadBreadCrumbs, GetBasePath, Wait, Rest, + +export function JobDetailController ($location, $rootScope, $scope, $compile, $routeParams, $log, ClearScope, Breadcrumbs, LoadBreadCrumbs, GetBasePath, Wait, Rest, ProcessErrors, SelectPlay, SelectTask, Socket, GetElapsed, DrawGraph, LoadHostSummary, ReloadHostSummaryList, JobIsFinished, SetTaskStyles, DigestEvent, UpdateDOM, EventViewer, DeleteJob, PlaybookRun, HostEventsViewer, LoadPlays, LoadTasks, LoadHosts, HostsEdit, ParseVariableString) { diff --git a/awx/ui/static/js/controllers/JobEvents.js b/awx/ui/static/js/controllers/JobEvents.js index 3ddc44b1d1..f55d1480ae 100644 --- a/awx/ui/static/js/controllers/JobEvents.js +++ b/awx/ui/static/js/controllers/JobEvents.js @@ -12,9 +12,9 @@ * @name controllers.function:JobEvent * @description This controller's for the job event page */ -'use strict'; -function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobEventList, GenerateList, + +export function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobEventList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, LookUpInit, ToggleChildren, FormatDate, EventView, Refresh, Wait) { @@ -260,7 +260,7 @@ JobEventsList.$inject = ['$sce', '$filter', '$scope', '$rootScope', '$location', 'GetBasePath', 'LookUpInit', 'ToggleChildren', 'FormatDate', 'EventView', 'Refresh', 'Wait' ]; -function JobEventsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, JobEventsForm, GenerateForm, +export function JobEventsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, JobEventsForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, FormatDate, EventView, Wait) { ClearScope(); diff --git a/awx/ui/static/js/controllers/JobHosts.js b/awx/ui/static/js/controllers/JobHosts.js index 32a32c07d5..399c4dba4e 100644 --- a/awx/ui/static/js/controllers/JobHosts.js +++ b/awx/ui/static/js/controllers/JobHosts.js @@ -12,9 +12,9 @@ * @name controllers.function:JobHosts * @description This controller's for the job hosts page */ -'use strict'; -function JobHostSummaryList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobHostList, GenerateList, + +export function JobHostSummaryList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobHostList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, Refresh, JobStatusToolTip) { diff --git a/awx/ui/static/js/controllers/JobStdout.js b/awx/ui/static/js/controllers/JobStdout.js index 51c01a2f95..8035ec7326 100644 --- a/awx/ui/static/js/controllers/JobStdout.js +++ b/awx/ui/static/js/controllers/JobStdout.js @@ -9,9 +9,9 @@ * @name controllers.function:JobStdout * @description This controller's for the standard out page that can be displayed when a job runs */ -'use strict'; -function JobStdoutController ($log, $rootScope, $scope, $compile, $routeParams, ClearScope, GetBasePath, Wait, Rest, ProcessErrors, Socket) { + +export function JobStdoutController ($log, $rootScope, $scope, $compile, $routeParams, ClearScope, GetBasePath, Wait, Rest, ProcessErrors, Socket) { ClearScope(); diff --git a/awx/ui/static/js/controllers/JobTemplates.js b/awx/ui/static/js/controllers/JobTemplates.js index 70a82799ae..6efc6a7e27 100644 --- a/awx/ui/static/js/controllers/JobTemplates.js +++ b/awx/ui/static/js/controllers/JobTemplates.js @@ -12,9 +12,9 @@ * @name controllers.function:JobTemplate * @description This controller's for the Job Template page */ -'use strict'; -function JobTemplatesList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobTemplateList, + +export function JobTemplatesList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobTemplateList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, JobTemplateForm, CredentialList, LookUpInit, PlaybookRun, Wait, Stream, CreateDialog, $compile) { @@ -246,7 +246,7 @@ JobTemplatesList.$inject = ['$scope', '$rootScope', '$location', '$log', '$route 'PlaybookRun', 'Wait', 'Stream', 'CreateDialog' , '$compile' ]; -function JobTemplatesAdd($scope, $rootScope, $compile, $location, $log, $routeParams, JobTemplateForm, +export function JobTemplatesAdd($scope, $rootScope, $compile, $location, $log, $routeParams, JobTemplateForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath, InventoryList, CredentialList, ProjectList, LookUpInit, md5Setup, ParseTypeChange, Wait, Empty, ToJSON, CallbackHelpInit, SurveyControllerInit, Prompt) { @@ -551,7 +551,7 @@ JobTemplatesAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$lo ]; -function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeParams, JobTemplateForm, GenerateForm, Rest, +export function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeParams, JobTemplateForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList, CredentialList, ProjectList, LookUpInit, GetBasePath, md5Setup, ParseTypeChange, JobStatusToolTip, FormatDate, Wait, Stream, Empty, Prompt, ParseVariableString, ToJSON, SchedulesControllerInit, JobsControllerInit, JobsListUpdate, diff --git a/awx/ui/static/js/controllers/Jobs.js b/awx/ui/static/js/controllers/Jobs.js index cbafb57b89..8fafb44583 100644 --- a/awx/ui/static/js/controllers/Jobs.js +++ b/awx/ui/static/js/controllers/Jobs.js @@ -12,9 +12,9 @@ * @name controllers.function:Jobs * @description This controller's for the jobs page */ -'use strict'; -function JobsListController ($rootScope, $log, $scope, $compile, $routeParams, ClearScope, Breadcrumbs, LoadBreadCrumbs, LoadSchedulesScope, + +export function JobsListController ($rootScope, $log, $scope, $compile, $routeParams, ClearScope, Breadcrumbs, LoadBreadCrumbs, LoadSchedulesScope, LoadJobsScope, RunningJobsList, CompletedJobsList, QueuedJobsList, ScheduledJobsList, GetChoices, GetBasePath, Wait, Socket) { ClearScope(); diff --git a/awx/ui/static/js/controllers/Organizations.js b/awx/ui/static/js/controllers/Organizations.js index ada8b3ae05..1726671feb 100644 --- a/awx/ui/static/js/controllers/Organizations.js +++ b/awx/ui/static/js/controllers/Organizations.js @@ -12,9 +12,9 @@ * @name controllers.function:Organizations * @description This controller's for the Organizations page */ -'use strict'; -function OrganizationsList($routeParams, $scope, $rootScope, $location, $log, Rest, Alert, LoadBreadCrumbs, Prompt, + +export function OrganizationsList($routeParams, $scope, $rootScope, $location, $log, Rest, Alert, LoadBreadCrumbs, Prompt, GenerateList, OrganizationList, SearchInit, PaginateInit, ClearScope, ProcessErrors, GetBasePath, SelectionInit, Wait, Stream) { ClearScope(); @@ -101,7 +101,7 @@ OrganizationsList.$inject = ['$routeParams', '$scope', '$rootScope', '$location' ]; -function OrganizationsAdd($scope, $rootScope, $compile, $location, $log, $routeParams, OrganizationForm, +export function OrganizationsAdd($scope, $rootScope, $compile, $location, $log, $routeParams, OrganizationForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, ReturnToCaller, Wait) { @@ -152,7 +152,7 @@ OrganizationsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$l ]; -function OrganizationsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, OrganizationForm, GenerateForm, Rest, +export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, OrganizationForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath, Wait, Stream) { ClearScope(); diff --git a/awx/ui/static/js/controllers/Permissions.js b/awx/ui/static/js/controllers/Permissions.js index 658ffc3140..67a2bcf012 100644 --- a/awx/ui/static/js/controllers/Permissions.js +++ b/awx/ui/static/js/controllers/Permissions.js @@ -12,9 +12,9 @@ * @name controllers.function:Permissions * @description This controller's for permissions */ -'use strict'; -function PermissionsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, PermissionList, + +export function PermissionsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, PermissionList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, CheckAccess, Wait) { @@ -102,7 +102,7 @@ PermissionsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeP ]; -function PermissionsAdd($scope, $rootScope, $compile, $location, $log, $routeParams, PermissionsForm, +export function PermissionsAdd($scope, $rootScope, $compile, $location, $log, $routeParams, PermissionsForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, ReturnToCaller, InventoryList, ProjectList, LookUpInit, CheckAccess, Wait, PermissionCategoryChange) { @@ -199,7 +199,7 @@ PermissionsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log ]; -function PermissionsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, PermissionsForm, +export function PermissionsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, PermissionsForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, Prompt, GetBasePath, InventoryList, ProjectList, LookUpInit, CheckAccess, Wait, PermissionCategoryChange) { diff --git a/awx/ui/static/js/controllers/Portal.js b/awx/ui/static/js/controllers/Portal.js index 035c62fb97..3bffa0ac54 100644 --- a/awx/ui/static/js/controllers/Portal.js +++ b/awx/ui/static/js/controllers/Portal.js @@ -14,7 +14,7 @@ * @name controllers.function:Portal * @description This controller's for portal mode */ -'use strict'; + /** * @ngdoc method @@ -24,7 +24,7 @@ * * */ -function PortalController($scope, $compile, $routeParams, $rootScope, $location, $log, Wait, ClearScope, Stream, Rest, GetBasePath, ProcessErrors, +export function PortalController($scope, $compile, $routeParams, $rootScope, $location, $log, Wait, ClearScope, Stream, Rest, GetBasePath, ProcessErrors, Button, PortalJobsWidget, GenerateList, PortalJobTemplateList, SearchInit, PaginateInit, PlaybookRun){ ClearScope('portal'); diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index 64c5e1c96a..fbd10bb261 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -12,9 +12,9 @@ * @name controllers.function:Projects * @description This controller's for the projects page */ -'use strict'; -function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, ProjectList, GenerateList, LoadBreadCrumbs, + +export function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, ProjectList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, SelectionInit, ProjectUpdate, Refresh, Wait, Stream, GetChoices, Empty, Find, LogViewer, GetProjectIcon, GetProjectToolTip) { @@ -391,7 +391,7 @@ ProjectsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routePara ]; -function ProjectsAdd($scope, $rootScope, $compile, $location, $log, $routeParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors, +export function ProjectsAdd($scope, $rootScope, $compile, $location, $log, $routeParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, LookUpInit, OrganizationList, CredentialList, GetChoices, DebugForm, Wait) { @@ -537,7 +537,7 @@ ProjectsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', ]; -function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, ProjectsForm, +export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, Authorization, CredentialList, LookUpInit, GetChoices, Empty, DebugForm, Wait, Stream, SchedulesControllerInit, SchedulesListInit, SchedulesList, ProjectUpdate) { diff --git a/awx/ui/static/js/controllers/Schedules.js b/awx/ui/static/js/controllers/Schedules.js index 440a12b167..f8a8fc9622 100644 --- a/awx/ui/static/js/controllers/Schedules.js +++ b/awx/ui/static/js/controllers/Schedules.js @@ -12,9 +12,9 @@ * @name controllers.function:Schedules * @description This controller's for schedules */ -'use strict'; -function ScheduleEditController($scope, $compile, $location, $routeParams, SchedulesList, Rest, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, + +export function ScheduleEditController($scope, $compile, $location, $routeParams, SchedulesList, Rest, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, GetChoices, Stream) { ClearScope(); diff --git a/awx/ui/static/js/controllers/Sockets.js b/awx/ui/static/js/controllers/Sockets.js index 2935d52ff7..4c38f6964c 100644 --- a/awx/ui/static/js/controllers/Sockets.js +++ b/awx/ui/static/js/controllers/Sockets.js @@ -11,9 +11,9 @@ * @description This controller's for controlling websockets * discuss */ -'use strict'; -function SocketsController ($scope, $compile, ClearScope, Socket) { + +export function SocketsController ($scope, $compile, ClearScope, Socket) { ClearScope(); diff --git a/awx/ui/static/js/controllers/Survey.js.old.js b/awx/ui/static/js/controllers/Survey.js.old.js index 33ba72833a..11a96a869b 100644 --- a/awx/ui/static/js/controllers/Survey.js.old.js +++ b/awx/ui/static/js/controllers/Survey.js.old.js @@ -26,7 +26,7 @@ // * // * The variables in local memory are cleaned out whenever the user navigates to a page (other than the Survey Maker page) // */ -// 'use strict'; +// // function SurveyController($scope, $rootScope, $compile, $location, $log, $routeParams, SurveyMakerForm, // GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, diff --git a/awx/ui/static/js/controllers/Teams.js b/awx/ui/static/js/controllers/Teams.js index 7c243b659b..1ee97e649b 100644 --- a/awx/ui/static/js/controllers/Teams.js +++ b/awx/ui/static/js/controllers/Teams.js @@ -12,9 +12,9 @@ * @name controllers.function:Teams * @description This controller's for teams */ -'use strict'; -function TeamsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, TeamList, GenerateList, LoadBreadCrumbs, + +export function TeamsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, TeamList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, SetTeamListeners, GetBasePath, SelectionInit, Wait, Stream) { @@ -116,7 +116,7 @@ TeamsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeParams' ]; -function TeamsAdd($scope, $rootScope, $compile, $location, $log, $routeParams, TeamForm, GenerateForm, +export function TeamsAdd($scope, $rootScope, $compile, $location, $log, $routeParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GenerateList, OrganizationList, SearchInit, PaginateInit, GetBasePath, LookUpInit, Wait) { ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior @@ -177,7 +177,7 @@ TeamsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$r ]; -function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors, +export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, LookUpInit, Prompt, GetBasePath, CheckAccess, OrganizationList, Wait, Stream) { diff --git a/awx/ui/static/js/controllers/Users.js b/awx/ui/static/js/controllers/Users.js index 718c8b73b7..003b65283c 100644 --- a/awx/ui/static/js/controllers/Users.js +++ b/awx/ui/static/js/controllers/Users.js @@ -11,9 +11,9 @@ * @name controllers.function:Users * @description This controller's the Users page */ -'use strict'; -function UsersList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, UserList, GenerateList, LoadBreadCrumbs, + +export function UsersList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, UserList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, SelectionInit, Wait, Stream) { ClearScope(); @@ -105,7 +105,7 @@ UsersList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeParams' ]; -function UsersAdd($scope, $rootScope, $compile, $location, $log, $routeParams, UserForm, GenerateForm, Rest, Alert, ProcessErrors, +export function UsersAdd($scope, $rootScope, $compile, $location, $log, $routeParams, UserForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath, LookUpInit, OrganizationList, ResetForm, Wait) { ClearScope(); @@ -208,7 +208,7 @@ UsersAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$r ]; -function UsersEdit($scope, $rootScope, $compile, $location, $log, $routeParams, UserForm, GenerateForm, Rest, Alert, +export function UsersEdit($scope, $rootScope, $compile, $location, $log, $routeParams, UserForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, GetBasePath, Prompt, CheckAccess, ResetForm, Wait, Stream) { diff --git a/awx/ui/static/js/directives/_dashboard-graphs.js b/awx/ui/static/js/directives/_dashboard-graphs.js index ed86866e80..ccacb29f77 100644 --- a/awx/ui/static/js/directives/_dashboard-graphs.js +++ b/awx/ui/static/js/directives/_dashboard-graphs.js @@ -1 +1,12 @@ -angular.module('DashboardGraphs', []); +import JobStatusGraph from 'tower/directives/job-status-graph'; +import HostCountGraph from 'tower/directives/host-count-graph'; +import HostStatusGraph from 'tower/directives/host-status-graph'; +import AutoSizeModule from 'tower/directives/auto-size-module'; +import AdjustGraphSize from 'tower/services/adjust-graph-size'; + +export default angular.module('DashboardGraphs', []) + .directive('jobStatusGraph', JobStatusGraph) + .directive('hostCountGraph', HostCountGraph) + .directive('hostStatusGraph', HostStatusGraph) + .directive('autoSizeModule', AutoSizeModule) + .service('adjustGraphSize', AdjustGraphSize); diff --git a/awx/ui/static/js/directives/auto-size-module.js b/awx/ui/static/js/directives/auto-size-module.js index e1851de160..3c63914a94 100644 --- a/awx/ui/static/js/directives/auto-size-module.js +++ b/awx/ui/static/js/directives/auto-size-module.js @@ -1,5 +1,9 @@ -angular.module('DashboardGraphs') -.directive('autoSizeModule', ['$window', function($window) { +export default + [ '$window', + AutoSizeModule + ]; + +function AutoSizeModule($window) { // Adjusts the size of the module so that all modules // fit into a single a page; assumes there are 2 rows @@ -32,4 +36,4 @@ angular.module('DashboardGraphs') }; -}]); +} diff --git a/awx/ui/static/js/directives/host-count-graph.js b/awx/ui/static/js/directives/host-count-graph.js index 81675e780f..a9ea758e04 100644 --- a/awx/ui/static/js/directives/host-count-graph.js +++ b/awx/ui/static/js/directives/host-count-graph.js @@ -1,5 +1,10 @@ -angular.module('DashboardGraphs'). - directive('hostCountGraph', ['GetBasePath', 'Rest', 'adjustGraphSize', '$window', function(getBasePath, Rest, adjustGraphSize, $window) { +export default +[ 'adjustGraphSize', + '$window', + HostCountGraph +]; + +function HostCountGraph(adjustGraphSize, $window) { return { restrict: 'E', @@ -42,11 +47,11 @@ angular.module('DashboardGraphs'). { "key" : "Hosts" , "color" : "#1778c3", "values": data.hosts - }, - { "key" : "License" , - "color" : "#171717", - "values": data.hosts - } + }, + { "key" : "License" , + "color" : "#171717", + "values": data.hosts + } ]; graphData.map(function(series) { @@ -116,4 +121,4 @@ angular.module('DashboardGraphs'). } } -}]); +} diff --git a/awx/ui/static/js/directives/host-status-graph.js b/awx/ui/static/js/directives/host-status-graph.js index 11b0dbf227..b94e392f0e 100644 --- a/awx/ui/static/js/directives/host-status-graph.js +++ b/awx/ui/static/js/directives/host-status-graph.js @@ -1,6 +1,10 @@ -angular.module('DashboardGraphs') - .directive('hostStatusGraph', ['$compile', '$window', - function ($compile, $window) { +export default + [ '$compile', + '$window', + HostStatusGraph + ]; + +function HostStatusGraph($compile, $window) { return { restrict: 'E', link: link, @@ -99,4 +103,4 @@ angular.module('DashboardGraphs') } } - }]); + } diff --git a/awx/ui/static/js/directives/job-status-graph.js b/awx/ui/static/js/directives/job-status-graph.js index 3cf6696bf2..97010587d6 100644 --- a/awx/ui/static/js/directives/job-status-graph.js +++ b/awx/ui/static/js/directives/job-status-graph.js @@ -1,6 +1,15 @@ -angular.module('DashboardGraphs') - .directive('jobStatusGraph', ['$rootScope', '$compile', '$location' , '$window', 'Wait', 'adjustGraphSize', 'jobStatusGraphData', - function ($rootScope, $compile , $location, $window, Wait, adjustGraphSize) { +export default + [ '$rootScope', + '$compile', + '$location' , + '$window', + 'Wait', + 'adjustGraphSize', + 'jobStatusGraphData', + JobStatusGraph + ]; + +function JobStatusGraph($rootScope, $compile , $location, $window, Wait, adjustGraphSize) { return { restrict: 'E', templateUrl: '/static/partials/job_status_graph.html', @@ -117,4 +126,4 @@ angular.module('DashboardGraphs') } } - }]); + } diff --git a/awx/ui/static/js/forms.js b/awx/ui/static/js/forms.js new file mode 100644 index 0000000000..1bf67462b7 --- /dev/null +++ b/awx/ui/static/js/forms.js @@ -0,0 +1,58 @@ +import ActivityDetail from "tower/forms/ActivityDetail"; +import Credentials from "tower/forms/Credentials"; +import CustomInventory from "tower/forms/CustomInventory"; +import EventsViewer from "tower/forms/EventsViewer"; +import Groups from "tower/forms/Groups"; +import HostGroups from "tower/forms/HostGroups"; +import Hosts from "tower/forms/Hosts"; +import Inventories from "tower/forms/Inventories"; +import InventoryStatus from "tower/forms/InventoryStatus"; +import JobEventData from "tower/forms/JobEventData"; +import JobSummary from "tower/forms/JobSummary"; +import JobTemplates from "tower/forms/JobTemplates"; +import JobVarsPrompt from "tower/forms/JobVarsPrompt"; +import Jobs from "tower/forms/Jobs"; +import LicenseForm from "tower/forms/LicenseForm"; +import LicenseUpdate from "tower/forms/LicenseUpdate"; +import LogViewerOptions from "tower/forms/LogViewerOptions"; +import LogViewerStatus from "tower/forms/LogViewerStatus"; +import Organizations from "tower/forms/Organizations"; +import Permissions from "tower/forms/Permissions"; +import ProjectStatus from "tower/forms/ProjectStatus"; +import Projects from "tower/forms/Projects"; +import Source from "tower/forms/Source"; +import SurveyMaker from "tower/forms/SurveyMaker"; +import SurveyQuestion from "tower/forms/SurveyQuestion"; +import Teams from "tower/forms/Teams"; +import Users from "tower/forms/Users"; + + +export + { ActivityDetail, + Credentials, + CustomInventory, + EventsViewer, + Groups, + HostGroups, + Hosts, + Inventories, + InventoryStatus, + JobEventData, + JobSummary, + JobTemplates, + JobVarsPrompt, + Jobs, + LicenseForm, + LicenseUpdate, + LogViewerOptions, + LogViewerStatus, + Organizations, + Permissions, + ProjectStatus, + Projects, + Source, + SurveyMaker, + SurveyQuestion, + Teams, + Users + }; diff --git a/awx/ui/static/js/forms/ActivityDetail.js b/awx/ui/static/js/forms/ActivityDetail.js index 269b281221..140fd389d9 100644 --- a/awx/ui/static/js/forms/ActivityDetail.js +++ b/awx/ui/static/js/forms/ActivityDetail.js @@ -16,33 +16,35 @@ * @name forms.function:ActivityDetail * @description This form is for activity detail modal that can be shown on most pages. */ -angular.module('ActivityDetailDefinition', []) - .value('ActivityDetailForm', { - name: 'activity', - editTitle: 'Activity Detail', - well: false, - 'class': 'horizontal-narrow', - formFieldSize: 'col-lg-10', - formLabelSize: 'col-lg-2', +export default + angular.module('ActivityDetailDefinition', []) + .value('ActivityDetailForm', { - fields: { - user: { - label: "Initiated by", - type: 'text', - readonly: true - }, - operation: { - label: 'Action', - type: 'text', - readonly: true - }, - changes: { - label: 'Changes', - type: 'textarea', - ngHide: "!changes || changes =='' || changes == 'null'", - readonly: true + name: 'activity', + editTitle: 'Activity Detail', + well: false, + 'class': 'horizontal-narrow', + formFieldSize: 'col-lg-10', + formLabelSize: 'col-lg-2', + + fields: { + user: { + label: "Initiated by", + type: 'text', + readonly: true + }, + operation: { + label: 'Action', + type: 'text', + readonly: true + }, + changes: { + label: 'Changes', + type: 'textarea', + ngHide: "!changes || changes =='' || changes == 'null'", + readonly: true + } } - } - }); //Form + }); //Form diff --git a/awx/ui/static/js/forms/Credentials.js b/awx/ui/static/js/forms/Credentials.js index 9d8a729481..d92c7fea5c 100644 --- a/awx/ui/static/js/forms/Credentials.js +++ b/awx/ui/static/js/forms/Credentials.js @@ -10,438 +10,440 @@ * @name forms.function:Credentials * @description This form is for adding/editing a Credential */ -angular.module('CredentialFormDefinition', []) - .value('CredentialForm', { - addTitle: 'Create Credential', //Legend in add mode - editTitle: '{{ name }}', //Legend in edit mode - name: 'credential', - well: true, - forceListeners: true, +export default + angular.module('CredentialFormDefinition', []) + .value('CredentialForm', { - actions: { - stream: { - ngClick: "showActivity()", - awToolTip: "View Activity Stream", - mode: 'edit' - } - }, + addTitle: 'Create Credential', //Legend in add mode + editTitle: '{{ name }}', //Legend in edit mode + name: 'credential', + well: true, + forceListeners: true, - fields: { - name: { - label: 'Name', - type: 'text', - addRequired: true, - editRequired: true, - autocomplete: false - }, - description: { - label: 'Description', - type: 'text', - addRequired: false, - editRequired: false - }, - owner: { - label: "Does this credential belong to a team or user?", - type: 'radio_group', - ngChange: "ownerChange()", - options: [{ - label: 'User', - value: 'user', - selected: true - }, { - label: 'Team', - value: 'team' - }], - awPopOver: "
A credential must be associated with either a user or a team. Choosing a user allows only the selected user access " + - "to the credential. Choosing a team shares the credential with all team members.
", - dataTitle: 'Owner', - dataPlacement: 'right', - dataContainer: "body" - }, - user: { - label: 'User that owns this credential', - type: 'lookup', - sourceModel: 'user', - sourceField: 'username', - ngClick: 'lookUpUser()', - ngShow: "owner == 'user'", - awRequiredWhen: { - variable: "user_required", - init: "false" + actions: { + stream: { + ngClick: "showActivity()", + awToolTip: "View Activity Stream", + mode: 'edit' } }, - team: { - label: 'Team that owns this credential', - type: 'lookup', - sourceModel: 'team', - sourceField: 'name', - ngClick: 'lookUpTeam()', - ngShow: "owner == 'team'", - awRequiredWhen: { - variable: "team_required", - init: "false" + + fields: { + name: { + label: 'Name', + type: 'text', + addRequired: true, + editRequired: true, + autocomplete: false + }, + description: { + label: 'Description', + type: 'text', + addRequired: false, + editRequired: false + }, + owner: { + label: "Does this credential belong to a team or user?", + type: 'radio_group', + ngChange: "ownerChange()", + options: [{ + label: 'User', + value: 'user', + selected: true + }, { + label: 'Team', + value: 'team' + }], + awPopOver: "A credential must be associated with either a user or a team. Choosing a user allows only the selected user access " + + "to the credential. Choosing a team shares the credential with all team members.
", + dataTitle: 'Owner', + dataPlacement: 'right', + dataContainer: "body" + }, + user: { + label: 'User that owns this credential', + type: 'lookup', + sourceModel: 'user', + sourceField: 'username', + ngClick: 'lookUpUser()', + ngShow: "owner == 'user'", + awRequiredWhen: { + variable: "user_required", + init: "false" + } + }, + team: { + label: 'Team that owns this credential', + type: 'lookup', + sourceModel: 'team', + sourceField: 'name', + ngClick: 'lookUpTeam()', + ngShow: "owner == 'team'", + awRequiredWhen: { + variable: "team_required", + init: "false" + } + }, + kind: { + label: 'Type', + excludeModal: true, + type: 'select', + ngOptions: 'kind.label for kind in credential_kind_options track by kind.value', // select as label for value in array 'kind.label for kind in credential_kind_options', + ngChange: 'kindChange()', + addRequired: true, + editRequired: true, + awPopOver:'The email address assigned to the Google Compute Engine service account.
', + dataTitle: 'Email', + dataPlacement: 'right', + dataContainer: "body" + }, + "subscription_id": { + labelBind: "usernameLabel", + type: 'text', + ngShow: "kind.value == 'azure'", + awRequiredWhen: { + variable: 'subscription_required', + init: false + }, + addRequired: false, + editRequired: false, + autocomplete: false, + awPopOver: 'Subscription ID is an Azure construct, which is mapped to a username.
', + dataTitle: 'Subscription ID', + dataPlacement: 'right', + dataContainer: "body" + + }, + "api_key": { + label: 'API Key', + type: 'password', + ngShow: "kind.value == 'rax'", + awRequiredWhen: { + variable: "rackspace_required", + init: false + }, + autocomplete: false, + ask: false, + clear: false, + // apiField: 'passwowrd' + }, + "password": { + label: 'Password', + type: 'password', + ngShow: "kind.value == 'scm' || kind.value == 'vmware'", + addRequired: false, + editRequired: false, + ngChange: "clearPWConfirm('password_confirm')", + ask: false, + clear: false, + associated: 'password_confirm', + autocomplete: false, + awRequiredWhen: { + variable: "password_required", + init: false + } + }, + "password_confirm": { + label: 'Confirm Password', + type: 'password', + ngShow: "kind.value == 'scm' || kind.value == 'vmware'", + addRequired: false, + editRequired: false, + awPassMatch: true, + associated: 'password', + autocomplete: false, + awRequiredWhen: { + variable: "password_required", + init: false + } + }, + "ssh_password": { + label: 'Password', // formally 'SSH Password' + type: 'password', + ngShow: "kind.value == 'ssh'", + ngChange: "clearPWConfirm('ssh_password_confirm')", + addRequired: false, + editRequired: false, + ask: true, + clear: true, + associated: 'ssh_password_confirm', + autocomplete: false + }, + "ssh_password_confirm": { + label: 'Confirm Password', // formally 'Confirm SSH password' + type: 'password', + ngShow: "kind.value == 'ssh'", + addRequired: false, + editRequired: false, + awPassMatch: true, + associated: 'ssh_password', + autocomplete: false + }, + "ssh_key_data": { + labelBind: 'sshKeyDataLabel', + type: 'textarea', + ngShow: "kind.value == 'ssh' || kind.value == 'scm' || " + + "kind.value == 'gce' || kind.value == 'azure'", + awRequiredWhen: { + variable: 'key_required', + init: true + }, + hintText: "{{ key_hint }}", + addRequired: false, + editRequired: false, + awDropFile: true, + 'class': 'ssh-key-field', + rows: 10, + awPopOver: "SSH key description", + awPopOverWatch: "key_description", + dataTitle: 'Help', + dataPlacement: 'right', + dataContainer: "body" + }, + "ssh_key_unlock": { + label: 'Key Password', + type: 'password', + ngShow: "kind.value == 'ssh' || kind.value == 'scm'", + addRequired: false, + editRequired: false, + ngChange: "clearPWConfirm('ssh_key_unlock_confirm')", + associated: 'ssh_key_unlock_confirm', + ask: true, + askShow: "kind.value == 'ssh'", // Only allow ask for machine credentials + clear: true + }, + "ssh_key_unlock_confirm": { + label: 'Confirm Key Password', + type: 'password', + ngShow: "kind.value == 'ssh' || kind.value == 'scm'", + addRequired: false, + editRequired: false, + awPassMatch: true, + associated: 'ssh_key_unlock' + }, + "login_method": { + label: "Login Method", // FIXME: Confirm this label is ok? + type: 'radio_group', + ngShow: "kind.value == 'ssh'", + ngChange: "loginMethodChange()", + options: [{ + label: 'None', // FIXME: Maybe 'Default' or 'SSH only' instead? + value: '', + selected: true + }, { + label: 'Sudo', + value: 'sudo' + }, { + label: 'Su', + value: 'su' + }], + awPopOver: "A credential may optionally provide a sudo username and password or su username and password to use when running a playbook.
", + dataPlacement: 'right', + dataContainer: "body" + }, + "sudo_username": { + label: 'Sudo Username', + type: 'text', + ngShow: "kind.value == 'ssh' && login_method == 'sudo'", + addRequired: false, + editRequired: false, + autocomplete: false + }, + "sudo_password": { + label: 'Sudo Password', + type: 'password', + ngShow: "kind.value == 'ssh' && login_method == 'sudo'", + addRequired: false, + editRequired: false, + ngChange: "clearPWConfirm('sudo_password_confirm')", + ask: true, + clear: true, + associated: 'sudo_password_confirm', + autocomplete: false + }, + "sudo_password_confirm": { + label: 'Confirm Sudo Password', + type: 'password', + ngShow: "kind.value == 'ssh' && login_method == 'sudo'", + addRequired: false, + editRequired: false, + awPassMatch: true, + associated: 'sudo_password', + autocomplete: false + }, + "su_username": { + label: 'Su Username', + type: 'text', + ngShow: "kind.value == 'ssh' && login_method == 'su'", + addRequired: false, + editRequired: false, + autocomplete: false + }, + "su_password": { + label: 'Su Password', + type: 'password', + ngShow: "kind.value == 'ssh' && login_method == 'su'", + addRequired: false, + editRequired: false, + ngChange: "clearPWConfirm('su_password_confirm')", + ask: true, + clear: true, + associated: 'su_password_confirm', + autocomplete: false + }, + "su_password_confirm": { + label: 'Confirm Su Password', + type: 'password', + ngShow: "kind.value == 'ssh' && login_method == 'su'", + addRequired: false, + editRequired: false, + awPassMatch: true, + associated: 'su_password', + autocomplete: false + }, + "project": { + label: "Project", + type: 'text', + ngShow: "kind.value == 'gce'", + awRequiredWhen: { + variable: 'project_required', + init: false + }, + awPopOver: "The Project ID is the GCE assigned identification. It is constructed as two words followed by a three digit number. Such as:
adjective-noun-000
", + dataTitle: 'Project ID', + dataPlacement: 'right', + dataContainer: "body", + addRequired: false, + editRequired: false, + autocomplete: false + }, + + "vault_password": { + label: "Vault Password", + type: 'password', + ngShow: "kind.value == 'ssh'", + addRequired: false, + editRequired: false, + ngChange: "clearPWConfirm('vault_password_confirm')", + ask: true, + clear: true, + associated: 'vault_password_confirm', + autocomplete: false + }, + "vault_password_confirm": { + label: "Confirm Vault Password", + type: 'password', + ngShow: "kind.value == 'ssh'", + addRequired: false, + editRequired: false, + awPassMatch: true, + associated: 'vault_password', + autocomplete: false } }, - kind: { - label: 'Type', - excludeModal: true, - type: 'select', - ngOptions: 'kind.label for kind in credential_kind_options track by kind.value', // select as label for value in array 'kind.label for kind in credential_kind_options', - ngChange: 'kindChange()', - addRequired: true, - editRequired: true, - awPopOver:'The email address assigned to the Google Compute Engine service account.
', - dataTitle: 'Email', - dataPlacement: 'right', - dataContainer: "body" - }, - "subscription_id": { - labelBind: "usernameLabel", - type: 'text', - ngShow: "kind.value == 'azure'", - awRequiredWhen: { - variable: 'subscription_required', - init: false - }, - addRequired: false, - editRequired: false, - autocomplete: false, - awPopOver: 'Subscription ID is an Azure construct, which is mapped to a username.
', - dataTitle: 'Subscription ID', - dataPlacement: 'right', - dataContainer: "body" - }, - "api_key": { - label: 'API Key', - type: 'password', - ngShow: "kind.value == 'rax'", - awRequiredWhen: { - variable: "rackspace_required", - init: false - }, - autocomplete: false, - ask: false, - clear: false, - // apiField: 'passwowrd' - }, - "password": { - label: 'Password', - type: 'password', - ngShow: "kind.value == 'scm' || kind.value == 'vmware'", - addRequired: false, - editRequired: false, - ngChange: "clearPWConfirm('password_confirm')", - ask: false, - clear: false, - associated: 'password_confirm', - autocomplete: false, - awRequiredWhen: { - variable: "password_required", - init: false - } - }, - "password_confirm": { - label: 'Confirm Password', - type: 'password', - ngShow: "kind.value == 'scm' || kind.value == 'vmware'", - addRequired: false, - editRequired: false, - awPassMatch: true, - associated: 'password', - autocomplete: false, - awRequiredWhen: { - variable: "password_required", - init: false - } - }, - "ssh_password": { - label: 'Password', // formally 'SSH Password' - type: 'password', - ngShow: "kind.value == 'ssh'", - ngChange: "clearPWConfirm('ssh_password_confirm')", - addRequired: false, - editRequired: false, - ask: true, - clear: true, - associated: 'ssh_password_confirm', - autocomplete: false - }, - "ssh_password_confirm": { - label: 'Confirm Password', // formally 'Confirm SSH password' - type: 'password', - ngShow: "kind.value == 'ssh'", - addRequired: false, - editRequired: false, - awPassMatch: true, - associated: 'ssh_password', - autocomplete: false - }, - "ssh_key_data": { - labelBind: 'sshKeyDataLabel', - type: 'textarea', - ngShow: "kind.value == 'ssh' || kind.value == 'scm' || " + - "kind.value == 'gce' || kind.value == 'azure'", - awRequiredWhen: { - variable: 'key_required', - init: true - }, - hintText: "{{ key_hint }}", - addRequired: false, - editRequired: false, - awDropFile: true, - 'class': 'ssh-key-field', - rows: 10, - awPopOver: "SSH key description", - awPopOverWatch: "key_description", - dataTitle: 'Help', - dataPlacement: 'right', - dataContainer: "body" - }, - "ssh_key_unlock": { - label: 'Key Password', - type: 'password', - ngShow: "kind.value == 'ssh' || kind.value == 'scm'", - addRequired: false, - editRequired: false, - ngChange: "clearPWConfirm('ssh_key_unlock_confirm')", - associated: 'ssh_key_unlock_confirm', - ask: true, - askShow: "kind.value == 'ssh'", // Only allow ask for machine credentials - clear: true - }, - "ssh_key_unlock_confirm": { - label: 'Confirm Key Password', - type: 'password', - ngShow: "kind.value == 'ssh' || kind.value == 'scm'", - addRequired: false, - editRequired: false, - awPassMatch: true, - associated: 'ssh_key_unlock' - }, - "login_method": { - label: "Login Method", // FIXME: Confirm this label is ok? - type: 'radio_group', - ngShow: "kind.value == 'ssh'", - ngChange: "loginMethodChange()", - options: [{ - label: 'None', // FIXME: Maybe 'Default' or 'SSH only' instead? - value: '', - selected: true - }, { - label: 'Sudo', - value: 'sudo' - }, { - label: 'Su', - value: 'su' - }], - awPopOver: "A credential may optionally provide a sudo username and password or su username and password to use when running a playbook.
", - dataPlacement: 'right', - dataContainer: "body" - }, - "sudo_username": { - label: 'Sudo Username', - type: 'text', - ngShow: "kind.value == 'ssh' && login_method == 'sudo'", - addRequired: false, - editRequired: false, - autocomplete: false - }, - "sudo_password": { - label: 'Sudo Password', - type: 'password', - ngShow: "kind.value == 'ssh' && login_method == 'sudo'", - addRequired: false, - editRequired: false, - ngChange: "clearPWConfirm('sudo_password_confirm')", - ask: true, - clear: true, - associated: 'sudo_password_confirm', - autocomplete: false - }, - "sudo_password_confirm": { - label: 'Confirm Sudo Password', - type: 'password', - ngShow: "kind.value == 'ssh' && login_method == 'sudo'", - addRequired: false, - editRequired: false, - awPassMatch: true, - associated: 'sudo_password', - autocomplete: false - }, - "su_username": { - label: 'Su Username', - type: 'text', - ngShow: "kind.value == 'ssh' && login_method == 'su'", - addRequired: false, - editRequired: false, - autocomplete: false - }, - "su_password": { - label: 'Su Password', - type: 'password', - ngShow: "kind.value == 'ssh' && login_method == 'su'", - addRequired: false, - editRequired: false, - ngChange: "clearPWConfirm('su_password_confirm')", - ask: true, - clear: true, - associated: 'su_password_confirm', - autocomplete: false - }, - "su_password_confirm": { - label: 'Confirm Su Password', - type: 'password', - ngShow: "kind.value == 'ssh' && login_method == 'su'", - addRequired: false, - editRequired: false, - awPassMatch: true, - associated: 'su_password', - autocomplete: false - }, - "project": { - label: "Project", - type: 'text', - ngShow: "kind.value == 'gce'", - awRequiredWhen: { - variable: 'project_required', - init: false - }, - awPopOver: "The Project ID is the GCE assigned identification. It is constructed as two words followed by a three digit number. Such as:
adjective-noun-000
", - dataTitle: 'Project ID', - dataPlacement: 'right', - dataContainer: "body", - addRequired: false, - editRequired: false, - autocomplete: false - }, + related: {} - "vault_password": { - label: "Vault Password", - type: 'password', - ngShow: "kind.value == 'ssh'", - addRequired: false, - editRequired: false, - ngChange: "clearPWConfirm('vault_password_confirm')", - ask: true, - clear: true, - associated: 'vault_password_confirm', - autocomplete: false - }, - "vault_password_confirm": { - label: "Confirm Vault Password", - type: 'password', - ngShow: "kind.value == 'ssh'", - addRequired: false, - editRequired: false, - awPassMatch: true, - associated: 'vault_password', - autocomplete: false - } - }, - - buttons: { - save: { - label: 'Save', - ngClick: 'formSave()', //$scope.function to call on click, optional - ngDisabled: true //Disable when $pristine or $invalid, optional - }, - reset: { - ngClick: 'formReset()', - ngDisabled: true //Disabled when $pristine - } - }, - - related: {} - - }); + }); diff --git a/awx/ui/static/js/forms/CustomInventory.js b/awx/ui/static/js/forms/CustomInventory.js index 9730936e24..45f2279781 100644 --- a/awx/ui/static/js/forms/CustomInventory.js +++ b/awx/ui/static/js/forms/CustomInventory.js @@ -11,68 +11,70 @@ * @name forms.function:Organizations * @description This form is for adding/editing an organization */ -angular.module('CustomInventoryFormDefinition', []) - .value('CustomInventoryForm', { - addTitle: 'Create Custom Inventory', //Title in add mode - editTitle: '{{ name }}', //Title in edit mode - name: 'custom_inventory', //entity or model name in singular form - well: false, - showActions: false, +export default + angular.module('CustomInventoryFormDefinition', []) + .value('CustomInventoryForm', { - fields: { - name: { - label: 'Name', - type: 'text', - addRequired: true, - editRequired: true, - capitalize: false - }, - description: { - label: 'Description', - type: 'text', - addRequired: false, - editRequired: false - }, - organization: { - label: 'Organization', - type: 'lookup', - awRequiredWhen: { - variable: "orgrequired", - init: true + addTitle: 'Create Custom Inventory', //Title in add mode + editTitle: '{{ name }}', //Title in edit mode + name: 'custom_inventory', //entity or model name in singular form + well: false, + showActions: false, + + fields: { + name: { + label: 'Name', + type: 'text', + addRequired: true, + editRequired: true, + capitalize: false + }, + description: { + label: 'Description', + type: 'text', + addRequired: false, + editRequired: false + }, + organization: { + label: 'Organization', + type: 'lookup', + awRequiredWhen: { + variable: "orgrequired", + init: true + }, + sourceModel: 'organization', + sourceField: 'name', + ngClick: 'lookUpOrganization()' + }, + script: { + label: 'Custom Script', + type: 'textarea', + hintText: "Drag and drop an inventory script on the field below", + addRequired: true, + editRequired: true, + awDropFile: true, + 'class': 'ssh-key-field', + rows: 10, + awPopOver: "Drag and drop your custom inventory script file here or create one in the field to import your custom inventory. " +
+ "
Script must begin with a hashbang sequence: i.e.... #!/usr/bin/env python
Drag and drop your custom inventory script file here or create one in the field to import your custom inventory. " +
- "
Script must begin with a hashbang sequence: i.e.... #!/usr/bin/env python