diff options
| author | Alex Rudyy <orudyy@apache.org> | 2014-05-08 12:33:14 +0000 |
|---|---|---|
| committer | Alex Rudyy <orudyy@apache.org> | 2014-05-08 12:33:14 +0000 |
| commit | 54243c16cf78f1d82c642335deaa01aa9a1b341e (patch) | |
| tree | f5d5a21fd54f7baa4ab428806cd788e30f0f2409 /qpid/java/bdbstore/src | |
| parent | 1b084a726e939ca674748746696b8592d5ac692c (diff) | |
| download | qpid-python-54243c16cf78f1d82c642335deaa01aa9a1b341e.tar.gz | |
QPID-5413: Add functionality to close the deleted tab of virtual host node.
Display user friendly values for BDB HA VHN priority and quorum override
Fix tree view
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1593252 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/bdbstore/src')
3 files changed, 26 insertions, 8 deletions
diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js index 704f7a197c..b38d7eddc0 100644 --- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js +++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js @@ -31,8 +31,10 @@ define(["dojo/_base/xhr", "dojo/domReady!"], function (xhr, lang, connect, parser, json, entities, query, json, registry, UpdatableStore) { - function BdbNode(containerNode) + function BdbNode(data) { + var containerNode = data.containerNode; + this.parent = data.parent; var that = this; xhr.get({url: "virtualhostnode/bdb/show.html", sync: true, diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js index 49501990ca..c4ac3f3d91 100644 --- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js +++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js @@ -34,6 +34,7 @@ define(["dojo/_base/xhr", "dojo/domReady!"], function (xhr, lang, connect, parser, json, entities, query, json, registry, EnhancedGrid, UpdatableStore, UserPreferences, edit) { + var priorityNames = {'_0': 'Never', '_1': 'Default', '_2': 'Normal', '_3': 'High'}; var nodeFields = ["storePath", "groupName", "role", "address", "coalescingSync", "designatedPrimary", "durability", "priority", "quorumOverride"]; function findNode(nodeClass, containerNode) @@ -79,9 +80,13 @@ define(["dojo/_base/xhr", { alert("Error:" + failureReason); } + return success; } - function BDBHA(containerNode) { + function BDBHA(data) + { + var containerNode = data.containerNode; + this.parent = data.parent; var that = this; xhr.get({url: "virtualhostnode/bdb_ha/show.html", sync: true, @@ -186,8 +191,10 @@ define(["dojo/_base/xhr", { if (confirm("Deletion of virtual host node will delete both configuration and message data.\n\n Are you sure you want to delete virtual host node?")) { - sendRequest(that.data.name, that.data.name, "DELETE"); - // TODO: close tab + if (sendRequest(that.data.name, that.data.name, "DELETE")) + { + that.parent.destroy(); + } } } ); @@ -200,7 +207,18 @@ define(["dojo/_base/xhr", for(var i = 0; i < nodeFields.length; i++) { var name = nodeFields[i]; - this[name].innerHTML = entities.encode(String(data[name])); + if (name == "priority") + { + this[name].innerHTML = priorityNames["_" + data[name]]; + } + else if (name == "quorumOverride") + { + this[name].innerHTML = (data[name] == 0 ? "MAJORITY" : entities.encode(String(data[name]))); + } + else + { + this[name].innerHTML = entities.encode(String(data[name])); + } } this._updateGrid(this._convertConfig(data.environmentConfiguration), this.environmentConfigurationPanel, this.environmentConfigurationGrid ); @@ -233,7 +251,6 @@ define(["dojo/_base/xhr", this.priorityContainer.style.display="block"; this.quorumOverrideContainer.style.display="block"; } - this.deleteNodeButton.set("disabled", data.role=="MASTER"); }; BDBHA.prototype._updateGrid=function(conf, panel, updatableGrid) diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html index 18da913948..579ec12608 100644 --- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html +++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html @@ -55,7 +55,6 @@ <div class="formLabel-labelCell" style="float:left; width: 200px;">Required minimum number of nodes:</div> <div style="float:left;"> <span class="quorumOverride" >N/A</span> - <span style="margin-left: 20px;">[ 0 signifies simple majority ]</span> </div> </div> <div style="clear:both"></div> @@ -73,7 +72,7 @@ <button data-dojo-type="dijit.form.Button" class="startNodeButton" type="button" data-dojo-props="disabled: true">Start</button> <button data-dojo-type="dijit.form.Button" class="stopNodeButton" type="button" data-dojo-props="disabled: true">Stop</button> <button data-dojo-type="dijit.form.Button" class="editNodeButton" type="button">Edit</button> - <button data-dojo-type="dijit.form.Button" class="deleteNodeButton" data-dojo-props="iconClass: 'dijitIconDelete', disabled: true">Delete Node</button> + <button data-dojo-type="dijit.form.Button" class="deleteNodeButton" data-dojo-props="iconClass: 'dijitIconDelete'">Delete Node</button> </div> <br/> |
