mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
Merge pull request #1647 from jakemcdermott/fix-1534-and-713
add persistent jobs->results filtering, prior version compatibility for job urls
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -11,6 +11,7 @@ function atRowItem () {
|
||||
badge: '@',
|
||||
headerValue: '@',
|
||||
headerLink: '@',
|
||||
headerState: '@',
|
||||
headerTag: '@',
|
||||
status: '@',
|
||||
statusTip: '@',
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
<div class="at-RowItem-header" ng-if="headerValue && headerLink">
|
||||
<a ng-href="{{ headerLink }}">{{ headerValue }}</a>
|
||||
</div>
|
||||
<div class="at-RowItem-header" ng-if="headerValue && !headerLink">
|
||||
<div class="at-RowItem-header" ng-if="headerValue && headerState">
|
||||
<a ui-sref="{{ headerState }}" >{{ headerValue }}</a>
|
||||
</div>
|
||||
<div class="at-RowItem-header" ng-if="headerValue && !headerLink && !headerState">
|
||||
{{ headerValue }}
|
||||
</div>
|
||||
<div class="at-RowItem-tag at-RowItem-tag--header" ng-if="headerTag">
|
||||
|
||||
@@ -128,7 +128,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, {
|
||||
@@ -173,7 +173,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, {
|
||||
@@ -197,7 +197,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, {
|
||||
@@ -243,7 +243,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, {
|
||||
@@ -268,7 +268,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, {
|
||||
|
||||
Reference in New Issue
Block a user