From 9ed5c843736d09a10669de083cbbfd2d8b0fdecb Mon Sep 17 00:00:00 2001 From: Frederick Borges Date: Fri, 24 Feb 2023 13:38:46 +0100 Subject: [PATCH] B OpenNebula/one#6015: Fix deploy mode fill value (#2523) (cherry picked from commit 58f4368d6d8ffe71628d88e49cd1de6fc0088cc9) --- .../form-panels/create/wizard-tabs/storage.js | 9 ++++----- .../form-panels/create/wizard-tabs/storage/html.hbs | 3 +++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage.js index a50c7a9b7e..3e78b4226f 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage.js @@ -90,7 +90,7 @@ define(function(require) { function _setup(context) { Tips.setup(context); var that = this; - this.ds_tm_mads = []; + var ds_tm_mads = []; var groupDropdownOptions = ''; that.numberOfDisks = 0; @@ -120,15 +120,14 @@ define(function(require) { if (tm_mad_system){ tm_mad_system.split(",").map(function(item) { var i = item.trim(); - if(that.ds_tm_mads.indexOf(i) === -1){ - that.ds_tm_mads.push(i); - groupDropdownOptions += ''; + if(ds_tm_mads.indexOf(i) === -1){ + ds_tm_mads.push(i); + $('select#TM_MAD_SYSTEM > option.' + i, context).show() } }); } } }); - $('select#TM_MAD_SYSTEM', context).html(groupDropdownOptions); } }); } diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/html.hbs b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/html.hbs index aa3c8e8d7b..e1d2897f0a 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/html.hbs +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/html.hbs @@ -43,6 +43,9 @@