From 3d98fe02b60c0fe6e27fba4299576c4a5a2019ab Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Wed, 19 Nov 2014 13:42:00 -0500 Subject: [PATCH] Cleanup jobs modal changed the title and fixed an issue with the launch url and schedule url getting reused improperly --- awx/ui/static/js/helpers/ConfigureTower.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/awx/ui/static/js/helpers/ConfigureTower.js b/awx/ui/static/js/helpers/ConfigureTower.js index 4ea6af7608..0117e0672f 100644 --- a/awx/ui/static/js/helpers/ConfigureTower.js +++ b/awx/ui/static/js/helpers/ConfigureTower.js @@ -85,7 +85,7 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules CreateDialog({ id: 'configure-tower-dialog', - title: 'Configure Tower', + title: 'Management Jobs', target: 'configure-tower-dialog', scope: scope, buttons: buttons, @@ -137,7 +137,7 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules scope.submitJob = function (id) { Wait('start'); - scheduleUrl += id+'/launch/'; + defaultUrl = GetBasePath('system_job_templates')+id+'/launch/'; CreateDialog({ id: 'prompt-for-days' , title: "Cleanup Job", @@ -146,6 +146,9 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules height: 300, minWidth: 200, callback: 'PromptForDays', + onOpen: function(){ + $("#days_to_keep").val(30); + }, buttons: [{ "label": "Cancel", "onClick": function() { @@ -162,7 +165,7 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules data = {}; data.extra_vars = JSON.stringify(extra_vars); - Rest.setUrl(scheduleUrl); + Rest.setUrl(defaultUrl); Rest.post(data) .success(function() { Wait('stop');