From 83d5fef67cea897e533bed81ae255f3d89eb2268 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Wed, 2 May 2018 01:02:56 -0400 Subject: [PATCH 1/3] conditionally hide scroll --- awx/ui/client/features/output/_index.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/client/features/output/_index.less b/awx/ui/client/features/output/_index.less index 0bb8a72aba..524951ecbc 100644 --- a/awx/ui/client/features/output/_index.less +++ b/awx/ui/client/features/output/_index.less @@ -303,7 +303,7 @@ grid-template-rows: minmax(500px, ~"calc(100vh - 140px)"); .at-Panel { - overflow-y: scroll; + overflow-y: auto; } } From 0c8b2a98723e524eb0d0ef86a9aef1a42ffb448e Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Wed, 2 May 2018 01:03:13 -0400 Subject: [PATCH 2/3] remove unused service --- awx/ui/client/features/output/details.directive.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/features/output/details.directive.js b/awx/ui/client/features/output/details.directive.js index d4e590e1c3..e55f3a8d81 100644 --- a/awx/ui/client/features/output/details.directive.js +++ b/awx/ui/client/features/output/details.directive.js @@ -509,8 +509,7 @@ function AtJobDetailsController ( _strings_, _status_, _wait_, - ParseTypeChange, - ParseVariableString, + _parse_, ) { vm = this || {}; @@ -519,7 +518,7 @@ function AtJobDetailsController ( $state = _$state_; error = _error_; - parse = ParseVariableString; + parse = _parse_; prompt = _prompt_; strings = _strings_; status = _status_; @@ -588,7 +587,6 @@ AtJobDetailsController.$inject = [ 'JobStrings', 'JobStatusService', 'Wait', - 'ParseTypeChange', 'ParseVariableString', ]; From 127883f104c67095e00de04ea1b0f3429211a728 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Wed, 2 May 2018 01:03:23 -0400 Subject: [PATCH 3/3] add prior version url compatibility --- .../features/jobs/jobsList.controller.js | 26 ++++----- .../client/features/jobs/jobsList.view.html | 2 +- .../features/output/details.directive.js | 2 +- .../host-event/host-event-modal.partial.html | 12 ++-- .../host-event/host-event.controller.js | 12 ++-- .../output/host-event/host-event.route.js | 8 +-- awx/ui/client/features/output/index.js | 42 +++++++------- awx/ui/client/features/output/jobs.strings.js | 2 +- awx/ui/client/features/output/legacy.route.js | 55 +++++++++++++++++++ .../client/features/output/render.service.js | 2 +- .../launchTemplateButton.component.js | 4 +- .../lib/components/list/row-item.directive.js | 1 + .../lib/components/list/row-item.partial.html | 5 +- .../relaunchButton.component.js | 10 ++-- .../lists/jobs/jobs-list.directive.js | 2 +- .../inventories/adhoc/adhoc.controller.js | 2 +- .../host-summary-popover.controller.js | 2 +- .../source-summary-popover.controller.js | 2 +- .../factories/view-update-status.factory.js | 2 +- .../adhoc-run.factory.js | 2 +- .../launchjob.factory.js | 2 +- .../management-jobs/card/card.controller.js | 2 +- .../organizations-inventories.controller.js | 2 +- .../organizations-projects.controller.js | 2 +- .../projects/list/projects-list.controller.js | 2 +- .../smart-status/smart-status.controller.js | 2 +- .../workflow-chart.directive.js | 6 +- 27 files changed, 136 insertions(+), 77 deletions(-) create mode 100644 awx/ui/client/features/output/legacy.route.js diff --git a/awx/ui/client/features/jobs/jobsList.controller.js b/awx/ui/client/features/jobs/jobsList.controller.js index 4959d41b5e..4755638249 100644 --- a/awx/ui/client/features/jobs/jobsList.controller.js +++ b/awx/ui/client/features/jobs/jobsList.controller.js @@ -3,8 +3,7 @@ * * All Rights Reserved ************************************************ */ -const mapChoices = choices => Object - .assign(...choices.map(([k, v]) => ({ [k]: v }))); +const mapChoices = choices => Object.assign(...choices.map(([k, v]) => ({ [k]: v }))); function ListJobsController ( $scope, @@ -61,37 +60,36 @@ function ListJobsController ( vm.emptyListReason = strings.get('list.NO_RUNNING'); } - vm.jobTypes = mapChoices(unifiedJob - .options('actions.GET.type.choices')); + vm.jobTypes = mapChoices(unifiedJob.options('actions.GET.type.choices')); - vm.getLink = ({ type, id }) => { - let link; + vm.getSref = ({ type, id }) => { + let sref; switch (type) { case 'job': - link = `/#/jobz/playbook/${id}`; + sref = `output({type: 'playbook', id: ${id}})`; break; case 'ad_hoc_command': - link = `/#/jobz/command/${id}`; + sref = `output({type: 'command', id: ${id}})`; break; case 'system_job': - link = `/#/jobz/system/${id}`; + sref = `output({type: 'system', id: ${id}})`; break; case 'project_update': - link = `/#/jobz/project/${id}`; + sref = `output({type: 'project', id: ${id}})`; break; case 'inventory_update': - link = `/#/jobz/inventory/${id}`; + sref = `output({type: 'inventory', id: ${id}})`; break; case 'workflow_job': - link = `/#/workflows/${id}`; + sref = `workflowResults({id: ${id}})`; break; default: - link = ''; + sref = ''; break; } - return link; + return sref; }; vm.deleteJob = (job) => { diff --git a/awx/ui/client/features/jobs/jobsList.view.html b/awx/ui/client/features/jobs/jobsList.view.html index d339ee75f1..e550cd879f 100644 --- a/awx/ui/client/features/jobs/jobsList.view.html +++ b/awx/ui/client/features/jobs/jobsList.view.html @@ -21,7 +21,7 @@ status="{{ job.status }}" status-tip="Job {{job.status}}. Click for details." header-value="{{ job.name }}" - header-link="{{ vm.getLink(job) }}" + header-state="{{ vm.getSref(job) }}" header-tag="{{ vm.jobTypes[job.type] }}">
diff --git a/awx/ui/client/features/output/details.directive.js b/awx/ui/client/features/output/details.directive.js index e55f3a8d81..6923aadb36 100644 --- a/awx/ui/client/features/output/details.directive.js +++ b/awx/ui/client/features/output/details.directive.js @@ -227,7 +227,7 @@ function getProjectUpdateDetails (updateId) { return null; } - const link = `/#/jobz/project/${jobId}`; + const link = `/#/jobs/project/${jobId}`; const tooltip = strings.get('resourceTooltips.PROJECT_UPDATE'); return { link, tooltip }; diff --git a/awx/ui/client/features/output/host-event/host-event-modal.partial.html b/awx/ui/client/features/output/host-event/host-event-modal.partial.html index a79b3cde68..47676df842 100644 --- a/awx/ui/client/features/output/host-event/host-event-modal.partial.html +++ b/awx/ui/client/features/output/host-event/host-event-modal.partial.html @@ -40,19 +40,19 @@
- - - diff --git a/awx/ui/client/features/output/host-event/host-event.controller.js b/awx/ui/client/features/output/host-event/host-event.controller.js index a688e59a64..280bf51818 100644 --- a/awx/ui/client/features/output/host-event/host-event.controller.js +++ b/awx/ui/client/features/output/host-event/host-event.controller.js @@ -57,7 +57,7 @@ function HostEventsController ( $scope.stdout = event[0];// eslint-disable-line prefer-destructuring } // instantiate Codemirror - if ($state.current.name === 'jobz.host-event.json') { + if ($state.current.name === 'output.host-event.json') { try { if (_.has(hostEvent.event_data, 'res')) { initCodeMirror( @@ -73,14 +73,14 @@ function HostEventsController ( // element with id HostEvent-codemirror is not the view // controlled by this instance of HostEventController } - } else if ($state.current.name === 'jobz.host-event.stdout') { + } else if ($state.current.name === 'output.host-event.stdout') { try { resize(); } catch (err) { // element with id HostEvent-codemirror is not the view // controlled by this instance of HostEventController } - } else if ($state.current.name === 'jobz.host-event.stderr') { + } else if ($state.current.name === 'output.host-event.stderr') { try { resize(); } catch (err) { @@ -98,11 +98,11 @@ function HostEventsController ( }); function resize () { - if ($state.current.name === 'jobz.host-event.json') { + if ($state.current.name === 'output.host-event.json') { const editor = $('.CodeMirror')[0].CodeMirror; const height = $('.modal-dialog').height() - $('.HostEvent-header').height() - $('.HostEvent-details').height() - $('.HostEvent-nav').height() - $('.HostEvent-controls').height() - 120; editor.setSize('100%', height); - } else if ($state.current.name === 'jobz.host-event.stdout' || $state.current.name === 'jobz.host-event.stderr') { + } else if ($state.current.name === 'output.host-event.stdout' || $state.current.name === 'output.host-event.stderr') { const height = $('.modal-dialog').height() - $('.HostEvent-header').height() - $('.HostEvent-details').height() - $('.HostEvent-nav').height() - $('.HostEvent-controls').height() - 120; $('.HostEvent-stdout').width('100%'); $('.HostEvent-stdout').height(height); @@ -154,7 +154,7 @@ function HostEventsController ( // Unbind the listener so it doesn't fire when we close the modal via navigation $('#HostEvent').off('hidden.bs.modal'); $('#HostEvent').modal('hide'); - $state.go('jobz'); + $state.go('output'); } $scope.init = init; $scope.init(); diff --git a/awx/ui/client/features/output/host-event/host-event.route.js b/awx/ui/client/features/output/host-event/host-event.route.js index 105881c778..aba9273327 100644 --- a/awx/ui/client/features/output/host-event/host-event.route.js +++ b/awx/ui/client/features/output/host-event/host-event.route.js @@ -25,7 +25,7 @@ HostEventResolve.$inject = [ ]; const hostEventModal = { - name: 'jobz.host-event', + name: 'output.host-event', url: '/host-event/:eventId', controller: 'HostEventsController', templateUrl: HostEventModalTemplate, @@ -40,7 +40,7 @@ const hostEventModal = { }; const hostEventJson = { - name: 'jobz.host-event.json', + name: 'output.host-event.json', url: '/json', controller: 'HostEventsController', templateUrl: HostEventCodeMirrorTemplate, @@ -50,7 +50,7 @@ const hostEventJson = { }; const hostEventStdout = { - name: 'jobz.host-event.stdout', + name: 'output.host-event.stdout', url: '/stdout', controller: 'HostEventsController', templateUrl: HostEventStdoutTemplate, @@ -60,7 +60,7 @@ const hostEventStdout = { }; const hostEventStderr = { - name: 'jobz.host-event.stderr', + name: 'output.host-event.stderr', url: '/stderr', controller: 'HostEventsController', templateUrl: HostEventStderrTemplate, diff --git a/awx/ui/client/features/output/index.js b/awx/ui/client/features/output/index.js index 3aaadc2553..12510b4626 100644 --- a/awx/ui/client/features/output/index.js +++ b/awx/ui/client/features/output/index.js @@ -8,6 +8,7 @@ import RenderService from '~features/output/render.service'; import ScrollService from '~features/output/scroll.service'; import EngineService from '~features/output/engine.service'; import StatusService from '~features/output/status.service'; +import LegacyRedirect from '~features/output/legacy.route'; import DetailsDirective from '~features/output/details.directive'; import SearchDirective from '~features/output/search.directive'; @@ -125,12 +126,6 @@ function resolveWebSocketConnection ($stateParams, SocketService) { return SocketService.addStateResolve(state, id); } -function resolveBreadcrumb (strings) { - return { - label: strings.get('state.TITLE') - }; -} - function getWebSocketResource (type) { let name; let key; @@ -163,11 +158,15 @@ function getWebSocketResource (type) { return { name, key }; } -function JobsRun ($stateRegistry) { +function JobsRun ($stateRegistry, strings) { + const parent = 'jobs'; + const ncyBreadcrumb = { parent, label: strings.get('state.BREADCRUMB_DEFAULT') }; + const state = { - name: 'jobz', - url: '/jobz/:type/:id?job_event_search', - route: '/jobz/:type/:id?job_event_search', + url: '/:type/:id?job_event_search', + name: 'output', + parent, + ncyBreadcrumb, data: { activityStream: true, activityStreamTarget: 'jobs' @@ -180,6 +179,11 @@ function JobsRun ($stateRegistry) { } }, resolve: { + webSocketConnection: [ + '$stateParams', + 'SocketService', + resolveWebSocketConnection + ], resource: [ 'JobModel', 'ProjectUpdateModel', @@ -192,14 +196,11 @@ function JobsRun ($stateRegistry) { 'Wait', resolveResource ], - ncyBreadcrumb: [ - 'JobStrings', - resolveBreadcrumb - ], - webSocketConnection: [ - '$stateParams', - 'SocketService', - resolveWebSocketConnection + breadcrumbLabel: [ + 'resource', + ({ model }) => { + ncyBreadcrumb.label = `${model.get('id')} - ${model.get('name')}`; + } ], }, }; @@ -207,7 +208,7 @@ function JobsRun ($stateRegistry) { $stateRegistry.register(state); } -JobsRun.$inject = ['$stateRegistry']; +JobsRun.$inject = ['$stateRegistry', 'JobStrings']; angular .module(MODULE_NAME, [ @@ -224,6 +225,7 @@ angular .directive('atJobDetails', DetailsDirective) .directive('atJobSearch', SearchDirective) .directive('atJobStats', StatsDirective) - .run(JobsRun); + .run(JobsRun) + .run(LegacyRedirect); export default MODULE_NAME; diff --git a/awx/ui/client/features/output/jobs.strings.js b/awx/ui/client/features/output/jobs.strings.js index f1f3ace11d..76584a1f1d 100644 --- a/awx/ui/client/features/output/jobs.strings.js +++ b/awx/ui/client/features/output/jobs.strings.js @@ -5,7 +5,7 @@ function JobsStrings (BaseString) { const ns = this.jobs; ns.state = { - TITLE: t.s('JOBZ') + BREADCRUMB_DEFAULT: t.s('RESULTS'), }; ns.warnings = { diff --git a/awx/ui/client/features/output/legacy.route.js b/awx/ui/client/features/output/legacy.route.js new file mode 100644 index 0000000000..4abf991dbb --- /dev/null +++ b/awx/ui/client/features/output/legacy.route.js @@ -0,0 +1,55 @@ +function LegacyRedirect ($stateRegistry) { + const destination = 'output'; + const routes = [ + { + name: 'legacyJobResult', + url: '/jobs/:id?job_event_search', + redirectTo: (trans) => { + const { + id, + job_event_search // eslint-disable-line camelcase + } = trans.params(); + + return { state: destination, params: { type: 'playbook', id, job_event_search } }; + } + }, + { + name: 'legacyAdHocJobStdout', + url: '/ad_hoc_commands/:id', + redirectTo: (trans) => { + const { id } = trans.params(); + return { state: destination, params: { type: 'command', id } }; + } + }, + { + name: 'legacyInventorySyncStdout', + url: '/inventory_sync/:id', + redirectTo: (trans) => { + const { id } = trans.params(); + return { state: destination, params: { type: 'inventory', id } }; + } + }, + { + name: 'legacyManagementJobStdout', + url: '/management_jobs/:id', + redirectTo: (trans) => { + const { id } = trans.params(); + return { state: destination, params: { type: 'system', id } }; + } + }, + { + name: 'legacyScmUpdateStdout', + url: '/scm_update/:id', + redirectTo: (trans) => { + const { id } = trans.params(); + return { state: destination, params: { type: 'project', id } }; + } + }, + ]; + + routes.forEach(state => $stateRegistry.register(state)); +} + +LegacyRedirect.$inject = ['$stateRegistry']; + +export default LegacyRedirect; diff --git a/awx/ui/client/features/output/render.service.js b/awx/ui/client/features/output/render.service.js index 81728150fe..9981cac65b 100644 --- a/awx/ui/client/features/output/render.service.js +++ b/awx/ui/client/features/output/render.service.js @@ -183,7 +183,7 @@ function JobRenderService ($q, $sce, $window) { } if (current.isHost) { - tdEvent = `${content}`; + tdEvent = `${content}`; } if (current.time && current.line === ln) { diff --git a/awx/ui/client/lib/components/launchTemplateButton/launchTemplateButton.component.js b/awx/ui/client/lib/components/launchTemplateButton/launchTemplateButton.component.js index bd82a2fa10..f8f6734c0e 100644 --- a/awx/ui/client/lib/components/launchTemplateButton/launchTemplateButton.component.js +++ b/awx/ui/client/lib/components/launchTemplateButton/launchTemplateButton.component.js @@ -41,7 +41,7 @@ function atLaunchTemplateCtrl ( selectedJobTemplate .postLaunch({ id: vm.template.id }) .then(({ data }) => { - $state.go('jobz', { id: data.job, type: 'playbook' }, { reload: true }); + $state.go('output', { id: data.job, type: 'playbook' }, { reload: true }); }); } else { const promptData = { @@ -138,7 +138,7 @@ function atLaunchTemplateCtrl ( id: vm.promptData.template, launchData: jobLaunchData }).then((launchRes) => { - $state.go('jobz', { id: launchRes.data.job, type: 'playbook' }, { reload: true }); + $state.go('output', { id: launchRes.data.job, type: 'playbook' }, { reload: true }); }).catch(createErrorHandler('launch job template', 'POST')); } else if (vm.promptData.templateType === 'workflow_job_template') { workflowTemplate.create().postLaunch({ diff --git a/awx/ui/client/lib/components/list/row-item.directive.js b/awx/ui/client/lib/components/list/row-item.directive.js index ea116cc5cc..67e169835a 100644 --- a/awx/ui/client/lib/components/list/row-item.directive.js +++ b/awx/ui/client/lib/components/list/row-item.directive.js @@ -11,6 +11,7 @@ function atRowItem () { badge: '@', headerValue: '@', headerLink: '@', + headerState: '@', headerTag: '@', status: '@', statusTip: '@', diff --git a/awx/ui/client/lib/components/list/row-item.partial.html b/awx/ui/client/lib/components/list/row-item.partial.html index 4783993acc..7698ba85a9 100644 --- a/awx/ui/client/lib/components/list/row-item.partial.html +++ b/awx/ui/client/lib/components/list/row-item.partial.html @@ -11,7 +11,10 @@ -
+ +
{{ headerValue }}
diff --git a/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js b/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js index 1f258a94ba..cd30c22968 100644 --- a/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js +++ b/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js @@ -123,7 +123,7 @@ function atRelaunchCtrl ( .then((launchRes) => { if (!$state.is('jobs')) { const relaunchType = launchRes.data.type === 'job' ? 'playbook' : launchRes.data.type; - $state.go('jobz', { id: launchRes.data.id, type: relaunchType }, { reload: true }); + $state.go('output', { id: launchRes.data.id, type: relaunchType }, { reload: true }); } }).catch(({ data, status, config }) => { ProcessErrors($scope, data, status, null, { @@ -168,7 +168,7 @@ function atRelaunchCtrl ( inventorySource.postUpdate(vm.job.inventory_source) .then((postUpdateRes) => { if (!$state.is('jobs')) { - $state.go('jobz', { id: postUpdateRes.data.id, type: 'inventory' }, { reload: true }); + $state.go('output', { id: postUpdateRes.data.id, type: 'inventory' }, { reload: true }); } }).catch(({ data, status, config }) => { ProcessErrors($scope, data, status, null, { @@ -192,7 +192,7 @@ function atRelaunchCtrl ( project.postUpdate(vm.job.project) .then((postUpdateRes) => { if (!$state.is('jobs')) { - $state.go('jobz', { id: postUpdateRes.data.id, type: 'project' }, { reload: true }); + $state.go('output', { id: postUpdateRes.data.id, type: 'project' }, { reload: true }); } }).catch(({ data, status, config }) => { ProcessErrors($scope, data, status, null, { @@ -238,7 +238,7 @@ function atRelaunchCtrl ( id: vm.job.id }).then((launchRes) => { if (!$state.is('jobs')) { - $state.go('jobz', { id: launchRes.data.id, type: 'command' }, { reload: true }); + $state.go('output', { id: launchRes.data.id, type: 'command' }, { reload: true }); } }).catch(({ data, status, config }) => { ProcessErrors($scope, data, status, null, { @@ -263,7 +263,7 @@ function atRelaunchCtrl ( relaunchData: PromptService.bundlePromptDataForRelaunch(vm.promptData) }).then((launchRes) => { if (!$state.is('jobs')) { - $state.go('jobz', { id: launchRes.data.job, type: 'playbook' }, { reload: true }); + $state.go('output', { id: launchRes.data.job, type: 'playbook' }, { reload: true }); } }).catch(({ data, status }) => { ProcessErrors($scope, data, status, null, { diff --git a/awx/ui/client/src/home/dashboard/lists/jobs/jobs-list.directive.js b/awx/ui/client/src/home/dashboard/lists/jobs/jobs-list.directive.js index 93a2147834..e14bc18ab0 100644 --- a/awx/ui/client/src/home/dashboard/lists/jobs/jobs-list.directive.js +++ b/awx/ui/client/src/home/dashboard/lists/jobs/jobs-list.directive.js @@ -34,7 +34,7 @@ export default if (job.type === 'workflow_job') { detailsUrl = `/#/workflows/${job.id}`; } else { - detailsUrl = `/#/jobz/playbook/${job.id}`; + detailsUrl = `/#/jobs/playbook/${job.id}`; } return { diff --git a/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.controller.js b/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.controller.js index 33f3a0583f..0d98739305 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/adhoc/adhoc.controller.js @@ -241,7 +241,7 @@ function adhocController($q, $scope, $stateParams, Rest.post(data) .then(({data}) => { Wait('stop'); - $state.go('jobz', {id: data.id, type: 'command'}); + $state.go('output', {id: data.id, type: 'command'}); }) .catch(({data, status}) => { ProcessErrors($scope, data, status, adhocForm, { diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.controller.js b/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.controller.js index 7b2e28e8aa..77bab5de67 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.controller.js @@ -23,7 +23,7 @@ export default [ '$scope', 'Empty', 'Wait', 'GetBasePath', 'Rest', 'ProcessError }; $scope.viewJob = function(jobId) { - $state.go('jobz', { id: jobId, type: 'playbook' }); + $state.go('output', { id: jobId, type: 'playbook' }); }; } diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.controller.js b/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.controller.js index 725069044e..70ae7aeacd 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.controller.js @@ -20,7 +20,7 @@ export default [ '$scope', 'Wait', 'Empty', 'Rest', 'ProcessErrors', '$state', $scope.viewJob = function(url) { // Pull the id out of the URL var id = url.replace(/^\//, '').split('/')[3]; - $state.go('jobz', { id, type: 'inventory' } ); + $state.go('output', { id, type: 'inventory' } ); }; } diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/factories/view-update-status.factory.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/factories/view-update-status.factory.js index c889517506..5b928e5cf5 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/factories/view-update-status.factory.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/factories/view-update-status.factory.js @@ -17,7 +17,7 @@ export default // Get the ID from the correct summary field var update_id = (data.summary_fields.current_update) ? data.summary_fields.current_update.id : data.summary_fields.last_update.id; - $state.go('jobz', { id: update_id, type: 'inventory' }); + $state.go('output', { id: update_id, type: 'inventory' }); }) .catch(({data, status}) => { ProcessErrors(scope, data, status, null, { hdr: 'Error!', diff --git a/awx/ui/client/src/job-submission/job-submission-factories/adhoc-run.factory.js b/awx/ui/client/src/job-submission/job-submission-factories/adhoc-run.factory.js index 65a7b1c578..debb0c9115 100644 --- a/awx/ui/client/src/job-submission/job-submission-factories/adhoc-run.factory.js +++ b/awx/ui/client/src/job-submission/job-submission-factories/adhoc-run.factory.js @@ -89,7 +89,7 @@ .then(({data}) => { Wait('stop'); if($location.path().replace(/^\//, '').split('/')[0] !== 'jobs') { - $state.go('jobz', { id: data.id, type: 'command' }); + $state.go('output', { id: data.id, type: 'command' }); } }) .catch(({data, status}) => { diff --git a/awx/ui/client/src/job-submission/job-submission-factories/launchjob.factory.js b/awx/ui/client/src/job-submission/job-submission-factories/launchjob.factory.js index 2e80cdc369..288787a8c8 100644 --- a/awx/ui/client/src/job-submission/job-submission-factories/launchjob.factory.js +++ b/awx/ui/client/src/job-submission/job-submission-factories/launchjob.factory.js @@ -150,7 +150,7 @@ export default // use $state.go with reload: true option to re-instantiate sockets in var goTojobResults = function(type) { - $state.go('jobz', {id: job, type}, {reload:true}); + $state.go('output', {id: job, type}, {reload:true}); }; if($state.includes('jobs')) { diff --git a/awx/ui/client/src/management-jobs/card/card.controller.js b/awx/ui/client/src/management-jobs/card/card.controller.js index 846b95a6ff..5b6bff4f44 100644 --- a/awx/ui/client/src/management-jobs/card/card.controller.js +++ b/awx/ui/client/src/management-jobs/card/card.controller.js @@ -94,7 +94,7 @@ export default Wait('stop'); $("#prompt-for-days").dialog("close"); // $("#configure-dialog").dialog('close'); - $state.go('jobz', { id: data.system_job, type: 'system' }, { reload: true }); + $state.go('output', { id: data.system_job, type: 'system' }, { reload: true }); }) .catch(({data, status}) => { let template_id = $scope.job_template_id; diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js index b26fffb264..57cf501c4d 100644 --- a/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js +++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js @@ -234,7 +234,7 @@ export default ['$scope', '$rootScope', '$location', $scope.viewJob = function(url) { // Pull the id out of the URL var id = url.replace(/^\//, '').split('/')[3]; - $state.go('jobz', { id: id, type: 'inventory' }); + $state.go('output', { id: id, type: 'inventory' }); }; 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 853534f142..51e753c8a4 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 @@ -187,7 +187,7 @@ export default ['$scope', '$rootScope', '$log', '$stateParams', 'Rest', 'Alert', // Grab the id from summary_fields var id = (data.summary_fields.current_update) ? data.summary_fields.current_update.id : data.summary_fields.last_update.id; - $state.go('jobz', { id: id, type: 'project' }); + $state.go('output', { id: id, type: 'project' }); } else { Alert('No Updates Available', 'There is no SCM update information available for this project. An update has not yet been ' + diff --git a/awx/ui/client/src/projects/list/projects-list.controller.js b/awx/ui/client/src/projects/list/projects-list.controller.js index 2c9525de26..bea12bdf0d 100644 --- a/awx/ui/client/src/projects/list/projects-list.controller.js +++ b/awx/ui/client/src/projects/list/projects-list.controller.js @@ -146,7 +146,7 @@ export default ['$scope', '$rootScope', '$log', 'Rest', 'Alert', // Grab the id from summary_fields var id = (data.summary_fields.current_update) ? data.summary_fields.current_update.id : data.summary_fields.last_update.id; - $state.go('jobz', { id: id, type: 'project'}, { reload: true }); + $state.go('output', { id: id, type: 'project'}, { reload: true }); } else { Alert(i18n._('No Updates Available'), i18n._('There is no SCM update information available for this project. An update has not yet been ' + diff --git a/awx/ui/client/src/smart-status/smart-status.controller.js b/awx/ui/client/src/smart-status/smart-status.controller.js index 1966e0b68c..1caf92e5ba 100644 --- a/awx/ui/client/src/smart-status/smart-status.controller.js +++ b/awx/ui/client/src/smart-status/smart-status.controller.js @@ -27,7 +27,7 @@ export default ['$scope', '$filter', if (typeof $scope.templateType !== 'undefined' && $scope.templateType === 'workflow_job_template') { detailsBaseUrl = '/#/workflows/'; } else { - detailsBaseUrl = '/#/jobz/playbook/'; + detailsBaseUrl = '/#/jobs/playbook/'; } var sparkData = 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 7cfc754d86..dc1db1718c 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 @@ -898,13 +898,13 @@ export default ['$state','moment', '$timeout', '$window', '$filter', 'Rest', 'Ge let goToJobResults = function(job_type) { if(job_type === 'job') { - $state.go('jobz', {id: d.job.id, type: 'playbook'}); + $state.go('output', {id: d.job.id, type: 'playbook'}); } else if(job_type === 'inventory_update') { - $state.go('jobz', {id: d.job.id, type: 'inventory'}); + $state.go('output', {id: d.job.id, type: 'inventory'}); } else if(job_type === 'project_update') { - $state.go('jobz', {id: d.job.id, type: 'project'}); + $state.go('output', {id: d.job.id, type: 'project'}); } };