You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2014/08/01 20:08:32 UTC

svn commit: r1615187 [1/2] - in /qpid/trunk/qpid/java: bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/ bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/ bdbstore/src/main/java/resources/js/qpid/management/virt...

Author: orudyy
Date: Fri Aug  1 18:08:31 2014
New Revision: 1615187

URL: http://svn.apache.org/r1615187
Log:
QPID-5928: [Java Broker] Add UI into web management console for editing of virtual host nodes and virtual hosts

The work is done by Andrew MacBean and Alex Rudyy.

Added:
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js
      - copied, changed from r1615185, qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/edit.js
      - copied, changed from r1615185, qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html
    qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js
      - copied, changed from r1615185, qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js
    qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js
      - copied, changed from r1615185, qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js
    qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/edit.js
      - copied, changed from r1615185, qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/edit.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHostNode.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js
      - copied, changed from r1615185, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/edit.js
      - copied, changed from r1615185, qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/filebased/
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/filebased/edit.html
      - copied, changed from r1615185, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/show.html
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/edit.js
      - copied, changed from r1615185, qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js
Modified:
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/edit.js
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html
    qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html
    qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js
    qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html
    qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html
    qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/VirtualHost.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/VirtualHostNode.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/show.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/show.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/json/show.html
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js

Copied: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js (from r1615185, qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js?p2=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js&p1=qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js&r1=1615185&r2=1615187&rev=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js Fri Aug  1 18:08:31 2014
@@ -1,5 +1,4 @@
 /*
- *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,22 +15,16 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
 define(["qpid/common/util", "dojo/domReady!"],
-  function (util)
-  {
-    var fields = ["storePath"];
-
-    function DerbyNode(data)
-    {
-      util.buildUI(data.containerNode, data.parent, "virtualhostnode/derby/show.html", fields, this);
-    }
-
-    DerbyNode.prototype.update=function(data)
-    {
-      util.updateUI(data, fields, this);
-    };
-
-    return DerbyNode;
-});
+   function (util)
+   {
+       var fieldNames = ["storeUnderfullSize", "storeOverfullSize", "storePath"];
+       return {
+           show: function(data)
+           {
+              util.buildEditUI(data.containerNode, "virtualhost/sizemonitoring/edit.html", "editVirtualHost.", fieldNames, data.data);
+           }
+       };
+   }
+);

Added: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js?rev=1615187&view=auto
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js (added)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js Fri Aug  1 18:08:31 2014
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define(["qpid/common/util", "dijit/registry", "dojo/_base/window", "dojo/domReady!"],
+   function (util, registry, win)
+   {
+       var fieldNames = ["storeUnderfullSize", "storeOverfullSize"];
+       return {
+           show: function(data)
+           {
+              util.buildEditUI(data.containerNode, "virtualhost/bdb_ha/edit.html", "editVirtualHost.", fieldNames, data.data);
+
+              var widget = registry.byId("editVirtualHost.localTransactionSynchronizationPolicy-" + data.data["localTransactionSynchronizationPolicy"]);
+              if (widget)
+              {
+                widget.set("checked", true);
+              }
+              widget = registry.byId("editVirtualHost.remoteTransactionSynchronizationPolicy-" + data.data["remoteTransactionSynchronizationPolicy"]);
+              if (widget)
+              {
+                widget.set("checked", true);
+              }
+
+              var that = this;
+              this.permittedNodes = registry.byId("editVirtualHost.permittedNodes");
+              this.permittedNodesList = registry.byId("editVirtualHost.permittedNodesList");
+              this.permittedNodesList.on("change", function(value){that._changePermittedNodeList(value);});
+
+              // permitted node text field
+              this.permittedNode = registry.byId("editVirtualHost.permittedNode");
+              this.permittedNode.on("change", function(value){that._changePermittedNode(value);});
+
+              // add and remove buttons & click handlers
+              this.permittedNodeAddButton = registry.byId("editVirtualHost.permittedNodeAdd");
+              this.permittedNodeAddButton.set("disabled", true);
+              this.permittedNodeRemoveButton = registry.byId("editVirtualHost.permittedNodeRemove");
+              this.permittedNodeRemoveButton.set("disabled", true);
+              this.permittedNodeAddButton.on("click", function(e){that._clickAddPermittedNodeButton(e);});
+              this.permittedNodeRemoveButton.on("click", function(e){that._clickRemovePermittedNodeButton(e);});
+
+              var permittedNodes = data.data.permittedNodes;
+              for(var i=0; i<permittedNodes.length;i++)
+              {
+                 var host = permittedNodes[i];
+                 var newOption = this._addOption(host);
+                 // add new option to list
+                 this.permittedNodesList.containerNode.appendChild(newOption);
+              }
+           },
+           _clickAddPermittedNodeButton: function(e)
+           {
+             // check the text box is valid and not empty
+             if(this.permittedNode.isValid() &&
+                   this.permittedNode.value &&
+                   this.permittedNode.value != "")
+             {
+               // read value to add from text box
+               var newAddress = this.permittedNode.value;
+
+               // clear UI value
+               this.permittedNode.set("value", "");
+               this.permittedNodeAddButton.set("disabled", true);
+
+               //check entry not already present in list
+               var alreadyPresent = false;
+               var children = this.permittedNodesList.containerNode.children;
+               var i;
+               for (i = 0; i < children.length; i++)
+                 {
+                   var child = children.item(i);
+                   if (child.value == newAddress)
+                   {
+                     alreadyPresent = true;
+                     break;
+                   }
+                 }
+
+                 if (!alreadyPresent)
+                 {
+                   var newOption = this._addOption(newAddress);
+
+                   // add new option to list
+                   this.permittedNodesList.containerNode.appendChild(newOption);
+                   this._updatePermittedNodes();
+                 }
+             }
+           },
+           _clickRemovePermittedNodeButton: function(e)
+           {
+             var selectedValues = this.permittedNodesList.get("value");
+             var v;
+             for (v in selectedValues)
+             {
+               var children = this.permittedNodesList.containerNode.children;
+               var i;
+               for (i = 0; i < children.length; i++)
+               {
+                 var child = children.item(i);
+                 if (child.value == selectedValues[v])
+                 {
+                   this.permittedNodesList.containerNode.removeChild(child);
+                 }
+               }
+             }
+             this._updatePermittedNodes();
+             this.permittedNodeRemoveButton.set("disabled", true);
+           },
+           _addOption: function(newAddress)
+           {
+              // construct new option for list
+              var newOption = win.doc.createElement('option');
+              newOption.innerHTML = newAddress;
+              newOption.value = newAddress;
+              return newOption;
+           },
+           _changePermittedNodeList: function(value)
+           {
+               var hasSelection = this.permittedNodesList.get("value").length > 0;
+               this.permittedNodeRemoveButton.set("disabled", !hasSelection);
+           },
+           _changePermittedNode: function(value)
+           {
+               var fieldIsEmpty = (this.permittedNode.get("value") == "");
+               this.permittedNodeAddButton.set("disabled", fieldIsEmpty);
+               return true;
+           },
+           _updatePermittedNodes: function()
+           {
+              var values = [];
+              var children = this.permittedNodesList.containerNode.children;
+              for (var i = 0; i < children.length; i++)
+              {
+                 var child = children.item(i);
+                 values.push(children.item(i).value);
+              }
+              this.permittedNodes.set("value", values);
+           }
+       };
+   }
+);

Copied: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/edit.js (from r1615185, qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/edit.js?p2=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/edit.js&p1=qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js&r1=1615185&r2=1615187&rev=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/edit.js Fri Aug  1 18:08:31 2014
@@ -16,18 +16,15 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
-define([],
-  function ()
-  {
-    function Memory(data)
-    {
-    }
-
-    Memory.prototype.update = function(data)
-    {
-    }
-
-    return Memory;
-  }
+define(["qpid/common/util", "dijit/registry", "dojo/domReady!"],
+   function (util, registry)
+   {
+       return {
+           show: function(data)
+           {
+              util.buildEditUI(data.containerNode, "virtualhostnode/filebased/edit.html", "editVirtualHostNode.", ["storePath"], data.data);
+              registry.byId("editVirtualHostNode.storePath").set("disabled", !(data.data.state == "STOPPED" || data.data.state == "ERRORED"));
+           }
+       };
+   }
 );

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js Fri Aug  1 18:08:31 2014
@@ -25,11 +25,13 @@ define(["qpid/common/util", "dojo/domRea
 
     function BdbNode(data)
     {
+       this.parent = data.parent;
        util.buildUI(data.containerNode, data.parent, "virtualhostnode/bdb/show.html", fieldNames, this);
     }
 
     BdbNode.prototype.update=function(data)
     {
+       this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED"));
        util.updateUI(data, fieldNames, this);
     };
 

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/edit.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/edit.js?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/edit.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/edit.js Fri Aug  1 18:08:31 2014
@@ -18,163 +18,47 @@
  * under the License.
  *
  */
-define(["dojo/_base/xhr",
-        "dojo/_base/array",
-        "dojo/_base/event",
-        "dojo/_base/lang",
-        "dojo/_base/window",
-        "dojo/dom",
-        "dojo/dom-construct",
+define(["qpid/common/util",
         "dijit/registry",
-        "dojo/parser",
-        'dojo/json',
-        "dojo/query",
         "dojo/store/Memory",
         "dojo/data/ObjectStore",
-        "dojo/text!virtualhostnode/bdb_ha/edit.html",
-        "dijit/Dialog",
-        "dijit/form/CheckBox",
-        "dijit/form/FilteringSelect",
-        "dijit/form/ValidationTextBox",
-        "dijit/form/Button",
-        "dijit/form/Form",
-        "dojox/validate/us",
-        "dojox/validate/web",
         "dojo/domReady!"],
-  function (xhr, array, event, lang, win, dom, domConstruct, registry, parser, json, query, Memory, ObjectStore, template)
-  {
-    var fields = [ "storePath", "name", "groupName", "address",
-                   "designatedPrimary", "priority",  "quorumOverride"];
-
-    var bdbHaNodeEditor =
-    {
-      init: function()
-      {
-        var that=this;
-        this.containerNode = domConstruct.create("div", {innerHTML: template});
-        parser.parse(this.containerNode);
-        this.dialog = registry.byId("editBDBHANodeDialog")
-        this.saveButton = registry.byId("editBDBHANode.saveButton");
-        this.cancelButton = registry.byId("editBDBHANode.cancelButton");
-        this.cancelButton.on("click", function(e){that._cancel(e);});
-        this.saveButton.on("click", function(e){that._save(e);});
-        for(var i = 0; i < fields.length; i++)
-        {
-            var fieldName = fields[i];
-            this[fieldName] = registry.byId("editBDBHANode." + fieldName);
-        }
-        this.form = registry.byId("editBDBHANodeForm");
-      },
-      show: function(nodeName)
-      {
-        var that=this;
-        this.nodeName = nodeName;
-        this.query = "api/latest/virtualhostnode/" + encodeURIComponent(nodeName);
-        xhr.get(
-            {
-              url: this.query,
-              sync: true,
-              handleAs: "json",
-              load: function(data)
+   function (util, registry, Memory, ObjectStore)
+   {
+       var fields = [ "storePath", "name", "groupName", "address",
+                      "designatedPrimary", "priority",  "quorumOverride"];
+
+       return {
+           show: function(data)
+           {
+              var node = data.data;
+              util.buildEditUI(data.containerNode, "virtualhostnode/bdb_ha/edit.html", "editVirtualHostNode.", fields, node);
+              if ( !(data.data.state == "ERRORED" || data.data.state == "STOPPED"))
               {
-                that._show(data[0]);
+                  registry.byId("editVirtualHostNode.storePath").set("disabled", true);
               }
-            }
-        );
-      },
-      destroy: function()
-      {
-        if (this.dialog)
-        {
-            this.dialog.destroyRecursive();
-            this.dialog = null;
-        }
 
-        if (this.containerNode)
-        {
-            domConstruct.destroy(this.containerNode);
-            this.containerNode = null;
-        }
-      },
-      _cancel: function(e)
-      {
-          this.dialog.hide();
-      },
-      _save: function(e)
-      {
-        event.stop(e);
-        if(this.form.validate())
-        {
-          var data = {};
-          for(var i = 0; i < fields.length; i++)
-          {
-              var fieldName = fields[i];
-              var widget = this[fieldName];
-              if (!widget.get("disabled"))
+              var overrideData = [{id: '0', name: 'Majority', selected: '1'}];
+              if (node.remotereplicationnodes && node.remotereplicationnodes.length>1)
               {
-                  data[fieldName] = widget.hasOwnProperty("checked")? widget.get("checked"):widget.get("value");
+                  registry.byId("editVirtualHostNode.designatedPrimary").set("disabled", true);
+                  registry.byId("editVirtualHostNode.priority").set("disabled", false);
+                  registry.byId("editVirtualHostNode.quorumOverride").set("disabled", false);
+                  var overrideLimit = Math.floor((node.remotereplicationnodes.length + 1)/2);
+                  for(var i = 1; i <= overrideLimit; i++)
+                  {
+                    overrideData.push({id: i, name: i + ""});
+                  }
               }
-          }
-          var success = false,failureReason=null;
-          xhr.put({
-              url: this.query,
-              sync: true,
-              handleAs: "json",
-              headers: { "Content-Type": "application/json"},
-              putData: json.stringify(data),
-              load: function(x) {success = true; },
-              error: function(error) {success = false; failureReason = error;}
-          });
-
-          if(success === true)
-          {
-              this.dialog.hide();
-          }
-          else
-          {
-              alert("Error:" + failureReason);
-          }
-          }
-          else
-          {
-              alert('Form contains invalid data.  Please correct first');
-          }
-        },
-        _show:function(node)
-        {
-          for(var i = 0; i < fields.length; i++)
-          {
-            var fieldName = fields[i];
-            this[fieldName].set("value", node[fieldName]);
-          }
-
-          var overrideData = [{id: '0', name: 'Majority', selected: '1'}];
-
-          if (node.remotereplicationnodes && node.remotereplicationnodes.length>1)
-          {
-            this["designatedPrimary"].set("disabled", true);
-            this["priority"].set("disabled", false);
-            this["quorumOverride"].set("disabled", false);
-            var overrideLimit = Math.floor((node.remotereplicationnodes.length + 1)/2);
-            for(var i = 1; i <= overrideLimit; i++)
-            {
-              overrideData.push({id: i, name: i + ""});
-            }
-          }
-          else
-          {
-            this["designatedPrimary"].set("disabled", false);
-            this["priority"].set("disabled", true);
-            this["quorumOverride"].set("disabled", true);
-          }
-          var store = new Memory({data :overrideData, idProperty: "id" });
-          this["quorumOverride"].set("store", new ObjectStore({objectStore: store}));
-          this.dialog.show();
-        }
-    };
-
-    bdbHaNodeEditor.init();
-
-    return bdbHaNodeEditor;
-  }
-);
\ No newline at end of file
+              else
+              {
+                  registry.byId("editVirtualHostNode.designatedPrimary").set("disabled", false);
+                  registry.byId("editVirtualHostNode.priority").set("disabled", true);
+                  registry.byId("editVirtualHostNode.quorumOverride").set("disabled", true);
+              }
+              var store = new Memory({data :overrideData, idProperty: "id" });
+              registry.byId("editVirtualHostNode.quorumOverride").set("store", new ObjectStore({objectStore: store}));
+           }
+       };
+   }
+);

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js Fri Aug  1 18:08:31 2014
@@ -27,10 +27,9 @@ define(["dojo/_base/xhr",
         "dojox/grid/EnhancedGrid",
         "qpid/common/UpdatableStore",
         "qpid/management/UserPreferences",
-        "qpid/management/virtualhostnode/bdb_ha/edit",
         "qpid/common/util",
         "dojo/domReady!"],
-  function (xhr, connect, entities, query, json, registry, EnhancedGrid, UpdatableStore, UserPreferences, edit, util)
+  function (xhr, connect, entities, query, json, registry, EnhancedGrid, UpdatableStore, UserPreferences, util)
   {
     var priorityNames = {'_0': 'Never', '_1': 'Default', '_2': 'Normal', '_3': 'High'};
     var nodeFields = ["storePath", "groupName", "role", "address", "designatedPrimary", "priority", "quorumOverride"];
@@ -154,18 +153,11 @@ define(["dojo/_base/xhr",
             }
           }
       );
-      this.parent.editNodeButton.set("disabled", false);
-      this.parent.editNodeButton.domNode.style.display = "inline";
-      this.parent.editNodeButton.on("click",
-          function(e)
-          {
-            edit.show(that.data.name);
-          }
-      );
     }
 
     BDBHA.prototype.update=function(data)
     {
+      this.parent.editNodeButton.set("disabled", false);
       this.data = data;
       for(var i = 0; i < nodeFields.length; i++)
       {

Added: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html?rev=1615187&view=auto
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html (added)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html Fri Aug  1 18:08:31 2014
@@ -0,0 +1,131 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<div>
+
+    <div style="clear:both">
+        <div class="formLabel-labelCell tableContainer-labelCell">Store overfull size (bytes):</div>
+        <div class="tableContainer-valueCell formLabel-controlCell">
+            <input data-dojo-type="dijit/form/NumberSpinner"
+                   id="editVirtualHost.storeOverfullSize"
+                   data-dojo-props="
+                              name: 'storeOverfullSize',
+                              placeHolder: 'size in bytes',
+                              required: false,
+                              title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages',
+                              constraints:{min:0,places:0}"/>
+        </div>
+    </div>
+    <div style="clear:both">
+        <div class="formLabel-labelCell tableContainer-labelCell">Store underfull size (bytes):</div>
+        <div class="tableContainer-valueCell formLabel-controlCell">
+            <input data-dojo-type="dijit/form/NumberSpinner"
+                   id="editVirtualHost.storeUnderfullSize"
+                   data-dojo-props="
+                              name: 'storeUnderfullSize',
+                              placeHolder: 'size in bytes',
+                              required: false,
+                              title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages',
+                              constraints:{min:0,places:0}"/>
+        </div>
+    </div>
+
+     <div class="formBox" style="clear:both">
+        <fieldset>
+            <legend>Permitted group nodes</legend>
+            <div style="clear:both">
+                <div class="formLabel-labelCell tableContainer-labelCell">Permitted addresses*:</div>
+                <div class="formLabel-controlCell tableContainer-valueCell addPermittedNodeList">
+                    <select type="text" id="editVirtualHost.permittedNodesList"
+                            data-dojo-type="dijit/form/MultiSelect"
+                            data-dojo-props="
+                                      multiple: true,
+                                      name: 'permittedNodeList',
+                                      readOnly : 'true',
+                                      excluded: true,
+                                      title: 'Enter permitted nodes'">
+                    </select> <!-- must use closing tag rather than shorthand - dojo bug? -->
+                    <input type="hidden" id="editVirtualHost.permittedNodes"
+                           data-dojo-type="dijit/form/ValidationTextBox"
+                           name="permittedNodes"/>
+                </div>
+                <button data-dojo-type="dijit/form/Button" id="editVirtualHost.permittedNodeRemove" data-dojo-props="label: '-'" ></button>
+            </div>
+
+            <div style="clear:both"></div>
+            <div style="clear:both">
+                <div class="formLabel-labelCell tableContainer-labelCell">Address:</div>
+                <div class="formLabel-controlCell tableContainer-valueCell">
+                    <input type="text" id="editVirtualHost.permittedNode"
+                           data-dojo-type="dijit/form/ValidationTextBox"
+                           data-dojo-props="
+                                      name: 'permittedNode',
+                                      placeHolder: 'host:port',
+                                      title: 'Enter address',
+                                      intermediateChanges: true,
+                                      pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
+                </div>
+                <button data-dojo-type="dijit/form/Button" id="editVirtualHost.permittedNodeAdd" data-dojo-props="label: '+'"></button>
+            </div>
+        </fieldset>
+    </div>
+
+    <div style="clear:both"></div>
+
+    <div class="formBox" style="clear:both">
+        <fieldset>
+        <legend>High availability durability</legend>
+        <div>
+            <div class="haOptionLabel">Master transaction sync policy</div>
+            <div>
+                <input data-dojo-type="dijit/form/RadioButton" type="radio" name="localTransactionSynchronizationPolicy" value="SYNC" id="editVirtualHost.localTransactionSynchronizationPolicy-SYNC"/>
+                <label>SYNC (the transaction will be written and synchronized to the disk; highest durability)</label>
+            </div>
+
+            <div>
+                <input data-dojo-type="dijit/form/RadioButton" type="radio" name="localTransactionSynchronizationPolicy" value="WRITE_NO_SYNC" id="editVirtualHost.localTransactionSynchronizationPolicy-WRITE_NO_SYNC"/>
+                <label>WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</label>
+            </div>
+
+            <div>
+                <input data-dojo-type="dijit/form/RadioButton" type="radio" name="localTransactionSynchronizationPolicy" value="NO_SYNC" id="editVirtualHost.localTransactionSynchronizationPolicy-NO_SYNC"/>
+                <label>NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</label>
+            </div>
+        </div>
+        <br/>
+        <div>
+            <div class="haOptionLabel">Replica transaction sync policy</div>
+            <div>
+                <input data-dojo-type="dijit/form/RadioButton" type="radio" name="remoteTransactionSynchronizationPolicy" value="SYNC"  id="editVirtualHost.remoteTransactionSynchronizationPolicy-SYNC"/>
+                <label>SYNC (the transaction will be written and synchronized to the disk; highest durability)</label>
+            </div>
+
+            <div>
+                <input data-dojo-type="dijit/form/RadioButton" type="radio" name="remoteTransactionSynchronizationPolicy"  value="WRITE_NO_SYNC"  id="editVirtualHost.remoteTransactionSynchronizationPolicy-WRITE_NO_SYNC"/>
+                <label>WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</label>
+            </div>
+
+            <div>
+                <input data-dojo-type="dijit/form/RadioButton" type="radio" name="remoteTransactionSynchronizationPolicy" value="NO_SYNC"  id="editVirtualHost.remoteTransactionSynchronizationPolicy-NO_SYNC"/>
+                <label>NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</label>
+            </div>
+        </div>
+        </fieldset>
+    </div>
+
+</div>

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html Fri Aug  1 18:08:31 2014
@@ -19,15 +19,15 @@
 
 <div>
   <div style="clear:both">
-      <div class="formLabel-labelCell">Store Overfull Limit:</div>
+      <div class="formLabel-labelCell">Store overfull size:</div>
       <div><span class="storeOverfullSize" ></span> bytes</div>
   </div>
   <div style="clear:both">
-      <div class="formLabel-labelCell">Store Underfull Limit:</div>
+      <div class="formLabel-labelCell">Store underfull size:</div>
       <div><span class="storeUnderfullSize"></span> bytes</div>
   </div>
   <div style="clear:both">
-      <div class="formLabel-labelCell">Permitted Nodes:</div>
+      <div class="formLabel-labelCell">Permitted nodes:</div>
       <div class="permittedNodes multiLineValue"></div>
   </div>
   <div style="clear:both"></div>
@@ -35,7 +35,7 @@
 
   <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'High Availability Durability',  open: true">
       <div style="clear:both">
-          <div class="formLabel-labelCell">Local Transaction Sync Policy:</div>
+          <div class="formLabel-labelCell">Master transaction sync policy:</div>
           <div class="localTransactionSynchronizationPolicy">
             <span class="localTransactionSynchronizationPolicy-sync">SYNC (the transaction will be written and synchronized to the disk; highest durability)</span>
             <span class="localTransactionSynchronizationPolicy-write_no_sync">WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</span>
@@ -43,7 +43,7 @@
           </div>
       </div>
       <div style="clear:both">
-          <div class="formLabel-labelCell">Remote Transaction Sync Policy:</div>
+          <div class="formLabel-labelCell">Replica transaction sync policy:</div>
           <div class="remoteTransactionSynchronizationPolicy">
               <span class="remoteTransactionSynchronizationPolicy-sync">SYNC (the transaction will be written and synchronized to the disk; highest durability)</span>
               <span class="remoteTransactionSynchronizationPolicy-write_no_sync">WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</span>

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html Fri Aug  1 18:08:31 2014
@@ -16,7 +16,7 @@
   -->
 <div>
   <div style="clear:both">
-    <div class="formLabel-labelCell">Store Path:</div>
+    <div class="formLabel-labelCell">Configuration store path:</div>
     <div class="storePath"></div>
   </div>
   <div style="clear:both"></div>

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html Fri Aug  1 18:08:31 2014
@@ -73,9 +73,7 @@
                                       title: 'Enter permitted nodes'">
                     </select> <!-- must use closing tag rather than shorthand - dojo bug? -->
                 </div>
-                <div class="formBoxButtons">
-                    <button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.permittedNodeRemove" data-dojo-props="label: '-'" ></button>
-                </div>
+                <button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.permittedNodeRemove" data-dojo-props="label: '-'" ></button>
             </div>
 
             <div style="clear:both"></div>
@@ -91,9 +89,7 @@
                                       intermediateChanges: true,
                                       pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
                 </div>
-                <div class="formBoxButtons">
-                    <button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.permittedNodeAdd" data-dojo-props="label: '+'"></button>
-                </div>
+                <button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.permittedNodeAdd" data-dojo-props="label: '+'"></button>
             </div>
         </fieldset>
     </div>

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html Fri Aug  1 18:08:31 2014
@@ -14,120 +14,96 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<div class="dijitHidden">
-  <div data-dojo-type="dijit/Dialog" data-dojo-props="title:'Edit BDB HA Virtual Host Node'" id="editBDBHANodeDialog">
-      <form id="editBDBHANodeForm" method="post" data-dojo-type="dijit/form/Form">
-          <table class="tableContainer-table tableContainer-table-horiz">
-            <tr>
-                <td class="tableContainer-labelCell"><strong>Path to store location*: </strong></td>
-                <td class="tableContainer-valueCell">
-                    <input type="text" id="editBDBHANode.storePath"
-                          data-dojo-type="dijit/form/ValidationTextBox"
-                          data-dojo-props="
-                            name: 'storePath',
-                            placeHolder: '/path/to/message/store',
-                            required: true,
-                            disabled: true,
-                            missingMessage: 'A store path must be supplied',
-                            title: 'Enter path to the store folder'" />
-                </td>
-            </tr>
-            <tr>
-                <td class="tableContainer-labelCell"><strong>Node Name*: </strong></td>
-                <td class="tableContainer-valueCell">
-                    <input type="text" id="editBDBHANode.name"
-                            data-dojo-type="dijit/form/ValidationTextBox"
-                            data-dojo-props="
-                                name: 'name',
-                                placeHolder: 'Node Name',
-                                required: true,
-                                disabled: true,
-                                missingMessage: 'A node name must be supplied',
-                                title: 'Enter node name',
-                                pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
-                </td>
-            </tr>
-            <tr>
-                <td class="tableContainer-labelCell"><strong>Replication Group*: </strong></td>
-                <td class="tableContainer-valueCell">
-                    <input type="text" id="editBDBHANode.groupName"
-                            data-dojo-type="dijit/form/ValidationTextBox"
-                            data-dojo-props="
-                                name: 'groupName',
-                                placeHolder: 'Group Name',
-                                required: true,
-                                disabled: true,
-                                missingMessage: 'A group name must be supplied',
-                                title: 'Enter group name',
-                                pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
-                </td>
-            </tr>
-            <tr>
-                <td class="tableContainer-labelCell"><strong>Address*: </strong></td>
-                <td class="tableContainer-valueCell">
-                    <input type="text" id="editBDBHANode.address"
-                            data-dojo-type="dijit/form/ValidationTextBox"
-                            data-dojo-props="
-                                name: 'address',
-                                placeHolder: 'host:port',
-                                disabled: true,
-                                required: true,
-                                missingMessage: 'A Host and Port must be supplied',
-                                invalidMessage: 'Must be of the form host:port',
-                                title: 'Enter Host and Port name',
-                                pattern: '^([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}$'" />
-                </td>
-            </tr>
-            <tr>
-                <td class="tableContainer-labelCell"><strong>Allow this node to operate solo: </strong></td>
-                <td class="tableContainer-valueCell">
-                    <input type="checkbox" id="editBDBHANode.designatedPrimary" checked="checked"
-                            data-dojo-type="dijit/form/CheckBox"
-                            data-dojo-props="
-                                name: 'designatedPrimary',
+<div>
+    <div style="clear:both">
+        <div class="formLabel-labelCell tableContainer-labelCell">Replication Group*:</div>
+        <div class="formLabel-controlCell tableContainer-valueCell">
+            <input type="text" id="editVirtualHostNode.groupName"
+                   data-dojo-type="dijit/form/ValidationTextBox"
+                   data-dojo-props="
+                                    name: 'groupName',
+                                    placeHolder: 'Group Name',
+                                    required: true,
+                                    disabled: true,
+                                    missingMessage: 'A group name must be supplied',
+                                    title: 'Enter group name',
+                                    pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
+        </div>
+    </div>
+    <div style="clear:both">
+        <div class="formLabel-labelCell tableContainer-labelCell">Address*:</div>
+        <div class="formLabel-controlCell tableContainer-valueCell">
+            <input type="text" id="editVirtualHostNode.address"
+                   data-dojo-type="dijit/form/ValidationTextBox"
+                   data-dojo-props="
+                                    name: 'address',
+                                    placeHolder: 'host:port',
+                                    required: true,
+                                    disabled: true,
+                                    missingMessage: 'A Host and Port must be supplied',
+                                    invalidMessage: 'Must be of the form host:port',
+                                    title: 'Enter Host and Port name',
+                                    pattern: '^([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}$'" />
+        </div>
+    </div>
+    <div style="clear:both">
+        <div class="formLabel-labelCell tableContainer-labelCell">Configuration store path*:</div>
+        <div class="formLabel-controlCell tableContainer-valueCell">
+            <input type="text" id="editVirtualHostNode.storePath"
+                   data-dojo-type="dijit/form/ValidationTextBox"
+                   data-dojo-props="
+                                  name: 'storePath',
+                                  placeHolder: 'path/to/store',
+                                  required: true,
+                                  missingMessage: 'Store path must be supplied',
+                                  title: 'Enter configuration store path'" />
+        </div>
+    </div>
+    <div style="clear:both">
+        <div class="formLabel-labelCell tableContainer-labelCell">Allow this node to operate solo: </div>
+        <div class="formLabel-controlCell tableContainer-valueCell">
+            <input type="checkbox" id="editVirtualHostNode.designatedPrimary" checked="checked"
+                   data-dojo-type="dijit/form/CheckBox"
+                   data-dojo-props="
+                                    name: 'designatedPrimary',
+                                    required: false,
+                                    title: 'Designate node as primary. It is applicable only to 2-nodes cluster'" />
+        </div>
+    </div>
+    <div style="clear:both">
+        <div class="formLabel-labelCell tableContainer-labelCell">Election priority of this node: </div>
+        <div class="formLabel-controlCell tableContainer-valueCell">
+            <div data-dojo-type="dojo/store/Memory" data-dojo-id="nodePriorityStore"
+                 data-dojo-props="data: [
+                                                      {id: '0', name: 'Never'},
+                                                      {id: '1', name: 'Default', selected: '1'},
+                                                      {id: '2', name: 'Normal'},
+                                                      {id: '3', name: 'High'}
+                                                   ]"></div>
+            <input id="editVirtualHostNode.priority" data-dojo-type="dijit/form/FilteringSelect" value="1"
+                   data-dojo-props="
+                                name: 'priority',
                                 required: false,
-                                title: 'Designate node as primary. It is applicable only to 2-nodes cluster'" />
-                </td>
-            </tr>
-            <tr>
-                <td class="tableContainer-labelCell"><strong>Election priority of this node: </strong></td>
-                <td class="tableContainer-valueCell">
-                    <div data-dojo-type="dojo/store/Memory" data-dojo-id="nodePriorityStore"
-                        data-dojo-props="data: [
-                                                  {id: '0', name: 'Never'},
-                                                  {id: '1', name: 'Default', selected: '1'},
-                                                  {id: '2', name: 'Normal'},
-                                                  {id: '3', name: 'High'}
-                                               ]"></div>
-                    <input id="editBDBHANode.priority" data-dojo-type="dijit/form/FilteringSelect" value="1"
-                        data-dojo-props="
-                            name: 'priority',
-                            required: false,
-                            title: 'Select node priority for election as a Master',
-                            store: nodePriorityStore,
-                            searchAttr: 'name'" />
-                </td>
-            </tr>
-            <tr>
-                <td class="tableContainer-labelCell"><strong>Required minimum number of nodes: </strong></td>
-                <td class="tableContainer-valueCell">
-                     <div data-dojo-type="dojo/store/Memory" data-dojo-id="nodeQuorumOverrideStore"
-                        data-dojo-props="data: [{id: '0', name: 'Majority', selected: '1'}]"></div>
-                    <input type="text" id="editBDBHANode.quorumOverride"
-                        data-dojo-type="dijit/form/FilteringSelect" value="0"
-                        data-dojo-props="
-                            name: 'quorumOverride',
-                            required: false,
-                            title: 'Enter quorum override. 0 signifies simple majority',
-                            store: nodeQuorumOverrideStore,
-                            searchAttr: 'name'" />
-                </td>
-            </tr>
-          </table>
-          <div class="dijitDialogPaneActionBar">
-              <button data-dojo-type="dijit/form/Button" id="editBDBHANode.saveButton" data-dojo-props="label: 'Save'" type="submit">Save</button>
-              <button data-dojo-type="dijit/form/Button" id="editBDBHANode.cancelButton" data-dojo-props="label: 'Cancel'" ></button>
-          </div>
-      </form>
-  </div>
-</div>
+                                title: 'Select node priority for election as a Master',
+                                store: nodePriorityStore,
+                                searchAttr: 'name'" />
+        </div>
+    </div>
+    <div style="clear:both">
+        <div class="formLabel-labelCell tableContainer-labelCell">Required minimum number of nodes: </div>
+        <div class="formLabel-controlCell tableContainer-valueCell">
+            <div data-dojo-type="dojo/store/Memory" data-dojo-id="nodeQuorumOverrideStore"
+                 data-dojo-props="data: [{id: '0', name: 'Majority', selected: '1'}]"></div>
+            <input type="text" id="editVirtualHostNode.quorumOverride"
+                   data-dojo-type="dijit/form/FilteringSelect" value="0"
+                   data-dojo-props="
+                                name: 'quorumOverride',
+                                required: false,
+                                title: 'Enter quorum override. 0 signifies simple majority',
+                                store: nodeQuorumOverrideStore,
+                                searchAttr: 'name'" />
+        </div>
+    </div>
+
+    <div style="clear:both"></div>
+</div>
\ No newline at end of file

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html Fri Aug  1 18:08:31 2014
@@ -20,11 +20,11 @@
  -->
 <div>
   <div style="clear:both">
-      <div class="formLabel-labelCell">Group Name:</div>
+      <div class="formLabel-labelCell">Group name:</div>
       <div class="groupName"></div>
   </div>
   <div style="clear:both">
-       <div class="formLabel-labelCell">Store Path:</div>
+       <div class="formLabel-labelCell">Configuration store path:</div>
        <div class="storePath"></div>
   </div>
   <div style="clear:both">

Copied: qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js (from r1615185, qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js?p2=qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js&p1=qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js&r1=1615185&r2=1615187&rev=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js Fri Aug  1 18:08:31 2014
@@ -1,5 +1,4 @@
 /*
- *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,22 +15,16 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
 define(["qpid/common/util", "dojo/domReady!"],
-  function (util)
-  {
-    var fields = ["storePath"];
-
-    function DerbyNode(data)
-    {
-      util.buildUI(data.containerNode, data.parent, "virtualhostnode/derby/show.html", fields, this);
-    }
-
-    DerbyNode.prototype.update=function(data)
-    {
-      util.updateUI(data, fields, this);
-    };
-
-    return DerbyNode;
-});
+   function (util)
+   {
+       var fieldNames = ["storeUnderfullSize", "storeOverfullSize", "storePath"];
+       return {
+           show: function(data)
+           {
+              util.buildEditUI(data.containerNode, "virtualhost/sizemonitoring/edit.html", "editVirtualHost.", fieldNames, data.data);
+           }
+       };
+   }
+);

Copied: qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js (from r1615185, qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js?p2=qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js&p1=qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js&r1=1615185&r2=1615187&rev=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js Fri Aug  1 18:08:31 2014
@@ -16,18 +16,15 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
-define([],
-  function ()
-  {
-    function Memory(data)
-    {
-    }
-
-    Memory.prototype.update = function(data)
-    {
-    }
-
-    return Memory;
-  }
+define(["qpid/common/util", "dijit/registry", "dojo/domReady!"],
+   function (util, registry)
+   {
+       return {
+           show: function(data)
+           {
+              util.buildEditUI(data.containerNode, "virtualhostnode/filebased/edit.html", "editVirtualHostNode.", ["storePath"], data.data);
+              registry.byId("editVirtualHostNode.storePath").set("disabled", data.data.state != "STOPPED");
+           }
+       };
+   }
 );

Modified: qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js Fri Aug  1 18:08:31 2014
@@ -25,11 +25,13 @@ define(["qpid/common/util", "dojo/domRea
 
     function DerbyNode(data)
     {
+      this.parent = data.parent;
       util.buildUI(data.containerNode, data.parent, "virtualhostnode/derby/show.html", fields, this);
     }
 
     DerbyNode.prototype.update=function(data)
     {
+      this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED"));
       util.updateUI(data, fields, this);
     };
 

Modified: qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html Fri Aug  1 18:08:31 2014
@@ -16,6 +16,6 @@
   -->
 
 <div style="clear:both">
-    <div class="formLabel-labelCell">Store Path:</div>
+    <div class="formLabel-labelCell">Configuration store path:</div>
     <div class="storePath"></div>
 </div>

Added: qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js?rev=1615187&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js Fri Aug  1 18:08:31 2014
@@ -0,0 +1,55 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+define(["dojo/_base/xhr",
+        "dojo/dom",
+        "dojo/dom-construct",
+        "dojo/_base/window",
+        "dijit/registry",
+        "dojo/parser",
+        "dojo/domReady!"],
+    function (xhr, dom, construct, win, registry, parser) {
+        var fieldNames = ["maxConnectionsPerPartition", "minConnectionsPerPartition", "partitionCount"];
+        return {
+            show: function(data) {
+                var that = this;
+                xhr.get({url: "virtualhost/store/pool/bonecp/add.html",
+                     sync: true,
+                     load:  function(template) {
+                        for ( var i = 0 ; i < fieldNames.length; i++ )
+                        {
+                          var widgetName = fieldNames[i];
+                          var widget = registry.byId("formAddVirtualHost.qpid.jdbcstore.bonecp." + widgetName);
+                          if (widget)
+                          {
+                             widget.destroyRecursive();
+                          }
+                        }
+                        data.containerNode.innerHTML = template;
+                        parser.parse(data.containerNode);
+                        for ( var i = 0 ; i < fieldNames.length; i++ )
+                        {
+                          var widgetName = fieldNames[i];
+                          registry.byId("formAddVirtualHost.qpid.jdbcstore.bonecp." + widgetName).set("value", data.data.context["qpid.jdbcstore.bonecp." + widgetName]);
+                        }
+                     }});
+            }
+        };
+    });

Modified: qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html Fri Aug  1 18:08:31 2014
@@ -14,6 +14,9 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
+<div class="formBox" style="clear:both">
+<fieldset>
+<legend>BoneCP Settings</legend>
 <table class="tableContainer-table tableContainer-table-horiz">
 
   <tr>
@@ -54,3 +57,5 @@
   </tr>
 
 </table>
+</fieldset>
+</div>
\ No newline at end of file

Modified: qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html Fri Aug  1 18:08:31 2014
@@ -14,6 +14,9 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
+<div class="formBox" style="clear:both">
+<fieldset>
+<legend>BoneCP Settings</legend>
 <table class="tableContainer-table tableContainer-table-horiz">
 
   <tr>
@@ -54,3 +57,5 @@
   </tr>
 
 </table>
+</fieldset>
+</div>
\ No newline at end of file

Copied: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/edit.js (from r1615185, qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/edit.js?p2=qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/edit.js&p1=qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js&r1=1615185&r2=1615187&rev=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/edit.js Fri Aug  1 18:08:31 2014
@@ -1,4 +1,5 @@
 /*
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,19 +16,11 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
+ *
  */
-
 define([],
-  function ()
-  {
-    function Memory(data)
-    {
-    }
-
-    Memory.prototype.update = function(data)
-    {
-    }
-
-    return Memory;
-  }
+   function ()
+   {
+        return {show: function(data) {}};
+   }
 );

Added: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js?rev=1615187&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js Fri Aug  1 18:08:31 2014
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define(["qpid/common/util",
+        "dojo/text!service/helper?action=pluginList&plugin=JDBCConnectionProviderFactory",
+        "dojo/_base/array",
+        "dojo/json",
+        "dojo/string",
+        "dojo/store/Memory",
+        "dojo/dom",
+        "dojo/dom-construct",
+        "dijit/registry",
+        "dojo/domReady!"],
+   function (util, poolTypeJsonString, array, json, string, Memory, dom, domConstruct, registry)
+   {
+
+       var fieldNames = ["connectionUrl", "username", "connectionPoolType"];
+       return {
+           show: function(data)
+           {
+              util.buildEditUI(data.containerNode, "virtualhost/jdbc/edit.html", "editVirtualHost.", fieldNames, data.data);
+
+              var poolTypes = json.parse(poolTypeJsonString);
+              var poolTypesData = [];
+              for (var i =0 ; i < poolTypes.length; i++)
+              {
+                  poolTypesData[i]= {id: poolTypes[i], name: poolTypes[i]};
+              }
+              var poolTypesStore = new Memory({ data: poolTypesData });
+              var poolTypeControl = registry.byId("editVirtualHost.connectionPoolType");
+              poolTypeControl.set("store", poolTypesStore);
+              poolTypeControl.set("value", data.data.connectionPoolType);
+
+              var passwordControl = registry.byId("editVirtualHost.password");
+              if (data.data.password)
+              {
+                passwordControl.set("placeHolder", "*******");
+              }
+
+               var poolTypeFieldsDiv = dom.byId("editVirtualHost.poolSpecificDiv");
+               poolTypeControl.on("change",
+                      function(type)
+                      {
+                        if(type && string.trim(type) != "")
+                        {
+                            var widgets = registry.findWidgets(poolTypeFieldsDiv);
+                            array.forEach(widgets, function(item) { item.destroyRecursive();});
+                            domConstruct.empty(poolTypeFieldsDiv);
+
+                            require(["qpid/management/store/pool/"+type.toLowerCase()+"/edit"],
+                            function(poolType)
+                            {
+                                poolType.show({containerNode:poolTypeFieldsDiv, data: data.data})
+                            });
+                        }
+                      }
+               );
+           }
+       };
+   }
+);

Modified: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js Fri Aug  1 18:08:31 2014
@@ -18,8 +18,8 @@
  * under the License.
  *
  */
-define(["qpid/common/util", "dojo/query", "dojo/domReady!"],
-  function (util, query)
+define(["qpid/common/util", "dojo/query", "dojo/_base/array", "dojo/dom-construct", "dijit/registry", "dojo/domReady!"],
+  function (util, query, array, domConstruct, registry)
   {
     var fieldNames = ["connectionUrl", "username", "connectionPoolType"];
 
@@ -32,14 +32,19 @@ define(["qpid/common/util", "dojo/query"
 
     JDBC.prototype.update = function(data)
     {
+        var previousConnectionPoolType = this.connectionPoolType ? this.connectionPoolType.innerHTML : null;
         util.updateUI(data, fieldNames, this);
         this.usernameAttributeContainer.style.display = data.username ? "block" : "none";
-        if (!this.poolDetails)
+        if (!this.poolDetails || previousConnectionPoolType != data.connectionPoolType)
         {
             var that = this;
             require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"],
               function(PoolDetails)
               {
+                var widgets = registry.findWidgets(that.connectionPoolTypeAttributeContainer);
+                array.forEach(widgets, function(item) { item.destroyRecursive();});
+                domConstruct.empty(that.connectionPoolTypeAttributeContainer);
+
                 that.poolDetails = new PoolDetails({containerNode:that.connectionPoolTypeAttributeContainer, parent: that});
                 that.poolDetails.update(data);
               }

Added: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js?rev=1615187&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js Fri Aug  1 18:08:31 2014
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define(["qpid/common/util",
+        "dojo/text!service/helper?action=pluginList&plugin=JDBCConnectionProviderFactory",
+        "dojo/_base/array",
+        "dojo/json",
+        "dojo/string",
+        "dojo/store/Memory",
+        "dojo/dom",
+        "dojo/dom-construct",
+        "dijit/registry",
+        "dojo/domReady!"],
+   function (util, poolTypeJsonString, array, json, string, Memory, dom, domConstruct, registry)
+   {
+        var fieldNames = ["connectionUrl", "username", "connectionPoolType"];
+        return {
+            show: function(data)
+            {
+                util.buildEditUI(data.containerNode, "virtualhostnode/jdbc/edit.html", "editVirtualHostNode.", fieldNames, data.data);
+                if (!(data.data.state == "STOPPED" || data.data.state == "ERRORED"))
+                {
+                   for( var i = 0 ; i < fieldNames.length ; i++ )
+                   {
+                      registry.byId("editVirtualHostNode." + fieldNames[i]).set("disabled", true);
+                   }
+                   registry.byId("editVirtualHostNode.password").set("disabled", true);
+                }
+
+                var poolTypes = json.parse(poolTypeJsonString);
+                var poolTypesData = [];
+                for (var i =0 ; i < poolTypes.length; i++)
+                {
+                    poolTypesData[i]= {id: poolTypes[i], name: poolTypes[i]};
+                }
+                var poolTypesStore = new Memory({ data: poolTypesData });
+                var poolTypeControl = registry.byId("editVirtualHostNode.connectionPoolType");
+                poolTypeControl.set("store", poolTypesStore);
+                poolTypeControl.set("value", data.data.connectionPoolType);
+
+                var passwordControl = registry.byId("editVirtualHostNode.password");
+                if (data.data.password)
+                {
+                  passwordControl.set("placeHolder", "*******");
+                }
+
+                 var poolTypeFieldsDiv = dom.byId("editVirtualHostNode.poolSpecificDiv");
+                 poolTypeControl.on("change",
+                        function(type)
+                        {
+                          if(type && string.trim(type) != "")
+                          {
+                              var widgets = registry.findWidgets(poolTypeFieldsDiv);
+                              array.forEach(widgets, function(item) { item.destroyRecursive();});
+                              domConstruct.empty(poolTypeFieldsDiv);
+
+                              require(["qpid/management/store/pool/"+type.toLowerCase()+"/edit"],
+                              function(poolType)
+                              {
+                                  poolType.show({containerNode:poolTypeFieldsDiv, data: data.data})
+
+                                  if (!(data.data.state == "STOPPED" || data.data.state == "ERRORED"))
+                                  {
+                                      var widgets = registry.findWidgets(poolTypeFieldsDiv);
+                                      array.forEach(widgets, function(item) { item.set("disabled", true);});
+                                  }
+                              });
+                          }
+                        }
+                 );
+            }
+        };
+    }
+);

Modified: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js?rev=1615187&r1=1615186&r2=1615187&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js Fri Aug  1 18:08:31 2014
@@ -19,15 +19,14 @@
  *
  */
 
-define(["qpid/common/util",
-        "dojo/query",
-        "dojo/domReady!"],
-  function (util, query)
+define(["qpid/common/util", "dojo/query", "dojo/_base/array", "dojo/dom-construct", "dijit/registry", "dojo/domReady!"],
+  function (util, query, array, domConstruct, registry)
   {
     var fieldNames = ["connectionUrl", "username", "connectionPoolType"];
 
     function Jdbc(data)
     {
+      this.parent = data.parent;
       util.buildUI(data.containerNode, data.parent, "virtualhostnode/jdbc/show.html", fieldNames, this);
 
       this.usernameAttributeContainer=query(".usernameAttributeContainer", data.containerNode)[0];
@@ -36,15 +35,21 @@ define(["qpid/common/util",
 
     Jdbc.prototype.update=function(data)
     {
+      var previousConnectionPoolType = this.connectionPoolType ? this.connectionPoolType.innerHTML : null;
+      this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED"));
       util.updateUI(data, fieldNames, this);
 
       this.usernameAttributeContainer.style.display = data.username ? "block" : "none";
-      if (!this.poolDetails)
+      if (!this.poolDetails || previousConnectionPoolType != data.connectionPoolType)
       {
         var that = this;
         require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"],
           function(PoolDetails)
           {
+            var widgets = registry.findWidgets(that.connectionPoolTypeAttributeContainer);
+            array.forEach(widgets, function(item) { item.destroyRecursive();});
+            domConstruct.empty(that.connectionPoolTypeAttributeContainer);
+
             that.poolDetails = new PoolDetails({containerNode:that.connectionPoolTypeAttributeContainer, parent: that});
             that.poolDetails.update(data);
           }

Added: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html?rev=1615187&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html Fri Aug  1 18:08:31 2014
@@ -0,0 +1,79 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<div>
+    <div style="clear:both">
+      <div class="formLabel-labelCell tableContainer-labelCell">JDBC Url*:</div>
+      <div class="formLabel-controlCell tableContainer-valueCell">
+          <input type="text" id="editVirtualHost.connectionUrl"
+                          data-dojo-type="dijit/form/ValidationTextBox"
+                          data-dojo-props="
+                              name: 'connectionUrl',
+                              placeHolder: 'jdbc:provider:info',
+                              required: true,
+                              missingMessage: 'JDBC URL must be supplied',
+                              title: 'Enter JDBC URL',
+                              pattern: '^jdbc:.*:.*$'"/>
+      </div>
+    </div>
+    <div style="clear:both">
+        <div class="formLabel-labelCell tableContainer-labelCell">Username*:</div>
+        <div class="formLabel-controlCell tableContainer-valueCell">
+            <input type="text" id="editVirtualHost.username"
+                   data-dojo-type="dijit/form/ValidationTextBox"
+                   data-dojo-props="
+                              name: 'username',
+                              placeHolder: 'username',
+                              required: true,
+                              missingMessage: 'Username must be supplied',
+                              title: 'Enter username'" />
+        </div>
+    </div>
+    <div style="clear:both">
+        <div class="formLabel-labelCell tableContainer-labelCell">Password*:</div>
+        <div class="formLabel-controlCell tableContainer-valueCell">
+            <input type="password" id="editVirtualHost.password"
+                   data-dojo-type="dijit/form/ValidationTextBox"
+                   data-dojo-props="
+                              name: 'password',
+                              placeHolder: 'password',
+                              type: 'password',
+                              required: false,
+                              missingMessage: 'Password must be supplied',
+                              title: 'Enter password'" />
+        </div>
+    </div>
+    <div style="clear:both">
+      <div class="formLabel-labelCell tableContainer-labelCell">Connection Pool*:</div>
+      <div class="formLabel-controlCell tableContainer-valueCell">
+          <input type="text" id="editVirtualHost.connectionPoolType"
+                          data-dojo-type="dijit/form/FilteringSelect"
+                          data-dojo-props="
+                              name: 'connectionPoolType',
+                              required: true,
+                              missingMessage: 'Connection Pool type must be supplied',
+                              title: 'Select Connection Pool',
+                              placeHolder: 'Select pool type'" />
+      </div>
+    </div>
+
+    <div style="clear:both"></div>
+    <div id="editVirtualHost.poolSpecificDiv"></div>
+
+</div>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org