Merge pull request #66 from joefiorini/broccoli-build

Improved build workflow for UI client
This commit is contained in:
Joe Fiorini
2015-02-09 09:18:07 -05:00
359 changed files with 17851 additions and 417985 deletions

7
.gitignore vendored
View File

@@ -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

View File

@@ -8,6 +8,7 @@
"latedef": "nofunc",
"noarg": true,
"nonew": true,
"maxerr": 10000,
"notypeof": true,
"globals": {
"angular":false,

View File

@@ -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

View File

@@ -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

View File

@@ -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;

View File

@@ -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,

View File

@@ -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,

View File

@@ -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) {

View File

@@ -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

View File

@@ -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,

View File

@@ -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) {

View File

@@ -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();

View File

@@ -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) {

View File

@@ -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();

View File

@@ -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,

View File

@@ -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();

View File

@@ -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();

View File

@@ -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) {

View File

@@ -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');

View File

@@ -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) {

View File

@@ -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();

View File

@@ -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();

View File

@@ -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,

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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')
};
}]);
}

View File

@@ -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').
}
}
}]);
}

View File

@@ -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')
}
}
}]);
}

View File

@@ -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
View 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
};

View File

@@ -16,6 +16,8 @@
* @name forms.function:ActivityDetail
* @description This form is for activity detail modal that can be shown on most pages.
*/
export default
angular.module('ActivityDetailDefinition', [])
.value('ActivityDetailForm', {

View File

@@ -10,6 +10,8 @@
* @name forms.function:Credentials
* @description This form is for adding/editing a Credential
*/
export default
angular.module('CredentialFormDefinition', [])
.value('CredentialForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:Organizations
* @description This form is for adding/editing an organization
*/
export default
angular.module('CustomInventoryFormDefinition', [])
.value('CustomInventoryForm', {

View File

@@ -9,6 +9,8 @@
* @name forms.function:EventsViewer
* @description This form is for events on the job detail page
*/
export default
angular.module('EventsViewerFormDefinition', [])
.value('EventsViewerForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:Groups
* @description This form is for adding/editing a Group on the inventory page
*/
export default
angular.module('GroupFormDefinition', [])
.value('GroupForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:HostGroups
* @description This form is for groups of hosts on the inventory page
*/
export default
angular.module('HostGroupsFormDefinition', [])
.value('HostGroupsForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:Hosts
* @description This form is for adding/editing a host on the inventory page
*/
export default
angular.module('HostFormDefinition', [])
.value('HostForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:Inventories
* @description This form is for adding/editing an inventory
*/
export default
angular.module('InventoryFormDefinition', [])
.value('InventoryForm', {

View File

@@ -11,6 +11,7 @@
* @name forms.function:InventoryStatus
* @description This form is for adding/editing an InventoryStatus
*/
export default
angular.module('InventoryStatusDefinition', [])
.value('InventoryStatusForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:JobEventData
* @description Not sure if this is used...
*/
export default
angular.module('JobEventDataDefinition', [])
.value('JobEventDataForm', {

View File

@@ -12,6 +12,7 @@
* @description Display job status info in a dialog
*/
export default
angular.module('JobSummaryDefinition', [])
.value('JobSummary', {

View File

@@ -12,8 +12,8 @@
* @name forms.function:JobTemplate
* @description This form is for adding/editing a Job Template
*/
'use strict';
export default
angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'CompletedJobsDefinition'])
.value ('JobTemplateFormObject', {

View File

@@ -11,8 +11,8 @@
* @name forms.function:JobVarsPrompt
* @description This form is for job variables prompt modal
*/
'use strict';
export default
angular.module('JobVarsPromptFormDefinition', [])
.value ('JobVarsPromptForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:Jobs
* @description This form is for adding/editing a Job
*/
export default
angular.module('JobFormDefinition', [])
.value('JobForm', {

View File

@@ -10,8 +10,9 @@
* @name forms.function:LicenseForm
* @description This form is for viewing the license information
*/
'use strict';
export default
angular.module('LicenseFormDefinition', [])
.value('LicenseForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:LicenseUpdate
* @description This form is for updating a license
*/
export default
angular.module('LicenseUpdateFormDefinition', [])
.value('LicenseUpdateForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:LogViewerOptions
* @description This form is for the page to view logs
*/
export default
angular.module('LogViewerOptionsDefinition', [])
.value('LogViewerOptionsForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:LogViewerStatus
* @description Form definition for LogViewer.js helper
*/
export default
angular.module('LogViewerStatusDefinition', [])
.value('LogViewerStatusForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:Organizations
* @description This form is for adding/editing an organization
*/
export default
angular.module('OrganizationFormDefinition', [])
.value('OrganizationForm', {

View File

@@ -12,6 +12,8 @@
* @name forms.function:Permissions
* @description This form is for adding/editing persmissions
*/
export default
angular.module('PermissionFormDefinition', [])
.value('PermissionsForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:ProjectStatus
* @description This form is for adding/editing project status
*/
export default
angular.module('ProjectStatusDefinition', [])
.value('ProjectStatusForm', {

View File

@@ -12,6 +12,8 @@
* @name forms.function:Projects
* @description This form is for adding/editing projects
*/
export default
angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
.value('ProjectsFormObject', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:Source
* @description This form is for group model
*/
export default
angular.module('SourceFormDefinition', [])
.value('SourceForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:SurveyMaker
* @description This form is for adding/editing a survey
*/
export default
angular.module('SurveyMakerFormDefinition', [])
.value('SurveyMakerForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:Questions
* @description This form is for adding a question
*/
export default
angular.module('SurveyQuestionFormDefinition', [])
.value('SurveyQuestionForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:Teams
* @description This form is for adding/editing teams
*/
export default
angular.module('TeamFormDefinition', [])
.value('TeamForm', {

View File

@@ -11,6 +11,8 @@
* @name forms.function:Users
* @description This form is for adding/editing users
*/
export default
angular.module('UserFormDefinition', [])
.value('UserForm', {

11
awx/ui/static/js/help.js Normal file
View 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
};

View File

@@ -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', {

View File

@@ -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', {

View File

@@ -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', {

View File

@@ -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', {

View 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
};

View File

@@ -16,8 +16,9 @@
* @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';
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) {

View File

@@ -12,8 +12,8 @@
* @description routines checking user access
*/
'use strict';
export default
angular.module('AccessHelper', ['RestServices', 'Utilities'])
.factory('CheckAccess', ['$rootScope', 'Alert', 'Rest', 'GetBasePath', 'ProcessErrors', '$cookieStore', function ($rootScope, Alert, Rest, GetBasePath, ProcessErrors, $cookieStore) {

View File

@@ -11,8 +11,8 @@
* 'show' attribute of each job_event in the set of job_events.
* See the filter in job_events.js list.
*/
'use strict';
export default
angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
.factory('ToggleChildren', ['$location', 'Store', function ($location, Store) {
return function (params) {

View File

@@ -11,8 +11,8 @@
*
*/
'use strict';
export default
angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog',
'GeneratorHelpers'])

View File

@@ -10,8 +10,8 @@
* @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();

View File

@@ -11,8 +11,8 @@
*
*/
'use strict';
export default
angular.module('CreateCustomInventoryHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog',
'GeneratorHelpers', 'CustomInventoryFormDefinition'])

View File

@@ -9,8 +9,8 @@
* @name helpers.function:EventViewer
* @description eventviewerhelper
*/
'use strict';
export default
angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFormDefinition', 'HostsHelper'])
.factory('EventViewer', ['$compile', 'CreateDialog', 'GetEvent', 'Wait', 'EventAddTable', 'GetBasePath', 'LookUpName', 'Empty', 'EventAddPreFormattedText',

View File

@@ -11,8 +11,8 @@
* @name helpers.function:Events
* @description EventView - show the job_events form in a modal dialog
*/
'use strict';
export default
angular.module('EventsHelper', ['RestServices', 'Utilities', 'JobEventDataDefinition', 'JobEventsFormDefinition'])
.factory('EventView', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'GenerateForm',

View File

@@ -13,6 +13,8 @@
* @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',

View File

@@ -11,8 +11,8 @@
* @name helpers.function:HostEventsViewer
* @description view a list of events for a given job and host
*/
'use strict';
export default
angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities', 'EventViewerHelper'])
.factory('HostEventsViewer', ['$log', '$compile', 'CreateDialog', 'Wait', 'GetBasePath', 'Empty', 'GetEvents', 'EventViewer',

View File

@@ -16,6 +16,7 @@
'use strict';
export default
angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'HostListDefinition',
'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'AuthService', 'HostsHelper',
'InventoryHelper', 'RelatedSearchHelper', 'InventoryFormDefinition', 'SelectionHelper',
@@ -1305,8 +1306,3 @@ function($rootScope, $location, $log, $routeParams, Rest, Alert, GenerateForm, P
};
}]);

View File

@@ -37,8 +37,8 @@
*/
'use strict';
export default
angular.module('JobDetailHelper', ['Utilities', 'RestServices', 'ModalDialog'])
.factory('DigestEvent', ['$rootScope', '$log', 'UpdatePlayStatus', 'UpdateHostStatus', 'AddHostResult',

View File

@@ -11,6 +11,7 @@
*/
'use strict';
export default
angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'CredentialFormDefinition', 'CredentialsListDefinition',
'LookUpHelper', 'JobSubmissionHelper', 'JobTemplateFormDefinition', 'ModalDialog', 'FormGenerator', 'JobVarsPromptFormDefinition'])

View File

@@ -11,8 +11,8 @@
* @name helpers.function:JobTemplatesHelper
* @description Routines shared by job related controllers
*/
'use strict';
export default
angular.module('JobTemplatesHelper', ['Utilities'])
/*
@@ -198,4 +198,3 @@ angular.module('JobTemplatesHelper', ['Utilities'])
}]);

View File

@@ -11,8 +11,8 @@
* @name helpers.function:Jobs
* @description routines shared by job related controllers
*/
'use strict';
export default
angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'JobSummaryDefinition', 'InventoryHelper', 'GeneratorHelpers',
'JobSubmissionHelper', 'LogViewerHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator'])

View File

@@ -17,8 +17,10 @@
*
*
*/
'use strict';
import 'tower/forms';
export default
angular.module('LicenseHelper', ['RestServices', 'Utilities', 'LicenseUpdateFormDefinition', 'FormGenerator', 'ParseHelper', 'ModalDialog', 'VariablesHelper', 'LicenseFormDefinition', 'AccessHelper'])
@@ -633,4 +635,3 @@ function ($location, $rootScope, $compile, $filter, GenerateForm, Rest, Alert, G
}
]);
*/

View File

@@ -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) {

View File

@@ -9,8 +9,8 @@
* @name helpers.function:LogViewer
* @description logviewer
*/
'use strict';
export default
angular.module('LogViewerHelper', ['ModalDialog', 'Utilities', 'FormGenerator', 'VariablesHelper'])
.factory('LogViewer', ['$location', '$compile', 'CreateDialog', 'GetJob', 'Wait', 'GenerateForm', 'LogViewerStatusForm', 'AddTable', 'AddTextarea',

View File

@@ -22,8 +22,8 @@
* })
*/
'use strict';
export default
angular.module('LookUpHelper', ['RestServices', 'Utilities', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ApiLoader', 'ModalDialog'])
.factory('LookUpInit', ['Alert', 'Rest', 'GenerateList', 'SearchInit', 'PaginateInit', 'GetBasePath', 'FormatDate', 'Empty', 'CreateDialog',

View File

@@ -9,8 +9,8 @@
* @name helpers.function:PaginationHelpers
* @description pagination
*/
'use strict';
export default
angular.module('PaginationHelpers', ['Utilities', 'RefreshHelper', 'RefreshRelatedHelper'])
.factory('PageRangeSetup', ['Empty',

View File

@@ -12,8 +12,8 @@
*
*/
'use strict';
export default
angular.module('ParseHelper', ['Utilities', 'AngularCodeMirrorModule'])
.factory('ParseTypeChange', ['Alert', 'AngularCodeMirror', function (Alert, AngularCodeMirror) {
return function (params) {

View File

@@ -10,6 +10,8 @@
* Functions shared amongst Permission related controllers
*
*/
export default
angular.module('PermissionsHelper', [])
// Handle category change event

View File

@@ -12,6 +12,8 @@
* scope.base_dir (readonly field).
*
*/
export default
angular.module('ProjectPathHelper', ['RestServices', 'Utilities'])
.factory('GetProjectPath', ['Alert', 'Rest', 'GetBasePath', 'ProcessErrors',
function (Alert, Rest, GetBasePath, ProcessErrors) {

View File

@@ -13,8 +13,8 @@
*
*/
'use strict';
export default
angular.module('ProjectsHelper', ['RestServices', 'Utilities', 'ProjectStatusDefinition', 'ProjectFormDefinition'])
.factory('GetProjectIcon', [ function() {

View File

@@ -11,8 +11,8 @@
*
*/
'use strict';
export default
angular.module('SchedulesHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', 'ListGenerator', 'ModalDialog',
'GeneratorHelpers'])

View File

@@ -14,8 +14,8 @@
* })
*/
'use strict';
export default
angular.module('SelectionHelper', ['Utilities', 'RestServices'])
.factory('SelectionInit', ['Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'Wait',

View File

@@ -11,8 +11,8 @@
*
*/
'use strict';
export default
angular.module('SocketHelper', ['Utilities', 'FFSocketHelpDefinition', 'SafariSocketHelpDefinition' , 'ChromeSocketHelpDefinition'])
.factory('ShowSocketHelp', ['$location', '$rootScope', 'FFSocketHelp', 'SafariSocketHelp', 'ChromeSocketHelp', 'HelpDialog',

View File

@@ -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',
};
}]);

View File

@@ -10,8 +10,8 @@
*
*/
'use strict';
export default
angular.module('UserHelper', ['UserFormDefinition'])
.factory('ResetForm', ['UserForm',
function (UserForm) {

View File

@@ -10,8 +10,7 @@
*
*/
'use strict';
export default
angular.module('VariablesHelper', ['Utilities'])
/**

View File

@@ -10,8 +10,8 @@
* @name helpers.function:api-defaults
* @description this could use more discussion
*/
'use strict';
export default
angular.module('APIDefaults', ['RestServices', 'Utilities'])
.factory('GetAPIDefaults', ['Alert', 'Rest', '$rootScope',
function (Alert, Rest, $rootScope) {

View File

@@ -10,8 +10,8 @@
* for the menu piece. The routine for building the menu is in InventoriesEdit controller
* (controllers/Inventories.js)
*/
'use strict';
export default
angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationListDefinition', 'ListGenerator', 'AuthService',
'InventoryHelper', 'InventoryFormDefinition', 'ParseHelper', 'SearchHelper', 'VariablesHelper',
])

View File

@@ -13,8 +13,8 @@
* discussion
*/
'use strict';
export default
angular.module('md5Helper', ['RestServices', 'Utilities', 'angular-md5'])
.factory('md5Setup', ['md5', function (md5) {
return function (params) {

View File

@@ -19,8 +19,8 @@
*
*/
'use strict';
export default
angular.module('RefreshRelatedHelper', ['RestServices', 'Utilities', 'PaginationHelpers'])
.factory('RefreshRelated', ['ProcessErrors', 'Rest', 'Wait', 'PageRangeSetup',
function (ProcessErrors, Rest, Wait, PageRangeSetup) {

View File

@@ -18,8 +18,8 @@
*
*/
'use strict';
export default
angular.module('RefreshHelper', ['RestServices', 'Utilities', 'PaginationHelpers'])
.factory('Refresh', ['ProcessErrors', 'Rest', 'Wait', 'Empty', 'PageRangeSetup',
function (ProcessErrors, Rest, Wait, Empty, PageRangeSetup) {

View File

@@ -19,8 +19,8 @@
*
*/
'use strict';
export default
angular.module('RelatedSearchHelper', ['RestServices', 'Utilities', 'RefreshRelatedHelper'])
.factory('RelatedSearchInit', ['$timeout', 'Alert', 'Rest', 'RefreshRelated', 'Wait', 'Empty',
function ($timeout, Alert, Rest, RefreshRelated, Wait, Empty) {

Some files were not shown because too many files have changed in this diff Show More