diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index fa0f67cc91..43bf7d2c91 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -135,16 +135,11 @@ var tower = angular.module('Tower', [ 'GroupFormDefinition', 'GroupListDefinition', 'TemplatesListDefinition', - 'PortalJobTemplatesListDefinition', 'JobTemplateFormDefinition', 'CompletedJobsDefinition', 'AllJobsDefinition', - 'JobSummaryDefinition', 'HostGroupsFormDefinition', 'ScheduledJobsDefinition', - 'JobsListDefinition', - 'LogViewerStatusDefinition', - 'LogViewerOptionsDefinition', 'lrInfiniteScroll', 'PortalJobsListDefinition', 'features', diff --git a/awx/ui/client/src/forms.js b/awx/ui/client/src/forms.js index 4645ac41b3..b1be9928dc 100644 --- a/awx/ui/client/src/forms.js +++ b/awx/ui/client/src/forms.js @@ -4,30 +4,18 @@ * All Rights Reserved *************************************************/ -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"; export { - EventsViewer, Groups, HostGroups, Hosts, Inventories, InventoryStatus, - JobEventData, - JobSummary, - JobTemplates, - JobVarsPrompt, - LogViewerOptions, - LogViewerStatus + JobTemplates }; 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/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/lists.js b/awx/ui/client/src/lists.js index d06b16c9dc..8896ac3ab1 100644 --- a/awx/ui/client/src/lists.js +++ b/awx/ui/client/src/lists.js @@ -12,10 +12,6 @@ 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 PortalJobTemplates from "./lists/PortalJobTemplates"; import PortalJobs from "./lists/PortalJobs"; import ScheduledJobs from "./lists/ScheduledJobs"; import Templates from "./lists/Templates"; @@ -29,10 +25,6 @@ export InventoryGroups, InventoryHosts, InventorySources, - JobEvents, - JobHosts, - Jobs, - PortalJobTemplates, PortalJobs, ScheduledJobs, Templates 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: "
\n
Success
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/lists/PortalJobTemplates.js b/awx/ui/client/src/lists/PortalJobTemplates.js deleted file mode 100644 index 234b1b6a45..0000000000 --- a/awx/ui/client/src/lists/PortalJobTemplates.js +++ /dev/null @@ -1,46 +0,0 @@ -/************************************************* - * Copyright (c) 2015 Ansible, Inc. - * - * All Rights Reserved - *************************************************/ - - -export default - angular.module('PortalJobTemplatesListDefinition', []) - .factory('PortalJobTemplateList', ['i18n', function(i18n) { - return { - - name: 'job_templates', - iterator: 'job_template', - editTitle: i18n._('JOB TEMPLATES'), - listTitle: i18n._('JOB TEMPLATES'), - index: false, - hover: true, - well: true, - emptyListText: i18n._('There are no job templates to display at this time'), - fields: { - name: { - key: true, - label: i18n._('Name'), - columnClass: 'col-lg-5 col-md-5 col-sm-9 col-xs-8', - linkTo: '/#/templates/{{job_template.id}}' - }, - description: { - label: i18n._('Description'), - columnClass: 'col-lg-4 col-md-4 hidden-sm hidden-xs' - } - }, - - actions: { - }, - - fieldActions: { - submit: { - label: i18n._('Launch'), - mode: 'all', - ngClick: 'submitJob(job_template.id)', - awToolTip: i18n._('Start a job using this template'), - dataPlacement: 'top' - } - } - };}]);