-
diff --git a/awx/ui/client/src/forms.js b/awx/ui/client/src/forms.js
deleted file mode 100644
index f51be2d458..0000000000
--- a/awx/ui/client/src/forms.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
-*************************************************/
-
-import ActivityDetail from "./forms/ActivityDetail";
-import Credentials from "./forms/Credentials";
-import EventsViewer from "./forms/EventsViewer";
-import Groups from "./forms/Groups";
-import HostGroups from "./forms/HostGroups";
-import Hosts from "./forms/Hosts";
-import Inventories from "./forms/Inventories";
-import InventoryStatus from "./forms/InventoryStatus";
-import JobEventData from "./forms/JobEventData";
-import JobSummary from "./forms/JobSummary";
-import JobTemplates from "./forms/JobTemplates";
-import JobVarsPrompt from "./forms/JobVarsPrompt";
-import LogViewerOptions from "./forms/LogViewerOptions";
-import LogViewerStatus from "./forms/LogViewerStatus";
-import Organizations from "./forms/Organizations";
-import Teams from "./forms/Teams";
-import Users from "./forms/Users";
-import WorkflowMaker from "./forms/WorkflowMaker";
-import Workflows from "./forms/Workflows";
-
-
-export
- { ActivityDetail,
- Credentials,
- EventsViewer,
- Groups,
- HostGroups,
- Hosts,
- Inventories,
- InventoryStatus,
- JobEventData,
- JobSummary,
- JobTemplates,
- JobVarsPrompt,
- LogViewerOptions,
- LogViewerStatus,
- Organizations,
- Teams,
- Users,
- WorkflowMaker,
- Workflows
- };
diff --git a/awx/ui/client/src/forms/EventsViewer.js b/awx/ui/client/src/forms/EventsViewer.js
deleted file mode 100644
index 9b9579f2a1..0000000000
--- a/awx/ui/client/src/forms/EventsViewer.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
- /**
- * @ngdoc function
- * @name forms.function:EventsViewer
- * @description This form is for events on the job detail page
-*/
-
-export default
- angular.module('EventsViewerFormDefinition', [])
- .factory('EventsViewerForm', ['i18n', function(i18n) {
- return {
-
- fields: {
- host_name: {
- label: i18n._('Host'),
- section: i18n._('Event')
- },
- status: {
- labellabel: i18n._('Status'),
- section: i18n._('Event')
- },
- id: {
- labellabel: i18n._('ID'),
- section: i18n._('Event')
- },
- created: {
- labellabel: i18n._('Created On'),
- section: i18n._('Event')
- },
- role: {
- labellabel: i18n._('Role'),
- section: i18n._('Event')
- },
- play: {
- labellabel: i18n._('Play'),
- type: 'text',
- section: i18n._('Event')
- },
- task: {
- labellabel: i18n._('Task'),
- section: i18n._('Event')
- },
- item: {
- labellabel: i18n._('Item'),
- section: i18n._('Event')
- },
- module_name: {
- labellabel: i18n._('Module'),
- section: i18n._('Event')
- },
- module_args: {
- labellabel: i18n._('Arguments'),
- section: i18n._('Event')
- },
- rc: {
- labellabel: i18n._('Return Code'),
- section: i18n._('Results')
- },
- msg: {
- labellabel: i18n._('Message'),
- section: i18n._('Results')
- },
- results: {
- labellabel: i18n._('Results'),
- section: i18n._('Results')
- },
- start: {
- labellabel: i18n._('Start'),
- section: i18n._('Timing')
- },
- end: {
- labellabel: i18n._('End'),
- section: i18n._('Timing')
- },
- delta: {
- labellabel: i18n._('Elapsed'),
- section: i18n._('Timing')
- }
- }
- };}]);
diff --git a/awx/ui/client/src/forms/Groups.js b/awx/ui/client/src/forms/Groups.js
deleted file mode 100644
index 506d66d1b2..0000000000
--- a/awx/ui/client/src/forms/Groups.js
+++ /dev/null
@@ -1,362 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
- /**
- * @ngdoc function
- * @name forms.function:Groups
- * @description This form is for adding/editing a Group on the inventory page
-*/
-
-export default
- angular.module('GroupFormDefinition', [])
- .value('GroupFormObject', {
-
- addTitle: 'CREATE GROUP',
- editTitle: '{{ name }}',
- showTitle: true,
- name: 'group',
- basePath: 'groups',
- // the parent node this generated state definition tree expects to attach to
- stateTree: 'inventoryManage',
- // form generator inspects the current state name to determine whether or not to set an active (.is-selected) class on a form tab
- // this setting is optional on most forms, except where the form's edit state name is not parentStateName.edit
- activeEditState: 'inventoryManage.editGroup',
- detailsClick: "$state.go('inventoryManage.editGroup')",
- well: false,
- fields: {
- name: {
- label: 'Name',
- type: 'text',
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
- required: true,
- tab: 'properties'
- },
- description: {
- label: 'Description',
- type: 'text',
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
- tab: 'properties'
- },
- variables: {
- label: 'Variables',
- type: 'textarea',
- class: 'Form-textAreaLabel Form-formGroup--fullWidth',
- rows: 6,
- 'default': '---',
- dataTitle: 'Group Variables',
- dataPlacement: 'right',
- parseTypeName: 'parseType',
- awPopOver: "
Variables defined here apply to all child groups and hosts.
" +
- "
Enter variables using either JSON or YAML syntax. Use the " +
- "radio button to toggle between the two.
" +
- "JSON:
\n" +
- "
{ \"somevar\": \"somevalue\", \"password\": \"magic\" } \n" +
- "YAML:
\n" +
- "
--- somevar: somevalue password: magic \n" +
- '
View JSON examples at www.json.org
' +
- '
View YAML examples at docs.ansible.com
',
- dataContainer: 'body',
- tab: 'properties'
- },
- source: {
- label: 'Source',
- type: 'select',
- ngOptions: 'source.label for source in source_type_options track by source.value',
- ngChange: 'sourceChange(source)',
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
- ngModel: 'source'
- },
- credential: {
- // initializes a default value for this search param
- // search params with default values set will not generate user-interactable search tags
- search: {
- kind: null
- },
- label: 'Cloud Credential',
- type: 'lookup',
- list: 'CredentialList',
- basePath: 'credentials',
- ngShow: "source && source.value !== '' && source.value !== 'custom'",
- sourceModel: 'credential',
- sourceField: 'name',
- ngClick: 'lookupCredential()',
- awRequiredWhen: {
- reqExpression: "cloudCredentialRequired",
- init: "false"
- },
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
- watchBasePath: "credentialBasePath"
- },
- source_regions: {
- label: 'Regions',
- type: 'select',
- ngOptions: 'source.label for source in source_region_choices track by source.value',
- multiSelect: true,
- ngShow: "source && (source.value == 'rax' || source.value == 'ec2' || source.value == 'gce' || source.value == 'azure' || source.value == 'azure_rm')",
-
-
- dataTitle: 'Source Regions',
- dataPlacement: 'right',
- awPopOver: "
Click on the regions field to see a list of regions for your cloud provider. You can select multiple regions, " +
- "or choose All to include all regions. Tower will only be updated with Hosts associated with the selected regions." +
- "
",
- dataContainer: 'body',
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
- },
- instance_filters: {
- label: 'Instance Filters',
- type: 'text',
- ngShow: "source && source.value == 'ec2'",
- dataTitle: 'Instance Filters',
- dataPlacement: 'right',
- awPopOver: "
Provide a comma-separated list of filter expressions. " +
- "Hosts are imported to Tower when ANY of the filters match.
" +
- "Limit to hosts having a tag:
\n" +
- "
tag-key=TowerManaged \n" +
- "Limit to hosts using either key pair:
\n" +
- "
key-name=staging, key-name=production \n" +
- "Limit to hosts where the Name tag begins with
test :
\n" +
- "
tag:Name=test* \n" +
- "
View the Describe Instances documentation " +
- "for a complete list of supported filters.
",
- dataContainer: 'body',
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
- },
- group_by: {
- label: 'Only Group By',
- type: 'select',
- ngShow: "source && source.value == 'ec2'",
- ngOptions: 'source.label for source in group_by_choices track by source.value',
- multiSelect: true,
- dataTitle: 'Only Group By',
- dataPlacement: 'right',
- awPopOver: "
Select which groups to create automatically. " +
- "Tower will create group names similar to the following examples based on the options selected:
" +
- "Availability Zone: zones » us-east-1b " +
- "Image ID: images » ami-b007ab1e " +
- "Instance ID: instances » i-ca11ab1e " +
- "Instance Type: types » type_m1_medium " +
- "Key Name: keys » key_testing " +
- "Region: regions » us-east-1 " +
- "Security Group: security_groups » security_group_default " +
- "Tags: tags » tag_Name » tag_Name_host1 " +
- "VPC ID: vpcs » vpc-5ca1ab1e " +
- "Tag None: tags » tag_none " +
- " If blank, all groups above are created except Instance ID .
",
- dataContainer: 'body',
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
- },
- inventory_script: {
- label : "Custom Inventory Script",
- type: 'lookup',
- basePath: 'inventory_scripts',
- list: 'InventoryScriptsList',
- ngShow: "source && source.value === 'custom'",
- sourceModel: 'inventory_script',
- sourceField: 'name',
- awRequiredWhen: {
- reqExpression: "source && source.value === 'custom'",
- init: "false"
- },
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
- },
- custom_variables: {
- id: 'custom_variables',
- label: 'Environment Variables', //"{{vars_label}}" ,
- ngShow: "source && source.value=='custom' ",
- type: 'textarea',
- class: 'Form-textAreaLabel Form-formGroup--fullWidth',
- rows: 6,
- 'default': '---',
- parseTypeName: 'envParseType',
- dataTitle: "Environment Variables",
- dataPlacement: 'right',
- awPopOver: "
Provide environment variables to pass to the custom inventory script.
" +
- "
Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.
" +
- "JSON:
\n" +
- "
{ \"somevar\": \"somevalue\", \"password\": \"magic\" } \n" +
- "YAML:
\n" +
- "
--- somevar: somevalue password: magic \n" +
- '
View JSON examples at www.json.org
' +
- '
View YAML examples at docs.ansible.com
',
- dataContainer: 'body'
- },
- ec2_variables: {
- id: 'ec2_variables',
- label: 'Source Variables', //"{{vars_label}}" ,
- ngShow: "source && source.value == 'ec2'",
- type: 'textarea',
- class: 'Form-textAreaLabel Form-formGroup--fullWidth',
- rows: 6,
- 'default': '---',
- parseTypeName: 'envParseType',
- dataTitle: "Source Variables",
- dataPlacement: 'right',
- awPopOver: "
Override variables found in ec2.ini and used by the inventory update script. For a detailed description of these variables " +
- "" +
- "view ec2.ini in the Ansible github repo.
" +
- "
Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.
" +
- "JSON:
\n" +
- "
{ \"somevar\": \"somevalue\", \"password\": \"magic\" } \n" +
- "YAML:
\n" +
- "
--- somevar: somevalue password: magic \n" +
- '
View JSON examples at www.json.org
' +
- '
View YAML examples at docs.ansible.com
',
- dataContainer: 'body'
- },
- vmware_variables: {
- id: 'vmware_variables',
- label: 'Source Variables', //"{{vars_label}}" ,
- ngShow: "source && source.value == 'vmware'",
- type: 'textarea',
- class: 'Form-textAreaLabel Form-formGroup--fullWidth',
- rows: 6,
- 'default': '---',
- parseTypeName: 'envParseType',
- dataTitle: "Source Variables",
- dataPlacement: 'right',
- awPopOver: "
Override variables found in vmware.ini and used by the inventory update script. For a detailed description of these variables " +
- "" +
- "view vmware_inventory.ini in the Ansible github repo.
" +
- "
Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.
" +
- "JSON:
\n" +
- "
{ \"somevar\": \"somevalue\", \"password\": \"magic\" } \n" +
- "YAML:
\n" +
- "
--- somevar: somevalue password: magic \n" +
- '
View JSON examples at www.json.org
' +
- '
View YAML examples at docs.ansible.com
',
- dataContainer: 'body'
- },
- openstack_variables: {
- id: 'openstack_variables',
- label: 'Source Variables', //"{{vars_label}}" ,
- ngShow: "source && source.value == 'openstack'",
- type: 'textarea',
- class: 'Form-textAreaLabel Form-formGroup--fullWidth',
- rows: 6,
- 'default': '---',
- parseTypeName: 'envParseType',
- dataTitle: "Source Variables",
- dataPlacement: 'right',
- awPopOver: "
Override variables found in openstack.yml and used by the inventory update script. For an example variable configuration " +
- "" +
- "view openstack.yml in the Ansible github repo.
" +
- "
Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.
" +
- "JSON:
\n" +
- "
{ \"somevar\": \"somevalue\", \"password\": \"magic\" } \n" +
- "YAML:
\n" +
- "
--- somevar: somevalue password: magic \n" +
- '
View JSON examples at www.json.org
' +
- '
View YAML examples at docs.ansible.com
',
- dataContainer: 'body'
- },
- checkbox_group: {
- label: 'Update Options',
- type: 'checkbox_group',
- ngShow: "source && (source.value !== '' && source.value !== null)",
- class: 'Form-checkbox--stacked',
- fields: [{
- name: 'overwrite',
- label: 'Overwrite',
- type: 'checkbox',
- ngShow: "source.value !== '' && source.value !== null",
-
-
- awPopOver: '
If checked, all child groups and hosts not found on the external source will be deleted from ' +
- 'the local inventory.
When not checked, local child hosts and groups not found on the external source will ' +
- 'remain untouched by the inventory update process.
',
- dataTitle: 'Overwrite',
- dataContainer: 'body',
- dataPlacement: 'right',
- labelClass: 'checkbox-options',
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
- }, {
- name: 'overwrite_vars',
- label: 'Overwrite Variables',
- type: 'checkbox',
- ngShow: "source.value !== '' && source.value !== null",
-
-
- awPopOver: '
If checked, all variables for child groups and hosts will be removed and replaced by those ' +
- 'found on the external source.
When not checked, a merge will be performed, combining local variables with ' +
- 'those found on the external source.
',
- dataTitle: 'Overwrite Variables',
- dataContainer: 'body',
- dataPlacement: 'right',
- labelClass: 'checkbox-options',
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
- }, {
- name: 'update_on_launch',
- label: 'Update on Launch',
- type: 'checkbox',
- ngShow: "source.value !== '' && source.value !== null",
- awPopOver: '
Each time a job runs using this inventory, refresh the inventory from the selected source before ' +
- 'executing job tasks.
',
- dataTitle: 'Update on Launch',
- dataContainer: 'body',
- dataPlacement: 'right',
- labelClass: 'checkbox-options',
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
- }]
- },
- update_cache_timeout: {
- label: "Cache Timeout
(seconds) ",
- id: 'source-cache-timeout',
- type: 'number',
- ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
- integer: true,
- min: 0,
- ngShow: "source && source.value !== '' && update_on_launch",
- spinner: true,
- "default": 0,
- awPopOver: '
Time in seconds to consider an inventory sync to be current. During job runs and callbacks the task system will ' +
- 'evaluate the timestamp of the latest sync. If it is older than Cache Timeout, it is not considered current, ' +
- 'and a new inventory sync will be performed.
',
- dataTitle: 'Cache Timeout',
- dataPlacement: 'right',
- dataContainer: "body"
- }
- },
-
- buttons: {
- cancel: {
- ngClick: 'formCancel()',
- ngShow: '(group_obj.summary_fields.user_capabilities.edit || canAdd)'
- },
- close: {
- ngClick: 'formCancel()',
- ngShow: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
- },
- save: {
- ngClick: 'formSave()',
- ngDisabled: true,
- ngShow: '(group_obj.summary_fields.user_capabilities.edit || canAdd)'
- }
- },
-
- related: {
- "notifications": {
- include: "NotificationsList"
- }
- }
-
- })
- .factory('GroupForm', ['GroupFormObject', 'NotificationsList',
- function(GroupFormObject, NotificationsList) {
- return function() {
- var itm;
-
- for (itm in GroupFormObject.related) {
- if (GroupFormObject.related[itm].include === "NotificationsList") {
- GroupFormObject.related[itm] = angular.copy(NotificationsList);
- GroupFormObject.related[itm].generateList = true;
- GroupFormObject.related[itm].disabled = "source === undefined || source.value === ''";
- GroupFormObject.related[itm].ngClick = "$state.go('inventoryManage.editGroup.notifications')";
- }
- }
- return GroupFormObject;
- };
- }]);
diff --git a/awx/ui/client/src/forms/HostGroups.js b/awx/ui/client/src/forms/HostGroups.js
deleted file mode 100644
index 16479fee2b..0000000000
--- a/awx/ui/client/src/forms/HostGroups.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
- /**
- * @ngdoc function
- * @name forms.function:HostGroups
- * @description This form is for groups of hosts on the inventory page
-*/
-
-export default
- angular.module('HostGroupsFormDefinition', [])
- .value('HostGroupsForm', {
-
- editTitle: 'HOST GROUPS',
- name: 'host',
- well: false,
- formLabelSize: 'col-lg-3',
- formFieldSize: 'col-lg-9',
-
- fields: {
- groups: {
- label: 'Groups',
- type: 'select',
- multiple: true,
- ngOptions: 'group.name for group in inventory_groups track by group.value',
- required: true,
- awPopOver: "
Provide a host name, ip address, or ip address:port. Examples include:
" +
- "
myserver.domain.com " +
- "127.0.0.1 " +
- "10.1.0.140:25 " +
- "server.example.com:25" +
- " ",
- dataTitle: 'Host Name',
- dataPlacement: 'right',
- dataContainer: '#form-modal .modal-content'
- }
- },
-
- buttons: { //for now always generates
tags
- reset: {
- ngClick: 'formReset()',
- ngDisabled: true
- },
- save: {
- ngClick: 'formSave()',
- ngDisabled: true
- }
- },
-
- related: { }
-
- }); //UserForm
diff --git a/awx/ui/client/src/forms/InventoryStatus.js b/awx/ui/client/src/forms/InventoryStatus.js
deleted file mode 100644
index 274c96a4d0..0000000000
--- a/awx/ui/client/src/forms/InventoryStatus.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
- /**
- * @ngdoc function
- * @name forms.function:InventoryStatus
- * @description This form is for adding/editing an InventoryStatus
-*/
-export default
- angular.module('InventoryStatusDefinition', [])
- .value('InventoryStatusForm', {
-
- name: 'inventory_update',
- editTitle: 'INVENTORY STATUS',
- well: false,
- 'class': 'horizontal-narrow',
-
- fields: {
- license_error: {
- type: 'alertblock',
- 'class': 'alert-info',
- alertTxt: 'The invenvtory update process exceeded the available number of licensed hosts. ' +
- 'View your license ' +
- 'for more information.',
- ngShow: 'license_error',
- closeable: true
- },
- created: {
- label: 'Created',
- type: 'text',
- readonly: true
- },
- status: {
- label: 'Status',
- type: 'text',
- readonly: true,
- 'class': 'nowrap mono-space resizable',
- rows: '{{ status_rows }}'
- },
- result_stdout: {
- label: 'Std Out',
- type: 'textarea',
- ngShow: 'result_stdout',
- 'class': 'nowrap mono-space resizable',
- readonly: true,
- rows: '{{ stdout_rows }}'
- },
- result_traceback: {
- label: 'Traceback',
- type: 'textarea',
- ngShow: 'result_traceback',
- 'class': 'nowrap mono-space resizable',
- readonly: true,
- rows: '{{ traceback_rows }}'
- }
- }
- }); //Form
diff --git a/awx/ui/client/src/forms/JobEventData.js b/awx/ui/client/src/forms/JobEventData.js
deleted file mode 100644
index 221eeca1d8..0000000000
--- a/awx/ui/client/src/forms/JobEventData.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
- /**
- * @ngdoc function
- * @name forms.function:JobEventData
- * @description Not sure if this is used...
-*/
-
-export default
- angular.module('JobEventDataDefinition', [])
- .value('JobEventDataForm', {
-
- editTitle: '{{ id }} - {{ event_display }}',
- name: 'job_events',
- well: false,
- 'class': 'horizontal-narrow',
-
- fields: {
- event_data: {
- label: false,
- type: 'textarea',
- readonly: true,
- rows: 18,
- 'class': 'modal-input-xxlarge'
- }
- }
-
- }); //Form
diff --git a/awx/ui/client/src/forms/JobSummary.js b/awx/ui/client/src/forms/JobSummary.js
deleted file mode 100644
index c211d8de34..0000000000
--- a/awx/ui/client/src/forms/JobSummary.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
- /**
- * @ngdoc function
- * @name forms.function:JobSummary
- * @description Display job status info in a dialog
-*/
-
-export default
- angular.module('JobSummaryDefinition', [])
- .value('JobSummary', {
-
- editTitle: '{{ id }} - {{ name }}',
- name: 'jobs',
- well: false,
-
- fields: {
- status: {
- //label: 'Job Status',
- type: 'custom',
- control: 'Status ' +
- ' {{ status }}
',
- readonly: true
- },
- created: {
- label: 'Created On',
- type: 'text',
- readonly: true
- },
- result_stdout: {
- label: 'Standard Out',
- type: 'textarea',
- readonly: true,
- xtraWide: true,
- rows: '{{ stdout_rows }}',
- 'class': 'nowrap mono-space resizable',
- ngShow: 'result_stdout != ""'
- },
- result_traceback: {
- label: 'Traceback',
- type: 'textarea',
- xtraWide: true,
- readonly: true,
- rows: '{{ traceback_rows }}',
- 'class': 'nowrap mono-space resizable',
- ngShow: 'result_traceback != ""'
- }
- }
- });
diff --git a/awx/ui/client/src/forms/JobVarsPrompt.js b/awx/ui/client/src/forms/JobVarsPrompt.js
deleted file mode 100644
index edf075f728..0000000000
--- a/awx/ui/client/src/forms/JobVarsPrompt.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-/**
- * @ngdoc function
- * @name forms.function:JobVarsPrompt
- * @description This form is for job variables prompt modal
-*/
-
-export default
- angular.module('JobVarsPromptFormDefinition', [])
-
- .value ('JobVarsPromptForm', {
-
- addTitle: '',
- editTitle: '',
- name: 'job',
- well: false,
-
- actions: { },
-
- fields: {
- extra_vars: {
- label: null,
- type: 'textarea',
- rows: 6,
-
-
- "default": "---"
- }
- },
-
- buttons: { },
-
- related: { }
-
- });
diff --git a/awx/ui/client/src/forms/LogViewerOptions.js b/awx/ui/client/src/forms/LogViewerOptions.js
deleted file mode 100644
index d2f64c2752..0000000000
--- a/awx/ui/client/src/forms/LogViewerOptions.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
- /**
- * @ngdoc function
- * @name forms.function:LogViewerOptions
- * @description This form is for the page to view logs
-*/
-
-export default
- angular.module('LogViewerOptionsDefinition', [])
- .value('LogViewerOptionsForm', {
-
- name: 'status',
- well: false,
-
- fields: {
- "job_template": {
- label: "Job Template",
- type: "text",
- readonly: true
- },
- "inventory": {
- label: "Inventory",
- type: "text",
- readonly: true
- },
- "project": {
- label: "Project",
- type: "text",
- readonly: true
- },
- "playbook": {
- label: "Playbook",
- type: "text",
- readonly: true
- },
- "credential": {
- label: "Credential",
- type: "text",
- readonly: true
- },
- "cloud credential": {
- label: "Cloud Cred.",
- type: "text",
- readonly: true
- },
- "forks": {
- label: "Forks",
- type: "text",
- readonly: true
- },
- "limit": {
- label: "Limit",
- type: "text",
- readonly: true
- },
- "verbosity": {
- label: "Verbosity",
- type: "text",
- readonly: true
- },
- "job_tags": {
- label: "Job Tags",
- type: "text",
- readonly: true
- },
- "inventory_source": {
- label: "Group",
- type: "text",
- readonly: true
- },
- "source": {
- label: "Source",
- type: "text",
- readonly: true
- },
- "source_path": {
- label: "Source Path",
- type: "text",
- readonly: true
- },
- "source_regions":{
- label: "Regions",
- type: "text",
- readonly: true
- },
- "overwrite": {
- label: "Overwrite",
- type: "text",
- readonly: true
- },
- "overwrite_vars": {
- label: "Overwrite Vars",
- type: "text",
- readonly: true
- }
- }
- });
diff --git a/awx/ui/client/src/forms/LogViewerStatus.js b/awx/ui/client/src/forms/LogViewerStatus.js
deleted file mode 100644
index a7c8fb215c..0000000000
--- a/awx/ui/client/src/forms/LogViewerStatus.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
- /**
- * @ngdoc function
- * @name forms.function:LogViewerStatus
- * @description Form definition for LogViewer.js helper
-*/
-
-export default
- angular.module('LogViewerStatusDefinition', [])
- .factory('LogViewerStatusForm', ['i18n', function(i18n) {
- return {
-
- name: 'status',
- well: false,
-
- fields: {
- "name": {
- label: i18n._("Name"),
- type: "text",
- readonly: true,
- },
- "status": {
- label: i18n._("Status"),
- type: "text",
- readonly: true
- },
- "license_error": {
- label: i18n._("License Error"),
- type: "text",
- readonly: true
- },
- "started": {
- label: i18n._("Started"),
- type: "date",
- "filter": "longDate",
- readonly: true
- },
- "finished": {
- label: i18n._("Finished"),
- type: "date",
- "filter": "longDate",
- readonly: true
- },
- "elapsed": {
- label: i18n._("Elapsed"),
- type: "text",
- readonly: true
- },
- "launch_type": {
- label: i18n._("Launch Type"),
- type: "text",
- readonly: true
- }
- }
-
- };}]);
diff --git a/awx/ui/client/src/forms/ProjectStatus.js b/awx/ui/client/src/forms/ProjectStatus.js
deleted file mode 100644
index 8d193b6826..0000000000
--- a/awx/ui/client/src/forms/ProjectStatus.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
- /**
- * @ngdoc function
- * @name forms.function:ProjectStatus
- * @description This form is for adding/editing project status
-*/
-
-export default
- angular.module('ProjectStatusDefinition', [])
- .value('ProjectStatusForm', {
-
- name: 'project_update',
- editTitle: 'SCM STATUS',
- well: false,
- 'class': 'horizontal-narrow',
-
- fields: {
- created: {
- label: 'Created',
- type: 'text',
- readonly: true
- },
- status: {
- label: 'Status',
- type: 'text',
- readonly: true
- },
- result_stdout: {
- label: 'Std Out',
- type: 'textarea',
- ngShow: "result_stdout",
- 'class': 'mono-space',
- readonly: true,
- rows: 15
- },
- result_traceback: {
- label: 'Traceback',
- type: 'textarea',
- ngShow: "result_traceback",
- 'class': 'mono-space',
- readonly: true,
- rows: 15
- }
- }
- }); //Form
diff --git a/awx/ui/client/src/forms/Inventories.js b/awx/ui/client/src/inventories/inventory.form.js
similarity index 97%
rename from awx/ui/client/src/forms/Inventories.js
rename to awx/ui/client/src/inventories/inventory.form.js
index 08f29d5872..3164d47b5a 100644
--- a/awx/ui/client/src/forms/Inventories.js
+++ b/awx/ui/client/src/inventories/inventory.form.js
@@ -10,9 +10,7 @@
* @description This form is for adding/editing an inventory
*/
-export default
-angular.module('InventoryFormDefinition', [])
- .factory('InventoryForm', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
addTitle: i18n._('NEW INVENTORY'),
@@ -134,4 +132,4 @@ angular.module('InventoryFormDefinition', [])
}
}
- };}]);
+ };}];
diff --git a/awx/ui/client/src/lists/Inventories.js b/awx/ui/client/src/inventories/inventory.list.js
similarity index 96%
rename from awx/ui/client/src/lists/Inventories.js
rename to awx/ui/client/src/inventories/inventory.list.js
index d2ec51afc1..cea3ebb79b 100644
--- a/awx/ui/client/src/lists/Inventories.js
+++ b/awx/ui/client/src/inventories/inventory.list.js
@@ -5,9 +5,7 @@
*************************************************/
-export default
- angular.module('InventoriesListDefinition', [])
- .factory('InventoryList', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
name: 'inventories',
@@ -96,4 +94,4 @@ export default
ngShow: 'inventory.summary_fields.user_capabilities.delete'
}
}
- };}]);
+ };}];
diff --git a/awx/ui/client/src/inventories/main.js b/awx/ui/client/src/inventories/main.js
index 6fb5916b25..45207bcf7e 100644
--- a/awx/ui/client/src/inventories/main.js
+++ b/awx/ui/client/src/inventories/main.js
@@ -13,6 +13,11 @@ import { copyMoveGroupRoute, copyMoveHostRoute } from './manage/copy-move/copy-m
import adHocRoute from './manage/adhoc/adhoc.route';
import { templateUrl } from '../shared/template-url/template-url.factory';
import { N_ } from '../i18n';
+
+// actual inventory list config object
+import InventoryList from './inventory.list';
+import InventoryForm from './inventory.form';
+
export default
angular.module('inventory', [
inventoryAdd.name,
@@ -20,6 +25,8 @@ angular.module('inventory', [
inventoryList.name,
inventoryManage.name,
])
+ .factory('InventoryList', InventoryList)
+ .factory('InventoryForm', InventoryForm)
.config(['$stateProvider', '$stateExtenderProvider', 'stateDefinitionsProvider',
function($stateProvider, $stateExtenderProvider, stateDefinitionsProvider) {
// When stateDefinition.lazyLoad() resolves, states matching name.** or /url** will be de-registered and replaced with resolved states
diff --git a/awx/ui/client/src/inventories/manage/copy-move/copy-move-groups.list.js b/awx/ui/client/src/inventories/manage/copy-move/copy-move-groups.list.js
new file mode 100644
index 0000000000..5a98b24591
--- /dev/null
+++ b/awx/ui/client/src/inventories/manage/copy-move/copy-move-groups.list.js
@@ -0,0 +1,24 @@
+/*************************************************
+ * Copyright (c) 2015 Ansible, Inc.
+ *
+ * All Rights Reserved
+ *************************************************/
+
+
+
+
+export default {
+ name: 'groups',
+ iterator: 'copy',
+ selectTitle: 'Copy Groups',
+ index: false,
+ well: false,
+ emptyListText: 'PLEASE CREATE ADDITIONAL GROUPS / HOSTS TO PERFORM THIS ACTION',
+ fields: {
+ name: {
+ key: true,
+ label: 'Target Group Name'
+ }
+ },
+ basePath: 'api/v1/inventories/{{$stateParams.inventory_id}}/groups'
+};
diff --git a/awx/ui/client/src/inventories/manage/copy-move/main.js b/awx/ui/client/src/inventories/manage/copy-move/main.js
index 1b32c11941..a9fbd47660 100644
--- a/awx/ui/client/src/inventories/manage/copy-move/main.js
+++ b/awx/ui/client/src/inventories/manage/copy-move/main.js
@@ -6,8 +6,10 @@
import CopyMoveGroupsController from './copy-move-groups.controller';
import CopyMoveHostsController from './copy-move-hosts.controller';
+import CopyMoveGroupList from './copy-move-groups.list';
export default
angular.module('manageCopyMove', [])
.controller('CopyMoveGroupsController', CopyMoveGroupsController)
- .controller('CopyMoveHostsController', CopyMoveHostsController);
+ .controller('CopyMoveHostsController', CopyMoveHostsController)
+ .value('CopyMoveGroupList', CopyMoveGroupList);
diff --git a/awx/ui/client/src/inventories/manage/groups/groups.form.js b/awx/ui/client/src/inventories/manage/groups/groups.form.js
new file mode 100644
index 0000000000..16fee6017d
--- /dev/null
+++ b/awx/ui/client/src/inventories/manage/groups/groups.form.js
@@ -0,0 +1,360 @@
+/*************************************************
+ * Copyright (c) 2015 Ansible, Inc.
+ *
+ * All Rights Reserved
+ *************************************************/
+
+ /**
+ * @ngdoc function
+ * @name forms.function:Groups
+ * @description This form is for adding/editing a Group on the inventory page
+*/
+
+export default ['NotificationsList',
+ function(NotificationsList) {
+ return function() {
+ var GroupFormObject = {
+
+ addTitle: 'CREATE GROUP',
+ editTitle: '{{ name }}',
+ showTitle: true,
+ name: 'group',
+ basePath: 'groups',
+ // the parent node this generated state definition tree expects to attach to
+ stateTree: 'inventoryManage',
+ // form generator inspects the current state name to determine whether or not to set an active (.is-selected) class on a form tab
+ // this setting is optional on most forms, except where the form's edit state name is not parentStateName.edit
+ activeEditState: 'inventoryManage.editGroup',
+ detailsClick: "$state.go('inventoryManage.editGroup')",
+ well: false,
+ fields: {
+ name: {
+ label: 'Name',
+ type: 'text',
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
+ required: true,
+ tab: 'properties'
+ },
+ description: {
+ label: 'Description',
+ type: 'text',
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
+ tab: 'properties'
+ },
+ variables: {
+ label: 'Variables',
+ type: 'textarea',
+ class: 'Form-textAreaLabel Form-formGroup--fullWidth',
+ rows: 6,
+ 'default': '---',
+ dataTitle: 'Group Variables',
+ dataPlacement: 'right',
+ parseTypeName: 'parseType',
+ awPopOver: "Variables defined here apply to all child groups and hosts.
" +
+ "Enter variables using either JSON or YAML syntax. Use the " +
+ "radio button to toggle between the two.
" +
+ "JSON: \n" +
+ "{ \"somevar\": \"somevalue\", \"password\": \"magic\" } \n" +
+ "YAML: \n" +
+ "--- somevar: somevalue password: magic \n" +
+ 'View JSON examples at www.json.org
' +
+ 'View YAML examples at docs.ansible.com
',
+ dataContainer: 'body',
+ tab: 'properties'
+ },
+ source: {
+ label: 'Source',
+ type: 'select',
+ ngOptions: 'source.label for source in source_type_options track by source.value',
+ ngChange: 'sourceChange(source)',
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
+ ngModel: 'source'
+ },
+ credential: {
+ // initializes a default value for this search param
+ // search params with default values set will not generate user-interactable search tags
+ search: {
+ kind: null
+ },
+ label: 'Cloud Credential',
+ type: 'lookup',
+ list: 'CredentialList',
+ basePath: 'credentials',
+ ngShow: "source && source.value !== '' && source.value !== 'custom'",
+ sourceModel: 'credential',
+ sourceField: 'name',
+ ngClick: 'lookupCredential()',
+ awRequiredWhen: {
+ reqExpression: "cloudCredentialRequired",
+ init: "false"
+ },
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
+ watchBasePath: "credentialBasePath"
+ },
+ source_regions: {
+ label: 'Regions',
+ type: 'select',
+ ngOptions: 'source.label for source in source_region_choices track by source.value',
+ multiSelect: true,
+ ngShow: "source && (source.value == 'rax' || source.value == 'ec2' || source.value == 'gce' || source.value == 'azure' || source.value == 'azure_rm')",
+
+
+ dataTitle: 'Source Regions',
+ dataPlacement: 'right',
+ awPopOver: "Click on the regions field to see a list of regions for your cloud provider. You can select multiple regions, " +
+ "or choose All to include all regions. Tower will only be updated with Hosts associated with the selected regions." +
+ "
",
+ dataContainer: 'body',
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
+ },
+ instance_filters: {
+ label: 'Instance Filters',
+ type: 'text',
+ ngShow: "source && source.value == 'ec2'",
+ dataTitle: 'Instance Filters',
+ dataPlacement: 'right',
+ awPopOver: "Provide a comma-separated list of filter expressions. " +
+ "Hosts are imported to Tower when ANY of the filters match.
" +
+ "Limit to hosts having a tag: \n" +
+ "tag-key=TowerManaged \n" +
+ "Limit to hosts using either key pair: \n" +
+ "key-name=staging, key-name=production \n" +
+ "Limit to hosts where the Name tag begins with test : \n" +
+ "tag:Name=test* \n" +
+ "View the Describe Instances documentation " +
+ "for a complete list of supported filters.
",
+ dataContainer: 'body',
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
+ },
+ group_by: {
+ label: 'Only Group By',
+ type: 'select',
+ ngShow: "source && source.value == 'ec2'",
+ ngOptions: 'source.label for source in group_by_choices track by source.value',
+ multiSelect: true,
+ dataTitle: 'Only Group By',
+ dataPlacement: 'right',
+ awPopOver: "Select which groups to create automatically. " +
+ "Tower will create group names similar to the following examples based on the options selected:
" +
+ "Availability Zone: zones » us-east-1b " +
+ "Image ID: images » ami-b007ab1e " +
+ "Instance ID: instances » i-ca11ab1e " +
+ "Instance Type: types » type_m1_medium " +
+ "Key Name: keys » key_testing " +
+ "Region: regions » us-east-1 " +
+ "Security Group: security_groups » security_group_default " +
+ "Tags: tags » tag_Name » tag_Name_host1 " +
+ "VPC ID: vpcs » vpc-5ca1ab1e " +
+ "Tag None: tags » tag_none " +
+ " If blank, all groups above are created except Instance ID .
",
+ dataContainer: 'body',
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
+ },
+ inventory_script: {
+ label : "Custom Inventory Script",
+ type: 'lookup',
+ basePath: 'inventory_scripts',
+ list: 'InventoryScriptsList',
+ ngShow: "source && source.value === 'custom'",
+ sourceModel: 'inventory_script',
+ sourceField: 'name',
+ awRequiredWhen: {
+ reqExpression: "source && source.value === 'custom'",
+ init: "false"
+ },
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
+ },
+ custom_variables: {
+ id: 'custom_variables',
+ label: 'Environment Variables', //"{{vars_label}}" ,
+ ngShow: "source && source.value=='custom' ",
+ type: 'textarea',
+ class: 'Form-textAreaLabel Form-formGroup--fullWidth',
+ rows: 6,
+ 'default': '---',
+ parseTypeName: 'envParseType',
+ dataTitle: "Environment Variables",
+ dataPlacement: 'right',
+ awPopOver: "Provide environment variables to pass to the custom inventory script.
" +
+ "Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.
" +
+ "JSON: \n" +
+ "{ \"somevar\": \"somevalue\", \"password\": \"magic\" } \n" +
+ "YAML: \n" +
+ "--- somevar: somevalue password: magic \n" +
+ 'View JSON examples at www.json.org
' +
+ 'View YAML examples at docs.ansible.com
',
+ dataContainer: 'body'
+ },
+ ec2_variables: {
+ id: 'ec2_variables',
+ label: 'Source Variables', //"{{vars_label}}" ,
+ ngShow: "source && source.value == 'ec2'",
+ type: 'textarea',
+ class: 'Form-textAreaLabel Form-formGroup--fullWidth',
+ rows: 6,
+ 'default': '---',
+ parseTypeName: 'envParseType',
+ dataTitle: "Source Variables",
+ dataPlacement: 'right',
+ awPopOver: "Override variables found in ec2.ini and used by the inventory update script. For a detailed description of these variables " +
+ "" +
+ "view ec2.ini in the Ansible github repo.
" +
+ "Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.
" +
+ "JSON: \n" +
+ "{ \"somevar\": \"somevalue\", \"password\": \"magic\" } \n" +
+ "YAML: \n" +
+ "--- somevar: somevalue password: magic \n" +
+ 'View JSON examples at www.json.org
' +
+ 'View YAML examples at docs.ansible.com
',
+ dataContainer: 'body'
+ },
+ vmware_variables: {
+ id: 'vmware_variables',
+ label: 'Source Variables', //"{{vars_label}}" ,
+ ngShow: "source && source.value == 'vmware'",
+ type: 'textarea',
+ class: 'Form-textAreaLabel Form-formGroup--fullWidth',
+ rows: 6,
+ 'default': '---',
+ parseTypeName: 'envParseType',
+ dataTitle: "Source Variables",
+ dataPlacement: 'right',
+ awPopOver: "Override variables found in vmware.ini and used by the inventory update script. For a detailed description of these variables " +
+ "" +
+ "view vmware_inventory.ini in the Ansible github repo.
" +
+ "Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.
" +
+ "JSON: \n" +
+ "{ \"somevar\": \"somevalue\", \"password\": \"magic\" } \n" +
+ "YAML: \n" +
+ "--- somevar: somevalue password: magic \n" +
+ 'View JSON examples at www.json.org
' +
+ 'View YAML examples at docs.ansible.com
',
+ dataContainer: 'body'
+ },
+ openstack_variables: {
+ id: 'openstack_variables',
+ label: 'Source Variables', //"{{vars_label}}" ,
+ ngShow: "source && source.value == 'openstack'",
+ type: 'textarea',
+ class: 'Form-textAreaLabel Form-formGroup--fullWidth',
+ rows: 6,
+ 'default': '---',
+ parseTypeName: 'envParseType',
+ dataTitle: "Source Variables",
+ dataPlacement: 'right',
+ awPopOver: "Override variables found in openstack.yml and used by the inventory update script. For an example variable configuration " +
+ "" +
+ "view openstack.yml in the Ansible github repo.
" +
+ "Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.
" +
+ "JSON: \n" +
+ "{ \"somevar\": \"somevalue\", \"password\": \"magic\" } \n" +
+ "YAML: \n" +
+ "--- somevar: somevalue password: magic \n" +
+ 'View JSON examples at www.json.org
' +
+ 'View YAML examples at docs.ansible.com
',
+ dataContainer: 'body'
+ },
+ checkbox_group: {
+ label: 'Update Options',
+ type: 'checkbox_group',
+ ngShow: "source && (source.value !== '' && source.value !== null)",
+ class: 'Form-checkbox--stacked',
+ fields: [{
+ name: 'overwrite',
+ label: 'Overwrite',
+ type: 'checkbox',
+ ngShow: "source.value !== '' && source.value !== null",
+
+
+ awPopOver: 'If checked, all child groups and hosts not found on the external source will be deleted from ' +
+ 'the local inventory.
When not checked, local child hosts and groups not found on the external source will ' +
+ 'remain untouched by the inventory update process.
',
+ dataTitle: 'Overwrite',
+ dataContainer: 'body',
+ dataPlacement: 'right',
+ labelClass: 'checkbox-options',
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
+ }, {
+ name: 'overwrite_vars',
+ label: 'Overwrite Variables',
+ type: 'checkbox',
+ ngShow: "source.value !== '' && source.value !== null",
+
+
+ awPopOver: 'If checked, all variables for child groups and hosts will be removed and replaced by those ' +
+ 'found on the external source.
When not checked, a merge will be performed, combining local variables with ' +
+ 'those found on the external source.
',
+ dataTitle: 'Overwrite Variables',
+ dataContainer: 'body',
+ dataPlacement: 'right',
+ labelClass: 'checkbox-options',
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
+ }, {
+ name: 'update_on_launch',
+ label: 'Update on Launch',
+ type: 'checkbox',
+ ngShow: "source.value !== '' && source.value !== null",
+ awPopOver: 'Each time a job runs using this inventory, refresh the inventory from the selected source before ' +
+ 'executing job tasks.
',
+ dataTitle: 'Update on Launch',
+ dataContainer: 'body',
+ dataPlacement: 'right',
+ labelClass: 'checkbox-options',
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
+ }]
+ },
+ update_cache_timeout: {
+ label: "Cache Timeout (seconds) ",
+ id: 'source-cache-timeout',
+ type: 'number',
+ ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
+ integer: true,
+ min: 0,
+ ngShow: "source && source.value !== '' && update_on_launch",
+ spinner: true,
+ "default": 0,
+ awPopOver: 'Time in seconds to consider an inventory sync to be current. During job runs and callbacks the task system will ' +
+ 'evaluate the timestamp of the latest sync. If it is older than Cache Timeout, it is not considered current, ' +
+ 'and a new inventory sync will be performed.
',
+ dataTitle: 'Cache Timeout',
+ dataPlacement: 'right',
+ dataContainer: "body"
+ }
+ },
+
+ buttons: {
+ cancel: {
+ ngClick: 'formCancel()',
+ ngShow: '(group_obj.summary_fields.user_capabilities.edit || canAdd)'
+ },
+ close: {
+ ngClick: 'formCancel()',
+ ngShow: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)'
+ },
+ save: {
+ ngClick: 'formSave()',
+ ngDisabled: true,
+ ngShow: '(group_obj.summary_fields.user_capabilities.edit || canAdd)'
+ }
+ },
+
+ related: {
+ "notifications": {
+ include: "NotificationsList"
+ }
+ }
+
+ };
+ var itm;
+
+ for (itm in GroupFormObject.related) {
+ if (GroupFormObject.related[itm].include === "NotificationsList") {
+ GroupFormObject.related[itm] = angular.copy(NotificationsList);
+ GroupFormObject.related[itm].generateList = true;
+ GroupFormObject.related[itm].disabled = "source === undefined || source.value === ''";
+ GroupFormObject.related[itm].ngClick = "$state.go('inventoryManage.editGroup.notifications')";
+ }
+ }
+ return GroupFormObject;
+ };
+ }];
diff --git a/awx/ui/client/src/inventories/manage/groups/inventory-groups.list.js b/awx/ui/client/src/inventories/manage/groups/inventory-groups.list.js
new file mode 100644
index 0000000000..3c4c12c9c1
--- /dev/null
+++ b/awx/ui/client/src/inventories/manage/groups/inventory-groups.list.js
@@ -0,0 +1,167 @@
+/*************************************************
+ * Copyright (c) 2015 Ansible, Inc.
+ *
+ * All Rights Reserved
+ *************************************************/
+
+export default {
+ name: 'groups',
+ iterator: 'group',
+ editTitle: '{{ inventory.name }}',
+ listTitle: 'GROUPS',
+ searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
+ showTitle: false,
+ well: true,
+ index: false,
+ hover: true,
+ 'class': 'table-no-border',
+ multiSelect: true,
+ trackBy: 'group.id',
+
+ fields: {
+ sync_status: {
+ label: '',
+ nosort: true,
+ mode: 'all',
+ iconOnly: true,
+ ngClick: 'viewUpdateStatus(group.id)',
+ awToolTip: "{{ group.status_tooltip }}",
+ dataTipWatch: "group.status_tooltip",
+ icon: "{{ 'fa icon-cloud-' + group.status_class }}",
+ ngClass: "group.status_class",
+ dataPlacement: "top",
+ columnClass: 'status-column List-staticColumn--smallStatus'
+ },
+ failed_hosts: {
+ label: '',
+ nosort: true,
+ mode: 'all',
+ iconOnly: true,
+ awToolTip: "{{ group.hosts_status_tip }}",
+ dataPlacement: "top",
+ ngClick: "showFailedHosts(group)",
+ icon: "{{ 'fa icon-job-' + group.hosts_status_class }}",
+ columnClass: 'status-column List-staticColumn--smallStatus'
+ },
+ name: {
+ label: 'Groups',
+ key: true,
+ ngClick: "groupSelect(group.id)",
+ columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
+ class: 'InventoryManage-breakWord',
+ },
+ total_groups: {
+ nosort: true,
+ label: '',
+ type: 'badgeCount',
+ ngHide: 'group.total_groups == 0',
+ noLink: true,
+ awToolTip: "{{group.name | sanitize}} contains {{group.total_groups}} {{group.total_groups === 1 ? 'child' : 'children'}}"
+ }
+ },
+
+ actions: {
+ refresh: {
+ mode: 'all',
+ awToolTip: "Refresh the page",
+ ngClick: "refreshGroups()",
+ ngShow: "socketStatus == 'error'",
+ actionClass: 'btn List-buttonDefault',
+ buttonContent: 'REFRESH'
+ },
+ launch: {
+ mode: 'all',
+ // $scope.$parent is governed by InventoryManageController,
+ ngDisabled: '!$parent.groupsSelected && !$parent.hostsSelected',
+ ngClick: '$parent.setAdhocPattern()',
+ awToolTip: "Select an inventory source by clicking the check box beside it. The inventory source can be a single group or host, a selection of multiple hosts, or a selection of multiple groups.",
+ dataTipWatch: "adhocCommandTooltip",
+ actionClass: 'btn List-buttonDefault',
+ buttonContent: 'RUN COMMANDS',
+ showTipWhenDisabled: true,
+ tooltipInnerClass: "Tooltip-wide",
+ ngShow: 'canAdhoc'
+ // TODO: set up a tip watcher and change text based on when
+ // things are selected/not selected. This is started and
+ // commented out in the inventory controller within the watchers.
+ // awToolTip: "{{ adhocButtonTipContents }}",
+ // dataTipWatch: "adhocButtonTipContents"
+ },
+ create: {
+ mode: 'all',
+ ngClick: "createGroup()",
+ awToolTip: "Create a new group",
+ actionClass: 'btn List-buttonSubmit',
+ buttonContent: '+ ADD GROUP',
+ ngShow: 'canAdd',
+ dataPlacement: "top",
+ }
+ },
+
+ fieldActions: {
+
+ columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
+
+ group_update: {
+ //label: 'Sync',
+ mode: 'all',
+ ngClick: 'updateGroup(group)',
+ awToolTip: "{{ group.launch_tooltip }}",
+ dataTipWatch: "group.launch_tooltip",
+ ngShow: "(group.status !== 'running' && group.status " +
+ "!== 'pending' && group.status !== 'updating') && group.summary_fields.user_capabilities.start",
+ ngClass: "group.launch_class",
+ dataPlacement: "top",
+ },
+ cancel: {
+ //label: 'Cancel',
+ mode: 'all',
+ ngClick: "cancelUpdate(group.id)",
+ awToolTip: "Cancel sync process",
+ 'class': 'red-txt',
+ ngShow: "(group.status == 'running' || group.status == 'pending' " +
+ "|| group.status == 'updating') && group.summary_fields.user_capabilities.start",
+ dataPlacement: "top",
+ iconClass: "fa fa-minus-circle"
+ },
+ copy: {
+ mode: 'all',
+ ngClick: "copyMoveGroup(group.id)",
+ awToolTip: 'Copy or move group',
+ ngShow: "group.id > 0 && group.summary_fields.user_capabilities.copy",
+ dataPlacement: "top"
+ },
+ schedule: {
+ mode: 'all',
+ ngClick: "scheduleGroup(group.id)",
+ awToolTip: "{{ group.group_schedule_tooltip }}",
+ ngClass: "group.scm_type_class",
+ dataPlacement: 'top',
+ ngShow: "!(group.summary_fields.inventory_source.source === '')"
+ },
+ edit: {
+ //label: 'Edit',
+ mode: 'all',
+ ngClick: "editGroup(group.id)",
+ awToolTip: 'Edit group',
+ dataPlacement: "top",
+ ngShow: "group.summary_fields.user_capabilities.edit"
+ },
+ view: {
+ //label: 'Edit',
+ mode: 'all',
+ ngClick: "editGroup(group.id)",
+ awToolTip: 'View group',
+ dataPlacement: "top",
+ ngShow: "!group.summary_fields.user_capabilities.edit"
+ },
+ "delete": {
+ //label: 'Delete',
+ mode: 'all',
+ ngClick: "deleteGroup(group)",
+ awToolTip: 'Delete group',
+ dataPlacement: "top",
+ ngShow: "group.summary_fields.user_capabilities.delete"
+ }
+ }
+};
diff --git a/awx/ui/client/src/inventories/manage/groups/main.js b/awx/ui/client/src/inventories/manage/groups/main.js
index e1c2c16ddb..9423ed0c81 100644
--- a/awx/ui/client/src/inventories/manage/groups/main.js
+++ b/awx/ui/client/src/inventories/manage/groups/main.js
@@ -11,6 +11,8 @@ import GetSourceTypeOptions from './factories/get-source-type-options.factory';
import GetSyncStatusMsg from './factories/get-sync-status-msg.factory';
import GroupsCancelUpdate from './factories/groups-cancel-update.factory';
import ViewUpdateStatus from './factories/view-update-status.factory';
+import InventoryGroups from './inventory-groups.list';
+import GroupForm from './groups.form';
export default
angular.module('manageGroups', [])
@@ -19,5 +21,7 @@ angular.module('manageGroups', [])
.factory('GetSyncStatusMsg', GetSyncStatusMsg)
.factory('GroupsCancelUpdate', GroupsCancelUpdate)
.factory('ViewUpdateStatus', ViewUpdateStatus)
+ .factory('GroupForm', GroupForm)
+ .value('InventoryGroups', InventoryGroups)
.controller('GroupAddController', GroupAddController)
.controller('GroupEditController', GroupEditController);
diff --git a/awx/ui/client/src/forms/Hosts.js b/awx/ui/client/src/inventories/manage/hosts/hosts.form.js
similarity index 97%
rename from awx/ui/client/src/forms/Hosts.js
rename to awx/ui/client/src/inventories/manage/hosts/hosts.form.js
index 55c7da509e..efb64a4785 100644
--- a/awx/ui/client/src/forms/Hosts.js
+++ b/awx/ui/client/src/inventories/manage/hosts/hosts.form.js
@@ -10,9 +10,7 @@
* @description This form is for adding/editing a host on the inventory page
*/
-export default
- angular.module('HostFormDefinition', [])
- .factory('HostForm', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
addTitle: i18n._('CREATE HOST'),
@@ -102,4 +100,4 @@ export default
}
},
};
- }]);
+ }];
diff --git a/awx/ui/client/src/inventories/manage/hosts/inventory-hosts.list.js b/awx/ui/client/src/inventories/manage/hosts/inventory-hosts.list.js
new file mode 100644
index 0000000000..a2793638a3
--- /dev/null
+++ b/awx/ui/client/src/inventories/manage/hosts/inventory-hosts.list.js
@@ -0,0 +1,119 @@
+/*************************************************
+ * Copyright (c) 2015 Ansible, Inc.
+ *
+ * All Rights Reserved
+ *************************************************/
+
+export default {
+ name: 'hosts',
+ iterator: 'host',
+ editTitle: '{{ selected_group }}',
+ listTitle: 'HOSTS',
+ searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
+ showTitle: false,
+ well: true,
+ index: false,
+ hover: true,
+ hasChildren: true,
+ 'class': 'table-no-border',
+ multiSelect: true,
+ trackBy: 'host.id',
+
+ fields: {
+ active_failures: {
+ label: '',
+ iconOnly: true,
+ nosort: true,
+ // do not remove this ng-click directive
+ // the list generator case to handle fields without ng-click
+ // cannot handle the aw-* directives
+ ngClick: 'noop()',
+ awPopOver: "{{ host.job_status_html }}",
+ dataTitle: "{{ host.job_status_title }}",
+ awToolTip: "{{ host.badgeToolTip }}",
+ dataPlacement: 'top',
+ icon: "{{ 'fa icon-job-' + host.active_failures }}",
+ id: 'active-failures-action',
+ columnClass: 'status-column List-staticColumn--smallStatus'
+ },
+ name: {
+ key: true,
+ label: 'Hosts',
+ ngClick: "editHost(host.id)",
+ ngClass: "{ 'host-disabled-label': !host.enabled }",
+ columnClass: 'col-lg-6 col-md-8 col-sm-8 col-xs-7',
+ dataHostId: "{{ host.id }}",
+ dataType: "host",
+ class: 'InventoryManage-breakWord'
+ }
+ },
+
+ fieldActions: {
+
+ columnClass: 'col-lg-6 col-md-4 col-sm-4 col-xs-5 text-right',
+ copy: {
+ mode: 'all',
+ ngClick: "copyMoveHost(host.id)",
+ awToolTip: 'Copy or move host to another group',
+ dataPlacement: "top",
+ ngShow: 'host.summary_fields.user_capabilities.edit'
+ },
+ edit: {
+ //label: 'Edit',
+ ngClick: "editHost(host.id)",
+ icon: 'icon-edit',
+ awToolTip: 'Edit host',
+ dataPlacement: 'top',
+ ngShow: 'host.summary_fields.user_capabilities.edit'
+ },
+ view: {
+ //label: 'Edit',
+ ngClick: "editHost(host.id)",
+ awToolTip: 'View host',
+ dataPlacement: 'top',
+ ngShow: '!host.summary_fields.user_capabilities.edit'
+ },
+ "delete": {
+ //label: 'Delete',
+ ngClick: "deleteHost(host.id, host.name)",
+ icon: 'icon-trash',
+ awToolTip: 'Delete host',
+ dataPlacement: 'top',
+ ngShow: 'host.summary_fields.user_capabilities.delete'
+ }
+ },
+
+ actions: {
+ system_tracking: {
+ buttonContent: 'System Tracking',
+ ngClick: 'systemTracking()',
+ awToolTip: "Select one or two hosts by clicking the checkbox beside the host. System tracking offers the ability to compare the results of two scan runs from different dates on one host or the same date on two hosts.",
+ dataTipWatch: "systemTrackingTooltip",
+ dataPlacement: 'top',
+ awFeature: 'system_tracking',
+ actionClass: 'btn List-buttonDefault system-tracking',
+ ngDisabled: 'systemTrackingDisabled || !hostsSelected',
+ showTipWhenDisabled: true,
+ tooltipInnerClass: "Tooltip-wide",
+ ngShow: true
+ },
+ refresh: {
+ mode: 'all',
+ awToolTip: "Refresh the page",
+ ngClick: "refreshGroups()",
+ ngShow: "socketStatus == 'error'",
+ actionClass: 'btn List-buttonDefault',
+ buttonContent: 'REFRESH'
+ },
+ create: {
+ mode: 'all',
+ ngClick: "createHost()",
+ awToolTip: "Create a new host",
+ actionClass: 'btn List-buttonSubmit',
+ buttonContent: '+ ADD HOST',
+ ngShow: 'canAdd',
+ dataPlacement: "top",
+ }
+ }
+
+};
diff --git a/awx/ui/client/src/inventories/manage/hosts/main.js b/awx/ui/client/src/inventories/manage/hosts/main.js
index 1b22bd3d35..b3d514a4f4 100644
--- a/awx/ui/client/src/inventories/manage/hosts/main.js
+++ b/awx/ui/client/src/inventories/manage/hosts/main.js
@@ -8,10 +8,14 @@ import HostsAddController from './hosts-add.controller';
import HostsEditController from './hosts-edit.controller';
import SetStatus from './factories/set-status.factory';
import SetEnabledMsg from './factories/set-enabled-msg.factory';
+import InventoryHosts from './inventory-hosts.list';
+import HostForm from './hosts.form';
export default
angular.module('manageHosts', [])
.factory('SetStatus', SetStatus)
.factory('SetEnabledMsg', SetEnabledMsg)
+ .factory('HostForm', HostForm)
+ .value('InventoryHosts', InventoryHosts)
.controller('HostsAddController', HostsAddController)
.controller('HostEditController', HostsEditController);
diff --git a/awx/ui/client/src/lists/AllJobs.js b/awx/ui/client/src/jobs/all-jobs.list.js
similarity index 97%
rename from awx/ui/client/src/lists/AllJobs.js
rename to awx/ui/client/src/jobs/all-jobs.list.js
index f3aacef09f..f0f3f4fe70 100644
--- a/awx/ui/client/src/lists/AllJobs.js
+++ b/awx/ui/client/src/jobs/all-jobs.list.js
@@ -5,9 +5,7 @@
*************************************************/
-export default
- angular.module('AllJobsDefinition', [])
- .factory('AllJobsList', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
name: 'jobs',
@@ -118,4 +116,4 @@ export default
}
}
};
-}]);
+}];
diff --git a/awx/ui/client/src/jobs/main.js b/awx/ui/client/src/jobs/main.js
index 6045000ef0..2ee309875d 100644
--- a/awx/ui/client/src/jobs/main.js
+++ b/awx/ui/client/src/jobs/main.js
@@ -14,6 +14,7 @@ import RelaunchInventory from './factories/relaunch-inventory.factory';
import RelaunchJob from './factories/relaunch-job.factory';
import RelaunchPlaybook from './factories/relaunch-playbook.factory';
import RelaunchSCM from './factories/relaunch-scm.factory';
+import AllJobsList from './all-jobs.list';
export default
angular.module('JobsModule', [])
@@ -28,4 +29,5 @@ export default
.factory('RelaunchInventory', RelaunchInventory)
.factory('RelaunchJob', RelaunchJob)
.factory('RelaunchPlaybook', RelaunchPlaybook)
- .factory('RelaunchSCM', RelaunchSCM);
+ .factory('RelaunchSCM', RelaunchSCM)
+ .factory('AllJobsList', AllJobsList);
diff --git a/awx/ui/client/src/lists.js b/awx/ui/client/src/lists.js
deleted file mode 100644
index ffe7da6d55..0000000000
--- a/awx/ui/client/src/lists.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-import CloudCredentials from "./lists/CloudCredentials";
-import CompletedJobs from "./lists/CompletedJobs";
-import AllJobs from "./lists/AllJobs";
-import Credentials from "./lists/Credentials";
-import Groups from "./lists/Groups";
-import Hosts from "./lists/Hosts";
-import Inventories from "./lists/Inventories";
-import InventoryGroups from "./lists/InventoryGroups";
-import InventoryHosts from "./lists/InventoryHosts";
-import InventorySources from "./lists/InventorySources";
-import JobEvents from "./lists/JobEvents";
-import JobHosts from "./lists/JobHosts";
-import Jobs from "./lists/Jobs";
-import Organizations from "./lists/Organizations";
-import PortalJobTemplates from "./lists/PortalJobTemplates";
-import PortalJobs from "./lists/PortalJobs";
-import ScheduledJobs from "./lists/ScheduledJobs";
-import Schedules from "./lists/Schedules";
-import Streams from "./lists/Streams";
-import Teams from "./lists/Teams";
-import Templates from "./lists/Templates";
-import Users from "./lists/Users";
-
-export
- { CloudCredentials,
- CompletedJobs,
- AllJobs,
- Credentials,
- Groups,
- Hosts,
- Inventories,
- InventoryGroups,
- InventoryHosts,
- InventorySources,
- JobEvents,
- JobHosts,
- Jobs,
- Organizations,
- PortalJobTemplates,
- PortalJobs,
- ScheduledJobs,
- Schedules,
- Streams,
- Teams,
- Templates,
- Users
- };
diff --git a/awx/ui/client/src/lists/CloudCredentials.js b/awx/ui/client/src/lists/CloudCredentials.js
deleted file mode 100644
index 0010390436..0000000000
--- a/awx/ui/client/src/lists/CloudCredentials.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-
-
-
-export default
- angular.module('CloudCredentialsListDefinition', [])
- .value('CloudCredentialList', {
-
- name: 'cloudcredentials',
- iterator: 'cloudcredential',
- selectTitle: 'Add Cloud Credentials',
- editTitle: 'CLOUD CREDENTIALS',
- selectInstructions: 'Select existing credentials by clicking each credential or checking the related checkbox. When finished, click the blue ' +
- 'Select button, located bottom right.
Create a brand new credential by clicking the button.
',
- index: false,
- hover: true,
-
- fields: {
- name: {
- key: true,
- label: 'Name'
- },
- description: {
- label: 'Description',
- excludeModal: false
- },
- team: {
- label: 'Team',
- ngBind: 'credential.team_name',
- sourceModel: 'team',
- sourceField: 'name',
- excludeModal: true
- },
- user: {
- label: 'User',
- ngBind: 'credential.user_username',
- sourceModel: 'user',
- sourceField: 'username',
- excludeModal: true
- }
- },
-
- actions: {
- add: {
- mode: 'all', // One of: edit, select, all
- ngClick: 'addCredential()',
- awToolTip: 'Create a new credential',
- actionClass: 'btn btn-sm List-buttonSubmit',
- buttonContent: '+ ADD'
- }
- },
-
- fieldActions: {
- edit: {
- ngClick: "editCredential(credential.id)",
- icon: 'fa-edit',
- label: 'Edit',
- "class": 'btn-sm',
- awToolTip: 'Edit credential',
- dataPlacement: 'top'
- },
-
- "delete": {
- ngClick: "deleteCredential(credential.id, credential.name)",
- icon: 'fa-trash-o',
- label: 'Delete',
- "class": 'btn-sm',
- awToolTip: 'Delete credential',
- dataPlacement: 'top'
- }
- }
- });
diff --git a/awx/ui/client/src/lists/Groups.js b/awx/ui/client/src/lists/Groups.js
deleted file mode 100644
index 205adde477..0000000000
--- a/awx/ui/client/src/lists/Groups.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-
-
-
-export default
- angular.module('GroupListDefinition', [])
- .value('CopyMoveGroupList', {
-
- name: 'groups',
- iterator: 'copy',
- selectTitle: 'Copy Groups',
- index: false,
- well: false,
- emptyListText: 'PLEASE CREATE ADDITIONAL GROUPS / HOSTS TO PERFORM THIS ACTION',
- fields: {
- name: {
- key: true,
- label: 'Target Group Name'
- }
- },
- basePath: 'api/v1/inventories/{{$stateParams.inventory_id}}/groups'
- });
diff --git a/awx/ui/client/src/lists/Hosts.js b/awx/ui/client/src/lists/Hosts.js
deleted file mode 100644
index 5dc875f6af..0000000000
--- a/awx/ui/client/src/lists/Hosts.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-export default
- angular.module('HostListDefinition', [])
- .value('HostList', {
-
- name: 'copy_hosts',
- iterator: 'copy_host',
- selectTitle: 'Add Existing Hosts',
- editTitle: 'Hosts',
- index: false,
- well: false,
-
- fields: {
- name: {
- key: true,
- label: 'Host Name'
- }
- },
-
- actions: { },
-
- fieldActions: { }
- });
diff --git a/awx/ui/client/src/lists/InventoryGroups.js b/awx/ui/client/src/lists/InventoryGroups.js
deleted file mode 100644
index 1a5d0b989a..0000000000
--- a/awx/ui/client/src/lists/InventoryGroups.js
+++ /dev/null
@@ -1,170 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-export default
- angular.module('InventoryGroupsDefinition', [])
- .value('InventoryGroups', {
-
- name: 'groups',
- iterator: 'group',
- editTitle: '{{ inventory.name }}',
- listTitle: 'GROUPS',
- searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
- showTitle: false,
- well: true,
- index: false,
- hover: true,
- 'class': 'table-no-border',
- multiSelect: true,
- trackBy: 'group.id',
-
- fields: {
- sync_status: {
- label: '',
- nosort: true,
- mode: 'all',
- iconOnly: true,
- ngClick: 'viewUpdateStatus(group.id)',
- awToolTip: "{{ group.status_tooltip }}",
- dataTipWatch: "group.status_tooltip",
- icon: "{{ 'fa icon-cloud-' + group.status_class }}",
- ngClass: "group.status_class",
- dataPlacement: "top",
- columnClass: 'status-column List-staticColumn--smallStatus'
- },
- failed_hosts: {
- label: '',
- nosort: true,
- mode: 'all',
- iconOnly: true,
- awToolTip: "{{ group.hosts_status_tip }}",
- dataPlacement: "top",
- ngClick: "showFailedHosts(group)",
- icon: "{{ 'fa icon-job-' + group.hosts_status_class }}",
- columnClass: 'status-column List-staticColumn--smallStatus'
- },
- name: {
- label: 'Groups',
- key: true,
- ngClick: "groupSelect(group.id)",
- columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6',
- class: 'InventoryManage-breakWord',
- },
- total_groups: {
- nosort: true,
- label: '',
- type: 'badgeCount',
- ngHide: 'group.total_groups == 0',
- noLink: true,
- awToolTip: "{{group.name | sanitize}} contains {{group.total_groups}} {{group.total_groups === 1 ? 'child' : 'children'}}"
- }
- },
-
- actions: {
- refresh: {
- mode: 'all',
- awToolTip: "Refresh the page",
- ngClick: "refreshGroups()",
- ngShow: "socketStatus == 'error'",
- actionClass: 'btn List-buttonDefault',
- buttonContent: 'REFRESH'
- },
- launch: {
- mode: 'all',
- // $scope.$parent is governed by InventoryManageController,
- ngDisabled: '!$parent.groupsSelected && !$parent.hostsSelected',
- ngClick: '$parent.setAdhocPattern()',
- awToolTip: "Select an inventory source by clicking the check box beside it. The inventory source can be a single group or host, a selection of multiple hosts, or a selection of multiple groups.",
- dataTipWatch: "adhocCommandTooltip",
- actionClass: 'btn List-buttonDefault',
- buttonContent: 'RUN COMMANDS',
- showTipWhenDisabled: true,
- tooltipInnerClass: "Tooltip-wide",
- ngShow: 'canAdhoc'
- // TODO: set up a tip watcher and change text based on when
- // things are selected/not selected. This is started and
- // commented out in the inventory controller within the watchers.
- // awToolTip: "{{ adhocButtonTipContents }}",
- // dataTipWatch: "adhocButtonTipContents"
- },
- create: {
- mode: 'all',
- ngClick: "createGroup()",
- awToolTip: "Create a new group",
- actionClass: 'btn List-buttonSubmit',
- buttonContent: '+ ADD GROUP',
- ngShow: 'canAdd',
- dataPlacement: "top",
- }
- },
-
- fieldActions: {
-
- columnClass: 'col-lg-6 col-md-6 col-sm-6 col-xs-6 text-right',
-
- group_update: {
- //label: 'Sync',
- mode: 'all',
- ngClick: 'updateGroup(group)',
- awToolTip: "{{ group.launch_tooltip }}",
- dataTipWatch: "group.launch_tooltip",
- ngShow: "(group.status !== 'running' && group.status " +
- "!== 'pending' && group.status !== 'updating') && group.summary_fields.user_capabilities.start",
- ngClass: "group.launch_class",
- dataPlacement: "top",
- },
- cancel: {
- //label: 'Cancel',
- mode: 'all',
- ngClick: "cancelUpdate(group.id)",
- awToolTip: "Cancel sync process",
- 'class': 'red-txt',
- ngShow: "(group.status == 'running' || group.status == 'pending' " +
- "|| group.status == 'updating') && group.summary_fields.user_capabilities.start",
- dataPlacement: "top",
- iconClass: "fa fa-minus-circle"
- },
- copy: {
- mode: 'all',
- ngClick: "copyMoveGroup(group.id)",
- awToolTip: 'Copy or move group',
- ngShow: "group.id > 0 && group.summary_fields.user_capabilities.copy",
- dataPlacement: "top"
- },
- schedule: {
- mode: 'all',
- ngClick: "scheduleGroup(group.id)",
- awToolTip: "{{ group.group_schedule_tooltip }}",
- ngClass: "group.scm_type_class",
- dataPlacement: 'top',
- ngShow: "!(group.summary_fields.inventory_source.source === '')"
- },
- edit: {
- //label: 'Edit',
- mode: 'all',
- ngClick: "editGroup(group.id)",
- awToolTip: 'Edit group',
- dataPlacement: "top",
- ngShow: "group.summary_fields.user_capabilities.edit"
- },
- view: {
- //label: 'Edit',
- mode: 'all',
- ngClick: "editGroup(group.id)",
- awToolTip: 'View group',
- dataPlacement: "top",
- ngShow: "!group.summary_fields.user_capabilities.edit"
- },
- "delete": {
- //label: 'Delete',
- mode: 'all',
- ngClick: "deleteGroup(group)",
- awToolTip: 'Delete group',
- dataPlacement: "top",
- ngShow: "group.summary_fields.user_capabilities.delete"
- }
- }
- });
diff --git a/awx/ui/client/src/lists/InventoryHosts.js b/awx/ui/client/src/lists/InventoryHosts.js
deleted file mode 100644
index f65c818893..0000000000
--- a/awx/ui/client/src/lists/InventoryHosts.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-export default
- angular.module('InventoryHostsDefinition', [])
- .value('InventoryHosts', {
-
- name: 'hosts',
- iterator: 'host',
- editTitle: '{{ selected_group }}',
- listTitle: 'HOSTS',
- searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
- showTitle: false,
- well: true,
- index: false,
- hover: true,
- hasChildren: true,
- 'class': 'table-no-border',
- multiSelect: true,
- trackBy: 'host.id',
-
- fields: {
- active_failures: {
- label: '',
- iconOnly: true,
- nosort: true,
- // do not remove this ng-click directive
- // the list generator case to handle fields without ng-click
- // cannot handle the aw-* directives
- ngClick: 'noop()',
- awPopOver: "{{ host.job_status_html }}",
- dataTitle: "{{ host.job_status_title }}",
- awToolTip: "{{ host.badgeToolTip }}",
- dataPlacement: 'top',
- icon: "{{ 'fa icon-job-' + host.active_failures }}",
- id: 'active-failures-action',
- columnClass: 'status-column List-staticColumn--smallStatus'
- },
- name: {
- key: true,
- label: 'Hosts',
- ngClick: "editHost(host.id)",
- ngClass: "{ 'host-disabled-label': !host.enabled }",
- columnClass: 'col-lg-6 col-md-8 col-sm-8 col-xs-7',
- dataHostId: "{{ host.id }}",
- dataType: "host",
- class: 'InventoryManage-breakWord'
- }
- },
-
- fieldActions: {
-
- columnClass: 'col-lg-6 col-md-4 col-sm-4 col-xs-5 text-right',
- copy: {
- mode: 'all',
- ngClick: "copyMoveHost(host.id)",
- awToolTip: 'Copy or move host to another group',
- dataPlacement: "top",
- ngShow: 'host.summary_fields.user_capabilities.edit'
- },
- edit: {
- //label: 'Edit',
- ngClick: "editHost(host.id)",
- icon: 'icon-edit',
- awToolTip: 'Edit host',
- dataPlacement: 'top',
- ngShow: 'host.summary_fields.user_capabilities.edit'
- },
- view: {
- //label: 'Edit',
- ngClick: "editHost(host.id)",
- awToolTip: 'View host',
- dataPlacement: 'top',
- ngShow: '!host.summary_fields.user_capabilities.edit'
- },
- "delete": {
- //label: 'Delete',
- ngClick: "deleteHost(host.id, host.name)",
- icon: 'icon-trash',
- awToolTip: 'Delete host',
- dataPlacement: 'top',
- ngShow: 'host.summary_fields.user_capabilities.delete'
- }
- },
-
- actions: {
- system_tracking: {
- buttonContent: 'System Tracking',
- ngClick: 'systemTracking()',
- awToolTip: "Select one or two hosts by clicking the checkbox beside the host. System tracking offers the ability to compare the results of two scan runs from different dates on one host or the same date on two hosts.",
- dataTipWatch: "systemTrackingTooltip",
- dataPlacement: 'top',
- awFeature: 'system_tracking',
- actionClass: 'btn List-buttonDefault system-tracking',
- ngDisabled: 'systemTrackingDisabled || !hostsSelected',
- showTipWhenDisabled: true,
- tooltipInnerClass: "Tooltip-wide",
- ngShow: true
- },
- refresh: {
- mode: 'all',
- awToolTip: "Refresh the page",
- ngClick: "refreshGroups()",
- ngShow: "socketStatus == 'error'",
- actionClass: 'btn List-buttonDefault',
- buttonContent: 'REFRESH'
- },
- create: {
- mode: 'all',
- ngClick: "createHost()",
- awToolTip: "Create a new host",
- actionClass: 'btn List-buttonSubmit',
- buttonContent: '+ ADD HOST',
- ngShow: 'canAdd',
- dataPlacement: "top",
- }
- }
-
- });
diff --git a/awx/ui/client/src/lists/InventorySources.js b/awx/ui/client/src/lists/InventorySources.js
deleted file mode 100644
index e8643da9f8..0000000000
--- a/awx/ui/client/src/lists/InventorySources.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*************************************************
- * Copyright (c) 2016 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-
-export default
- angular.module('InventorySourcesListDefinition', [])
- .value('InventorySourcesList', {
-
- name: 'workflow_inventory_sources',
- iterator: 'inventory_source',
- basePath: 'inventory_sources',
- listTitle: 'INVENTORY SOURCES',
- index: false,
- hover: true,
-
- fields: {
- name: {
- label: 'Name',
- ngBind: 'inventory_source.summary_fields.group.name',
- columnClass: 'col-md-11',
- simpleTip: {
- awToolTip: "Inventory: {{inventory_source.summary_fields.inventory.name}}",
- dataPlacement: "top"
- }
- }
- },
-
- actions: {},
-
- fieldActions: {}
- });
diff --git a/awx/ui/client/src/lists/JobEvents.js b/awx/ui/client/src/lists/JobEvents.js
deleted file mode 100644
index 97fc68cc61..0000000000
--- a/awx/ui/client/src/lists/JobEvents.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-
-export default
- angular.module('JobEventsListDefinition', [])
- .factory('JobEventList', ['i18n', function(i18n) {
- return {
-
- name: 'jobevents',
- iterator: 'jobevent',
- editTitle: i18n._('JOB EVENTS'),
- index: false,
- hover: true,
- "class": "condensed",
- hasChildren: true,
- filterBy: '{ show: true }',
-
- navigationLinks: {
- //details: {
- // href: '/#/jobs/{{ job_id }}',
- // label: 'Status',
- // icon: 'icon-zoom-in',
- // ngShow: 'job_id !== null'
- //},
- events: {
- href: '/#/job_events/{{ job_id }}',
- label: i18n._('Events'),
- active: true,
- icon: 'icon-list-ul'
- },
- hosts: {
- href: '/#/job_host_summaries/{{ job_id }}',
- label: i18n._('Host Summary'),
- icon: 'icon-laptop'
- }
- },
-
- fields: {
- created: {
- label: i18n._('Created On'),
- columnClass: 'col-lg-1 col-md-1 hidden-sm hidden-xs',
- key: true,
- nosort: true,
- noLink: true
- },
- status: {
- label: i18n._('Status'),
- showValue: false,
- columnClass: 'col-sm-1 col-xs-2 text-center',
- nosort: true,
- ngClick: 'viewJobEvent(jobevent.id)',
- awToolTip: '{{ jobevent.statusBadgeToolTip }}',
- dataPlacement: 'top',
- badgeIcon: 'fa icon-job-{{ jobevent.status }}',
- badgePlacement: 'left',
- badgeToolTip: '{{ jobevent.statusBadgeToolTip }}',
- badgeTipPlacement: 'top',
- badgeNgClick: 'viewJobEvent(jobevent.id)'
- },
- event_display: {
- label: i18n._('Event'),
- hasChildren: true,
- ngClick: 'toggleChildren(jobevent.id, jobevent.related.children)',
- nosort: true,
- ngClass: '{{ jobevent.class }}',
- appendHTML: 'jobevent.event_detail'
- },
- host: {
- label: i18n._('Host'),
- ngBind: 'jobevent.summary_fields.host.name',
- ngHref: '{{ jobevent.hostLink }}',
- nosort: true,
- id: 'job-event-host-header',
- 'class': 'break',
- columnClass: 'col-lg-2 hidden-sm hidden-xs'
- }
- },
-
- actions: {
- refresh: {
- mode: 'all',
- awToolTip: 'Refresh the page',
- ngClick: 'refresh()',
- actionClass: 'btn List-buttonDefault',
- buttonContent: i18n._('REFRESH')
- }
- },
-
- fieldActions: {
-
- columnClass: 'col-sm-1 col-xs-2',
-
- view: {
- label: i18n._('View'),
- ngClick: 'viewJobEvent(jobevent.id)',
- awToolTip: i18n._('View event details'),
- dataPlacement: 'top'
- }
- }
- };}]);
diff --git a/awx/ui/client/src/lists/JobHosts.js b/awx/ui/client/src/lists/JobHosts.js
deleted file mode 100644
index a38e621a53..0000000000
--- a/awx/ui/client/src/lists/JobHosts.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-
-export default
- angular.module('JobHostDefinition', [])
- .value('JobHostList', {
-
- name: 'jobhosts',
- iterator: 'jobhost',
- editTitle: 'ALL SUMMARIES',
- "class": "table-condensed",
- index: false,
- hover: true,
-
- navigationLinks: {
- ngHide: 'host_id !== null',
- //details: {
- // href: "/#/jobs/{{ job_id }}",
- // label: 'Status',
- // icon: 'icon-zoom-in',
- // ngShow: "job_id !== null"
- //},
- events: {
- href: "/#/job_events/{{ job_id }}",
- label: 'Events',
- icon: 'icon-list-ul'
- },
- hosts: {
- href: "/#/job_host_summariess/{{ job_id }}",
- label: 'Host Summary',
- active: true,
- icon: 'icon-laptop'
- }
- },
-
- fields: {
- host: {
- label: 'Host',
- key: true,
- sourceModel: 'host',
- sourceField: 'name',
- ngBind: 'jobhost.host_name',
- ngHref: "{{ jobhost.hostLinkTo }}"
- },
- status: {
- label: 'Status',
- badgeNgHref: "{{ jobhost.statusLinkTo }}",
- badgeIcon: 'fa icon-job-{{ jobhost.status }}',
- badgePlacement: 'left',
- badgeToolTip: "{{ jobhost.statusBadgeToolTip }}",
- badgeTipPlacement: 'top',
- ngHref: "{{ jobhost.statusLinkTo }}",
- awToolTip: "{{ jobhost.statusBadgeToolTip }}",
- dataPlacement: 'top'
- },
- ok: {
- label: 'Success',
- },
- changed: {
- label: 'Changed',
- },
- failures: {
- label: 'Failure',
- },
- dark: {
- label: 'Unreachable',
- },
- skipped: {
- label: 'Skipped',
- }
- },
-
- actions: {
- help: {
- awPopOver: "\nSuccess Tasks successfully executed on the host. \n" +
- "Changed Actions taken on the host. \n" +
- "Failure Tasks that failed on the host. \n" +
- "Unreachable Times the ansible server could not reach the host. \n" +
- "Skipped Tasks bypassed and not performed on the host due to prior task failure or the host being unreachable. \n" +
- " \n",
- dataPlacement: 'left',
- dataContainer: "body",
- mode: 'all',
- actionClass: 'btn-xs btn-help',
- awToolTip: 'Click for help',
- dataTitle: 'Job Host Summary',
- id: 'jobhost-help-button'
- },
- refresh: {
- mode: 'all',
- awToolTip: "Refresh the page",
- ngClick: "refresh()",
- ngShow: "host_id == null", //don't show when viewing from inventory->hosts
- actionClass: 'btn List-buttonDefault',
- buttonContent: 'REFRESH'
- }
- }
-
- //fieldActions: {}
-
- });
diff --git a/awx/ui/client/src/lists/Jobs.js b/awx/ui/client/src/lists/Jobs.js
deleted file mode 100644
index e03b1f5511..0000000000
--- a/awx/ui/client/src/lists/Jobs.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
-
-export default
- angular.module('JobsListDefinition', [])
- .value( 'JobsList', {
-
- name: 'jobs',
- iterator: 'job',
- editTitle: 'JOBS',
- 'class': 'table-condensed',
- index: false,
- hover: true,
- well: false,
-
- fields: {
- id: {
- label: 'ID',
- ngClick:"viewjobResults(job)",
- key: true,
- desc: true,
- columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2',
- awToolTip: "{{ job.status_tip }}",
- awTipPlacement: "top",
- },
- status: {
- label: '',
- columnClass: 'col-lg-1 col-md-2 col-sm-2 col-xs-2',
- awToolTip: "{{ job.status_tip }}",
- awTipPlacement: "top",
- dataTitle: "{{ job.status_popover_title }}",
- icon: 'icon-job-{{ job.status }}',
- iconOnly: true,
- ngClick:"viewjobResults(job)"
- },
- started: {
- label: 'Started',
- noLink: true,
- filter: "longDate",
- columnClass: "col-lg-2 col-md-2 hidden-xs"
- },
- type: {
- label: 'Type',
- ngBind: 'job.type_label',
- link: false,
- columnClass: "col-lg-2 col-md-2 hidden-sm hidden-xs"
- },
- name: {
- label: 'Name',
- columnClass: 'col-md-3 col-xs-5',
- ngClick: "viewjobResults(job)",
- }
- },
-
- actions: { },
-
- fieldActions: {
- submit: {
- mode: 'all',
- icon: 'icon-rocket',
- ngClick: 'relaunchJob($event, job.id)',
- awToolTip: 'Relaunch using the same parameters',
- dataPlacement: 'top',
- ngHide: "job.type == 'system_job' "
- },
- cancel: {
- mode: 'all',
- ngClick: 'deleteJob(job.id)',
- awToolTip: 'Cancel the job',
- dataPlacement: 'top',
- ngShow: "job.status == 'running'"
- },
- "delete": {
- mode: 'all',
- ngClick: 'deleteJob(job.id)',
- awToolTip: 'Delete the job',
- dataPlacement: 'top',
- ngShow: "job.status != 'running'"
- }
- }
- });
diff --git a/awx/ui/client/src/organizations/add/organizations-add.controller.js b/awx/ui/client/src/organizations/add/organizations-add.controller.js
index 220ba636a5..8224bd5d4c 100644
--- a/awx/ui/client/src/organizations/add/organizations-add.controller.js
+++ b/awx/ui/client/src/organizations/add/organizations-add.controller.js
@@ -8,8 +8,8 @@ export default ['$scope', '$rootScope', '$location', '$stateParams',
'OrganizationForm', 'GenerateForm', 'Rest', 'Alert',
'ProcessErrors', 'ClearScope', 'GetBasePath', 'Wait','$state',
function($scope, $rootScope, $location, $stateParams, OrganizationForm,
- GenerateForm, Rest, Alert, ProcessErrors,
- ClearScope, GetBasePath, Wait, $state) {
+ GenerateForm, Rest, Alert, ProcessErrors, ClearScope, GetBasePath, Wait,
+ $state) {
Rest.setUrl(GetBasePath('organizations'));
Rest.options()
diff --git a/awx/ui/client/src/organizations/edit/organizations-edit.controller.js b/awx/ui/client/src/organizations/edit/organizations-edit.controller.js
index b6ecfae2a4..bb88975235 100644
--- a/awx/ui/client/src/organizations/edit/organizations-edit.controller.js
+++ b/awx/ui/client/src/organizations/edit/organizations-edit.controller.js
@@ -4,12 +4,11 @@
* All Rights Reserved
*************************************************/
-export default ['$scope', '$rootScope', '$location', '$log', '$stateParams',
- 'OrganizationForm', 'Rest', 'Alert', 'ProcessErrors', 'Prompt', 'ClearScope',
- 'GetBasePath', 'Wait', '$state', 'ToggleNotification',
- function($scope, $rootScope, $location, $log, $stateParams,
- OrganizationForm, Rest, Alert, ProcessErrors, Prompt, ClearScope,
- GetBasePath, Wait, $state, ToggleNotification) {
+export default ['$scope', '$location', '$stateParams', 'OrganizationForm',
+ 'Rest', 'ProcessErrors', 'Prompt', 'ClearScope', 'GetBasePath', 'Wait',
+ '$state', 'ToggleNotification', function($scope, $location, $stateParams,
+ OrganizationForm, Rest, ProcessErrors, Prompt, ClearScope, GetBasePath,
+ Wait, $state, ToggleNotification) {
ClearScope();
diff --git a/awx/ui/client/src/organizations/linkout/addUsers/addUsers.controller.js b/awx/ui/client/src/organizations/linkout/addUsers/addUsers.controller.js
index 5db0ffeac2..6be109865a 100644
--- a/awx/ui/client/src/organizations/linkout/addUsers/addUsers.controller.js
+++ b/awx/ui/client/src/organizations/linkout/addUsers/addUsers.controller.js
@@ -11,11 +11,13 @@
* Controller for handling permissions adding
*/
-export default ['$scope', '$rootScope', 'ProcessErrors', 'GetBasePath', 'generateList',
-'templateUrl', '$state', 'Rest', '$q', 'Wait', '$window', 'QuerySet', 'UserList',
-function($scope, $rootScope, ProcessErrors, GetBasePath, generateList,
- templateUrl, $state, Rest, $q, Wait, $window, qs, UserList) {
- $scope.$on("linkLists", function() {
+export default ['$scope', '$rootScope', 'ProcessErrors', 'GetBasePath',
+ 'generateList', '$state', 'Rest', '$q', 'Wait', '$window', 'QuerySet',
+ 'UserList',
+ function($scope, $rootScope, ProcessErrors, GetBasePath, generateList,
+ $state, Rest, $q, Wait, $window, qs, UserList) {
+
+ $scope.$on("linkLists", function() {
if ($state.current.name.split(".")[1] === "users") {
$scope.addType = "Users";
diff --git a/awx/ui/client/src/organizations/linkout/addUsers/addUsers.directive.js b/awx/ui/client/src/organizations/linkout/addUsers/addUsers.directive.js
index 65c721be17..83bd03f8e8 100644
--- a/awx/ui/client/src/organizations/linkout/addUsers/addUsers.directive.js
+++ b/awx/ui/client/src/organizations/linkout/addUsers/addUsers.directive.js
@@ -6,56 +6,56 @@
/* jshint unused: vars */
import addUsers from './addUsers.controller';
-export default
- ['Wait', 'templateUrl', '$state', '$view', '$compile', function(Wait, templateUrl, $state, $view, $compile) {
- return {
- restrict: 'E',
- scope: {
- addUsersType: '@'
- },
- controller: addUsers,
- templateUrl: templateUrl('organizations/linkout/addUsers/addUsers'),
- link: function(scope, element, attrs, ctrl) {
+export default ['Wait', 'templateUrl', '$compile', function(Wait, templateUrl,
+ $compile) {
+ return {
+ restrict: 'E',
+ scope: {
+ addUsersType: '@'
+ },
+ controller: addUsers,
+ templateUrl: templateUrl('organizations/linkout/addUsers/addUsers'),
+ link: function(scope, element, attrs, ctrl) {
- $("body").addClass("is-modalOpen");
+ $("body").addClass("is-modalOpen");
- $("body").append(element);
+ $("body").append(element);
- Wait('start');
+ Wait('start');
- scope.$broadcast("linkLists");
+ scope.$broadcast("linkLists");
- setTimeout(function() {
- $('#add-users-modal').modal("show");
- }, 200);
+ setTimeout(function() {
+ $('#add-users-modal').modal("show");
+ }, 200);
- $('.modal[aria-hidden=false]').each(function () {
- if ($(this).attr('id') !== 'add-users-modal') {
- $(this).modal('hide');
- }
- });
+ $('.modal[aria-hidden=false]').each(function () {
+ if ($(this).attr('id') !== 'add-users-modal') {
+ $(this).modal('hide');
+ }
+ });
- scope.closeModal = function() {
- $("body").removeClass("is-modalOpen");
- $('#add-users-modal').on('hidden.bs.modal',
- function () {
- $('.AddUsers').remove();
- });
- $('#add-users-modal').modal('hide');
- };
+ scope.closeModal = function() {
+ $("body").removeClass("is-modalOpen");
+ $('#add-users-modal').on('hidden.bs.modal',
+ function () {
+ $('.AddUsers').remove();
+ });
+ $('#add-users-modal').modal('hide');
+ };
- scope.$on('closeUsersModal', function() {
- scope.closeModal();
- });
+ scope.$on('closeUsersModal', function() {
+ scope.closeModal();
+ });
- scope.compileList = function(html) {
- $('#add-users-list').append($compile(html)(scope));
- };
+ scope.compileList = function(html) {
+ $('#add-users-list').append($compile(html)(scope));
+ };
- Wait('stop');
+ Wait('stop');
- window.scrollTo(0,0);
- }
- };
- }
- ];
+ window.scrollTo(0,0);
+ }
+ };
+ }
+];
diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js
index ad232d443c..a19d081083 100644
--- a/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js
+++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js
@@ -4,13 +4,11 @@
* All Rights Reserved
*************************************************/
-export default ['$stateParams', '$scope', 'UserList', 'Rest', '$state',
- 'generateList', '$compile', 'Wait', 'OrgAdminList',
- 'OrgAdminsDataset',
- 'Prompt', 'ProcessErrors', 'GetBasePath', '$filter',
- function($stateParams, $scope, UserList, Rest, $state, GenerateList,
- $compile, Wait, OrgAdminList, OrgAdminsDataset, Prompt, ProcessErrors,
- GetBasePath, $filter) {
+export default ['$stateParams', '$scope', 'Rest', '$state', '$compile', 'Wait',
+ 'OrgAdminList', 'OrgAdminsDataset', 'Prompt', 'ProcessErrors',
+ 'GetBasePath', '$filter',
+ function($stateParams, $scope, Rest, $state, $compile, Wait, OrgAdminList,
+ OrgAdminsDataset, Prompt, ProcessErrors, GetBasePath, $filter) {
var orgBase = GetBasePath('organizations');
diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-job-templates.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-job-templates.controller.js
index 3f81b1550b..79b58beeae 100644
--- a/awx/ui/client/src/organizations/linkout/controllers/organizations-job-templates.controller.js
+++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-job-templates.controller.js
@@ -4,15 +4,12 @@
* All Rights Reserved
*************************************************/
-export default ['$scope', '$rootScope', '$location', '$log',
- '$stateParams', 'Rest', 'Alert', 'Prompt', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
- 'GetBasePath', 'JobTemplateForm', 'InitiatePlaybookRun', 'Wait', 'TemplateCopyService',
- '$compile', '$state', 'OrgJobTemplateList', 'OrgJobTemplateDataset', 'QuerySet',
- function($scope, $rootScope, $location, $log,
- $stateParams, Rest, Alert, Prompt, ReturnToCaller, ClearScope, ProcessErrors,
- GetBasePath, JobTemplateForm, InitiatePlaybookRun, Wait, TemplateCopyService,
- $compile, $state, OrgJobTemplateList, Dataset, qs) {
-
+export default ['$scope', '$rootScope', '$stateParams', 'Rest', 'ProcessErrors',
+ 'GetBasePath', 'InitiatePlaybookRun', 'Wait', 'TemplateCopyService',
+ '$state', 'OrgJobTemplateList', 'OrgJobTemplateDataset', 'QuerySet',
+ function($scope, $rootScope, $stateParams, Rest, ProcessErrors, GetBasePath,
+ InitiatePlaybookRun, Wait, TemplateCopyService, $state, OrgJobTemplateList,
+ Dataset, qs) {
var list = OrgJobTemplateList,
orgBase = GetBasePath('organizations');
diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js
index 5f112f47c0..e1bc8e72eb 100644
--- a/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js
+++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js
@@ -4,15 +4,14 @@
* All Rights Reserved
*************************************************/
-export default ['$scope', '$rootScope', '$location', '$log',
- '$stateParams', 'Rest', 'Alert', 'Prompt',
- 'ReturnToCaller', 'ClearScope', 'OrgProjectList', 'OrgProjectDataset',
- 'ProcessErrors', 'GetBasePath', 'ProjectUpdate',
- 'Wait', 'GetChoices', 'Empty', 'Find', 'GetProjectIcon', 'GetProjectToolTip', '$filter', '$state',
- function($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, Prompt,
- ReturnToCaller, ClearScope, OrgProjectList, Dataset,
- ProcessErrors, GetBasePath, ProjectUpdate,
- Wait, GetChoices, Empty, Find, GetProjectIcon, GetProjectToolTip, $filter, $state) {
+export default ['$scope', '$rootScope', '$log', '$stateParams', 'Rest', 'Alert',
+ 'OrgProjectList', 'OrgProjectDataset', 'ProcessErrors', 'GetBasePath',
+ 'ProjectUpdate', 'Wait', 'GetChoices', 'Empty', 'Find', 'GetProjectIcon',
+ 'GetProjectToolTip', '$filter', '$state',
+ function($scope, $rootScope, $log, $stateParams, Rest, Alert,
+ OrgProjectList, Dataset, ProcessErrors, GetBasePath, ProjectUpdate,
+ Wait, GetChoices, Empty, Find, GetProjectIcon, GetProjectToolTip, $filter,
+ $state) {
var list = OrgProjectList,
projUrl,
diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-teams.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-teams.controller.js
index 3589328bb3..b9f2f9b5b2 100644
--- a/awx/ui/client/src/organizations/linkout/controllers/organizations-teams.controller.js
+++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-teams.controller.js
@@ -4,15 +4,10 @@
* All Rights Reserved
*************************************************/
-export default ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'OrgTeamList',
- 'Rest', 'Alert', 'Prompt', 'OrgTeamsDataset', 'ReturnToCaller', 'ClearScope',
- 'ProcessErrors', 'GetBasePath',
- 'Wait', '$state',
- function($scope, $rootScope, $location, $log, $stateParams, OrgTeamList,
- Rest, Alert, Prompt, Dataset, ReturnToCaller, ClearScope,
- ProcessErrors, GetBasePath,
- Wait, $state) {
-
+export default ['$scope', '$stateParams', 'OrgTeamList', 'Rest',
+ 'OrgTeamsDataset', 'GetBasePath', 'Wait', '$state',
+ function($scope, $stateParams, OrgTeamList, Rest, Dataset, GetBasePath,
+ Wait, $state) {
var list = OrgTeamList,
orgBase = GetBasePath('organizations');
diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js
index eca7c86729..9949381906 100644
--- a/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js
+++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js
@@ -5,11 +5,10 @@
*************************************************/
export default ['$stateParams', '$scope', 'OrgUserList','Rest', '$state',
- 'generateList', '$compile', 'Wait', 'OrgUsersDataset',
- 'Prompt', 'ProcessErrors', 'GetBasePath', '$filter',
- function($stateParams, $scope, OrgUserList, Rest, $state, GenerateList,
- $compile, Wait, OrgUsersDataset, Prompt, ProcessErrors,
- GetBasePath, $filter) {
+ '$compile', 'Wait', 'OrgUsersDataset', 'Prompt', 'ProcessErrors',
+ 'GetBasePath', '$filter',
+ function($stateParams, $scope, OrgUserList, Rest, $state, $compile, Wait,
+ OrgUsersDataset, Prompt, ProcessErrors, GetBasePath, $filter) {
var orgBase = GetBasePath('organizations');
diff --git a/awx/ui/client/src/organizations/main.js b/awx/ui/client/src/organizations/main.js
index 076c89d1aa..3871049e97 100644
--- a/awx/ui/client/src/organizations/main.js
+++ b/awx/ui/client/src/organizations/main.js
@@ -10,6 +10,8 @@ import OrganizationsAdd from './add/organizations-add.controller';
import OrganizationsEdit from './edit/organizations-edit.controller';
import organizationsLinkout from './linkout/main';
import OrganizationsLinkoutStates from './linkout/organizations-linkout.route';
+import OrganizationForm from './organizations.form';
+import OrganizationList from './organizations.list';
import { N_ } from '../i18n';
@@ -20,6 +22,8 @@ angular.module('Organizations', [
.controller('OrganizationsList', OrganizationsList)
.controller('OrganizationsAdd', OrganizationsAdd)
.controller('OrganizationsEdit', OrganizationsEdit)
+ .factory('OrganizationForm', OrganizationForm)
+ .factory('OrganizationList', OrganizationList)
.config(['$stateProvider', 'stateDefinitionsProvider', '$stateExtenderProvider',
function($stateProvider, stateDefinitionsProvider, $stateExtenderProvider) {
let stateExtender = $stateExtenderProvider.$get(),
diff --git a/awx/ui/client/src/forms/Organizations.js b/awx/ui/client/src/organizations/organizations.form.js
similarity index 80%
rename from awx/ui/client/src/forms/Organizations.js
rename to awx/ui/client/src/organizations/organizations.form.js
index 49ce02afa9..da2b61fa6a 100644
--- a/awx/ui/client/src/forms/Organizations.js
+++ b/awx/ui/client/src/organizations/organizations.form.js
@@ -10,10 +10,10 @@
* @description This form is for adding/editing an organization
*/
-export default
- angular.module('OrganizationFormDefinition', [])
- .factory('OrganizationFormObject', ['i18n', function(i18n) {
- return {
+export default ['NotificationsList', 'i18n',
+ function(NotificationsList, i18n) {
+ return function() {
+ var OrganizationFormObject = {
addTitle: i18n._('NEW ORGANIZATION'), //Title in add mode
editTitle: '{{ name }}', //Title in edit mode
@@ -98,18 +98,15 @@ export default
}
}
- };}])
+ };
- .factory('OrganizationForm', ['OrganizationFormObject', 'NotificationsList',
- function(OrganizationFormObject, NotificationsList) {
- return function() {
- var itm;
- for (itm in OrganizationFormObject.related) {
- if (OrganizationFormObject.related[itm].include === "NotificationsList") {
- OrganizationFormObject.related[itm] = NotificationsList;
- OrganizationFormObject.related[itm].generateList = true; // tell form generator to call list generator and inject a list
- }
- }
- return OrganizationFormObject;
- };
- }]);
+ var itm;
+ for (itm in OrganizationFormObject.related) {
+ if (OrganizationFormObject.related[itm].include === "NotificationsList") {
+ OrganizationFormObject.related[itm] = NotificationsList;
+ OrganizationFormObject.related[itm].generateList = true; // tell form generator to call list generator and inject a list
+ }
+ }
+ return OrganizationFormObject;
+ };
+}];
diff --git a/awx/ui/client/src/lists/Organizations.js b/awx/ui/client/src/organizations/organizations.list.js
similarity index 93%
rename from awx/ui/client/src/lists/Organizations.js
rename to awx/ui/client/src/organizations/organizations.list.js
index b0eff989c6..410a98293e 100644
--- a/awx/ui/client/src/lists/Organizations.js
+++ b/awx/ui/client/src/organizations/organizations.list.js
@@ -5,17 +5,15 @@
*************************************************/
-export default
- angular.module('OrganizationListDefinition', [])
- .value('OrganizationList', {
-
+export default [function() {
+ return {
name: 'organizations',
iterator: 'organization',
selectTitle: 'Add Organizations',
selectInstructions: 'Select existing organizations by clicking each organization or checking the related checkbox. When finished, ' +
'click the blue Select button, located bottom right.
Create a new organization by clicking the ' +
' button.
',
- editTitle: 'ORGANIZATIONS',
+ editTitle: 'Organizations',
hover: true,
index: false,
@@ -62,4 +60,5 @@ export default
dataPlacement: 'top'
}
}
- });
+ };
+}];
diff --git a/awx/ui/client/src/portal-mode/main.js b/awx/ui/client/src/portal-mode/main.js
index 7ba8246c05..8abcdaf630 100644
--- a/awx/ui/client/src/portal-mode/main.js
+++ b/awx/ui/client/src/portal-mode/main.js
@@ -5,9 +5,13 @@
*************************************************/
import route from './portal-mode.route';
+import PortalJobsList from './portal-jobs.list';
+import PortalJobTemplateList from './portal-job-templates.list';
export default
angular.module('portalMode', [])
+ .factory('PortalJobsList', PortalJobsList)
+ .factory('PortalJobTemplateList', PortalJobTemplateList)
.run(['$stateExtender', function($stateExtender){
$stateExtender.addState(route);
- }]);
\ No newline at end of file
+ }]);
diff --git a/awx/ui/client/src/lists/PortalJobTemplates.js b/awx/ui/client/src/portal-mode/portal-job-templates.list.js
similarity index 89%
rename from awx/ui/client/src/lists/PortalJobTemplates.js
rename to awx/ui/client/src/portal-mode/portal-job-templates.list.js
index 234b1b6a45..a0ca8e83e1 100644
--- a/awx/ui/client/src/lists/PortalJobTemplates.js
+++ b/awx/ui/client/src/portal-mode/portal-job-templates.list.js
@@ -5,9 +5,7 @@
*************************************************/
-export default
- angular.module('PortalJobTemplatesListDefinition', [])
- .factory('PortalJobTemplateList', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
name: 'job_templates',
@@ -43,4 +41,4 @@ export default
dataPlacement: 'top'
}
}
- };}]);
+ };}];
diff --git a/awx/ui/client/src/lists/PortalJobs.js b/awx/ui/client/src/portal-mode/portal-jobs.list.js
similarity index 90%
rename from awx/ui/client/src/lists/PortalJobs.js
rename to awx/ui/client/src/portal-mode/portal-jobs.list.js
index 57a17b1e5d..e2d74c6c21 100644
--- a/awx/ui/client/src/lists/PortalJobs.js
+++ b/awx/ui/client/src/portal-mode/portal-jobs.list.js
@@ -5,9 +5,7 @@
*************************************************/
-export default
- angular.module('PortalJobsListDefinition', [])
- .factory('PortalJobsList', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
name: 'jobs',
@@ -44,4 +42,4 @@ export default
},
actions: { }
- };}]);
+ };}];
diff --git a/awx/ui/client/src/projects/projects.form.js b/awx/ui/client/src/projects/projects.form.js
index ed73564f8d..578e723c88 100644
--- a/awx/ui/client/src/projects/projects.form.js
+++ b/awx/ui/client/src/projects/projects.form.js
@@ -13,7 +13,6 @@
export default ['i18n', 'NotificationsList', function(i18n, NotificationsList) {
return function() {
var projectsFormObj = {
-
addTitle: i18n._('NEW PROJECT'),
editTitle: '{{ name }}',
name: 'project',
diff --git a/awx/ui/client/src/scheduler/main.js b/awx/ui/client/src/scheduler/main.js
index 4536261d0c..1d08e673dd 100644
--- a/awx/ui/client/src/scheduler/main.js
+++ b/awx/ui/client/src/scheduler/main.js
@@ -16,6 +16,8 @@ import EditSchedule from './factories/edit-schedule.factory';
import RRuleToAPI from './factories/r-rule-to-api.factory';
import SchedulePost from './factories/schedule-post.factory';
import ToggleSchedule from './factories/toggle-schedule.factory';
+import SchedulesList from './schedules.list';
+import ScheduledJobsList from './scheduled-jobs.list';
export default
angular.module('scheduler', [])
@@ -28,6 +30,8 @@ export default
.factory('RRuleToAPI', RRuleToAPI)
.factory('SchedulePost', SchedulePost)
.factory('ToggleSchedule', ToggleSchedule)
+ .factory('SchedulesList', SchedulesList)
+ .factory('ScheduledJobsList', ScheduledJobsList)
.directive('schedulerDatePicker', schedulerDatePicker)
.run(['$stateExtender', function($stateExtender) {
// Inventory sync schedule states registered in: awx/ui/client/src/inventories/manage/groups/main.js
diff --git a/awx/ui/client/src/lists/ScheduledJobs.js b/awx/ui/client/src/scheduler/scheduled-jobs.list.js
similarity index 95%
rename from awx/ui/client/src/lists/ScheduledJobs.js
rename to awx/ui/client/src/scheduler/scheduled-jobs.list.js
index f134dca1c8..709a98bd3c 100644
--- a/awx/ui/client/src/lists/ScheduledJobs.js
+++ b/awx/ui/client/src/scheduler/scheduled-jobs.list.js
@@ -5,9 +5,7 @@
*************************************************/
-export default
- angular.module('ScheduledJobsDefinition', [])
- .factory('ScheduledJobsList', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
name: 'schedules',
@@ -85,4 +83,4 @@ export default
ngShow: 'schedule.summary_fields.user_capabilities.delete'
}
}
- };}]);
+ };}];
diff --git a/awx/ui/client/src/lists/Schedules.js b/awx/ui/client/src/scheduler/schedules.list.js
similarity index 96%
rename from awx/ui/client/src/lists/Schedules.js
rename to awx/ui/client/src/scheduler/schedules.list.js
index 126650b5b4..5bf3341962 100644
--- a/awx/ui/client/src/lists/Schedules.js
+++ b/awx/ui/client/src/scheduler/schedules.list.js
@@ -5,9 +5,7 @@
*************************************************/
-export default
- angular.module('SchedulesListDefinition', [])
- .factory('SchedulesList', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
name: 'schedules',
@@ -97,4 +95,4 @@ export default
ngShow: 'schedule.summary_fields.user_capabilities.delete'
}
}
- };}]);
+ };}];
diff --git a/awx/ui/client/src/shared/directives.js b/awx/ui/client/src/shared/directives.js
index 88b491527a..bdd9dc2462 100644
--- a/awx/ui/client/src/shared/directives.js
+++ b/awx/ui/client/src/shared/directives.js
@@ -745,9 +745,6 @@ function(ConfigurationUtils, i18n, $rootScope) {
.directive('awToolTip', [function() {
return {
link: function(scope, element, attrs) {
- // if (attrs.class.indexOf("JobResultsStdOut") > -1) {
- // debugger;
- // }
var delay = { show: 200, hide: 0 },
placement,
stateChangeWatcher;
diff --git a/awx/ui/client/src/teams/add/teams-add.controller.js b/awx/ui/client/src/teams/add/teams-add.controller.js
index f91df286bc..6204565958 100644
--- a/awx/ui/client/src/teams/add/teams-add.controller.js
+++ b/awx/ui/client/src/teams/add/teams-add.controller.js
@@ -4,10 +4,10 @@
* All Rights Reserved
*************************************************/
-export default ['$scope', '$rootScope', '$stateParams', 'TeamForm', 'GenerateForm',
- 'Rest', 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'Wait', '$state',
- function($scope, $rootScope, $stateParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors,
- ClearScope, GetBasePath, Wait, $state) {
+export default ['$scope', '$rootScope', 'TeamForm', 'GenerateForm', 'Rest',
+ 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'Wait', '$state',
+ function($scope, $rootScope, TeamForm, GenerateForm, Rest, Alert,
+ ProcessErrors, ClearScope, GetBasePath, Wait, $state) {
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
//$scope.
diff --git a/awx/ui/client/src/teams/edit/teams-edit.controller.js b/awx/ui/client/src/teams/edit/teams-edit.controller.js
index c4b1d1fa4c..6587311c7d 100644
--- a/awx/ui/client/src/teams/edit/teams-edit.controller.js
+++ b/awx/ui/client/src/teams/edit/teams-edit.controller.js
@@ -6,9 +6,8 @@
export default ['$scope', '$rootScope', '$stateParams', 'TeamForm', 'Rest',
'ProcessErrors', 'ClearScope', 'GetBasePath', 'Wait', '$state',
- function($scope, $rootScope, $stateParams,
- TeamForm, Rest, ProcessErrors, ClearScope, GetBasePath, Wait, $state) {
-
+ function($scope, $rootScope, $stateParams, TeamForm, Rest, ProcessErrors,
+ ClearScope, GetBasePath, Wait, $state) {
ClearScope();
var form = TeamForm,
diff --git a/awx/ui/client/src/teams/list/teams-list.controller.js b/awx/ui/client/src/teams/list/teams-list.controller.js
index a4793de0ec..1477452358 100644
--- a/awx/ui/client/src/teams/list/teams-list.controller.js
+++ b/awx/ui/client/src/teams/list/teams-list.controller.js
@@ -4,11 +4,10 @@
* All Rights Reserved
*************************************************/
-export default ['$scope', '$rootScope', '$log',
- '$stateParams', 'Rest', 'Alert', 'TeamList', 'Prompt', 'ClearScope',
- 'ProcessErrors', 'GetBasePath', 'Wait', '$state', '$filter', 'rbacUiControlService', 'Dataset',
- function($scope, $rootScope, $log, $stateParams,
- Rest, Alert, TeamList, Prompt, ClearScope, ProcessErrors,
+export default ['$scope', 'Rest', 'TeamList', 'Prompt', 'ClearScope',
+ 'ProcessErrors', 'GetBasePath', 'Wait', '$state', '$filter',
+ 'rbacUiControlService', 'Dataset',
+ function($scope, Rest, TeamList, Prompt, ClearScope, ProcessErrors,
GetBasePath, Wait, $state, $filter, rbacUiControlService, Dataset) {
ClearScope();
diff --git a/awx/ui/client/src/teams/main.js b/awx/ui/client/src/teams/main.js
index cd800ddb11..258af14dda 100644
--- a/awx/ui/client/src/teams/main.js
+++ b/awx/ui/client/src/teams/main.js
@@ -7,6 +7,8 @@
import TeamsList from './list/teams-list.controller';
import TeamsAdd from './add/teams-add.controller';
import TeamsEdit from './edit/teams-edit.controller';
+import TeamList from './teams.list';
+import TeamForm from './teams.form';
import { N_ } from '../i18n';
export default
@@ -14,6 +16,8 @@ angular.module('Teams', [])
.controller('TeamsList', TeamsList)
.controller('TeamsAdd', TeamsAdd)
.controller('TeamsEdit', TeamsEdit)
+ .factory('TeamList', TeamList)
+ .factory('TeamForm', TeamForm)
.config(['$stateProvider', 'stateDefinitionsProvider',
function($stateProvider, stateDefinitionsProvider) {
let stateDefinitions = stateDefinitionsProvider.$get();
diff --git a/awx/ui/client/src/forms/Teams.js b/awx/ui/client/src/teams/teams.form.js
similarity index 97%
rename from awx/ui/client/src/forms/Teams.js
rename to awx/ui/client/src/teams/teams.form.js
index 7b883ab834..2a3e97fcfa 100644
--- a/awx/ui/client/src/forms/Teams.js
+++ b/awx/ui/client/src/teams/teams.form.js
@@ -10,9 +10,7 @@
* @description This form is for adding/editing teams
*/
-export default
- angular.module('TeamFormDefinition', [])
- .factory('TeamForm', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
addTitle: i18n._('NEW TEAM'), //Legend in add mode
@@ -162,4 +160,4 @@ export default
}
}
},
- };}]); //InventoryForm
+ };}];
diff --git a/awx/ui/client/src/lists/Teams.js b/awx/ui/client/src/teams/teams.list.js
similarity index 95%
rename from awx/ui/client/src/lists/Teams.js
rename to awx/ui/client/src/teams/teams.list.js
index ea8bce2419..551d07f37c 100644
--- a/awx/ui/client/src/lists/Teams.js
+++ b/awx/ui/client/src/teams/teams.list.js
@@ -5,9 +5,7 @@
*************************************************/
-export default
- angular.module('TeamsListDefinition', [])
- .factory('TeamList', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
name: 'teams',
@@ -83,4 +81,4 @@ export default
ngShow: 'team.summary_fields.user_capabilities.delete'
}
}
- };}]);
+ };}];
diff --git a/awx/ui/client/src/lists/CompletedJobs.js b/awx/ui/client/src/templates/completed-jobs.list.js
similarity index 95%
rename from awx/ui/client/src/lists/CompletedJobs.js
rename to awx/ui/client/src/templates/completed-jobs.list.js
index 5af98f634d..8ad664d3db 100644
--- a/awx/ui/client/src/lists/CompletedJobs.js
+++ b/awx/ui/client/src/templates/completed-jobs.list.js
@@ -5,9 +5,7 @@
*************************************************/
-export default
- angular.module('CompletedJobsDefinition', [])
- .factory('CompletedJobsList', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
// These tooltip fields are consumed to build disabled related tabs tooltips in the form > add view
awToolTip: i18n._('Please save and run a job to view'),
@@ -84,4 +82,4 @@ export default
ngShow: 'completed_job.summary_fields.user_capabilities.delete'
}
}
- };}]);
+ };}];
diff --git a/awx/ui/client/src/templates/inventory-sources.list.js b/awx/ui/client/src/templates/inventory-sources.list.js
new file mode 100644
index 0000000000..a80d57f466
--- /dev/null
+++ b/awx/ui/client/src/templates/inventory-sources.list.js
@@ -0,0 +1,31 @@
+/*************************************************
+ * Copyright (c) 2016 Ansible, Inc.
+ *
+ * All Rights Reserved
+ *************************************************/
+
+
+export default {
+ name: 'workflow_inventory_sources',
+ iterator: 'inventory_source',
+ basePath: 'inventory_sources',
+ listTitle: 'INVENTORY SOURCES',
+ index: false,
+ hover: true,
+
+ fields: {
+ name: {
+ label: 'Name',
+ ngBind: 'inventory_source.summary_fields.group.name',
+ columnClass: 'col-md-11',
+ simpleTip: {
+ awToolTip: "Inventory: {{inventory_source.summary_fields.inventory.name}}",
+ dataPlacement: "top"
+ }
+ }
+ },
+
+ actions: {},
+
+ fieldActions: {}
+};
diff --git a/awx/ui/client/src/forms/JobTemplates.js b/awx/ui/client/src/templates/job-template.form.js
similarity index 94%
rename from awx/ui/client/src/forms/JobTemplates.js
rename to awx/ui/client/src/templates/job-template.form.js
index 0156b47770..3a3d006c10 100644
--- a/awx/ui/client/src/forms/JobTemplates.js
+++ b/awx/ui/client/src/templates/job-template.form.js
@@ -11,11 +11,10 @@
*/
-export default
- angular.module('JobTemplateFormDefinition', [ 'CompletedJobsDefinition'])
-
- .factory('JobTemplateFormObject', ['i18n', function(i18n) {
- return {
+export default ['NotificationsList', 'CompletedJobsList', 'i18n',
+function(NotificationsList, CompletedJobsList, i18n) {
+ return function() {
+ var JobTemplateFormObject = {
addTitle: i18n._('NEW JOB TEMPLATE'),
editTitle: '{{ name }}',
@@ -487,26 +486,22 @@ export default
class: 'Form-primaryButton'
}
}
- };}])
+ };
+ var itm;
- .factory('JobTemplateForm', ['JobTemplateFormObject', 'NotificationsList', 'CompletedJobsList',
- function(JobTemplateFormObject, NotificationsList, CompletedJobsList) {
- return function() {
- var itm;
+ for (itm in JobTemplateFormObject.related) {
+ if (JobTemplateFormObject.related[itm].include === "NotificationsList") {
+ JobTemplateFormObject.related[itm] = _.clone(NotificationsList);
+ JobTemplateFormObject.related[itm].ngClick = "$state.go('templates.editJobTemplate.notifications')";
+ JobTemplateFormObject.related[itm].generateList = true; // tell form generator to call list generator and inject a list
+ }
+ if (JobTemplateFormObject.related[itm].include === "CompletedJobsList") {
+ JobTemplateFormObject.related[itm] = CompletedJobsList;
+ JobTemplateFormObject.related[itm].ngClick = "$state.go('templates.editJobTemplate.completed_jobs')";
+ JobTemplateFormObject.related[itm].generateList = true;
+ }
+ }
- for (itm in JobTemplateFormObject.related) {
- if (JobTemplateFormObject.related[itm].include === "NotificationsList") {
- JobTemplateFormObject.related[itm] = _.clone(NotificationsList);
- JobTemplateFormObject.related[itm].ngClick = "$state.go('templates.editJobTemplate.notifications')";
- JobTemplateFormObject.related[itm].generateList = true; // tell form generator to call list generator and inject a list
- }
- if (JobTemplateFormObject.related[itm].include === "CompletedJobsList") {
- JobTemplateFormObject.related[itm] = CompletedJobsList;
- JobTemplateFormObject.related[itm].ngClick = "$state.go('templates.editJobTemplate.completed_jobs')";
- JobTemplateFormObject.related[itm].generateList = true;
- }
- }
-
- return JobTemplateFormObject;
- };
- }]);
+ return JobTemplateFormObject;
+ };
+}];
diff --git a/awx/ui/client/src/templates/main.js b/awx/ui/client/src/templates/main.js
index abab0576b9..c733507f05 100644
--- a/awx/ui/client/src/templates/main.js
+++ b/awx/ui/client/src/templates/main.js
@@ -20,6 +20,11 @@ import workflowService from './workflows/workflow.service';
import templateCopyService from './copy-template/template-copy.service';
import CallbackHelpInit from './job_templates/factories/callback-help-init.factory';
import md5Setup from './job_templates/factories/md-5-setup.factory';
+import WorkflowForm from './workflows.form';
+import CompletedJobsList from './completed-jobs.list';
+import InventorySourcesList from './inventory-sources.list';
+import TemplateList from './templates.list';
+import JobTemplateForm from './job-template.form';
export default
angular.module('templates', [surveyMaker.name, templatesList.name, jobTemplatesAdd.name,
@@ -31,6 +36,11 @@ angular.module('templates', [surveyMaker.name, templatesList.name, jobTemplatesA
.service('TemplateCopyService', templateCopyService)
.factory('CallbackHelpInit', CallbackHelpInit)
.factory('md5Setup', md5Setup)
+ .factory('WorkflowForm', WorkflowForm)
+ .factory('CompletedJobsList', CompletedJobsList)
+ .factory('TemplateList', TemplateList)
+ .factory('JobTemplateForm', JobTemplateForm)
+ .value('InventorySourcesList', InventorySourcesList)
.config(['$stateProvider', 'stateDefinitionsProvider', '$stateExtenderProvider',
function($stateProvider, stateDefinitionsProvider, $stateExtenderProvider) {
let stateTree, addJobTemplate, editJobTemplate, addWorkflow, editWorkflow,
diff --git a/awx/ui/client/src/lists/Templates.js b/awx/ui/client/src/templates/templates.list.js
similarity index 97%
rename from awx/ui/client/src/lists/Templates.js
rename to awx/ui/client/src/templates/templates.list.js
index 4608406c0e..70e920dda0 100644
--- a/awx/ui/client/src/lists/Templates.js
+++ b/awx/ui/client/src/templates/templates.list.js
@@ -5,9 +5,7 @@
*************************************************/
-export default
- angular.module('TemplatesListDefinition', [])
- .factory('TemplateList', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
name: 'templates',
@@ -129,4 +127,4 @@ export default
ngShow: 'template.summary_fields.user_capabilities.delete'
}
}
- };}]);
+ };}];
diff --git a/awx/ui/client/src/forms/Workflows.js b/awx/ui/client/src/templates/workflows.form.js
similarity index 90%
rename from awx/ui/client/src/forms/Workflows.js
rename to awx/ui/client/src/templates/workflows.form.js
index 821a3ab072..4906dfae75 100644
--- a/awx/ui/client/src/forms/Workflows.js
+++ b/awx/ui/client/src/templates/workflows.form.js
@@ -10,11 +10,9 @@
* @description This form is for adding/editing a Workflow
*/
-export default
- angular.module('WorkflowFormDefinition', [])
-
- .factory('WorkflowFormObject', ['i18n', function(i18n) {
- return {
+export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) {
+ return function() {
+ var WorkflowFormObject = {
addTitle: i18n._('NEW WORKFLOW JOB TEMPLATE'),
editTitle: '{{ name }}',
@@ -190,21 +188,18 @@ export default
class: 'Form-primaryButton'
}
}
- };}])
+ };
- .factory('WorkflowForm', ['WorkflowFormObject', 'NotificationsList',
- function(WorkflowFormObject, NotificationsList) {
- return function() {
- var itm;
+ var itm;
- for (itm in WorkflowFormObject.related) {
- if (WorkflowFormObject.related[itm].include === "NotificationsList") {
- WorkflowFormObject.related[itm] = _.clone(NotificationsList);
- WorkflowFormObject.related[itm].ngClick = "$state.go('templates.editWorkflowJobTemplate.notifications')";
- WorkflowFormObject.related[itm].generateList = true; // tell form generator to call list generator and inject a list
- }
- }
+ for (itm in WorkflowFormObject.related) {
+ if (WorkflowFormObject.related[itm].include === "NotificationsList") {
+ WorkflowFormObject.related[itm] = _.clone(NotificationsList);
+ WorkflowFormObject.related[itm].ngClick = "$state.go('templates.editWorkflowJobTemplate.notifications')";
+ WorkflowFormObject.related[itm].generateList = true; // tell form generator to call list generator and inject a list
+ }
+ }
- return WorkflowFormObject;
- };
- }]);
+ return WorkflowFormObject;
+ };
+}];
diff --git a/awx/ui/client/src/templates/workflows/add-workflow/workflow-add.controller.js b/awx/ui/client/src/templates/workflows/add-workflow/workflow-add.controller.js
index 036ff6b21f..be496f559e 100644
--- a/awx/ui/client/src/templates/workflows/add-workflow/workflow-add.controller.js
+++ b/awx/ui/client/src/templates/workflows/add-workflow/workflow-add.controller.js
@@ -4,15 +4,13 @@
* All Rights Reserved
*************************************************/
- export default
- [ '$scope', 'WorkflowForm', 'GenerateForm', 'Alert', 'ProcessErrors', 'ClearScope',
- 'Wait', '$state', 'CreateSelect2', 'TemplatesService', 'ToJSON',
- 'ParseTypeChange', 'OrganizationList', '$q', 'Rest', 'GetBasePath',
- function(
- $scope, WorkflowForm, GenerateForm, Alert, ProcessErrors, ClearScope,
- Wait, $state, CreateSelect2, TemplatesService, ToJSON,
- ParseTypeChange, OrganizationList, $q, Rest, GetBasePath
- ) {
+export default [
+ '$scope', 'WorkflowForm', 'GenerateForm', 'Alert', 'ProcessErrors',
+ 'ClearScope', 'Wait', '$state', 'CreateSelect2', 'TemplatesService',
+ 'ToJSON', 'ParseTypeChange', '$q', 'Rest', 'GetBasePath',
+ function($scope, WorkflowForm, GenerateForm, Alert, ProcessErrors,
+ ClearScope, Wait, $state, CreateSelect2, TemplatesService, ToJSON,
+ ParseTypeChange, $q, Rest, GetBasePath) {
Rest.setUrl(GetBasePath('workflow_job_templates'));
Rest.options()
diff --git a/awx/ui/client/src/templates/workflows/edit-workflow/workflow-edit.controller.js b/awx/ui/client/src/templates/workflows/edit-workflow/workflow-edit.controller.js
index e8fba017c8..d3548540af 100644
--- a/awx/ui/client/src/templates/workflows/edit-workflow/workflow-edit.controller.js
+++ b/awx/ui/client/src/templates/workflows/edit-workflow/workflow-edit.controller.js
@@ -4,18 +4,16 @@
* All Rights Reserved
*************************************************/
- export default
- [ '$scope', '$stateParams', 'WorkflowForm', 'GenerateForm', 'Alert', 'ProcessErrors',
- 'ClearScope', 'GetBasePath', '$q', 'ParseTypeChange', 'Wait', 'Empty',
- 'ToJSON', 'initSurvey', '$state', 'CreateSelect2', 'ParseVariableString',
- 'TemplatesService', 'OrganizationList', 'Rest', 'WorkflowService', 'ToggleNotification', 'OrgAdminLookup',
- function(
- $scope, $stateParams, WorkflowForm, GenerateForm, Alert, ProcessErrors,
- ClearScope, GetBasePath, $q, ParseTypeChange, Wait, Empty,
- ToJSON, SurveyControllerInit, $state, CreateSelect2, ParseVariableString,
- TemplatesService, OrganizationList, Rest, WorkflowService, ToggleNotification, OrgAdminLookup
- ) {
-
+export default [
+ '$scope', '$stateParams', 'WorkflowForm', 'GenerateForm', 'Alert',
+ 'ProcessErrors', 'ClearScope', 'GetBasePath', '$q', 'ParseTypeChange',
+ 'Wait', 'Empty', 'ToJSON', 'initSurvey', '$state', 'CreateSelect2',
+ 'ParseVariableString', 'TemplatesService', 'Rest', 'ToggleNotification',
+ 'OrgAdminLookup',
+ function($scope, $stateParams, WorkflowForm, GenerateForm, Alert,
+ ProcessErrors, ClearScope, GetBasePath, $q, ParseTypeChange, Wait, Empty,
+ ToJSON, SurveyControllerInit, $state, CreateSelect2, ParseVariableString,
+ TemplatesService, Rest, ToggleNotification, OrgAdminLookup) {
ClearScope();
$scope.$watch('workflow_job_template_obj.summary_fields.user_capabilities.edit', function(val) {
diff --git a/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js b/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js
index 72cb0e1887..b11786adc6 100644
--- a/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js
+++ b/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js
@@ -4,7 +4,7 @@
* All Rights Reserved
*************************************************/
-export default [ '$state','moment', '$timeout', '$window',
+export default ['$state','moment', '$timeout', '$window',
function($state, moment, $timeout, $window) {
return {
diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/main.js b/awx/ui/client/src/templates/workflows/workflow-maker/main.js
index 821dfe18aa..4cca4bf693 100644
--- a/awx/ui/client/src/templates/workflows/workflow-maker/main.js
+++ b/awx/ui/client/src/templates/workflows/workflow-maker/main.js
@@ -1,9 +1,11 @@
import workflowMaker from './workflow-maker.directive';
import WorkflowMakerController from './workflow-maker.controller';
+import WorkflowMakerForm from './workflow-maker.form';
export default
angular.module('templates.workflowMaker', [])
// In order to test this controller I had to expose it at the module level
// like so. Is this correct? Is there a better pattern for doing this?
.controller('WorkflowMakerController', WorkflowMakerController)
+ .factory('WorkflowMakerForm', WorkflowMakerForm)
.directive('workflowMaker', workflowMaker);
diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js b/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js
index 7fcf27cc6c..4e239edc42 100644
--- a/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js
+++ b/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js
@@ -4,14 +4,10 @@
* All Rights Reserved
*************************************************/
-export default ['$scope', 'WorkflowService', 'generateList', 'TemplateList', 'ProjectList',
- 'GetBasePath', 'Wait', 'TemplatesService', '$state',
- 'ProcessErrors', 'InventorySourcesList', 'CreateSelect2', 'WorkflowMakerForm',
- 'GenerateForm', 'InventoryList', 'CredentialList', '$q',
- function($scope, WorkflowService, GenerateList, TemplateList, ProjectList,
- GetBasePath, Wait, TemplatesService, $state,
- ProcessErrors, InventorySourcesList, CreateSelect2, WorkflowMakerForm,
- GenerateForm, InventoryList, CredentialList, $q) {
+export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
+ '$state', 'ProcessErrors', 'CreateSelect2', 'WorkflowMakerForm', '$q',
+ function($scope, WorkflowService, GetBasePath, TemplatesService, $state,
+ ProcessErrors, CreateSelect2, WorkflowMakerForm, $q) {
let form = WorkflowMakerForm();
diff --git a/awx/ui/client/src/forms/WorkflowMaker.js b/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.form.js
similarity index 90%
rename from awx/ui/client/src/forms/WorkflowMaker.js
rename to awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.form.js
index a911e85678..6e4074bb20 100644
--- a/awx/ui/client/src/forms/WorkflowMaker.js
+++ b/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.form.js
@@ -10,16 +10,9 @@
* @description This form is for adding/editing a Job Template
*/
-// export default
-// angular.module('WorkflowMakerFormDefinition', [])
-//
-// .value ('WorkflowMakerFormObject', {
-
-export default
- angular.module('WorkflowMakerFormDefinition', [])
-
- .factory('WorkflowMakerFormObject', ['i18n', function(i18n) {
- return {
+export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) {
+ return function() {
+ var WorkflowMakerFormObject = {
addTitle: '',
editTitle: '',
@@ -176,16 +169,15 @@ export default
ngShow: '(workflowJobTemplateObj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate)'
}
}
- };}])
- .factory('WorkflowMakerForm', ['WorkflowMakerFormObject', 'NotificationsList', function(WorkflowMakerFormObject, NotificationsList) {
- return function() {
- var itm;
- for (itm in WorkflowMakerFormObject.related) {
- if (WorkflowMakerFormObject.related[itm].include === "NotificationsList") {
- WorkflowMakerFormObject.related[itm] = NotificationsList;
- WorkflowMakerFormObject.related[itm].generateList = true; // tell form generator to call list generator and inject a list
- }
- }
- return WorkflowMakerFormObject;
- };
- }]);
+ };
+
+ var itm;
+ for (itm in WorkflowMakerFormObject.related) {
+ if (WorkflowMakerFormObject.related[itm].include === "NotificationsList") {
+ WorkflowMakerFormObject.related[itm] = NotificationsList;
+ WorkflowMakerFormObject.related[itm].generateList = true; // tell form generator to call list generator and inject a list
+ }
+ }
+ return WorkflowMakerFormObject;
+ };
+}];
diff --git a/awx/ui/client/src/users/add/users-add.controller.js b/awx/ui/client/src/users/add/users-add.controller.js
index 6f7b8b75b3..3263b6d545 100644
--- a/awx/ui/client/src/users/add/users-add.controller.js
+++ b/awx/ui/client/src/users/add/users-add.controller.js
@@ -12,13 +12,12 @@ const user_type_options = [
{ type: 'system_administrator', label: N_('System Administrator') },
];
-export default ['$scope', '$rootScope', '$stateParams', 'UserForm', 'GenerateForm',
- 'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'GetBasePath',
+export default ['$scope', '$rootScope', 'UserForm', 'GenerateForm', 'Rest',
+ 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'GetBasePath',
'Wait', 'CreateSelect2', '$state', '$location', 'i18n',
- function($scope, $rootScope, $stateParams, UserForm,
- GenerateForm, Rest, Alert, ProcessErrors, ReturnToCaller, ClearScope,
- GetBasePath, Wait, CreateSelect2, $state, $location, i18n) {
-
+ function($scope, $rootScope, UserForm, GenerateForm, Rest, Alert,
+ ProcessErrors, ReturnToCaller, ClearScope, GetBasePath, Wait, CreateSelect2,
+ $state, $location, i18n) {
ClearScope();
var defaultUrl = GetBasePath('organizations'),
diff --git a/awx/ui/client/src/users/edit/users-edit.controller.js b/awx/ui/client/src/users/edit/users-edit.controller.js
index a1255398ed..864ba4ce71 100644
--- a/awx/ui/client/src/users/edit/users-edit.controller.js
+++ b/awx/ui/client/src/users/edit/users-edit.controller.js
@@ -12,11 +12,10 @@ const user_type_options = [
{ type: 'system_administrator', label: N_('System Administrator') },
];
-export default ['$scope', '$rootScope', '$location',
- '$stateParams', 'UserForm', 'Rest', 'ProcessErrors', 'ClearScope', 'GetBasePath',
- 'Wait', 'CreateSelect2', '$state', 'i18n',
- function($scope, $rootScope, $location,
- $stateParams, UserForm, Rest, ProcessErrors,
+export default ['$scope', '$rootScope', '$stateParams', 'UserForm', 'Rest',
+ 'ProcessErrors', 'ClearScope', 'GetBasePath', 'Wait', 'CreateSelect2',
+ '$state', 'i18n',
+ function($scope, $rootScope, $stateParams, UserForm, Rest, ProcessErrors,
ClearScope, GetBasePath, Wait, CreateSelect2, $state, i18n) {
for (var i = 0; i < user_type_options.length; i++) {
diff --git a/awx/ui/client/src/users/list/users-list.controller.js b/awx/ui/client/src/users/list/users-list.controller.js
index 437690da83..3eb05edb83 100644
--- a/awx/ui/client/src/users/list/users-list.controller.js
+++ b/awx/ui/client/src/users/list/users-list.controller.js
@@ -12,12 +12,12 @@ const user_type_options = [
{ type: 'system_administrator', label: N_('System Administrator') },
];
-export default ['$scope', '$rootScope', '$stateParams',
- 'Rest', 'Alert', 'UserList', 'Prompt', 'ClearScope', 'ProcessErrors', 'GetBasePath',
- 'Wait', '$state', '$filter', 'rbacUiControlService', 'Dataset', 'i18n',
- function($scope, $rootScope, $stateParams,
- Rest, Alert, UserList, Prompt, ClearScope, ProcessErrors, GetBasePath,
- Wait, $state, $filter, rbacUiControlService, Dataset, i18n) {
+export default ['$scope', '$rootScope', 'Rest', 'UserList', 'Prompt',
+ 'ClearScope', 'ProcessErrors', 'GetBasePath', 'Wait', '$state', '$filter',
+ 'rbacUiControlService', 'Dataset', 'i18n',
+ function($scope, $rootScope, Rest, UserList, Prompt, ClearScope,
+ ProcessErrors, GetBasePath, Wait, $state, $filter, rbacUiControlService,
+ Dataset, i18n) {
for (var i = 0; i < user_type_options.length; i++) {
user_type_options[i].label = i18n._(user_type_options[i].label);
diff --git a/awx/ui/client/src/users/main.js b/awx/ui/client/src/users/main.js
index 1d978a091b..436c614788 100644
--- a/awx/ui/client/src/users/main.js
+++ b/awx/ui/client/src/users/main.js
@@ -7,6 +7,8 @@
import UsersList from './list/users-list.controller';
import UsersAdd from './add/users-add.controller';
import UsersEdit from './edit/users-edit.controller';
+import UserForm from './users.form';
+import UserList from './users.list';
import { N_ } from '../i18n';
export default
@@ -14,6 +16,8 @@ angular.module('Users', [])
.controller('UsersList', UsersList)
.controller('UsersAdd', UsersAdd)
.controller('UsersEdit', UsersEdit)
+ .factory('UserForm', UserForm)
+ .factory('UserList', UserList)
.config(['$stateProvider', 'stateDefinitionsProvider',
function($stateProvider, stateDefinitionsProvider) {
let stateDefinitions = stateDefinitionsProvider.$get();
diff --git a/awx/ui/client/src/forms/Users.js b/awx/ui/client/src/users/users.form.js
similarity index 98%
rename from awx/ui/client/src/forms/Users.js
rename to awx/ui/client/src/users/users.form.js
index 0b4f366443..c1a7946a6e 100644
--- a/awx/ui/client/src/forms/Users.js
+++ b/awx/ui/client/src/users/users.form.js
@@ -10,9 +10,7 @@
* @description This form is for adding/editing users
*/
-export default
- angular.module('UserFormDefinition', [])
- .factory('UserForm', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
addTitle: i18n._('NEW USER'),
@@ -229,4 +227,4 @@ export default
}
}
- };}]);
+ };}];
diff --git a/awx/ui/client/src/lists/Users.js b/awx/ui/client/src/users/users.list.js
similarity index 96%
rename from awx/ui/client/src/lists/Users.js
rename to awx/ui/client/src/users/users.list.js
index 6f9e8ecbe6..c53eb79887 100644
--- a/awx/ui/client/src/lists/Users.js
+++ b/awx/ui/client/src/users/users.list.js
@@ -5,9 +5,7 @@
*************************************************/
-export default
- angular.module('UserListDefinition', [])
- .factory('UserList', ['i18n', function(i18n) {
+export default ['i18n', function(i18n) {
return {
name: 'users',
@@ -87,4 +85,4 @@ export default
ngShow: 'user.summary_fields.user_capabilities.delete'
}
}
- };}]);
+ };}];
diff --git a/awx/ui/client/src/workflow-results/workflow-results.controller.js b/awx/ui/client/src/workflow-results/workflow-results.controller.js
index cd4ae42a20..8a20e8c57d 100644
--- a/awx/ui/client/src/workflow-results/workflow-results.controller.js
+++ b/awx/ui/client/src/workflow-results/workflow-results.controller.js
@@ -1,30 +1,9 @@
-export default ['workflowData',
- 'workflowResultsService',
- 'workflowDataOptions',
- 'jobLabels',
- 'workflowNodes',
- '$scope',
- 'ParseTypeChange',
- 'ParseVariableString',
- 'WorkflowService',
- 'count',
- '$state',
- 'i18n',
- 'moment',
- function(workflowData,
- workflowResultsService,
- workflowDataOptions,
- jobLabels,
- workflowNodes,
- $scope,
- ParseTypeChange,
- ParseVariableString,
- WorkflowService,
- count,
- $state,
- i18n,
- moment
- ) {
+export default ['workflowData', 'workflowResultsService', 'workflowDataOptions',
+ 'jobLabels', 'workflowNodes', '$scope', 'ParseTypeChange',
+ 'ParseVariableString', 'WorkflowService', 'count', '$state', 'i18n',
+ 'moment', function(workflowData, workflowResultsService,
+ workflowDataOptions, jobLabels, workflowNodes, $scope, ParseTypeChange,
+ ParseVariableString, WorkflowService, count, $state, i18n, moment) {
var runTimeElapsedTimer = null;
var getTowerLinks = function() {