mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
clear job event search on relaunch
This commit is contained in:
@@ -23,6 +23,13 @@ function atRelaunchCtrl (
|
|||||||
const jobObj = new Job();
|
const jobObj = new Job();
|
||||||
const jobTemplate = new JobTemplate();
|
const jobTemplate = new JobTemplate();
|
||||||
|
|
||||||
|
const transitionOptions = { reload: true };
|
||||||
|
|
||||||
|
if ($state.includes('output')) {
|
||||||
|
transitionOptions.inherit = false;
|
||||||
|
transitionOptions.location = 'replace';
|
||||||
|
}
|
||||||
|
|
||||||
const updateTooltip = () => {
|
const updateTooltip = () => {
|
||||||
if (vm.job.type === 'job' && vm.job.status === 'failed') {
|
if (vm.job.type === 'job' && vm.job.status === 'failed') {
|
||||||
vm.tooltip = strings.get('relaunch.HOSTS');
|
vm.tooltip = strings.get('relaunch.HOSTS');
|
||||||
@@ -128,7 +135,7 @@ function atRelaunchCtrl (
|
|||||||
.then((launchRes) => {
|
.then((launchRes) => {
|
||||||
if (!$state.is('jobs')) {
|
if (!$state.is('jobs')) {
|
||||||
const relaunchType = launchRes.data.type === 'job' ? 'playbook' : launchRes.data.type;
|
const relaunchType = launchRes.data.type === 'job' ? 'playbook' : launchRes.data.type;
|
||||||
$state.go('output', { id: launchRes.data.id, type: relaunchType }, { reload: true });
|
$state.go('output', { id: launchRes.data.id, type: relaunchType }, transitionOptions);
|
||||||
}
|
}
|
||||||
}).catch(({ data, status, config }) => {
|
}).catch(({ data, status, config }) => {
|
||||||
ProcessErrors($scope, data, status, null, {
|
ProcessErrors($scope, data, status, null, {
|
||||||
@@ -173,7 +180,7 @@ function atRelaunchCtrl (
|
|||||||
inventorySource.postUpdate(vm.job.inventory_source)
|
inventorySource.postUpdate(vm.job.inventory_source)
|
||||||
.then((postUpdateRes) => {
|
.then((postUpdateRes) => {
|
||||||
if (!$state.is('jobs')) {
|
if (!$state.is('jobs')) {
|
||||||
$state.go('output', { id: postUpdateRes.data.id, type: 'inventory' }, { reload: true });
|
$state.go('output', { id: postUpdateRes.data.id, type: 'inventory' }, transitionOptions);
|
||||||
}
|
}
|
||||||
}).catch(({ data, status, config }) => {
|
}).catch(({ data, status, config }) => {
|
||||||
ProcessErrors($scope, data, status, null, {
|
ProcessErrors($scope, data, status, null, {
|
||||||
@@ -197,7 +204,7 @@ function atRelaunchCtrl (
|
|||||||
project.postUpdate(vm.job.project)
|
project.postUpdate(vm.job.project)
|
||||||
.then((postUpdateRes) => {
|
.then((postUpdateRes) => {
|
||||||
if (!$state.is('jobs')) {
|
if (!$state.is('jobs')) {
|
||||||
$state.go('output', { id: postUpdateRes.data.id, type: 'project' }, { reload: true });
|
$state.go('output', { id: postUpdateRes.data.id, type: 'project' }, transitionOptions);
|
||||||
}
|
}
|
||||||
}).catch(({ data, status, config }) => {
|
}).catch(({ data, status, config }) => {
|
||||||
ProcessErrors($scope, data, status, null, {
|
ProcessErrors($scope, data, status, null, {
|
||||||
@@ -219,7 +226,7 @@ function atRelaunchCtrl (
|
|||||||
id: vm.job.id
|
id: vm.job.id
|
||||||
}).then((launchRes) => {
|
}).then((launchRes) => {
|
||||||
if (!$state.is('jobs')) {
|
if (!$state.is('jobs')) {
|
||||||
$state.go('workflowResults', { id: launchRes.data.id }, { reload: true });
|
$state.go('workflowResults', { id: launchRes.data.id }, transitionOptions);
|
||||||
}
|
}
|
||||||
}).catch(({ data, status, config }) => {
|
}).catch(({ data, status, config }) => {
|
||||||
ProcessErrors($scope, data, status, null, {
|
ProcessErrors($scope, data, status, null, {
|
||||||
@@ -243,7 +250,7 @@ function atRelaunchCtrl (
|
|||||||
id: vm.job.id
|
id: vm.job.id
|
||||||
}).then((launchRes) => {
|
}).then((launchRes) => {
|
||||||
if (!$state.is('jobs')) {
|
if (!$state.is('jobs')) {
|
||||||
$state.go('output', { id: launchRes.data.id, type: 'command' }, { reload: true });
|
$state.go('output', { id: launchRes.data.id, type: 'command' }, transitionOptions);
|
||||||
}
|
}
|
||||||
}).catch(({ data, status, config }) => {
|
}).catch(({ data, status, config }) => {
|
||||||
ProcessErrors($scope, data, status, null, {
|
ProcessErrors($scope, data, status, null, {
|
||||||
@@ -268,7 +275,7 @@ function atRelaunchCtrl (
|
|||||||
relaunchData: PromptService.bundlePromptDataForRelaunch(vm.promptData)
|
relaunchData: PromptService.bundlePromptDataForRelaunch(vm.promptData)
|
||||||
}).then((launchRes) => {
|
}).then((launchRes) => {
|
||||||
if (!$state.is('jobs')) {
|
if (!$state.is('jobs')) {
|
||||||
$state.go('output', { id: launchRes.data.job, type: 'playbook' }, { reload: true });
|
$state.go('output', { id: launchRes.data.job, type: 'playbook' }, transitionOptions);
|
||||||
}
|
}
|
||||||
}).catch(({ data, status }) => {
|
}).catch(({ data, status }) => {
|
||||||
ProcessErrors($scope, data, status, null, {
|
ProcessErrors($scope, data, status, null, {
|
||||||
|
|||||||
Reference in New Issue
Block a user