You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2015/10/19 14:47:59 UTC

[1/3] incubator-brooklyn git commit: Add support for correct configkey conversion from the app wizard UI

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 <th...@cloudsoftcorp.com>
Authored: Mon Oct 12 16:04:13 2015 +0100
Committer: Thomas Bouron <th...@cloudsoftcorp.com>
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())
         },


[2/3] incubator-brooklyn git commit: Add support for correct configkey conversion from the app wizard UI - step create

Posted by sv...@apache.org.
Add support for correct configkey conversion from the app wizard UI - step create


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/13a0372f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/13a0372f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/13a0372f

Branch: refs/heads/master
Commit: 13a0372f534fff68cc18277e975a85bbc1c368a1
Parents: 204e87c
Author: Thomas Bouron <th...@cloudsoftcorp.com>
Authored: Thu Oct 15 09:16:23 2015 +0100
Committer: Thomas Bouron <th...@cloudsoftcorp.com>
Committed: Thu Oct 15 09:16:23 2015 +0100

----------------------------------------------------------------------
 .../assets/js/view/application-add-wizard.js     | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/13a0372f/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 1c72e42..850ccf0 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
@@ -85,6 +85,13 @@ define([
         if (entity.config && _.size(entity.config)) result["brooklyn.config"] = entity.config;
         return result;
     }
+    function getConvertedConfigValue(value) {
+        try {
+            return $.parseJSON(value);
+        } catch (e) {
+            return value;
+        }
+    }
     
     var ModalWizard = Backbone.View.extend({
         tagName:'div',
@@ -510,7 +517,7 @@ define([
         getConfigMap:function (root) {
             var map = {}
             $('.app-add-wizard-config-entry',root).each( function (index,elt) {
-                map[$('#key',elt).val()] = $('#value',elt).val()
+                map[$('#key',elt).val()] = getConvertedConfigValue($('#value',elt).val())
             })
             return map;
         },
@@ -777,22 +784,14 @@ define([
             }
         },
         getConfigMap:function() {
-            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') :
-                    that.getConvertedConfigValue($('#value',elt).val())
+                    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())
         },


[3/3] incubator-brooklyn git commit: This closes #949

Posted by sv...@apache.org.
This closes #949

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/5fda6edf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/5fda6edf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/5fda6edf

Branch: refs/heads/master
Commit: 5fda6edf1db681d2881f3db56681e01c8fdfe058
Parents: 388668a 13a0372
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Mon Oct 19 15:33:09 2015 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Mon Oct 19 15:33:09 2015 +0300

----------------------------------------------------------------------
 .../webapp/assets/js/view/application-add-wizard.js    | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------