1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Merge pull request #320 from mabashian/6034-workflow-402

Basic license wfjt fixes
This commit is contained in:
Michael Abashian 2017-08-23 17:58:32 -04:00 committed by GitHub
commit 3aa9d2e64c
3 changed files with 9 additions and 12 deletions

View File

@ -41,7 +41,6 @@
<div class="Form-tab"
ng-click="selectTab('workflow_templates')"
ng-class="{'is-selected': tab.workflow_templates}"
ng-hide="resolve.workflowTemplatesDataset.status === 402"
translate>
Workflow Templates
</div>
@ -74,7 +73,7 @@
<div id="AddPermissions-jobTemplates" class="AddPermissions-list" ng-show="tab.job_templates">
<rbac-multiselect-list view="JobTemplates" all-selected="allSelected" dataset="resolve.jobTemplatesDataset"></rbac-multiselect-list>
</div>
<div ng-if="resolve.workflowTemplatesDataset.status !== 402" id="AddPermissions-workflowTemplates" class="AddPermissions-list" ng-show="tab.workflow_templates">
<div id="AddPermissions-workflowTemplates" class="AddPermissions-list" ng-show="tab.workflow_templates">
<rbac-multiselect-list view="WorkflowTemplates" all-selected="allSelected" dataset="resolve.workflowTemplatesDataset"></rbac-multiselect-list>
</div>
<div id="AddPermissions-projects" class="AddPermissions-list" ng-show="tab.projects">

View File

@ -243,10 +243,6 @@ export default ['$q', 'Rest', 'ProcessErrors', '$rootScope', 'Wait', 'DjangoSear
.catch(function(response) {
Wait('stop');
if (/^\/api\/v[0-9]+\/workflow_job_templates\/$/.test(endpoint) && response.status === 402) {
return response;
}
this.error(response.data, response.status);
throw response;

View File

@ -128,20 +128,22 @@ export default ['$scope', '$rootScope',
TemplatesService.deleteWorkflowJobTemplate(template.id)
.then(function () {
handleSuccessfulDelete(true);
}, function (data) {
})
.catch(function (response) {
Wait('stop');
ProcessErrors($scope, data, data.status, null, { hdr: 'Error!',
msg: 'Call to delete workflow job template failed. DELETE returned status: ' + status });
ProcessErrors($scope, response.data, response.status, null, { hdr: 'Error!',
msg: 'Call to delete workflow job template failed. DELETE returned status: ' + response.status + '.'});
});
}
else if(template.type && (template.type === 'Job Template' || template.type === 'job_template')) {
TemplatesService.deleteJobTemplate(template.id)
.then(function () {
handleSuccessfulDelete();
}, function (data) {
})
.catch(function (response) {
Wait('stop');
ProcessErrors($scope, data, data.status, null, { hdr: 'Error!',
msg: 'Call to delete job template failed. DELETE returned status: ' + data.status });
ProcessErrors($scope, response.data, response.status, null, { hdr: 'Error!',
msg: 'Call to delete job template failed. DELETE returned status: ' + response.status + '.'});
});
}
else {