mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Cleanup jobs modal
changed the title and fixed an issue with the launch url and schedule url getting reused improperly
This commit is contained in:
@@ -85,7 +85,7 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules
|
|||||||
|
|
||||||
CreateDialog({
|
CreateDialog({
|
||||||
id: 'configure-tower-dialog',
|
id: 'configure-tower-dialog',
|
||||||
title: 'Configure Tower',
|
title: 'Management Jobs',
|
||||||
target: 'configure-tower-dialog',
|
target: 'configure-tower-dialog',
|
||||||
scope: scope,
|
scope: scope,
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
@@ -137,7 +137,7 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules
|
|||||||
|
|
||||||
scope.submitJob = function (id) {
|
scope.submitJob = function (id) {
|
||||||
Wait('start');
|
Wait('start');
|
||||||
scheduleUrl += id+'/launch/';
|
defaultUrl = GetBasePath('system_job_templates')+id+'/launch/';
|
||||||
CreateDialog({
|
CreateDialog({
|
||||||
id: 'prompt-for-days' ,
|
id: 'prompt-for-days' ,
|
||||||
title: "Cleanup Job",
|
title: "Cleanup Job",
|
||||||
@@ -146,6 +146,9 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules
|
|||||||
height: 300,
|
height: 300,
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
callback: 'PromptForDays',
|
callback: 'PromptForDays',
|
||||||
|
onOpen: function(){
|
||||||
|
$("#days_to_keep").val(30);
|
||||||
|
},
|
||||||
buttons: [{
|
buttons: [{
|
||||||
"label": "Cancel",
|
"label": "Cancel",
|
||||||
"onClick": function() {
|
"onClick": function() {
|
||||||
@@ -162,7 +165,7 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules
|
|||||||
data = {};
|
data = {};
|
||||||
data.extra_vars = JSON.stringify(extra_vars);
|
data.extra_vars = JSON.stringify(extra_vars);
|
||||||
|
|
||||||
Rest.setUrl(scheduleUrl);
|
Rest.setUrl(defaultUrl);
|
||||||
Rest.post(data)
|
Rest.post(data)
|
||||||
.success(function() {
|
.success(function() {
|
||||||
Wait('stop');
|
Wait('stop');
|
||||||
|
|||||||
Reference in New Issue
Block a user