mirror of
https://github.com/ansible/awx.git
synced 2026-01-23 15:38:06 -03:30
clear job event search on relaunch
This commit is contained in:
parent
e6668a43cd
commit
7f23aa81e6
@ -23,6 +23,13 @@ function atRelaunchCtrl (
|
||||
const jobObj = new Job();
|
||||
const jobTemplate = new JobTemplate();
|
||||
|
||||
const transitionOptions = { reload: true };
|
||||
|
||||
if ($state.includes('output')) {
|
||||
transitionOptions.inherit = false;
|
||||
transitionOptions.location = 'replace';
|
||||
}
|
||||
|
||||
const updateTooltip = () => {
|
||||
if (vm.job.type === 'job' && vm.job.status === 'failed') {
|
||||
vm.tooltip = strings.get('relaunch.HOSTS');
|
||||
@ -128,7 +135,7 @@ function atRelaunchCtrl (
|
||||
.then((launchRes) => {
|
||||
if (!$state.is('jobs')) {
|
||||
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 }) => {
|
||||
ProcessErrors($scope, data, status, null, {
|
||||
@ -173,7 +180,7 @@ function atRelaunchCtrl (
|
||||
inventorySource.postUpdate(vm.job.inventory_source)
|
||||
.then((postUpdateRes) => {
|
||||
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 }) => {
|
||||
ProcessErrors($scope, data, status, null, {
|
||||
@ -197,7 +204,7 @@ function atRelaunchCtrl (
|
||||
project.postUpdate(vm.job.project)
|
||||
.then((postUpdateRes) => {
|
||||
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 }) => {
|
||||
ProcessErrors($scope, data, status, null, {
|
||||
@ -219,7 +226,7 @@ function atRelaunchCtrl (
|
||||
id: vm.job.id
|
||||
}).then((launchRes) => {
|
||||
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 }) => {
|
||||
ProcessErrors($scope, data, status, null, {
|
||||
@ -243,7 +250,7 @@ function atRelaunchCtrl (
|
||||
id: vm.job.id
|
||||
}).then((launchRes) => {
|
||||
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 }) => {
|
||||
ProcessErrors($scope, data, status, null, {
|
||||
@ -268,7 +275,7 @@ function atRelaunchCtrl (
|
||||
relaunchData: PromptService.bundlePromptDataForRelaunch(vm.promptData)
|
||||
}).then((launchRes) => {
|
||||
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 }) => {
|
||||
ProcessErrors($scope, data, status, null, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user