mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 10:11:05 -03:30
@@ -45,12 +45,14 @@ export default ['$scope', '$rootScope', '$location', '$stateParams', 'Rest',
|
|||||||
$scope.$on(`${list.iterator}_options`, function(event, data){
|
$scope.$on(`${list.iterator}_options`, function(event, data){
|
||||||
$scope.options = data.data.actions.GET;
|
$scope.options = data.data.actions.GET;
|
||||||
optionsRequestDataProcessing();
|
optionsRequestDataProcessing();
|
||||||
|
renameTypeLabelFromWorkflowJobTemplateToWorkflowTemplate();
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$watchCollection('templates', function() {
|
$scope.$watchCollection('templates', function() {
|
||||||
optionsRequestDataProcessing();
|
optionsRequestDataProcessing();
|
||||||
}
|
renameTypeLabelFromWorkflowJobTemplateToWorkflowTemplate();
|
||||||
);
|
});
|
||||||
|
|
||||||
// iterate over the list and add fields like type label, after the
|
// iterate over the list and add fields like type label, after the
|
||||||
// OPTIONS request returns, or the list is sorted/paginated/searched
|
// OPTIONS request returns, or the list is sorted/paginated/searched
|
||||||
function optionsRequestDataProcessing(){
|
function optionsRequestDataProcessing(){
|
||||||
@@ -70,6 +72,13 @@ export default ['$scope', '$rootScope', '$location', '$stateParams', 'Rest',
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renameTypeLabelFromWorkflowJobTemplateToWorkflowTemplate() {
|
||||||
|
$scope[list.name].forEach(function(item) {
|
||||||
|
if (item.type_label === "Workflow Job Template") {
|
||||||
|
item.type_label = "Workflow Template";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$scope.$on(`ws-jobs`, function () {
|
$scope.$on(`ws-jobs`, function () {
|
||||||
// @issue - this is no longer quite as ham-fisted but I'd like for someone else to take a peek
|
// @issue - this is no longer quite as ham-fisted but I'd like for someone else to take a peek
|
||||||
|
|||||||
Reference in New Issue
Block a user