From 161caf0099b7c544ba0516d153023bf2b1c5b854 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Mon, 16 Jul 2018 11:57:35 -0400 Subject: [PATCH] Send relaunch value instead of name in POST request --- .../relaunchButton/relaunchButton.component.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js b/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js index e27d1b130e..4064340d74 100644 --- a/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js +++ b/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js @@ -81,7 +81,7 @@ function atRelaunchCtrl ( }, launchOptions: launchOptions.data, job: vm.job.id, - relaunchHostType: option ? (option.name).toLowerCase() : null, + relaunchHostType: option ? (option.value) : null, prompts: { credentials: { value: populatedJob.summary_fields.credentials ? @@ -125,9 +125,9 @@ function atRelaunchCtrl ( id: vm.job.id, }; - if (_.has(option, 'name')) { + if (_.has(option, 'value')) { launchParams.relaunchData = { - hosts: (option.name).toLowerCase() + hosts: option.value }; } @@ -155,11 +155,13 @@ function atRelaunchCtrl ( vm.dropdownOptions = [ { name: strings.get('relaunch.ALL'), - icon: 'icon-host-all' + icon: 'icon-host-all', + value: 'all' }, { name: strings.get('relaunch.FAILED'), - icon: 'icon-host-failed' + icon: 'icon-host-failed', + value: 'failed' } ];