Repository: incubator-brooklyn Updated Branches: refs/heads/master 388668abb -> 5fda6edf1
Add support for correct configkey conversion from the app wizard UI Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/204e87c5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/204e87c5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/204e87c5 Branch: refs/heads/master Commit: 204e87c5170f595951d59c16f7864fc2a8d98624 Parents: 49eabd1 Author: Thomas Bouron <[email protected]> Authored: Mon Oct 12 16:04:13 2015 +0100 Committer: Thomas Bouron <[email protected]> Committed: Mon Oct 12 16:04:13 2015 +0100 ---------------------------------------------------------------------- .../webapp/assets/js/view/application-add-wizard.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/204e87c5/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js ---------------------------------------------------------------------- diff --git a/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js b/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js index 13e4cf0..1c72e42 100644 --- a/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js +++ b/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js @@ -777,14 +777,22 @@ define([ } }, getConfigMap:function() { - var map = {} + var that = this; + var map = {}; $('.app-add-wizard-config-entry').each( function (index,elt) { map[$('#key',elt).val()] = $('#checkboxValue',elt).length ? $('#checkboxValue',elt).is(':checked') : - $('#value',elt).val() + that.getConvertedConfigValue($('#value',elt).val()) }) return map; }, + getConvertedConfigValue:function (value) { + try { + return $.parseJSON(value); + } catch (e) { + return value; + } + }, selectionVersion:function (event) { this.model.spec.set("version", $(event.currentTarget).val()) },
