mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 00:57:48 -02:30
Merge pull request #66 from joefiorini/broccoli-build
Improved build workflow for UI client
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -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
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"latedef": "nofunc",
|
||||
"noarg": true,
|
||||
"nonew": true,
|
||||
"maxerr": 10000,
|
||||
"notypeof": true,
|
||||
"globals": {
|
||||
"angular":false,
|
||||
|
||||
@@ -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
|
||||
|
||||
16
Makefile
16
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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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')
|
||||
|
||||
};
|
||||
|
||||
}]);
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
@@ -116,4 +121,4 @@ angular.module('DashboardGraphs').
|
||||
|
||||
}
|
||||
}
|
||||
}]);
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
|
||||
}
|
||||
}
|
||||
}]);
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
}
|
||||
}]);
|
||||
}
|
||||
|
||||
58
awx/ui/static/js/forms.js
Normal file
58
awx/ui/static/js/forms.js
Normal file
@@ -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
|
||||
};
|
||||
@@ -16,7 +16,9 @@
|
||||
* @name forms.function:ActivityDetail
|
||||
* @description This form is for activity detail modal that can be shown on most pages.
|
||||
*/
|
||||
angular.module('ActivityDetailDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('ActivityDetailDefinition', [])
|
||||
.value('ActivityDetailForm', {
|
||||
|
||||
name: 'activity',
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
* @name forms.function:Credentials
|
||||
* @description This form is for adding/editing a Credential
|
||||
*/
|
||||
angular.module('CredentialFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('CredentialFormDefinition', [])
|
||||
.value('CredentialForm', {
|
||||
|
||||
addTitle: 'Create Credential', //Legend in add mode
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:Organizations
|
||||
* @description This form is for adding/editing an organization
|
||||
*/
|
||||
angular.module('CustomInventoryFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('CustomInventoryFormDefinition', [])
|
||||
.value('CustomInventoryForm', {
|
||||
|
||||
addTitle: 'Create Custom Inventory', //Title in add mode
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
* @name forms.function:EventsViewer
|
||||
* @description This form is for events on the job detail page
|
||||
*/
|
||||
angular.module('EventsViewerFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('EventsViewerFormDefinition', [])
|
||||
.value('EventsViewerForm', {
|
||||
|
||||
fields: {
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:Groups
|
||||
* @description This form is for adding/editing a Group on the inventory page
|
||||
*/
|
||||
angular.module('GroupFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('GroupFormDefinition', [])
|
||||
.value('GroupForm', {
|
||||
|
||||
addTitle: 'Create Group',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:HostGroups
|
||||
* @description This form is for groups of hosts on the inventory page
|
||||
*/
|
||||
angular.module('HostGroupsFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('HostGroupsFormDefinition', [])
|
||||
.value('HostGroupsForm', {
|
||||
|
||||
editTitle: 'Host Groups',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:Hosts
|
||||
* @description This form is for adding/editing a host on the inventory page
|
||||
*/
|
||||
angular.module('HostFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('HostFormDefinition', [])
|
||||
.value('HostForm', {
|
||||
|
||||
addTitle: 'Create Host',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:Inventories
|
||||
* @description This form is for adding/editing an inventory
|
||||
*/
|
||||
angular.module('InventoryFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('InventoryFormDefinition', [])
|
||||
.value('InventoryForm', {
|
||||
|
||||
addTitle: 'Create Inventory',
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
* @name forms.function:InventoryStatus
|
||||
* @description This form is for adding/editing an InventoryStatus
|
||||
*/
|
||||
angular.module('InventoryStatusDefinition', [])
|
||||
export default
|
||||
angular.module('InventoryStatusDefinition', [])
|
||||
.value('InventoryStatusForm', {
|
||||
|
||||
name: 'inventory_update',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:JobEventData
|
||||
* @description Not sure if this is used...
|
||||
*/
|
||||
angular.module('JobEventDataDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('JobEventDataDefinition', [])
|
||||
.value('JobEventDataForm', {
|
||||
|
||||
editTitle: '{{ id }} - {{ event_display }}',
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* @description Display job status info in a dialog
|
||||
*/
|
||||
|
||||
angular.module('JobSummaryDefinition', [])
|
||||
export default
|
||||
angular.module('JobSummaryDefinition', [])
|
||||
.value('JobSummary', {
|
||||
|
||||
editTitle: '{{ id }} - {{ name }}',
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
* @name forms.function:JobTemplate
|
||||
* @description This form is for adding/editing a Job Template
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'CompletedJobsDefinition'])
|
||||
export default
|
||||
angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'CompletedJobsDefinition'])
|
||||
|
||||
.value ('JobTemplateFormObject', {
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
* @name forms.function:JobVarsPrompt
|
||||
* @description This form is for job variables prompt modal
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('JobVarsPromptFormDefinition', [])
|
||||
export default
|
||||
angular.module('JobVarsPromptFormDefinition', [])
|
||||
|
||||
.value ('JobVarsPromptForm', {
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:Jobs
|
||||
* @description This form is for adding/editing a Job
|
||||
*/
|
||||
angular.module('JobFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('JobFormDefinition', [])
|
||||
.value('JobForm', {
|
||||
|
||||
addTitle: 'Create Job',
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
* @name forms.function:LicenseForm
|
||||
* @description This form is for viewing the license information
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('LicenseFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('LicenseFormDefinition', [])
|
||||
.value('LicenseForm', {
|
||||
|
||||
name: 'license',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:LicenseUpdate
|
||||
* @description This form is for updating a license
|
||||
*/
|
||||
angular.module('LicenseUpdateFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('LicenseUpdateFormDefinition', [])
|
||||
.value('LicenseUpdateForm', {
|
||||
|
||||
name: 'license',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:LogViewerOptions
|
||||
* @description This form is for the page to view logs
|
||||
*/
|
||||
angular.module('LogViewerOptionsDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('LogViewerOptionsDefinition', [])
|
||||
.value('LogViewerOptionsForm', {
|
||||
|
||||
name: 'status',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:LogViewerStatus
|
||||
* @description Form definition for LogViewer.js helper
|
||||
*/
|
||||
angular.module('LogViewerStatusDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('LogViewerStatusDefinition', [])
|
||||
.value('LogViewerStatusForm', {
|
||||
|
||||
name: 'status',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:Organizations
|
||||
* @description This form is for adding/editing an organization
|
||||
*/
|
||||
angular.module('OrganizationFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('OrganizationFormDefinition', [])
|
||||
.value('OrganizationForm', {
|
||||
|
||||
addTitle: 'Create Organization', //Title in add mode
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
* @name forms.function:Permissions
|
||||
* @description This form is for adding/editing persmissions
|
||||
*/
|
||||
angular.module('PermissionFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('PermissionFormDefinition', [])
|
||||
.value('PermissionsForm', {
|
||||
|
||||
addTitle: 'Add Permission', //Title in add mode
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:ProjectStatus
|
||||
* @description This form is for adding/editing project status
|
||||
*/
|
||||
angular.module('ProjectStatusDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('ProjectStatusDefinition', [])
|
||||
.value('ProjectStatusForm', {
|
||||
|
||||
name: 'project_update',
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
* @name forms.function:Projects
|
||||
* @description This form is for adding/editing projects
|
||||
*/
|
||||
|
||||
export default
|
||||
angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
.value('ProjectsFormObject', {
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:Source
|
||||
* @description This form is for group model
|
||||
*/
|
||||
angular.module('SourceFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('SourceFormDefinition', [])
|
||||
.value('SourceForm', {
|
||||
|
||||
addTitle: 'Create Source',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:SurveyMaker
|
||||
* @description This form is for adding/editing a survey
|
||||
*/
|
||||
angular.module('SurveyMakerFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('SurveyMakerFormDefinition', [])
|
||||
.value('SurveyMakerForm', {
|
||||
|
||||
addTitle: 'Add Survey', //Title in add mode
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:Questions
|
||||
* @description This form is for adding a question
|
||||
*/
|
||||
angular.module('SurveyQuestionFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('SurveyQuestionFormDefinition', [])
|
||||
.value('SurveyQuestionForm', {
|
||||
|
||||
addTitle: 'Add Question',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:Teams
|
||||
* @description This form is for adding/editing teams
|
||||
*/
|
||||
angular.module('TeamFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('TeamFormDefinition', [])
|
||||
.value('TeamForm', {
|
||||
|
||||
addTitle: 'Create Team', //Legend in add mode
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
* @name forms.function:Users
|
||||
* @description This form is for adding/editing users
|
||||
*/
|
||||
angular.module('UserFormDefinition', [])
|
||||
|
||||
export default
|
||||
angular.module('UserFormDefinition', [])
|
||||
.value('UserForm', {
|
||||
|
||||
addTitle: 'Create User',
|
||||
|
||||
11
awx/ui/static/js/help.js
Normal file
11
awx/ui/static/js/help.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import ChromeSocketHelp from "tower/help/ChromeSocketHelp";
|
||||
import FirefoxSocketHelp from "tower/help/FirefoxSocketHelp";
|
||||
import InventoryGroups from "tower/help/InventoryGroups";
|
||||
import SafariSocketHelp from "tower/help/SafariSocketHelp";
|
||||
|
||||
export
|
||||
{ ChromeSocketHelp,
|
||||
FirefoxSocketHelp,
|
||||
InventoryGroups,
|
||||
SafariSocketHelp
|
||||
};
|
||||
@@ -18,7 +18,7 @@
|
||||
* @name help.function:ChromeSocketHelp
|
||||
* @description This help modal gives instructions on what the user should do if not connected to the web sockets while using Chrome.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
angular.module('ChromeSocketHelpDefinition', [])
|
||||
.value('ChromeSocketHelp', {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* @name help.function:FirefoxSocketHelp
|
||||
* @description This help modal gives instructions on what the user should do if not connected to the web sockets while using Firefox.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
angular.module('FFSocketHelpDefinition', [])
|
||||
.value('FFSocketHelp', {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* @name help.function:InventoryGroups
|
||||
* @description This help modal walks the user how to add groups to an inventory or a subgroup to an existing group.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
angular.module('InventoryGroupsHelpDefinition', [])
|
||||
.value('InventoryGroupsHelp', {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* @name help.function:SafariSocketHelp
|
||||
* @description This help modal gives instructions on what the user should do if not connected to the web sockets while using Safari. Safari does not support websockets.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
angular.module('SafariSocketHelpDefinition', [])
|
||||
.value('SafariSocketHelp', {
|
||||
|
||||
82
awx/ui/static/js/helpers.js
Normal file
82
awx/ui/static/js/helpers.js
Normal file
@@ -0,0 +1,82 @@
|
||||
import 'tower/forms';
|
||||
import 'tower/lists';
|
||||
|
||||
import AboutAnsible from "tower/helpers/AboutAnsible";
|
||||
import Access from "tower/helpers/Access";
|
||||
import Children from "tower/helpers/Children";
|
||||
import ConfigureTower from "tower/helpers/ConfigureTower";
|
||||
import Credentials from "tower/helpers/Credentials";
|
||||
import CustomInventory from "tower/helpers/CustomInventory";
|
||||
import EventViewer from "tower/helpers/EventViewer";
|
||||
import Events from "tower/helpers/Events";
|
||||
import Groups from "tower/helpers/Groups";
|
||||
import HostEventsViewer from "tower/helpers/HostEventsViewer";
|
||||
import Hosts from "tower/helpers/Hosts";
|
||||
import JobDetail from "tower/helpers/JobDetail";
|
||||
import JobSubmission from "tower/helpers/JobSubmission";
|
||||
import JobTemplates from "tower/helpers/JobTemplates";
|
||||
import Jobs from "tower/helpers/Jobs";
|
||||
import License from "tower/helpers/License";
|
||||
import LoadConfig from "tower/helpers/LoadConfig";
|
||||
import LogViewer from "tower/helpers/LogViewer";
|
||||
import Lookup from "tower/helpers/Lookup";
|
||||
import PaginationHelpers from "tower/helpers/PaginationHelpers";
|
||||
import Parse from "tower/helpers/Parse";
|
||||
import Permissions from "tower/helpers/Permissions";
|
||||
import ProjectPath from "tower/helpers/ProjectPath";
|
||||
import Projects from "tower/helpers/Projects";
|
||||
import Schedules from "tower/helpers/Schedules";
|
||||
import Selection from "tower/helpers/Selection";
|
||||
import SocketHelper from "tower/helpers/SocketHelper";
|
||||
import Survey from "tower/helpers/Survey";
|
||||
import Users from "tower/helpers/Users";
|
||||
import Variables from "tower/helpers/Variables";
|
||||
import ApiDefaults from "tower/helpers/api-defaults";
|
||||
import inventory from "tower/helpers/inventory";
|
||||
import MD5 from "tower/helpers/md5";
|
||||
import RefreshRelated from "tower/helpers/refresh-related";
|
||||
import Refresh from "tower/helpers/refresh";
|
||||
import RelatedSearch from "tower/helpers/related-search";
|
||||
import Search from "tower/helpers/search";
|
||||
import Teams from "tower/helpers/teams";
|
||||
|
||||
export
|
||||
{ AboutAnsible,
|
||||
Access,
|
||||
Children,
|
||||
ConfigureTower,
|
||||
Credentials,
|
||||
CustomInventory,
|
||||
EventViewer,
|
||||
Events,
|
||||
Groups,
|
||||
HostEventsViewer,
|
||||
Hosts,
|
||||
JobDetail,
|
||||
JobSubmission,
|
||||
JobTemplates,
|
||||
Jobs,
|
||||
License,
|
||||
LoadConfig,
|
||||
LogViewer,
|
||||
Lookup,
|
||||
PaginationHelpers,
|
||||
Parse,
|
||||
Permissions,
|
||||
ProjectPath,
|
||||
Projects,
|
||||
Schedules,
|
||||
Selection,
|
||||
SocketHelper,
|
||||
Survey,
|
||||
Users,
|
||||
Variables,
|
||||
ApiDefaults,
|
||||
inventory,
|
||||
MD5,
|
||||
RefreshRelated,
|
||||
Refresh,
|
||||
RelatedSearch,
|
||||
Search,
|
||||
Teams
|
||||
};
|
||||
@@ -16,9 +16,10 @@
|
||||
* @name helpers.function:AboutAnsible
|
||||
* @description This is the code for the About Ansible modal window that pops up with cowsay giving company/tower info and copyright information.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('AboutAnsibleHelpModal', ['RestServices', 'Utilities','ModalDialog'])
|
||||
|
||||
export default
|
||||
angular.module('AboutAnsibleHelpModal', ['RestServices', 'Utilities','ModalDialog'])
|
||||
.factory('AboutAnsibleHelp', ['$rootScope', '$compile', '$location' , 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', 'CreateDialog',
|
||||
function ($rootScope, $compile , $location, Rest, GetBasePath, ProcessErrors, Wait, CreateDialog) {
|
||||
return function () {
|
||||
@@ -88,4 +89,4 @@ angular.module('AboutAnsibleHelpModal', ['RestServices', 'Utilities','ModalDialo
|
||||
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
* @description routines checking user access
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('AccessHelper', ['RestServices', 'Utilities'])
|
||||
export default
|
||||
angular.module('AccessHelper', ['RestServices', 'Utilities'])
|
||||
|
||||
.factory('CheckAccess', ['$rootScope', 'Alert', 'Rest', 'GetBasePath', 'ProcessErrors', '$cookieStore', function ($rootScope, Alert, Rest, GetBasePath, ProcessErrors, $cookieStore) {
|
||||
return function (params) {
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
* 'show' attribute of each job_event in the set of job_events.
|
||||
* See the filter in job_events.js list.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
|
||||
export default
|
||||
angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
|
||||
.factory('ToggleChildren', ['$location', 'Store', function ($location, Store) {
|
||||
return function (params) {
|
||||
|
||||
@@ -108,4 +108,4 @@ angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
|
||||
Store(path + '_children', local_child_store);
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog',
|
||||
export default
|
||||
angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog',
|
||||
'GeneratorHelpers'])
|
||||
|
||||
.factory('ConfigureTower', ['Wait', '$location' , '$compile', 'CreateDialog', 'ConfigureTowerJobsList', 'GenerateList', 'GetBasePath' , 'SearchInit' , 'PaginateInit', 'PlaybookRun', 'LoadSchedulesScope',
|
||||
@@ -236,8 +236,8 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules
|
||||
}])
|
||||
|
||||
|
||||
.factory('ConfigureTowerSchedule', ['$compile','SchedulerInit', 'Rest', 'Wait', 'SetSchedulesInnerDialogSize', 'SchedulePost', 'ProcessErrors', 'GetBasePath', 'Empty', 'Prompt',
|
||||
function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, SchedulePost, ProcessErrors, GetBasePath, Empty, Prompt) {
|
||||
.factory('ConfigureTowerSchedule', ['$compile','SchedulerInit', 'Rest', 'Wait', 'SetSchedulesInnerDialogSize', 'SchedulePost', 'ProcessErrors', 'GetBasePath', 'Empty', 'Prompt',
|
||||
function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, SchedulePost, ProcessErrors, GetBasePath, Empty, Prompt) {
|
||||
return function(params) {
|
||||
var parent_scope = params.scope,
|
||||
mode = params.mode, // 'add' or 'edit'
|
||||
@@ -466,4 +466,4 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
|
||||
scope.$emit('ScheduleReady');
|
||||
}
|
||||
};
|
||||
}]);
|
||||
}]);
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name helpers.function:Credentials
|
||||
* @description Functions shared amongst Credential related controllers
|
||||
*/
|
||||
'use strict';
|
||||
*/
|
||||
|
||||
export default
|
||||
angular.module('CredentialsHelper', ['Utilities'])
|
||||
|
||||
.factory('KindChange', ['Empty',
|
||||
@@ -22,6 +22,30 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
reset = params.reset,
|
||||
collapse, id;
|
||||
|
||||
$('.popover').each(function() {
|
||||
// remove lingering popover <div>. Seems to be a bug in TB3 RC1
|
||||
$(this).remove();
|
||||
});
|
||||
$('.tooltip').each( function() {
|
||||
// close any lingering tool tipss
|
||||
$(this).hide();
|
||||
});
|
||||
// Put things in a default state
|
||||
scope.usernameLabel = 'Username';
|
||||
scope.aws_required = false;
|
||||
scope.email_required = false;
|
||||
scope.rackspace_required = false;
|
||||
scope.sshKeyDataLabel = 'SSH Private Key';
|
||||
scope.username_required = false; // JT-- added username_required b/c mutliple 'kinds' need username to be required (GCE)
|
||||
scope.key_required = false; // JT -- doing the same for key and project
|
||||
scope.project_required = false;
|
||||
scope.subscription_required = false;
|
||||
scope.key_description = "Paste the contents of the SSH private key file.<div class=\"popover-footer\"><span class=\"key\">esc</span> or click to close</div>";
|
||||
scope.key_hint= "drag and drop an SSH private key file on the field below";
|
||||
scope.host_required = false;
|
||||
scope.password_required = false;
|
||||
scope.hostLabel = '';
|
||||
|
||||
$('.popover').each(function() {
|
||||
// remove lingering popover <div>. Seems to be a bug in TB3 RC1
|
||||
$(this).remove();
|
||||
@@ -142,7 +166,7 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
scope.team_name = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
@@ -160,7 +184,7 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
scope.su_password = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('CreateCustomInventoryHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog',
|
||||
export default
|
||||
angular.module('CreateCustomInventoryHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog',
|
||||
'GeneratorHelpers', 'CustomInventoryFormDefinition'])
|
||||
|
||||
.factory('CreateCustomInventory', ['Wait', 'CreateDialog', 'CustomInventoryList', 'GenerateList', 'GetBasePath' , 'SearchInit' , 'PaginateInit', 'PlaybookRun', 'CustomInventoryAdd',
|
||||
@@ -176,9 +176,9 @@ angular.module('CreateCustomInventoryHelper', [ 'Utilities', 'RestServices', 'Sc
|
||||
}])
|
||||
|
||||
|
||||
.factory('CustomInventoryAdd', ['$compile','SchedulerInit', 'Rest', 'Wait', 'CustomInventoryList', 'CustomInventoryForm', 'ProcessErrors', 'GetBasePath', 'Empty', 'GenerateForm',
|
||||
.factory('CustomInventoryAdd', ['$compile','SchedulerInit', 'Rest', 'Wait', 'CustomInventoryList', 'CustomInventoryForm', 'ProcessErrors', 'GetBasePath', 'Empty', 'GenerateForm',
|
||||
'SearchInit' , 'PaginateInit', 'GenerateList', 'LookUpInit', 'OrganizationList',
|
||||
function($compile, SchedulerInit, Rest, Wait, CustomInventoryList, CustomInventoryForm, ProcessErrors, GetBasePath, Empty, GenerateForm,
|
||||
function($compile, SchedulerInit, Rest, Wait, CustomInventoryList, CustomInventoryForm, ProcessErrors, GetBasePath, Empty, GenerateForm,
|
||||
SearchInit, PaginateInit, GenerateList, LookUpInit, OrganizationList) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
@@ -245,11 +245,11 @@ function($compile, SchedulerInit, Rest, Wait, CustomInventoryList, CustomInvento
|
||||
generator.reset();
|
||||
};
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('CustomInventoryEdit', ['$compile','CustomInventoryList', 'Rest', 'Wait', 'GenerateList', 'CustomInventoryForm', 'ProcessErrors', 'GetBasePath', 'Empty', 'GenerateForm',
|
||||
.factory('CustomInventoryEdit', ['$compile','CustomInventoryList', 'Rest', 'Wait', 'GenerateList', 'CustomInventoryForm', 'ProcessErrors', 'GetBasePath', 'Empty', 'GenerateForm',
|
||||
'SearchInit', 'PaginateInit', '$routeParams', 'OrganizationList', 'LookUpInit',
|
||||
function($compile, CustomInventoryList, Rest, Wait, GenerateList, CustomInventoryForm, ProcessErrors, GetBasePath, Empty, GenerateForm,
|
||||
function($compile, CustomInventoryList, Rest, Wait, GenerateList, CustomInventoryForm, ProcessErrors, GetBasePath, Empty, GenerateForm,
|
||||
SearchInit, PaginateInit, $routeParams, OrganizationList, LookUpInit) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
@@ -354,4 +354,4 @@ function($compile, CustomInventoryList, Rest, Wait, GenerateList, CustomInventor
|
||||
|
||||
};
|
||||
};
|
||||
}]);
|
||||
}]);
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
* @name helpers.function:EventViewer
|
||||
* @description eventviewerhelper
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFormDefinition', 'HostsHelper'])
|
||||
export default
|
||||
angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFormDefinition', 'HostsHelper'])
|
||||
|
||||
.factory('EventViewer', ['$compile', 'CreateDialog', 'GetEvent', 'Wait', 'EventAddTable', 'GetBasePath', 'LookUpName', 'Empty', 'EventAddPreFormattedText',
|
||||
function($compile, CreateDialog, GetEvent, Wait, EventAddTable, GetBasePath, LookUpName, Empty, EventAddPreFormattedText) {
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
* @name helpers.function:Events
|
||||
* @description EventView - show the job_events form in a modal dialog
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('EventsHelper', ['RestServices', 'Utilities', 'JobEventDataDefinition', 'JobEventsFormDefinition'])
|
||||
export default
|
||||
angular.module('EventsHelper', ['RestServices', 'Utilities', 'JobEventDataDefinition', 'JobEventsFormDefinition'])
|
||||
|
||||
.factory('EventView', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'GenerateForm',
|
||||
'Prompt', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'JobEventDataForm', 'Empty', 'JobEventsForm',
|
||||
|
||||
@@ -13,11 +13,13 @@
|
||||
* @name helpers.function:Groups
|
||||
* @description inventory tree widget add/edit/delete
|
||||
*/
|
||||
|
||||
export default
|
||||
angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'GroupListDefinition', 'SearchHelper',
|
||||
'PaginationHelpers', 'ListGenerator', 'AuthService', 'GroupsHelper', 'InventoryHelper', 'SelectionHelper',
|
||||
'JobSubmissionHelper', 'RefreshHelper', 'PromptDialog', 'CredentialsListDefinition', 'InventoryTree',
|
||||
'InventoryStatusDefinition', 'VariablesHelper', 'SchedulesListDefinition', 'SourceFormDefinition', 'LogViewerHelper',
|
||||
'SchedulesHelper'
|
||||
'PaginationHelpers', 'ListGenerator', 'AuthService', 'GroupsHelper', 'InventoryHelper', 'SelectionHelper',
|
||||
'JobSubmissionHelper', 'RefreshHelper', 'PromptDialog', 'CredentialsListDefinition', 'InventoryTree',
|
||||
'InventoryStatusDefinition', 'VariablesHelper', 'SchedulesListDefinition', 'SourceFormDefinition', 'LogViewerHelper',
|
||||
'SchedulesHelper'
|
||||
])
|
||||
|
||||
/**
|
||||
@@ -144,7 +146,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
||||
'class': html_class
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
/**
|
||||
@@ -418,7 +420,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
||||
*
|
||||
*/
|
||||
.factory('GroupsScheduleListInit', ['GroupsScheduleEdit', 'SchedulesList', 'GenerateList', 'SearchInit', 'PaginateInit', 'Rest',
|
||||
'PageRangeSetup', 'Wait', 'ProcessErrors', 'Find', 'ToggleSchedule', 'DeleteSchedule', 'GetBasePath', 'SchedulesListInit',
|
||||
'PageRangeSetup', 'Wait', 'ProcessErrors', 'Find', 'ToggleSchedule', 'DeleteSchedule', 'GetBasePath', 'SchedulesListInit',
|
||||
function(GroupsScheduleEdit, SchedulesList, GenerateList, SearchInit, PaginateInit, Rest, PageRangeSetup, Wait, ProcessErrors, Find,
|
||||
ToggleSchedule, DeleteSchedule, GetBasePath, SchedulesListInit) {
|
||||
return function(params) {
|
||||
@@ -533,7 +535,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
||||
height = height - 110 - $('#schedules-buttons').outerHeight();
|
||||
$('#schedules-form-container-body').height(height);
|
||||
};
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
/**
|
||||
@@ -694,9 +696,9 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
||||
*
|
||||
*/
|
||||
.factory('GroupsEdit', ['$rootScope', '$location', '$log', '$routeParams', '$compile', 'Rest', 'Alert', 'GroupForm', 'GenerateForm',
|
||||
'Prompt', 'ProcessErrors', 'GetBasePath', 'SetNodeName', 'ParseTypeChange', 'GetSourceTypeOptions', 'InventoryUpdate',
|
||||
'LookUpInit', 'Empty', 'Wait', 'GetChoices', 'UpdateGroup', 'SourceChange', 'Find', 'WatchInventoryWindowResize',
|
||||
'ParseVariableString', 'ToJSON', 'GroupsScheduleListInit', 'SourceForm', 'SetSchedulesInnerDialogSize',
|
||||
'Prompt', 'ProcessErrors', 'GetBasePath', 'SetNodeName', 'ParseTypeChange', 'GetSourceTypeOptions', 'InventoryUpdate',
|
||||
'LookUpInit', 'Empty', 'Wait', 'GetChoices', 'UpdateGroup', 'SourceChange', 'Find', 'WatchInventoryWindowResize',
|
||||
'ParseVariableString', 'ToJSON', 'GroupsScheduleListInit', 'SourceForm', 'SetSchedulesInnerDialogSize',
|
||||
function ($rootScope, $location, $log, $routeParams, $compile, Rest, Alert, GroupForm, GenerateForm, Prompt, ProcessErrors,
|
||||
GetBasePath, SetNodeName, ParseTypeChange, GetSourceTypeOptions, InventoryUpdate, LookUpInit, Empty, Wait,
|
||||
GetChoices, UpdateGroup, SourceChange, Find, WatchInventoryWindowResize, ParseVariableString, ToJSON, GroupsScheduleListInit,
|
||||
@@ -1420,7 +1422,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
||||
*
|
||||
*/
|
||||
.factory('GroupsDelete', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'GroupForm', 'GenerateForm',
|
||||
'Prompt', 'ProcessErrors', 'GetBasePath', 'Wait', 'BuildTree', 'Find', 'CreateDialog',
|
||||
'Prompt', 'ProcessErrors', 'GetBasePath', 'Wait', 'BuildTree', 'Find', 'CreateDialog',
|
||||
function ($rootScope, $location, $log, $routeParams, Rest, Alert, GroupForm, GenerateForm, Prompt, ProcessErrors,
|
||||
GetBasePath, Wait, BuildTree, Find, CreateDialog) {
|
||||
return function (params) {
|
||||
@@ -1687,7 +1689,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
||||
*
|
||||
*/
|
||||
.factory('GroupsCopy', ['$compile', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'GenerateList', 'GroupList', 'SearchInit',
|
||||
'PaginateInit', 'GetRootGroups',
|
||||
'PaginateInit', 'GetRootGroups',
|
||||
function($compile, Rest, ProcessErrors, CreateDialog, GetBasePath, Wait, GenerateList, GroupList, SearchInit, PaginateInit, GetRootGroups) {
|
||||
return function(params) {
|
||||
|
||||
@@ -1990,7 +1992,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
||||
*
|
||||
*/
|
||||
.factory('ShowUpdateStatus', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'GenerateForm',
|
||||
'Prompt', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'InventoryStatusForm', 'Wait',
|
||||
'Prompt', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'InventoryStatusForm', 'Wait',
|
||||
function ($rootScope, $location, $log, $routeParams, Rest, Alert, GenerateForm, Prompt, ProcessErrors, GetBasePath,
|
||||
FormatDate, InventoryStatusForm, Wait) {
|
||||
return function (params) {
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
* @name helpers.function:HostEventsViewer
|
||||
* @description view a list of events for a given job and host
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities', 'EventViewerHelper'])
|
||||
export default
|
||||
angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities', 'EventViewerHelper'])
|
||||
|
||||
.factory('HostEventsViewer', ['$log', '$compile', 'CreateDialog', 'Wait', 'GetBasePath', 'Empty', 'GetEvents', 'EventViewer',
|
||||
function($log, $compile, CreateDialog, Wait, GetBasePath, Empty, GetEvents, EventViewer) {
|
||||
|
||||
@@ -8,20 +8,21 @@
|
||||
*/
|
||||
|
||||
/* jshint loopfunc: true */
|
||||
/**
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name helpers.function:Hosts
|
||||
* @description Routines that handle host add/edit/delete on the Inventory detail page.
|
||||
*/
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
export default
|
||||
angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'HostListDefinition',
|
||||
'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'AuthService', 'HostsHelper',
|
||||
'InventoryHelper', 'RelatedSearchHelper', 'InventoryFormDefinition', 'SelectionHelper',
|
||||
'HostGroupsFormDefinition', 'VariablesHelper', 'ModalDialog', 'LogViewerHelper',
|
||||
'GroupListDefinition'
|
||||
])
|
||||
])
|
||||
|
||||
.factory('SetEnabledMsg', [ function() {
|
||||
return function(host) {
|
||||
@@ -171,7 +172,7 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
|
||||
|
||||
.factory('HostsReload', [ '$routeParams', 'Empty', 'InventoryHosts', 'GetBasePath', 'SearchInit', 'PaginateInit', 'Wait',
|
||||
'SetHostStatus', 'SetStatus', 'ApplyEllipsis', 'SetContainerHeights', 'GetHostContainerRows',
|
||||
function($routeParams, Empty, InventoryHosts, GetBasePath, SearchInit, PaginateInit, Wait, SetHostStatus, SetStatus,
|
||||
function($routeParams, Empty, InventoryHosts, GetBasePath, SearchInit, PaginateInit, Wait, SetHostStatus, SetStatus,
|
||||
ApplyEllipsis, SetContainerHeights) {
|
||||
return function(params) {
|
||||
|
||||
@@ -228,10 +229,10 @@ function($routeParams, Empty, InventoryHosts, GetBasePath, SearchInit, PaginateI
|
||||
}
|
||||
scope.search(list.iterator, null, true);
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('InjectHosts', ['GenerateList', 'InventoryHosts', 'HostsReload',
|
||||
function(GenerateList, InventoryHosts, HostsReload) {
|
||||
.factory('InjectHosts', ['GenerateList', 'InventoryHosts', 'HostsReload',
|
||||
function(GenerateList, InventoryHosts, HostsReload) {
|
||||
return function(params) {
|
||||
|
||||
var group_scope = params.group_scope,
|
||||
@@ -247,10 +248,10 @@ function(GenerateList, InventoryHosts, HostsReload) {
|
||||
// Load data
|
||||
HostsReload({ scope: host_scope, group_id: group_id, inventory_id: inventory_id, parent_scope: group_scope, pageSize: pageSize });
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('ToggleHostEnabled', [ 'GetBasePath', 'Rest', 'Wait', 'ProcessErrors', 'Alert', 'Find', 'SetEnabledMsg',
|
||||
function(GetBasePath, Rest, Wait, ProcessErrors, Alert, Find, SetEnabledMsg) {
|
||||
.factory('ToggleHostEnabled', [ 'GetBasePath', 'Rest', 'Wait', 'ProcessErrors', 'Alert', 'Find', 'SetEnabledMsg',
|
||||
function(GetBasePath, Rest, Wait, ProcessErrors, Alert, Find, SetEnabledMsg) {
|
||||
return function(params) {
|
||||
|
||||
var id = params.host_id,
|
||||
@@ -288,11 +289,11 @@ function(GetBasePath, Rest, Wait, ProcessErrors, Alert, Find, SetEnabledMsg) {
|
||||
'then run an inventory sync to update Tower with the new status.', 'alert-info');
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('HostsList', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'HostList', 'GenerateList',
|
||||
.factory('HostsList', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'HostList', 'GenerateList',
|
||||
'Prompt', 'SearchInit', 'PaginateInit', 'ProcessErrors', 'GetBasePath', 'HostsAdd', 'HostsReload', 'SelectionInit',
|
||||
function($rootScope, $location, $log, $routeParams, Rest, Alert, HostList, GenerateList, Prompt, SearchInit,
|
||||
function($rootScope, $location, $log, $routeParams, Rest, Alert, HostList, GenerateList, Prompt, SearchInit,
|
||||
PaginateInit, ProcessErrors, GetBasePath, HostsAdd, HostsReload, SelectionInit) {
|
||||
return function(params) {
|
||||
|
||||
@@ -348,12 +349,12 @@ function($rootScope, $location, $log, $routeParams, Rest, Alert, HostList, Gener
|
||||
};
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
|
||||
.factory('HostsCreate', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'HostForm', 'GenerateForm',
|
||||
.factory('HostsCreate', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'HostForm', 'GenerateForm',
|
||||
'Prompt', 'ProcessErrors', 'GetBasePath', 'HostsReload', 'ParseTypeChange', 'Wait', 'ToJSON',
|
||||
function($rootScope, $location, $log, $routeParams, Rest, Alert, HostForm, GenerateForm, Prompt, ProcessErrors,
|
||||
function($rootScope, $location, $log, $routeParams, Rest, Alert, HostForm, GenerateForm, Prompt, ProcessErrors,
|
||||
GetBasePath, HostsReload, ParseTypeChange, Wait, ToJSON) {
|
||||
return function(params) {
|
||||
|
||||
@@ -447,13 +448,13 @@ function($rootScope, $location, $log, $routeParams, Rest, Alert, HostForm, Gener
|
||||
};
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
|
||||
.factory('HostsEdit', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'HostForm', 'GenerateForm',
|
||||
.factory('HostsEdit', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'HostForm', 'GenerateForm',
|
||||
'Prompt', 'ProcessErrors', 'GetBasePath', 'HostsReload', 'ParseTypeChange', 'Wait', 'Find', 'SetStatus', 'ApplyEllipsis',
|
||||
'ToJSON', 'ParseVariableString', 'CreateDialog', 'TextareaResize',
|
||||
function($rootScope, $location, $log, $routeParams, Rest, Alert, HostForm, GenerateForm, Prompt, ProcessErrors,
|
||||
function($rootScope, $location, $log, $routeParams, Rest, Alert, HostForm, GenerateForm, Prompt, ProcessErrors,
|
||||
GetBasePath, HostsReload, ParseTypeChange, Wait, Find, SetStatus, ApplyEllipsis, ToJSON,
|
||||
ParseVariableString, CreateDialog, TextareaResize) {
|
||||
return function(params) {
|
||||
@@ -697,11 +698,11 @@ function($rootScope, $location, $log, $routeParams, Rest, Alert, HostForm, Gener
|
||||
};
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
|
||||
.factory('HostsDelete', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'Prompt', 'ProcessErrors', 'GetBasePath', 'HostsReload', 'Wait',
|
||||
function($rootScope, $location, $log, $routeParams, Rest, Alert, Prompt, ProcessErrors, GetBasePath, HostsReload, Wait) {
|
||||
.factory('HostsDelete', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'Prompt', 'ProcessErrors', 'GetBasePath', 'HostsReload', 'Wait',
|
||||
function($rootScope, $location, $log, $routeParams, Rest, Alert, Prompt, ProcessErrors, GetBasePath, HostsReload, Wait) {
|
||||
return function(params) {
|
||||
// Remove the selected host from the current group by disassociating
|
||||
|
||||
@@ -766,9 +767,9 @@ function($rootScope, $location, $log, $routeParams, Rest, Alert, Prompt, Process
|
||||
Prompt({ hdr: 'Delete Host', body: body, action: action_to_take, 'class': 'btn-danger' });
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('HostsCopy', ['$compile', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'GenerateList', 'GroupList', 'SearchInit',
|
||||
.factory('HostsCopy', ['$compile', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'GenerateList', 'GroupList', 'SearchInit',
|
||||
'PaginateInit',
|
||||
function($compile, Rest, ProcessErrors, CreateDialog, GetBasePath, Wait, GenerateList, GroupList, SearchInit, PaginateInit) {
|
||||
return function(params) {
|
||||
@@ -1003,11 +1004,11 @@ function($rootScope, $location, $log, $routeParams, Rest, Alert, Prompt, Process
|
||||
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('EditHostGroups', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'GenerateForm', 'Prompt',
|
||||
.factory('EditHostGroups', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'GenerateForm', 'Prompt',
|
||||
'ProcessErrors', 'GetBasePath', 'HostsReload', 'ParseTypeChange', 'Wait',
|
||||
function($rootScope, $location, $log, $routeParams, Rest, Alert, GenerateForm, Prompt, ProcessErrors, GetBasePath, HostsReload,
|
||||
function($rootScope, $location, $log, $routeParams, Rest, Alert, GenerateForm, Prompt, ProcessErrors, GetBasePath, HostsReload,
|
||||
ParseTypeChange, Wait) {
|
||||
return function(params) {
|
||||
|
||||
@@ -1303,10 +1304,5 @@ function($rootScope, $location, $log, $routeParams, Rest, Alert, GenerateForm, P
|
||||
scope.$digest();
|
||||
}
|
||||
};
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('JobDetailHelper', ['Utilities', 'RestServices', 'ModalDialog'])
|
||||
export default
|
||||
angular.module('JobDetailHelper', ['Utilities', 'RestServices', 'ModalDialog'])
|
||||
|
||||
.factory('DigestEvent', ['$rootScope', '$log', 'UpdatePlayStatus', 'UpdateHostStatus', 'AddHostResult',
|
||||
.factory('DigestEvent', ['$rootScope', '$log', 'UpdatePlayStatus', 'UpdateHostStatus', 'AddHostResult',
|
||||
'GetElapsed', 'UpdateTaskStatus', 'DrawGraph', 'LoadHostSummary', 'JobIsFinished', 'AddNewTask', 'AddNewPlay',
|
||||
function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, GetElapsed,
|
||||
function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, GetElapsed,
|
||||
UpdateTaskStatus, DrawGraph, LoadHostSummary, JobIsFinished, AddNewTask, AddNewPlay) {
|
||||
return function(params) {
|
||||
|
||||
@@ -178,16 +178,16 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
});
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('JobIsFinished', [ function() {
|
||||
.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');
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('GetElapsed', [ function() {
|
||||
.factory('GetElapsed', [ function() {
|
||||
return function(params) {
|
||||
var start = params.start,
|
||||
end = params.end,
|
||||
@@ -211,9 +211,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
return '00:00:00';
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('SetActivePlay', [ function() {
|
||||
.factory('SetActivePlay', [ function() {
|
||||
return function(params) {
|
||||
//find the most recent task in the list of 'active' tasks
|
||||
|
||||
@@ -241,9 +241,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
}
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('SetActiveTask', [ function() {
|
||||
.factory('SetActiveTask', [ function() {
|
||||
return function(params) {
|
||||
//find the most recent task in the list of 'active' tasks
|
||||
var scope = params.scope,
|
||||
@@ -271,9 +271,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
}
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('AddNewPlay', ['SetActivePlay', function(SetActivePlay) {
|
||||
.factory('AddNewPlay', ['SetActivePlay', function(SetActivePlay) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
event = params.event,
|
||||
@@ -299,9 +299,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
|
||||
SetActivePlay({ scope: scope });
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('AddNewTask', ['DrawGraph', 'UpdatePlayStatus', 'SetActivePlay', 'SetActiveTask', function(DrawGraph, UpdatePlayStatus, SetActivePlay, SetActiveTask) {
|
||||
.factory('AddNewTask', ['DrawGraph', 'UpdatePlayStatus', 'SetActivePlay', 'SetActiveTask', function(DrawGraph, UpdatePlayStatus, SetActivePlay, SetActiveTask) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
event = params.event,
|
||||
@@ -351,9 +351,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
modified: event.modified
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('UpdateJobStatus', ['GetElapsed', 'Empty', 'JobIsFinished', function(GetElapsed, Empty, JobIsFinished) {
|
||||
.factory('UpdateJobStatus', ['GetElapsed', 'Empty', 'JobIsFinished', function(GetElapsed, Empty, JobIsFinished) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
failed = params.failed,
|
||||
@@ -377,10 +377,10 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
});
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
// Update the status of a play
|
||||
.factory('UpdatePlayStatus', ['GetElapsed', 'UpdateJobStatus', function(GetElapsed, UpdateJobStatus) {
|
||||
// Update the status of a play
|
||||
.factory('UpdatePlayStatus', ['GetElapsed', 'UpdateJobStatus', function(GetElapsed, UpdateJobStatus) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
failed = params.failed,
|
||||
@@ -422,9 +422,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
modified: modified
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('UpdateTaskStatus', ['UpdatePlayStatus', 'GetElapsed', function(UpdatePlayStatus, GetElapsed) {
|
||||
.factory('UpdateTaskStatus', ['UpdatePlayStatus', 'GetElapsed', function(UpdatePlayStatus, GetElapsed) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
failed = params.failed,
|
||||
@@ -472,10 +472,10 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
});
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
// Each time a runner event is received update host summary totals and the parent task
|
||||
.factory('UpdateHostStatus', ['UpdateTaskStatus', 'AddHostResult', function(UpdateTaskStatus, AddHostResult) {
|
||||
// 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
|
||||
@@ -563,10 +563,10 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
item: item
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
// Add a new host result
|
||||
.factory('AddHostResult', ['SetTaskStyles', 'SetActivePlay', 'SetActiveTask', function(SetTaskStyles, SetActivePlay, SetActiveTask) {
|
||||
// Add a new host result
|
||||
.factory('AddHostResult', ['SetTaskStyles', 'SetActivePlay', 'SetActiveTask', function(SetTaskStyles, SetActivePlay, SetActiveTask) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
task_id = params.task_id,
|
||||
@@ -653,9 +653,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
SetActiveTask({ scope: scope });
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('SetTaskStyles', [ function() {
|
||||
.factory('SetTaskStyles', [ function() {
|
||||
return function(params) {
|
||||
var task = params.task,
|
||||
diff;
|
||||
@@ -704,9 +704,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
task.unreachableStyle = (task.unreachablePct > 0) ? { 'display': 'inline-block', 'width': task.unreachablePct + "%" } : { 'display': 'none' };
|
||||
task.missingStyle = (task.missingPct > 0) ? { 'display': 'inline-block', 'width': task.missingPct + "%" } : { 'display': 'none' };
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('LoadPlays', ['Rest', 'ProcessErrors', 'GetElapsed', 'SelectPlay', 'JobIsFinished',
|
||||
.factory('LoadPlays', ['Rest', 'ProcessErrors', 'GetElapsed', 'SelectPlay', 'JobIsFinished',
|
||||
function(Rest, ProcessErrors, GetElapsed, SelectPlay, JobIsFinished) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
@@ -778,10 +778,10 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
msg: 'Call to ' + url + '. GET returned: ' + status });
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
// Call when the selected Play needs to change
|
||||
.factory('SelectPlay', ['LoadTasks', function(LoadTasks) {
|
||||
// Call when the selected Play needs to change
|
||||
.factory('SelectPlay', ['LoadTasks', function(LoadTasks) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
id = params.id,
|
||||
@@ -804,9 +804,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
});
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('LoadTasks', ['Rest', 'ProcessErrors', 'GetElapsed', 'SelectTask', 'SetTaskStyles', function(Rest, ProcessErrors, GetElapsed, SelectTask, SetTaskStyles) {
|
||||
.factory('LoadTasks', ['Rest', 'ProcessErrors', 'GetElapsed', 'SelectTask', 'SetTaskStyles', function(Rest, ProcessErrors, GetElapsed, SelectTask, SetTaskStyles) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
callback = params.callback,
|
||||
@@ -925,10 +925,10 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
});
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
// Call when the selected task needs to change
|
||||
.factory('SelectTask', ['LoadHosts', function(LoadHosts) {
|
||||
// Call when the selected task needs to change
|
||||
.factory('SelectTask', ['LoadHosts', function(LoadHosts) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
id = params.id,
|
||||
@@ -950,10 +950,10 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
clear: true
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
// Refresh the list of hosts
|
||||
.factory('LoadHosts', ['Rest', 'ProcessErrors', function(Rest, ProcessErrors) {
|
||||
// Refresh the list of hosts
|
||||
.factory('LoadHosts', ['Rest', 'ProcessErrors', function(Rest, ProcessErrors) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
callback = params.callback,
|
||||
@@ -1051,10 +1051,10 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
//$('#hosts-table-detail').mCustomScrollbar("update");
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
// Refresh the list of hosts in the hosts summary section
|
||||
.factory('ReloadHostSummaryList', ['Rest', 'ProcessErrors', function(Rest, ProcessErrors) {
|
||||
// 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,
|
||||
@@ -1103,9 +1103,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
msg: 'Call to ' + url + '. GET returned: ' + status });
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('LoadHostSummary', [ function() {
|
||||
.factory('LoadHostSummary', [ function() {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
data = params.data,
|
||||
@@ -1133,9 +1133,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
scope.host_summary.total = scope.host_summary.ok + scope.host_summary.changed +
|
||||
scope.host_summary.unreachable + scope.host_summary.failed;
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('DrawGraph', [ function() {
|
||||
.factory('DrawGraph', [ function() {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
resize = params.resize,
|
||||
@@ -1192,9 +1192,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
}
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('DrawPlays', [function() {
|
||||
.factory('DrawPlays', [function() {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
idx = 0,
|
||||
@@ -1266,9 +1266,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
});
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('DrawTasks', [ function() {
|
||||
.factory('DrawTasks', [ function() {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
result = [],
|
||||
@@ -1347,9 +1347,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
});
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('DrawHostResults', [ function() {
|
||||
.factory('DrawHostResults', [ function() {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
result = [],
|
||||
@@ -1422,9 +1422,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
});
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('DrawHostSummaries', [ function() {
|
||||
.factory('DrawHostSummaries', [ function() {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
result = [],
|
||||
@@ -1482,9 +1482,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
});
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('UpdateDOM', ['DrawPlays', 'DrawTasks', 'DrawHostResults', 'DrawHostSummaries', 'DrawGraph',
|
||||
.factory('UpdateDOM', ['DrawPlays', 'DrawTasks', 'DrawHostResults', 'DrawHostSummaries', 'DrawGraph',
|
||||
function(DrawPlays, DrawTasks, DrawHostResults, DrawHostSummaries, DrawGraph) {
|
||||
return function(params) {
|
||||
var scope = params.scope;
|
||||
@@ -1508,4 +1508,4 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge
|
||||
DrawGraph({ scope: scope, resize: true });
|
||||
}
|
||||
};
|
||||
}]);
|
||||
}]);
|
||||
|
||||
@@ -4,17 +4,18 @@
|
||||
* JobSubmission.js
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name helpers.function:JobSubmission
|
||||
* @description
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name helpers.function:JobSubmission
|
||||
* @description
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
export default
|
||||
angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'CredentialFormDefinition', 'CredentialsListDefinition',
|
||||
'LookUpHelper', 'JobSubmissionHelper', 'JobTemplateFormDefinition', 'ModalDialog', 'FormGenerator', 'JobVarsPromptFormDefinition'])
|
||||
|
||||
.factory('LaunchJob', ['Rest', 'Wait', 'ProcessErrors', 'ToJSON', 'Empty', 'GetBasePath',
|
||||
.factory('LaunchJob', ['Rest', 'Wait', 'ProcessErrors', 'ToJSON', 'Empty', 'GetBasePath',
|
||||
function(Rest, Wait, ProcessErrors, ToJSON, Empty, GetBasePath) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
@@ -119,8 +120,8 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
|
||||
};
|
||||
}])
|
||||
|
||||
.factory('PromptForCredential', ['$location', 'Wait', 'GetBasePath', 'LookUpInit', 'JobTemplateForm', 'CredentialList', 'Rest', 'Prompt', 'ProcessErrors',
|
||||
function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialList, Rest, Prompt, ProcessErrors) {
|
||||
.factory('PromptForCredential', ['$location', 'Wait', 'GetBasePath', 'LookUpInit', 'JobTemplateForm', 'CredentialList', 'Rest', 'Prompt', 'ProcessErrors',
|
||||
function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialList, Rest, Prompt, ProcessErrors) {
|
||||
return function(params) {
|
||||
|
||||
var scope = params.scope,
|
||||
@@ -185,11 +186,11 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
msg: 'Checking for machine credentials failed. GET returned: ' + status });
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
|
||||
|
||||
.factory('CreateLaunchDialog', ['$compile', 'Rest', 'GetBasePath', 'TextareaResize', 'CreateDialog', 'GenerateForm',
|
||||
.factory('CreateLaunchDialog', ['$compile', 'Rest', 'GetBasePath', 'TextareaResize', 'CreateDialog', 'GenerateForm',
|
||||
'JobVarsPromptForm', 'Wait', 'ParseTypeChange',
|
||||
function($compile, Rest, GetBasePath, TextareaResize,CreateDialog, GenerateForm,
|
||||
JobVarsPromptForm, Wait, ParseTypeChange) {
|
||||
@@ -270,12 +271,12 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
});
|
||||
};
|
||||
|
||||
}])
|
||||
}])
|
||||
|
||||
|
||||
|
||||
|
||||
.factory('PromptForPasswords', ['$compile', 'Wait', 'Alert', 'CredentialForm',
|
||||
.factory('PromptForPasswords', ['$compile', 'Wait', 'Alert', 'CredentialForm',
|
||||
function($compile, Wait, Alert, CredentialForm) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
@@ -425,7 +426,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
};
|
||||
}])
|
||||
|
||||
.factory('PromptForVars', ['$compile', 'Rest', 'GetBasePath', 'TextareaResize', 'CreateLaunchDialog', 'GenerateForm', 'JobVarsPromptForm', 'Wait',
|
||||
.factory('PromptForVars', ['$compile', 'Rest', 'GetBasePath', 'TextareaResize', 'CreateLaunchDialog', 'GenerateForm', 'JobVarsPromptForm', 'Wait',
|
||||
'ParseVariableString', 'ToJSON', 'ProcessErrors', '$routeParams' ,
|
||||
function($compile, Rest, GetBasePath, TextareaResize,CreateLaunchDialog, GenerateForm, JobVarsPromptForm, Wait,
|
||||
ParseVariableString, ToJSON, ProcessErrors, $routeParams) {
|
||||
@@ -474,9 +475,9 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
});
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('PromptForSurvey', ['$compile', 'Wait', 'Alert', 'CredentialForm', 'CreateLaunchDialog', 'SurveyControllerInit' , 'GetBasePath', 'Rest' , 'Empty',
|
||||
.factory('PromptForSurvey', ['$compile', 'Wait', 'Alert', 'CredentialForm', 'CreateLaunchDialog', 'SurveyControllerInit' , 'GetBasePath', 'Rest' , 'Empty',
|
||||
'GenerateForm', 'ShowSurveyModal', 'ProcessErrors', '$routeParams' ,
|
||||
function($compile, Wait, Alert, CredentialForm, CreateLaunchDialog, SurveyControllerInit, GetBasePath, Rest, Empty,
|
||||
GenerateForm, ShowSurveyModal, ProcessErrors, $routeParams) {
|
||||
@@ -645,14 +646,14 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name helpers.function:JobSubmission#PlaybookRun
|
||||
* @methodOf helpers.function:JobSubmission
|
||||
* @description The playbook Run function is run when the user clicks the launch button
|
||||
*
|
||||
*/
|
||||
// Submit request to run a playbook
|
||||
.factory('PlaybookRun', ['$location','$routeParams', 'LaunchJob', 'PromptForPasswords', 'Rest', 'GetBasePath', 'Alert', 'ProcessErrors', 'Wait', 'Empty',
|
||||
* @ngdoc method
|
||||
* @name helpers.function:JobSubmission#PlaybookRun
|
||||
* @methodOf helpers.function:JobSubmission
|
||||
* @description The playbook Run function is run when the user clicks the launch button
|
||||
*
|
||||
*/
|
||||
// Submit request to run a playbook
|
||||
.factory('PlaybookRun', ['$location','$routeParams', 'LaunchJob', 'PromptForPasswords', 'Rest', 'GetBasePath', 'Alert', 'ProcessErrors', 'Wait', 'Empty',
|
||||
'PromptForCredential', 'PromptForVars', 'PromptForSurvey' , 'CreateLaunchDialog',
|
||||
function ($location, $routeParams, LaunchJob, PromptForPasswords, Rest, GetBasePath, Alert, ProcessErrors, Wait, Empty,
|
||||
PromptForCredential, PromptForVars, PromptForSurvey, CreateLaunchDialog) {
|
||||
@@ -883,10 +884,10 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
});
|
||||
};
|
||||
}
|
||||
])
|
||||
])
|
||||
|
||||
// Submit SCM Update request
|
||||
.factory('ProjectUpdate', ['PromptForPasswords', 'LaunchJob', 'Rest', '$location', 'GetBasePath', 'ProcessErrors', 'Alert',
|
||||
// Submit SCM Update request
|
||||
.factory('ProjectUpdate', ['PromptForPasswords', 'LaunchJob', 'Rest', '$location', 'GetBasePath', 'ProcessErrors', 'Alert',
|
||||
'ProjectsForm', 'Wait',
|
||||
function (PromptForPasswords, LaunchJob, Rest, $location, GetBasePath, ProcessErrors, Alert, ProjectsForm, Wait) {
|
||||
return function (params) {
|
||||
@@ -954,11 +955,11 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
});
|
||||
};
|
||||
}
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
// Submit Inventory Update request
|
||||
.factory('InventoryUpdate', ['PromptForPasswords', 'LaunchJob', 'Rest', '$location', 'GetBasePath', 'ProcessErrors', 'Alert', 'Wait',
|
||||
// Submit Inventory Update request
|
||||
.factory('InventoryUpdate', ['PromptForPasswords', 'LaunchJob', 'Rest', '$location', 'GetBasePath', 'ProcessErrors', 'Alert', 'Wait',
|
||||
function (PromptForPasswords, LaunchJob, Rest, $location, GetBasePath, ProcessErrors, Alert, Wait) {
|
||||
return function (params) {
|
||||
|
||||
@@ -1024,4 +1025,4 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
});
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
* Routines shared by job related controllers
|
||||
*
|
||||
*/
|
||||
/**
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name helpers.function:JobTemplatesHelper
|
||||
* @description Routines shared by job related controllers
|
||||
*/
|
||||
'use strict';
|
||||
*/
|
||||
|
||||
export default
|
||||
angular.module('JobTemplatesHelper', ['Utilities'])
|
||||
|
||||
/*
|
||||
@@ -196,6 +196,5 @@ angular.module('JobTemplatesHelper', ['Utilities'])
|
||||
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
@@ -11,18 +11,18 @@
|
||||
* @name helpers.function:Jobs
|
||||
* @description routines shared by job related controllers
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'JobSummaryDefinition', 'InventoryHelper', 'GeneratorHelpers',
|
||||
export default
|
||||
angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'JobSummaryDefinition', 'InventoryHelper', 'GeneratorHelpers',
|
||||
'JobSubmissionHelper', 'LogViewerHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator'])
|
||||
|
||||
/**
|
||||
/**
|
||||
* JobsControllerInit({ scope: $scope });
|
||||
*
|
||||
* Initialize calling scope with all the bits required to support a jobs list
|
||||
*
|
||||
*/
|
||||
.factory('JobsControllerInit', ['$location', 'Find', 'DeleteJob', 'RelaunchJob', 'LogViewer', '$window',
|
||||
.factory('JobsControllerInit', ['$location', 'Find', 'DeleteJob', 'RelaunchJob', 'LogViewer', '$window',
|
||||
function($location, Find, DeleteJob, RelaunchJob, LogViewer, $window) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
@@ -108,9 +108,9 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job
|
||||
};
|
||||
};
|
||||
}
|
||||
])
|
||||
])
|
||||
|
||||
.factory('RelaunchJob', ['RelaunchInventory', 'RelaunchPlaybook', 'RelaunchSCM',
|
||||
.factory('RelaunchJob', ['RelaunchInventory', 'RelaunchPlaybook', 'RelaunchSCM',
|
||||
function(RelaunchInventory, RelaunchPlaybook, RelaunchSCM) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
@@ -128,9 +128,9 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job
|
||||
}
|
||||
};
|
||||
}
|
||||
])
|
||||
])
|
||||
|
||||
.factory('JobStatusToolTip', [
|
||||
.factory('JobStatusToolTip', [
|
||||
function () {
|
||||
return function (status) {
|
||||
var toolTip;
|
||||
@@ -161,9 +161,9 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job
|
||||
return toolTip;
|
||||
};
|
||||
}
|
||||
])
|
||||
])
|
||||
|
||||
.factory('ShowJobSummary', ['Rest', 'Wait', 'GetBasePath', 'FormatDate', 'ProcessErrors', 'GenerateForm', 'JobSummary',
|
||||
.factory('ShowJobSummary', ['Rest', 'Wait', 'GetBasePath', 'FormatDate', 'ProcessErrors', 'GenerateForm', 'JobSummary',
|
||||
'WatchInventoryWindowResize',
|
||||
function (Rest, Wait, GetBasePath, FormatDate, ProcessErrors, GenerateForm, JobSummary, WatchInventoryWindowResize) {
|
||||
return function (params) {
|
||||
@@ -281,10 +281,10 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job
|
||||
};
|
||||
|
||||
}
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
.factory('JobsListUpdate', ['Rest', function(Rest) {
|
||||
.factory('JobsListUpdate', ['Rest', function(Rest) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
parent_scope = params.parent_scope,
|
||||
@@ -349,14 +349,14 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job
|
||||
}
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* Called from JobsList controller to load each section or list on the page
|
||||
*
|
||||
*/
|
||||
.factory('LoadJobsScope', ['$routeParams', '$location', '$compile', 'SearchInit', 'PaginateInit', 'GenerateList', 'JobsControllerInit', 'JobsListUpdate', 'SearchWidget',
|
||||
.factory('LoadJobsScope', ['$routeParams', '$location', '$compile', 'SearchInit', 'PaginateInit', 'GenerateList', 'JobsControllerInit', 'JobsListUpdate', 'SearchWidget',
|
||||
function($routeParams, $location, $compile, SearchInit, PaginateInit, GenerateList, JobsControllerInit, JobsListUpdate, SearchWidget) {
|
||||
return function(params) {
|
||||
var parent_scope = params.parent_scope,
|
||||
@@ -430,10 +430,10 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job
|
||||
}
|
||||
scope.search(list.iterator, null, null, null, null, spinner);
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('DeleteJob', ['Find', 'GetBasePath', 'Rest', 'Wait', 'ProcessErrors', 'Prompt', 'Alert',
|
||||
function(Find, GetBasePath, Rest, Wait, ProcessErrors, Prompt, Alert){
|
||||
.factory('DeleteJob', ['Find', 'GetBasePath', 'Rest', 'Wait', 'ProcessErrors', 'Prompt', 'Alert',
|
||||
function(Find, GetBasePath, Rest, Wait, ProcessErrors, Prompt, Alert){
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
id = params.id,
|
||||
@@ -551,10 +551,10 @@ function(Find, GetBasePath, Rest, Wait, ProcessErrors, Prompt, Alert){
|
||||
}
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('RelaunchInventory', ['Find', 'Wait', 'Rest', 'InventoryUpdate', 'ProcessErrors', 'GetBasePath',
|
||||
function(Find, Wait, Rest, InventoryUpdate, ProcessErrors, GetBasePath) {
|
||||
.factory('RelaunchInventory', ['Find', 'Wait', 'Rest', 'InventoryUpdate', 'ProcessErrors', 'GetBasePath',
|
||||
function(Find, Wait, Rest, InventoryUpdate, ProcessErrors, GetBasePath) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
id = params.id,
|
||||
@@ -577,20 +577,20 @@ function(Find, Wait, Rest, InventoryUpdate, ProcessErrors, GetBasePath) {
|
||||
url + ' GET returned: ' + status });
|
||||
});
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('RelaunchPlaybook', ['PlaybookRun', function(PlaybookRun) {
|
||||
.factory('RelaunchPlaybook', ['PlaybookRun', function(PlaybookRun) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
id = params.id;
|
||||
PlaybookRun({ scope: scope, id: id });
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('RelaunchSCM', ['ProjectUpdate', function(ProjectUpdate) {
|
||||
.factory('RelaunchSCM', ['ProjectUpdate', function(ProjectUpdate) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
id = params.id;
|
||||
ProjectUpdate({ scope: scope, project_id: id });
|
||||
};
|
||||
}]);
|
||||
}]);
|
||||
|
||||
@@ -17,13 +17,15 @@
|
||||
*
|
||||
*
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('LicenseHelper', ['RestServices', 'Utilities', 'LicenseUpdateFormDefinition', 'FormGenerator', 'ParseHelper', 'ModalDialog', 'VariablesHelper', 'LicenseFormDefinition', 'AccessHelper'])
|
||||
import 'tower/forms';
|
||||
|
||||
export default
|
||||
angular.module('LicenseHelper', ['RestServices', 'Utilities', 'LicenseUpdateFormDefinition', 'FormGenerator', 'ParseHelper', 'ModalDialog', 'VariablesHelper', 'LicenseFormDefinition', 'AccessHelper'])
|
||||
|
||||
|
||||
.factory('CheckLicense', ['$rootScope', '$compile', 'CreateDialog', 'Store', 'LicenseUpdateForm', 'GenerateForm', 'TextareaResize', 'ToJSON', 'GetBasePath', 'Rest', 'ProcessErrors', 'Alert', 'IsAdmin',
|
||||
function($rootScope, $compile, CreateDialog, Store, LicenseUpdateForm, GenerateForm, TextareaResize, ToJSON, GetBasePath, Rest, ProcessErrors, Alert, IsAdmin) {
|
||||
.factory('CheckLicense', ['$rootScope', '$compile', 'CreateDialog', 'Store', 'LicenseUpdateForm', 'GenerateForm', 'TextareaResize', 'ToJSON', 'GetBasePath', 'Rest', 'ProcessErrors', 'Alert', 'IsAdmin',
|
||||
function($rootScope, $compile, CreateDialog, Store, LicenseUpdateForm, GenerateForm, TextareaResize, ToJSON, GetBasePath, Rest, ProcessErrors, Alert, IsAdmin) {
|
||||
return {
|
||||
getRemainingDays: function(time_remaining) {
|
||||
// assumes time_remaining will be in seconds
|
||||
@@ -339,10 +341,10 @@ function($rootScope, $compile, CreateDialog, Store, LicenseUpdateForm, GenerateF
|
||||
});
|
||||
}
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('LicenseViewer', ['$location', '$rootScope', '$compile', '$filter', 'GenerateForm', 'Rest', 'Alert', 'GetBasePath', 'ProcessErrors', 'FormatDate', 'Prompt', 'Empty', 'LicenseForm', 'IsAdmin', 'CreateDialog', 'CheckLicense', 'TextareaResize',
|
||||
function ($location, $rootScope, $compile, $filter, GenerateForm, Rest, Alert, GetBasePath, ProcessErrors, FormatDate, Prompt, Empty, LicenseForm, IsAdmin, CreateDialog, CheckLicense, TextareaResize) {
|
||||
.factory('LicenseViewer', ['$location', '$rootScope', '$compile', '$filter', 'GenerateForm', 'Rest', 'Alert', 'GetBasePath', 'ProcessErrors', 'FormatDate', 'Prompt', 'Empty', 'LicenseForm', 'IsAdmin', 'CreateDialog', 'CheckLicense', 'TextareaResize',
|
||||
function ($location, $rootScope, $compile, $filter, GenerateForm, Rest, Alert, GetBasePath, ProcessErrors, FormatDate, Prompt, Empty, LicenseForm, IsAdmin, CreateDialog, CheckLicense, TextareaResize) {
|
||||
return {
|
||||
|
||||
createDialog: function(html) {
|
||||
@@ -574,10 +576,10 @@ function ($location, $rootScope, $compile, $filter, GenerateForm, Rest, Alert, G
|
||||
CheckLicense.GetLicense('LicenseDataReady', scope);
|
||||
}
|
||||
};
|
||||
}]);
|
||||
}]);
|
||||
|
||||
/*
|
||||
.factory('CheckLicense', ['$rootScope', 'Store', 'Alert', '$location', 'Authorization',
|
||||
/*
|
||||
.factory('CheckLicense', ['$rootScope', 'Store', 'Alert', '$location', 'Authorization',
|
||||
function ($rootScope, Store, Alert, $location, Authorization) {
|
||||
return function () {
|
||||
// Check license status and alert the user, if needed
|
||||
@@ -631,6 +633,5 @@ function ($location, $rootScope, $compile, $filter, GenerateForm, Rest, Alert, G
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
*/
|
||||
|
||||
]);
|
||||
*/
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
|
||||
/*jshint evil:true */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
export default
|
||||
angular.module('LoadConfigHelper', ['Utilities'])
|
||||
|
||||
.factory('LoadConfig', ['$log', '$rootScope', '$http', 'ProcessErrors', 'Store', function($log, $rootScope, $http, ProcessErrors, Store) {
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
* @name helpers.function:LogViewer
|
||||
* @description logviewer
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('LogViewerHelper', ['ModalDialog', 'Utilities', 'FormGenerator', 'VariablesHelper'])
|
||||
export default
|
||||
angular.module('LogViewerHelper', ['ModalDialog', 'Utilities', 'FormGenerator', 'VariablesHelper'])
|
||||
|
||||
.factory('LogViewer', ['$location', '$compile', 'CreateDialog', 'GetJob', 'Wait', 'GenerateForm', 'LogViewerStatusForm', 'AddTable', 'AddTextarea',
|
||||
'LogViewerOptionsForm', 'EnvTable', 'GetBasePath', 'LookUpName', 'Empty', 'AddPreFormattedText', 'ParseVariableString', 'GetChoices',
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
* })
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('LookUpHelper', ['RestServices', 'Utilities', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ApiLoader', 'ModalDialog'])
|
||||
export default
|
||||
angular.module('LookUpHelper', ['RestServices', 'Utilities', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ApiLoader', 'ModalDialog'])
|
||||
|
||||
.factory('LookUpInit', ['Alert', 'Rest', 'GenerateList', 'SearchInit', 'PaginateInit', 'GetBasePath', 'FormatDate', 'Empty', 'CreateDialog',
|
||||
function (Alert, Rest, GenerateList, SearchInit, PaginateInit, GetBasePath, FormatDate, Empty, CreateDialog) {
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
* @name helpers.function:PaginationHelpers
|
||||
* @description pagination
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('PaginationHelpers', ['Utilities', 'RefreshHelper', 'RefreshRelatedHelper'])
|
||||
export default
|
||||
angular.module('PaginationHelpers', ['Utilities', 'RefreshHelper', 'RefreshRelatedHelper'])
|
||||
|
||||
.factory('PageRangeSetup', ['Empty',
|
||||
.factory('PageRangeSetup', ['Empty',
|
||||
function (Empty) {
|
||||
return function (params) {
|
||||
|
||||
@@ -55,9 +55,9 @@ angular.module('PaginationHelpers', ['Utilities', 'RefreshHelper', 'RefreshRelat
|
||||
}
|
||||
};
|
||||
}
|
||||
])
|
||||
])
|
||||
|
||||
.factory('RelatedPaginateInit', ['RefreshRelated', '$cookieStore', 'Wait',
|
||||
.factory('RelatedPaginateInit', ['RefreshRelated', '$cookieStore', 'Wait',
|
||||
function (RefreshRelated, $cookieStore, Wait) {
|
||||
return function (params) {
|
||||
|
||||
@@ -108,10 +108,10 @@ angular.module('PaginationHelpers', ['Utilities', 'RefreshHelper', 'RefreshRelat
|
||||
};
|
||||
};
|
||||
}
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
.factory('PaginateInit', ['Refresh', '$cookieStore', 'Wait',
|
||||
.factory('PaginateInit', ['Refresh', '$cookieStore', 'Wait',
|
||||
function (Refresh, $cookieStore, Wait) {
|
||||
return function (params) {
|
||||
|
||||
@@ -161,4 +161,4 @@ angular.module('PaginationHelpers', ['Utilities', 'RefreshHelper', 'RefreshRelat
|
||||
};
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('ParseHelper', ['Utilities', 'AngularCodeMirrorModule'])
|
||||
export default
|
||||
angular.module('ParseHelper', ['Utilities', 'AngularCodeMirrorModule'])
|
||||
.factory('ParseTypeChange', ['Alert', 'AngularCodeMirror', function (Alert, AngularCodeMirror) {
|
||||
return function (params) {
|
||||
|
||||
@@ -95,4 +95,4 @@ angular.module('ParseHelper', ['Utilities', 'AngularCodeMirrorModule'])
|
||||
};
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
* Functions shared amongst Permission related controllers
|
||||
*
|
||||
*/
|
||||
angular.module('PermissionsHelper', [])
|
||||
|
||||
// Handle category change event
|
||||
.factory('PermissionCategoryChange', ['$sce',
|
||||
export default
|
||||
angular.module('PermissionsHelper', [])
|
||||
|
||||
// Handle category change event
|
||||
.factory('PermissionCategoryChange', ['$sce',
|
||||
function ($sce) {
|
||||
return function (params) {
|
||||
var scope = params.scope,
|
||||
@@ -51,4 +53,4 @@ angular.module('PermissionsHelper', [])
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
* scope.base_dir (readonly field).
|
||||
*
|
||||
*/
|
||||
angular.module('ProjectPathHelper', ['RestServices', 'Utilities'])
|
||||
|
||||
export default
|
||||
angular.module('ProjectPathHelper', ['RestServices', 'Utilities'])
|
||||
.factory('GetProjectPath', ['Alert', 'Rest', 'GetBasePath', 'ProcessErrors',
|
||||
function (Alert, Rest, GetBasePath, ProcessErrors) {
|
||||
return function (params) {
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('ProjectsHelper', ['RestServices', 'Utilities', 'ProjectStatusDefinition', 'ProjectFormDefinition'])
|
||||
export default
|
||||
angular.module('ProjectsHelper', ['RestServices', 'Utilities', 'ProjectStatusDefinition', 'ProjectFormDefinition'])
|
||||
|
||||
.factory('GetProjectIcon', [ function() {
|
||||
return function(status) {
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('SchedulesHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog',
|
||||
export default
|
||||
angular.module('SchedulesHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog',
|
||||
'GeneratorHelpers'])
|
||||
|
||||
.factory('ShowSchedulerModal', ['Wait', 'CreateDialog', function(Wait, CreateDialog) {
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
* })
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('SelectionHelper', ['Utilities', 'RestServices'])
|
||||
export default
|
||||
angular.module('SelectionHelper', ['Utilities', 'RestServices'])
|
||||
|
||||
.factory('SelectionInit', ['Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'Wait',
|
||||
.factory('SelectionInit', ['Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'Wait',
|
||||
function (Rest, Alert, ProcessErrors, ReturnToCaller, Wait) {
|
||||
return function (params) {
|
||||
|
||||
@@ -174,4 +174,4 @@ angular.module('SelectionHelper', ['Utilities', 'RestServices'])
|
||||
});
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('SocketHelper', ['Utilities', 'FFSocketHelpDefinition', 'SafariSocketHelpDefinition' , 'ChromeSocketHelpDefinition'])
|
||||
export default
|
||||
angular.module('SocketHelper', ['Utilities', 'FFSocketHelpDefinition', 'SafariSocketHelpDefinition' , 'ChromeSocketHelpDefinition'])
|
||||
|
||||
.factory('ShowSocketHelp', ['$location', '$rootScope', 'FFSocketHelp', 'SafariSocketHelp', 'ChromeSocketHelp', 'HelpDialog',
|
||||
function($location, $rootScope, FFSocketHelp, SafariSocketHelp, ChromeSocketHelp, HelpDialog) {
|
||||
.factory('ShowSocketHelp', ['$location', '$rootScope', 'FFSocketHelp', 'SafariSocketHelp', 'ChromeSocketHelp', 'HelpDialog',
|
||||
function($location, $rootScope, FFSocketHelp, SafariSocketHelp, ChromeSocketHelp, HelpDialog) {
|
||||
return function() {
|
||||
var scope = $rootScope.$new();
|
||||
scope.socketPort = $AnsibleConfig.websocket_port;
|
||||
@@ -42,4 +42,4 @@ function($location, $rootScope, FFSocketHelp, SafariSocketHelp, ChromeSocketHelp
|
||||
HelpDialog({ defn: ChromeSocketHelp, scope: scope });
|
||||
}
|
||||
};
|
||||
}]);
|
||||
}]);
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
export default
|
||||
angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog' ,
|
||||
'GeneratorHelpers'])
|
||||
|
||||
@@ -877,4 +876,3 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
|
||||
};
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('UserHelper', ['UserFormDefinition'])
|
||||
export default
|
||||
angular.module('UserHelper', ['UserFormDefinition'])
|
||||
.factory('ResetForm', ['UserForm',
|
||||
function (UserForm) {
|
||||
return function () {
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
export default
|
||||
angular.module('VariablesHelper', ['Utilities'])
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
* @name helpers.function:api-defaults
|
||||
* @description this could use more discussion
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('APIDefaults', ['RestServices', 'Utilities'])
|
||||
export default
|
||||
angular.module('APIDefaults', ['RestServices', 'Utilities'])
|
||||
.factory('GetAPIDefaults', ['Alert', 'Rest', '$rootScope',
|
||||
function (Alert, Rest, $rootScope) {
|
||||
return function (key) {
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
* for the menu piece. The routine for building the menu is in InventoriesEdit controller
|
||||
* (controllers/Inventories.js)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationListDefinition', 'ListGenerator', 'AuthService',
|
||||
export default
|
||||
angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationListDefinition', 'ListGenerator', 'AuthService',
|
||||
'InventoryHelper', 'InventoryFormDefinition', 'ParseHelper', 'SearchHelper', 'VariablesHelper',
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
.factory('GetGroupContainerHeight', [ function() {
|
||||
.factory('GetGroupContainerHeight', [ function() {
|
||||
return function() {
|
||||
|
||||
/*console.log('window height: ' + $(window).height());
|
||||
@@ -38,9 +38,9 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
||||
height = (height < 600) ? 600 : height;
|
||||
return height;
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('GetHostContainerRows', [ function() {
|
||||
.factory('GetHostContainerRows', [ function() {
|
||||
return function() {
|
||||
var height, rows;
|
||||
height = $('#hosts-container .list-well').height() - $('#hosts-constainer .list-well .row').height() - $('#hosts_table thead').height();
|
||||
@@ -48,9 +48,9 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
||||
rows = (rows < 20) ? 20 : rows;
|
||||
return rows;
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('GetGroupContainerRows', [ function() {
|
||||
.factory('GetGroupContainerRows', [ function() {
|
||||
return function() {
|
||||
var height, rows;
|
||||
height = $('#groups-container .list-table-container').height();
|
||||
@@ -58,9 +58,9 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
||||
rows = (rows < 20) ? 20 : rows;
|
||||
return rows;
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
.factory('SetContainerHeights', [ 'GetGroupContainerHeight', 'GetHostContainerRows', function(GetGroupContainerHeight, GetHostContainerRows) {
|
||||
.factory('SetContainerHeights', [ 'GetGroupContainerHeight', 'GetHostContainerRows', function(GetGroupContainerHeight, GetHostContainerRows) {
|
||||
return function(params) {
|
||||
var group_scope = params.group_scope,
|
||||
host_scope = params.host_scope,
|
||||
@@ -97,10 +97,10 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
||||
}, 100);
|
||||
|
||||
};
|
||||
}])
|
||||
}])
|
||||
|
||||
|
||||
.factory('WatchInventoryWindowResize', ['ApplyEllipsis', 'SetContainerHeights',
|
||||
.factory('WatchInventoryWindowResize', ['ApplyEllipsis', 'SetContainerHeights',
|
||||
function (ApplyEllipsis, SetContainerHeights) {
|
||||
return function (params) {
|
||||
// Call to set or restore window resize
|
||||
@@ -118,9 +118,9 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
||||
}, 500));
|
||||
};
|
||||
}
|
||||
])
|
||||
])
|
||||
|
||||
.factory('SaveInventory', ['InventoryForm', 'Rest', 'Alert', 'ProcessErrors', 'LookUpInit', 'OrganizationList',
|
||||
.factory('SaveInventory', ['InventoryForm', 'Rest', 'Alert', 'ProcessErrors', 'LookUpInit', 'OrganizationList',
|
||||
'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON',
|
||||
function (InventoryForm, Rest, Alert, ProcessErrors, LookUpInit, OrganizationList, GetBasePath, ParseTypeChange, Wait,
|
||||
ToJSON) {
|
||||
@@ -181,10 +181,10 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
||||
});
|
||||
};
|
||||
}
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
.factory('EditInventoryProperties', ['InventoryForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LookUpInit', 'OrganizationList',
|
||||
.factory('EditInventoryProperties', ['InventoryForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LookUpInit', 'OrganizationList',
|
||||
'GetBasePath', 'ParseTypeChange', 'SaveInventory', 'Wait', 'Store', 'SearchInit', 'ParseVariableString', 'CreateDialog', 'TextareaResize',
|
||||
function (InventoryForm, GenerateForm, Rest, Alert, ProcessErrors, LookUpInit, OrganizationList, GetBasePath, ParseTypeChange, SaveInventory,
|
||||
Wait, Store, SearchInit, ParseVariableString, CreateDialog, TextareaResize) {
|
||||
@@ -394,4 +394,4 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
|
||||
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
* discussion
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('md5Helper', ['RestServices', 'Utilities', 'angular-md5'])
|
||||
export default
|
||||
angular.module('md5Helper', ['RestServices', 'Utilities', 'angular-md5'])
|
||||
.factory('md5Setup', ['md5', function (md5) {
|
||||
return function (params) {
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('RefreshRelatedHelper', ['RestServices', 'Utilities', 'PaginationHelpers'])
|
||||
export default
|
||||
angular.module('RefreshRelatedHelper', ['RestServices', 'Utilities', 'PaginationHelpers'])
|
||||
.factory('RefreshRelated', ['ProcessErrors', 'Rest', 'Wait', 'PageRangeSetup',
|
||||
function (ProcessErrors, Rest, Wait, PageRangeSetup) {
|
||||
return function (params) {
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('RefreshHelper', ['RestServices', 'Utilities', 'PaginationHelpers'])
|
||||
export default
|
||||
angular.module('RefreshHelper', ['RestServices', 'Utilities', 'PaginationHelpers'])
|
||||
.factory('Refresh', ['ProcessErrors', 'Rest', 'Wait', 'Empty', 'PageRangeSetup',
|
||||
function (ProcessErrors, Rest, Wait, Empty, PageRangeSetup) {
|
||||
return function (params) {
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
angular.module('RelatedSearchHelper', ['RestServices', 'Utilities', 'RefreshRelatedHelper'])
|
||||
export default
|
||||
angular.module('RelatedSearchHelper', ['RestServices', 'Utilities', 'RefreshRelatedHelper'])
|
||||
.factory('RelatedSearchInit', ['$timeout', 'Alert', 'Rest', 'RefreshRelated', 'Wait', 'Empty',
|
||||
function ($timeout, Alert, Rest, RefreshRelated, Wait, Empty) {
|
||||
return function (params) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user