From 388a4345b1c831cf42bca0dc18d421c8ac70cf90 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Tue, 7 Feb 2017 10:51:29 -0500 Subject: [PATCH] Labels expects the iterator to be `template` not `job_template` --- .../linkout/organizations-linkout.route.js | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js b/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js index 33f4bf7226..0e83389d22 100644 --- a/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js +++ b/awx/ui/client/src/organizations/linkout/organizations-linkout.route.js @@ -267,7 +267,7 @@ export default [{ }, }, params: { - job_template_search: { + template_search: { value: { project__organization: null } @@ -299,27 +299,23 @@ export default [{ list.listTitle = N_('Job Templates'); list.emptyListText = "This list is populated by job templates added from the Job Templates section"; list.searchSize = "col-lg-12 col-md-12 col-sm-12 col-xs-12"; - list.iterator = 'job_template'; + list.iterator = 'template'; list.name = 'job_templates'; list.basePath = "job_templates"; list.fields.smart_status.ngInclude = "'/static/partials/organizations-job-template-smart-status.html'"; - list.fields.name.ngHref = '#/templates/job_template/{{job_template.id}}'; - list.fieldActions.submit.ngClick = 'submitJob(job_template.id)'; - list.fieldActions.submit.ngShow = 'job_template.summary_fields.user_capabilities.start'; - list.fieldActions.schedule.ngClick = 'scheduleJob(job_template.id)'; - list.fieldActions.copy.ngClick = 'copyTemplate(job_template.id)'; - list.fieldActions.copy.ngShow = 'job_template.summary_fields.user_capabilities.copy'; - list.fieldActions.edit.ngClick = "editJobTemplate(job_template.id)"; - list.fieldActions.edit.ngShow = 'job_template.summary_fields.user_capabilities.edit'; - list.fieldActions.view.ngClick = "editJobTemplate(job_template.id)"; - list.fieldActions.view.ngShow = '!job_template.summary_fields.user_capabilities.edit'; + list.fields.name.ngHref = '#/templates/job_template/{{template.id}}'; + list.fieldActions.submit.ngClick = 'submitJob(template.id)'; + list.fieldActions.schedule.ngClick = 'scheduleJob(template.id)'; + list.fieldActions.copy.ngClick = 'copyTemplate(template.id)'; + list.fieldActions.edit.ngClick = "editJobTemplate(template.id)"; + list.fieldActions.view.ngClick = "editJobTemplate(template.id)"; return list; }], OrgJobTemplateDataset: ['OrgJobTemplateList', 'QuerySet', '$stateParams', 'GetBasePath', function(list, qs, $stateParams, GetBasePath) { let path = GetBasePath(list.name); - $stateParams.job_template_search.project__organization = $stateParams.organization_id; - return qs.search(path, $stateParams.job_template_search); + $stateParams.template_search.project__organization = $stateParams.organization_id; + return qs.search(path, $stateParams.template_search); } ] }