You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ma...@apache.org on 2014/07/25 18:16:13 UTC
svn commit: r1613461 [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: macbean
Date: Fri Jul 25 16:16:12 2014
New Revision: 1613461
URL: http://svn.apache.org/r1613461
Log:
QPID-5928: [Java Broker] Implement or update virtualhostnode & virtualhost
Work completed by Alex Rudyy <or...@apache.org> and me.
Added:
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/show.js
- copied, changed from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html
qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/
qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
- copied, changed from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/show.js
- copied, changed from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js
- copied, changed from r1613440, 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/jdbc-provider-bone/src/main/java/resources/store/
qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/store/pool/
qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/store/pool/bonecp/
qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/store/pool/bonecp/show.html
qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/show.js
- copied, changed from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
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/virtualhostnode/store/
qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/store/pool/
qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/store/pool/none/
qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/store/pool/none/add.html
- copied, changed from r1613440, qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/add.html
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/management/editVirtualHost.js
qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/show.js
- copied, changed from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.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/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/show.js
- copied, changed from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js
- copied, changed from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
Removed:
qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/store/derby/add.js
qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhost/store/derby/add.html
qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/store/jdbc/add.html
qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/add.html
qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.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/show.js
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/show.html
qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecoverer.java
qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecovererTest.java
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-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java
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/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html
qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/preferences/filesystempreferences/show.html
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/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/virtualhostnode/json/show.js
qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showVirtualHost.html
qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showVirtualHostNode.html
Copied: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/show.js (from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/show.js?p2=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js&r1=1613440&r2=1613461&rev=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/show.js Fri Jul 25 16:16:12 2014
@@ -17,24 +17,22 @@
* under the License.
*/
-define(["dojo/_base/xhr",
- "dojo/parser",
- "dojo/dom",
- "dojo/dom-construct",
- "dojo/json",
- "dijit/registry",
- "dojo/text!virtualhost/sizemonitoring/add.html",
- "dijit/form/ValidationTextBox",
- "dijit/form/NumberTextBox",
+define(["qpid/common/util",
"dojo/domReady!"],
- function (xhr, parser, dom, domConstruct, json, registry, template)
+ function (util)
{
- return {
- show: function (data)
- {
- this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
- parser.parse(this.containerNode);
- }
- };
+ var fields = ["storePath", "storeUnderfullSize", "storeOverfullSize"];
+
+ function BDB(data)
+ {
+ util.buildUI(data.containerNode, data.parent, "virtualhost/sizemonitoring/show.html", fields, this);
+ }
+
+ BDB.prototype.update = function(data)
+ {
+ util.updateUI(data, fields, this);
+ }
+
+ return BDB;
}
);
Added: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js?rev=1613461&view=auto
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js (added)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js Fri Jul 25 16:16:12 2014
@@ -0,0 +1,69 @@
+/*
+ * 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/query", "dojo/domReady!"],
+ function (util, query)
+ {
+ var fields = [ "storeUnderfullSize", "storeOverfullSize", "permittedNodes"];
+ var syncPolicies = ["sync", "no_sync", "write_no_sync"];
+ var localTransactionSynchronizationPolicy = "localTransactionSynchronizationPolicy";
+ var remoteTransactionSynchronizationPolicy = "remoteTransactionSynchronizationPolicy";
+
+ function BDB(data)
+ {
+ util.buildUI(data.containerNode, data.parent, "virtualhost/bdb_ha/show.html", fields, this);
+ for(var i=0; i<syncPolicies.length;i++)
+ {
+ var policyName = syncPolicies[i];
+ this[localTransactionSynchronizationPolicy + "-" + policyName]= query("." + localTransactionSynchronizationPolicy + "-" + policyName, data.containerNode)[0];
+ this[remoteTransactionSynchronizationPolicy +"-" + policyName]= query("." + remoteTransactionSynchronizationPolicy + "-" + policyName, data.containerNode)[0];
+ }
+ }
+
+ BDB.prototype.update = function(data)
+ {
+ util.updateUI(data, fields, this);
+ var localSyncPolicy = data[localTransactionSynchronizationPolicy].toLowerCase();
+ var remoteSyncPolicy = data[remoteTransactionSynchronizationPolicy].toLowerCase();
+ for(var i=0; i<syncPolicies.length;i++)
+ {
+ var policyName = syncPolicies[i];
+ if (policyName==localSyncPolicy)
+ {
+ this[localTransactionSynchronizationPolicy + "-" + policyName].checked = true
+ }
+ else
+ {
+ this[localTransactionSynchronizationPolicy + "-" + policyName].checked = false
+ }
+
+ if (policyName==remoteSyncPolicy)
+ {
+ this[remoteTransactionSynchronizationPolicy + "-" + policyName].checked = true
+ }
+ else
+ {
+ this[remoteTransactionSynchronizationPolicy + "-" + policyName].checked = false
+ }
+ }
+ }
+
+ return BDB;
+ }
+);
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=1613461&r1=1613460&r2=1613461&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 Jul 25 16:16:12 2014
@@ -18,65 +18,19 @@
* under the License.
*
*/
-define(["dojo/_base/xhr",
- "dojo/_base/lang",
- "dojo/_base/connect",
- "dojo/parser",
- "dojo/string",
- "dojox/html/entities",
- "dojo/query",
- "dojo/json",
- "dijit/registry",
- "qpid/common/UpdatableStore",
- "dojo/domReady!"],
- function (xhr, lang, connect, parser, json, entities, query, json, registry, UpdatableStore)
+define(["qpid/common/util", "dojo/domReady!"],
+ function (util)
{
+ var fieldNames = ["storePath"];
+
function BdbNode(data)
{
- var containerNode = data.containerNode;
- this.parent = data.parent;
- var that = this;
- xhr.get({url: "virtualhostnode/bdb/show.html",
- sync: true,
- load: function(template) {
- containerNode.innerHTML = template;
- parser.parse(containerNode);
- }});
- this.storePath = query(".storePath", containerNode)[0];
- this.environmentConfigurationPanel = registry.byNode(query(".environmentConfigurationPanel", containerNode)[0]);
- this.environmentConfigurationGrid = new UpdatableStore([],
- query(".environmentConfiguration", containerNode)[0],
- [ {name: 'Name', field: 'id', width: '50%'}, {name: 'Value', field: 'value', width: '50%'} ],
- null,
- null,
- null, true );
+ util.buildUI(data.containerNode, data.parent, "virtualhostnode/bdb/show.html", fieldNames, this);
}
BdbNode.prototype.update=function(data)
{
- this.storePath.innerHTML = entities.encode(String(data.storePath));
- if (data.environmentConfiguration)
- {
- this.environmentConfigurationPanel.domNode.style.display="block";
- var conf = data.environmentConfiguration;
- var settings = [];
- for(var propName in conf)
- {
- if(conf.hasOwnProperty(propName))
- {
- settings.push({"id": propName, "value": conf[propName]});
- }
- }
- var changed = this.environmentConfigurationGrid.update(settings);
- if (changed)
- {
- this.environmentConfigurationGrid.grid._refresh();
- }
- }
- else
- {
- this.environmentConfigurationPanel.domNode.style.display="none";
- }
+ util.updateUI(data, fieldNames, this);
};
return BdbNode;
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=1613461&r1=1613460&r2=1613461&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 Jul 25 16:16:12 2014
@@ -19,10 +19,7 @@
*
*/
define(["dojo/_base/xhr",
- "dojo/_base/lang",
"dojo/_base/connect",
- "dojo/parser",
- "dojo/string",
"dojox/html/entities",
"dojo/query",
"dojo/json",
@@ -31,11 +28,12 @@ define(["dojo/_base/xhr",
"qpid/common/UpdatableStore",
"qpid/management/UserPreferences",
"qpid/management/virtualhostnode/bdb_ha/edit",
+ "qpid/common/util",
"dojo/domReady!"],
- function (xhr, lang, connect, parser, json, entities, query, json, registry, EnhancedGrid, UpdatableStore, UserPreferences, edit)
+ function (xhr, connect, entities, query, json, registry, EnhancedGrid, UpdatableStore, UserPreferences, edit, util)
{
var priorityNames = {'_0': 'Never', '_1': 'Default', '_2': 'Normal', '_3': 'High'};
- var nodeFields = ["storePath", "groupName", "role", "address", "designatedPrimary", "durability", "priority", "quorumOverride"];
+ var nodeFields = ["storePath", "groupName", "role", "address", "designatedPrimary", "priority", "quorumOverride"];
function findNode(nodeClass, containerNode)
{
@@ -88,36 +86,11 @@ define(["dojo/_base/xhr",
var containerNode = data.containerNode;
this.parent = data.parent;
var that = this;
- xhr.get({url: "virtualhostnode/bdb_ha/show.html",
- sync: true,
- load: function(template) {
- containerNode.innerHTML = template;
- parser.parse(containerNode);
- }});
-
- for(var i=0; i<nodeFields.length;i++)
- {
- var fieldName = nodeFields[i];
- this[fieldName]= findNode(fieldName, containerNode);
- }
+ util.buildUI(data.containerNode, data.parent, "virtualhostnode/bdb_ha/show.html", nodeFields, this);
this.designatedPrimaryContainer = findNode("designatedPrimaryContainer", containerNode);
this.priorityContainer = findNode("priorityContainer", containerNode);
this.quorumOverrideContainer = findNode("quorumOverrideContainer", containerNode);
- this.environmentConfigurationPanel = registry.byNode(query(".environmentConfigurationPanel", containerNode)[0]),
- this.environmentConfigurationGrid = new UpdatableStore([],
- query(".environmentConfiguration", containerNode)[0],
- [ {name: 'Name', field: 'id', width: '50%'}, {name: 'Value', field: 'value', width: '50%'} ],
- null,
- null,
- null, true );
- this.replicatedEnvironmentConfigurationPanel = registry.byNode(query(".replicatedEnvironmentConfigurationPanel", containerNode)[0]);
- this.replicatedEnvironmentConfigurationGrid = new UpdatableStore([],
- query(".replicatedEnvironmentConfiguration", containerNode)[0],
- [ {name: 'Name', field: 'id', width: '50%'}, {name: 'Value', field: 'value', width: '50%'} ],
- null,
- null,
- null, true );
this.membersGridPanel = registry.byNode(query(".membersGridPanel", containerNode)[0]);
this.membersGrid = new UpdatableStore([],
@@ -182,6 +155,7 @@ define(["dojo/_base/xhr",
}
);
this.parent.editNodeButton.set("disabled", false);
+ this.parent.editNodeButton.domNode.style.display = "inline";
this.parent.editNodeButton.on("click",
function(e)
{
@@ -210,9 +184,6 @@ define(["dojo/_base/xhr",
}
}
- this._updateGrid(this._convertConfig(data.environmentConfiguration), this.environmentConfigurationPanel, this.environmentConfigurationGrid );
- this._updateGrid(this._convertConfig(data.replicatedEnvironmentConfiguration), this.replicatedEnvironmentConfigurationPanel, this.replicatedEnvironmentConfigurationGrid );
-
var members = data.remotereplicationnodes;
if (members)
{
@@ -259,20 +230,5 @@ define(["dojo/_base/xhr",
}
}
- BDBHA.prototype._convertConfig=function(conf)
- {
- var settings = [];
- if (conf)
- {
- for(var propName in conf)
- {
- if(conf.hasOwnProperty(propName))
- {
- settings.push({"id": propName, "value": conf[propName]});
- }
- }
- }
- return settings;
- }
return BDBHA;
});
Added: 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=1613461&view=auto
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html (added)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html Fri Jul 25 16:16:12 2014
@@ -0,0 +1,75 @@
+<!--
+ ~ 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" style="float:left; width: 100px;">Store Overfull Limit:</div>
+ <div style="float:left;"><span class="storeOverfullSize" ></span> bytes</div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell" style="float:left; width: 100px;">Store Underfull Limit:</div>
+ <div style="float:left;"><span class="storeUnderfullSize"></span> bytes</div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell" style="float:left; width: 100px;">Permitted Nodes:</div>
+ <div class="permittedNodes" style="float:left;"></div>
+ </div>
+ <div style="clear:both"></div>
+ <br/>
+
+ <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'High Availability Durability', open: true">
+ <div>Before each transaction commit returns to the caller the following will be true:</div>
+ <div>
+ <div>At the master node, the node will have received the required minimum number of acknowledgements from the replica nodes and the transaction will have been:</div>
+ <div>
+ <input type="radio" disabled="true" class="localTransactionSynchronizationPolicy-sync" name="localTransactionSynchronizationPolicy" value="SYNC"/>
+ <label>written and synchronized to the disk [default - highest durability],</label>
+ </div>
+
+ <div>
+ <input type="radio" disabled="true" class="localTransactionSynchronizationPolicy-write_no_sync" name="localTransactionSynchronizationPolicy" value="WRITE_NO_SYNC"/>
+ <label>written only; the synchronization will be performed later,</label>
+ </div>
+
+ <div>
+ <input type="radio" class="localTransactionSynchronizationPolicy-no_sync" disabled="true" name="localTransactionSynchronizationPolicy" value="NO_SYNC"/>
+ <label>write later; the transaction will be written and synchronized later [lowest durability],</label>
+ </div>
+ </div>
+ <div>
+ <div>At the required minimum number od replica nodes, the transaction will have been:</div>
+ <div>
+ <input type="radio" disabled="true" class="remoteTransactionSynchronizationPolicy-sync" name="remoteTransactionSynchronizationPolicy" value="SYNC"/>
+ <label>written and synchronized to the disk [default - highest durability],</label>
+ </div>
+
+ <div>
+ <input type="radio" disabled="true" class="remoteTransactionSynchronizationPolicy-write_no_sync" name="remoteTransactionSynchronizationPolicy" value="WRITE_NO_SYNC"/>
+ <label>written only; the synchronization will be performed later,</label>
+ </div>
+
+ <div>
+ <input type="radio" class="remoteTransactionSynchronizationPolicy-no_sync" disabled="true" name="remoteTransactionSynchronizationPolicy" value="NO_SYNC"/>
+ <label>write later; the transaction will be written and synchronized later [lowest durability],</label>
+ </div>
+ </div>
+ </div>
+
+
+</div>
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=1613461&r1=1613460&r2=1613461&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 Jul 25 16:16:12 2014
@@ -20,7 +20,4 @@
<div class="storePath" style="float:left;"></div>
</div>
<div style="clear:both"></div>
- <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Environment Configuration', open: true" class="environmentConfigurationPanel">
- <div class="environmentConfiguration"></div>
- </div>
-</div>
\ No newline at end of file
+</div>
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=1613461&r1=1613460&r2=1613461&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 Jul 25 16:16:12 2014
@@ -35,10 +35,6 @@
<div class="formLabel-labelCell" style="float:left; width: 200px;">Address:</div>
<div class="address" style="float:left;">N/A</div>
</div>
- <div style="clear:both">
- <div class="formLabel-labelCell" style="float:left; width: 200px;">Durability:</div>
- <div class="durability" style="float:left;">N/A</div>
- </div>
<div style="clear:both" class="designatedPrimaryContainer">
<div class="formLabel-labelCell" style="float:left; width: 200px;">Allow this node to operate solo:</div>
<div class="designatedPrimary" style="float:left;">N/A</div>
@@ -54,16 +50,6 @@
</div>
</div>
<div style="clear:both"></div>
- <br/>
- <div style="clear:both" data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Environment Configuration'" class="environmentConfigurationPanel">
- <div class="environmentConfiguration"></div>
- </div>
- <div style="clear:both"></div>
- <br/>
- <div style="clear:both" data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Replicated Environment Configuration'" class="replicatedEnvironmentConfigurationPanel">
- <div class="replicatedEnvironmentConfiguration"></div>
- </div>
- <div style="clear:both"></div>
<div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Group nodes'" class="membersGridPanel">
<div class="groupMembers"></div>
<div class="groupMembersToolbar dijitDialogPaneActionBar">
Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecoverer.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecoverer.java?rev=1613461&r1=1613460&r2=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecoverer.java (original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecoverer.java Fri Jul 25 16:16:12 2014
@@ -242,7 +242,19 @@ public class BrokerStoreUpgraderAndRecov
addAttributeTransformer("createdBy", copyAttribute()).
addAttributeTransformer("storePath", mutateAttributeName("connectionURL")).
addAttributeTransformer("connectionURL", mutateAttributeName("connectionUrl")).
- addAttributeTransformer("connectionPool", mutateAttributeName("connectionPoolType")).
+ addAttributeTransformer("connectionPool", new AttributeTransformer()
+ {
+ @Override
+ public MutableEntry transform(MutableEntry entry)
+ {
+ Object value = entry.getValue();
+ if ("DEFAULT".equals(value))
+ {
+ value = "NONE";
+ }
+ return new MutableEntry("connectionPoolType", value);
+ }
+ }).
addAttributeTransformer("jdbcBigIntType", addContextVar("qpid.jdbcstore.bigIntType")).
addAttributeTransformer("jdbcBytesForBlob", addContextVar("qpid.jdbcstore.useBytesForBlob")).
addAttributeTransformer("jdbcBlobType", addContextVar("qpid.jdbcstore.blobType")).
Modified: qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecovererTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecovererTest.java?rev=1613461&r1=1613460&r2=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecovererTest.java (original)
+++ qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecovererTest.java Fri Jul 25 16:16:12 2014
@@ -63,7 +63,7 @@ public class BrokerStoreUpgraderAndRecov
mock(BrokerOptions.class));
}
- public void testUpgradeVirtualHostWithJDBCStore()
+ public void testUpgradeVirtualHostWithJDBCStoreAndBoneCPPool()
{
Map<String, Object> hostAttributes = new HashMap<>();
hostAttributes.put("name", "test");
@@ -114,6 +114,51 @@ public class BrokerStoreUpgraderAndRecov
assertEquals("Unexpected attributes", expectedAttributes, upgradedVirtualHostNodeRecord.getAttributes());
}
+ public void testUpgradeVirtualHostWithJDBCStoreAndDefaultPool()
+ {
+ Map<String, Object> hostAttributes = new HashMap<>();
+ hostAttributes.put("name", "test");
+ hostAttributes.put("modelVersion", "0.4");
+ hostAttributes.put("connectionPool", "DEFAULT");
+ hostAttributes.put("connectionURL", "jdbc:derby://localhost:1527/tmp/vh/test;create=true");
+ hostAttributes.put("createdBy", "webadmin");
+ hostAttributes.put("createdTime", 1401385905260l);
+ hostAttributes.put("storeType", "jdbc");
+ hostAttributes.put("type", "STANDARD");
+ hostAttributes.put("jdbcBigIntType", "mybigint");
+ hostAttributes.put("jdbcBlobType", "myblob");
+ hostAttributes.put("jdbcVarbinaryType", "myvarbinary");
+ hostAttributes.put("jdbcBytesForBlob", true);
+
+
+ ConfiguredObjectRecord virtualHostRecord = new ConfiguredObjectRecordImpl(UUID.randomUUID(), "VirtualHost",
+ hostAttributes, Collections.<String,ConfiguredObjectRecord>singletonMap("Broker", _brokerRecord));
+ DurableConfigurationStore dcs = new DurableConfigurationStoreStub(_brokerRecord, virtualHostRecord);
+
+ BrokerStoreUpgraderAndRecoverer recoverer = new BrokerStoreUpgraderAndRecoverer(_systemContext);
+ List<ConfiguredObjectRecord> records = recoverer.upgrade(dcs);
+
+ ConfiguredObjectRecord upgradedVirtualHostNodeRecord = findRecordById(virtualHostRecord.getId(), records);
+ assertEquals("Unexpected type", "VirtualHostNode", upgradedVirtualHostNodeRecord.getType());
+ Map<String,Object> expectedAttributes = new HashMap<>();
+ expectedAttributes.put("connectionPoolType", "NONE");
+ expectedAttributes.put("connectionUrl", "jdbc:derby://localhost:1527/tmp/vh/test;create=true");
+ expectedAttributes.put("createdBy", "webadmin");
+ expectedAttributes.put("createdTime", 1401385905260l);
+ expectedAttributes.put("name", "test");
+ expectedAttributes.put("type", "JDBC");
+
+ final Map<String, Object> context = new HashMap<>();
+ context.put("qpid.jdbcstore.bigIntType", "mybigint");
+ context.put("qpid.jdbcstore.varBinaryType", "myvarbinary");
+ context.put("qpid.jdbcstore.blobType", "myblob");
+ context.put("qpid.jdbcstore.useBytesForBlob", true);
+
+ expectedAttributes.put("context", context);
+
+ assertEquals("Unexpected attributes", expectedAttributes, upgradedVirtualHostNodeRecord.getAttributes());
+ }
+
public void testUpgradeVirtualHostWithDerbyStore()
{
Map<String, Object> hostAttributes = new HashMap<>();
Copied: qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js (from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js?p2=qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js&r1=1613440&r2=1613461&rev=1613461&view=diff
==============================================================================
(empty)
Copied: qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/show.js (from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/show.js?p2=qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js&r1=1613440&r2=1613461&rev=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/show.js Fri Jul 25 16:16:12 2014
@@ -17,24 +17,22 @@
* under the License.
*/
-define(["dojo/_base/xhr",
- "dojo/parser",
- "dojo/dom",
- "dojo/dom-construct",
- "dojo/json",
- "dijit/registry",
- "dojo/text!virtualhost/sizemonitoring/add.html",
- "dijit/form/ValidationTextBox",
- "dijit/form/NumberTextBox",
+define(["qpid/common/util",
"dojo/domReady!"],
- function (xhr, parser, dom, domConstruct, json, registry, template)
+ function (util)
{
- return {
- show: function (data)
- {
- this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
- parser.parse(this.containerNode);
- }
- };
+ var fields = ["storePath", "storeUnderfullSize", "storeOverfullSize"];
+
+ function Derby(data)
+ {
+ util.buildUI(data.containerNode, data.parent, "virtualhost/sizemonitoring/show.html", fields, this);
+ }
+
+ Derby.prototype.update = function(data)
+ {
+ util.updateUI(data, fields, this);
+ }
+
+ return Derby;
}
);
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=1613461&r1=1613460&r2=1613461&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 Jul 25 16:16:12 2014
@@ -18,34 +18,19 @@
* under the License.
*
*/
-define(["dojo/_base/xhr",
- "dojo/_base/lang",
- "dojo/_base/connect",
- "dojo/parser",
- "dojo/string",
- "dojox/html/entities",
- "dojo/query",
- "dojo/json",
- "dojo/domReady!"],
- function (xhr, lang, connect, parser, json, entities, query, json)
+define(["qpid/common/util", "dojo/domReady!"],
+ function (util)
{
+ var fields = ["storePath"];
+
function DerbyNode(data)
{
- var containerNode = data.containerNode;
- this.parent = data.parent;
- var that = this;
- xhr.get({url: "virtualhostnode/derby/show.html",
- sync: true,
- load: function(template) {
- containerNode.innerHTML = template;
- parser.parse(containerNode);
- }});
- this.storePath = query(".storePath", containerNode)[0];
+ util.buildUI(data.containerNode, data.parent, "virtualhostnode/derby/show.html", fields, this);
}
DerbyNode.prototype.update=function(data)
{
- this.storePath.innerHTML = entities.encode(String(data.storePath));
+ util.updateUI(data, fields, this);
};
return DerbyNode;
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=1613461&r1=1613460&r2=1613461&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 Jul 25 16:16:12 2014
@@ -16,6 +16,6 @@
-->
<div style="clear:both">
- <div class="formLabel-labelCell" style="float:left; width: 200px;">Store Path:</div>
- <div class="storePath" style="float:left;"></div>
-</div>
\ No newline at end of file
+ <div class="formLabel-labelCell" style="float:left; width: 200px;">Store Path:</div>
+ <div class="storePath" style="float:left;"></div>
+</div>
Copied: qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js (from r1613440, 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-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js?p2=qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js&p1=qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js&r1=1613440&r2=1613461&rev=1613461&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-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js Fri Jul 25 16:16:12 2014
@@ -29,14 +29,14 @@ define(["dojo/_base/xhr",
"dojo/domReady!"],
function (xhr, lang, connect, parser, json, entities, query, json)
{
- var fieldNames = ["connectionUrl", "bigIntType", "varBinaryType", "blobType", "bytesForBlob", "connectionPoolType"];
+ var fieldNames = ["maxConnectionsPerPartition", "minConnectionsPerPartition", "partitionCount"];
- function JdbcNode(data)
+ function BoneCP(data)
{
var containerNode = data.containerNode;
this.parent = data.parent;
var that = this;
- xhr.get({url: "virtualhostnode/jdbc/show.html",
+ xhr.get({url: "store/pool/bonecp/show.html",
sync: true,
load: function(template) {
containerNode.innerHTML = template;
@@ -49,15 +49,15 @@ define(["dojo/_base/xhr",
}
}
- JdbcNode.prototype.update=function(data)
+ BoneCP.prototype.update=function(data)
{
for(var i=0; i<fieldNames.length;i++)
{
var fieldName = fieldNames[i];
- var value = data[fieldName];
+ var value = data.context["qpid.jdbcstore.bonecp."+fieldName];
this[fieldName].innerHTML= value?entities.encode(String(value)):"";
}
};
- return JdbcNode;
+ return BoneCP;
});
Added: qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/store/pool/bonecp/show.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/store/pool/bonecp/show.html?rev=1613461&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/store/pool/bonecp/show.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/store/pool/bonecp/show.html Fri Jul 25 16:16:12 2014
@@ -0,0 +1,37 @@
+<!--
+ ~ 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>
+ <br/>
+ <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Bone Connection Pool Settings', open: false">
+ <div style="clear:both">
+ <div class="formLabel-labelCell" style="float:left; width: 200px;">Partition Count:</div>
+ <div class="partitionCount" style="float:left;"></div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell" style="float:left; width: 200px;">Minimum connections per Partition:</div>
+ <div class="minConnectionsPerPartition" style="float:left;"></div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell" style="float:left; width: 200px;">Maximum connections per Partition:</div>
+ <div class="maxConnectionsPerPartition" style="float:left;"></div>
+ </div>
+ <div style="clear:both"></div>
+ </div>
+</div>
+
Modified: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java?rev=1613461&r1=1613460&r2=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java Fri Jul 25 16:16:12 2014
@@ -30,7 +30,7 @@ import java.util.Set;
@PluggableService
public class DefaultConnectionProviderFactory implements JDBCConnectionProviderFactory
{
- public static final String TYPE = "DEFAULT";
+ public static final String TYPE = "NONE";
@Override
public String getType()
Copied: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/show.js (from r1613440, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.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/show.js?p2=qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js&r1=1613440&r2=1613461&rev=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/show.js Fri Jul 25 16:16:12 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,26 +16,18 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
+ *
*/
-
-define(["dojo/_base/xhr",
- "dojo/parser",
- "dojo/dom",
- "dojo/dom-construct",
- "dojo/json",
- "dijit/registry",
- "dojo/text!virtualhost/sizemonitoring/add.html",
- "dijit/form/ValidationTextBox",
- "dijit/form/NumberTextBox",
- "dojo/domReady!"],
- function (xhr, parser, dom, domConstruct, json, registry, template)
+define([],
+ function ()
{
- return {
- show: function (data)
- {
- this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
- parser.parse(this.containerNode);
- }
+ function NonePool(data)
+ {
+ }
+
+ NonePool.prototype.update=function(data)
+ {
};
- }
-);
+
+ return NonePool;
+});
Added: 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=1613461&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js Fri Jul 25 16:16:12 2014
@@ -0,0 +1,56 @@
+/*
+ *
+ * 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/query", "dojo/domReady!"],
+ function (util, query)
+ {
+ var fieldNames = ["connectionUrl", "username", "connectionPoolType"];
+
+ function JDBC(data)
+ {
+ util.buildUI(data.containerNode, data.parent, "virtualhostnode/jdbc/show.html", fieldNames, this);
+ this.usernameAttributeContainer=query(".usernameAttributeContainer", data.containerNode)[0];
+ this.connectionPoolTypeAttributeContainer=query(".connectionPoolTypeAttributeContainer", data.containerNode)[0];
+ }
+
+ JDBC.prototype.update = function(data)
+ {
+ util.updateUI(data, fieldNames, this);
+ this.usernameAttributeContainer.style.display = data.username ? "block" : "none";
+ if (!this.poolDetails)
+ {
+ var that = this;
+ require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"],
+ function(PoolDetails)
+ {
+ that.poolDetails = new PoolDetails({containerNode:that.connectionPoolTypeAttributeContainer, parent: that});
+ that.poolDetails.update(data);
+ }
+ );
+ }
+ else
+ {
+ this.poolDetails.update(data);
+ }
+ }
+
+ return JDBC;
+ }
+);
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=1613461&r1=1613460&r2=1613461&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 Jul 25 16:16:12 2014
@@ -18,46 +18,43 @@
* under the License.
*
*/
-define(["dojo/_base/xhr",
- "dojo/_base/lang",
- "dojo/_base/connect",
- "dojo/parser",
- "dojo/string",
- "dojox/html/entities",
+
+define(["qpid/common/util",
"dojo/query",
- "dojo/json",
"dojo/domReady!"],
- function (xhr, lang, connect, parser, json, entities, query, json)
+ function (util, query)
{
- var fieldNames = ["connectionUrl", "bigIntType", "varBinaryType", "blobType", "bytesForBlob", "connectionPoolType"];
+ var fieldNames = ["connectionUrl", "username", "connectionPoolType"];
- function JdbcNode(data)
+ function Jdbc(data)
{
- var containerNode = data.containerNode;
- this.parent = data.parent;
- var that = this;
- xhr.get({url: "virtualhostnode/jdbc/show.html",
- sync: true,
- load: function(template) {
- containerNode.innerHTML = template;
- parser.parse(containerNode);
- }});
- for(var i=0; i<fieldNames.length;i++)
- {
- var fieldName = fieldNames[i];
- this[fieldName]= query("." + fieldName, containerNode)[0];
- }
+ util.buildUI(data.containerNode, data.parent, "virtualhostnode/jdbc/show.html", fieldNames, this);
+
+ this.usernameAttributeContainer=query(".usernameAttributeContainer", data.containerNode)[0];
+ this.connectionPoolTypeAttributeContainer=query(".connectionPoolTypeAttributeContainer", data.containerNode)[0];
}
- JdbcNode.prototype.update=function(data)
+ Jdbc.prototype.update=function(data)
{
- for(var i=0; i<fieldNames.length;i++)
+ util.updateUI(data, fieldNames, this);
+
+ this.usernameAttributeContainer.style.display = data.username ? "block" : "none";
+ if (!this.poolDetails)
+ {
+ var that = this;
+ require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"],
+ function(PoolDetails)
+ {
+ that.poolDetails = new PoolDetails({containerNode:that.connectionPoolTypeAttributeContainer, parent: that});
+ that.poolDetails.update(data);
+ }
+ );
+ }
+ else
{
- var fieldName = fieldNames[i];
- var value = data[fieldName];
- this[fieldName].innerHTML= value?entities.encode(String(value)):"";
+ this.poolDetails.update(data);
}
};
- return JdbcNode;
+ return Jdbc;
});
Modified: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html?rev=1613461&r1=1613460&r2=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html Fri Jul 25 16:16:12 2014
@@ -19,26 +19,16 @@
<div class="formLabel-labelCell" style="float:left; width: 200px;">Connection URL:</div>
<div class="connectionUrl" style="float:left;"></div>
</div>
- <div style="clear:both">
- <div class="formLabel-labelCell" style="float:left; width: 200px;">Big Integer Type:</div>
- <div class="bigIntType" style="float:left;"></div>
- </div>
- <div style="clear:both">
- <div class="formLabel-labelCell" style="float:left; width: 200px;">Var Binary Type:</div>
- <div class="varBinaryType" style="float:left;"></div>
- </div>
- <div style="clear:both">
- <div class="formLabel-labelCell" style="float:left; width: 200px;">Blob Type:</div>
- <div class="blobType" style="float:left;"></div>
- </div>
- <div style="clear:both">
- <div class="formLabel-labelCell" style="float:left; width: 200px;">Bytes For Blob:</div>
- <div class="bytesForBlob" style="float:left;"></div>
+ <div class="usernameAttributeContainer" style="clear:both">
+ <div class="formLabel-labelCell" style="float:left; width: 200px;">Username:</div>
+ <div class="username" style="float:left;"></div>
</div>
<div style="clear:both">
<div class="formLabel-labelCell" style="float:left; width: 200px;">Connection Pool Type:</div>
<div class="connectionPoolType" style="float:left;"></div>
</div>
+ <div class="connectionPoolTypeAttributeContainer" style="clear:both"/>
+
<div style="clear:both"></div>
</div>
Copied: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/store/pool/none/add.html (from r1613440, qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/add.html)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/store/pool/none/add.html?p2=qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/store/pool/none/add.html&p1=qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/add.html&r1=1613440&r2=1613461&rev=1613461&view=diff
==============================================================================
(empty)
Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/preferences/filesystempreferences/show.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/preferences/filesystempreferences/show.html?rev=1613461&r1=1613460&r2=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/preferences/filesystempreferences/show.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/preferences/filesystempreferences/show.html Fri Jul 25 16:16:12 2014
@@ -18,4 +18,4 @@
<div style="clear:both">
<div class="formLabel-labelCell" style="float:left; width: 100px;">Path:</div>
<div class="fileSystemPreferencesProviderPath" style="float:left;"></div>
-</div>
\ No newline at end of file
+</div>
Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css?rev=1613461&r1=1613460&r2=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css Fri Jul 25 16:16:12 2014
@@ -205,4 +205,9 @@ div .messages {
font-style: italic;
}
+.dijitDialogPaneActionBar .editNodeButton
+{
+ display: none
+}
+
Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html?rev=1613461&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html Fri Jul 25 16:16:12 2014
@@ -0,0 +1,118 @@
+<!--
+ ~ 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 class="dijitHidden">
+ <div data-dojo-type="dijit/Dialog" data-dojo-props="title:'Edit Virtual Host'" id="editVirtualHostDialog">
+ <form id="editVirtualHostForm" method="post" data-dojo-type="dijit/form/Form">
+
+ <div id="editVirtualHost.typeFields"></div>
+
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Dead letter queue enabled:</div>
+ <div style="float:left;" class="tableContainer-valueCell formLabel-controlCell">
+ <input type="checkbox" id="editVirtualHost.queue.deadLetterQueueEnabled"
+ data-dojo-type="dijit/form/CheckBox"
+ data-dojo-props="name: 'queue.deadLetterQueueEnabled'">
+ </input>
+ </div>
+ </div>
+
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store Transaction Idle Timeout Warn:</div>
+ <div style="float:left;" class="tableContainer-valueCell formLabel-controlCell">
+ <input data-dojo-type="dijit/form/NumberSpinner"
+ id="editVirtualHost.storeTransactionIdleTimeoutWarn"
+ name="storeTransactionIdleTimeoutWarn"
+ smallDelta="1000"
+ constraints="{min: 0, places: 0, pattern: '#'}"
+ placeHolder="idle timeout warn time in ms"
+ missingMessage="An idle timeout warn time in ms must be supplied"/>
+ </div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store Transaction Idle Timeout Close:</div>
+ <div style="float:left;" class="tableContainer-valueCell formLabel-controlCell">
+ <input data-dojo-type="dijit/form/NumberSpinner"
+ id="editVirtualHost.storeTransactionIdleTimeoutClose"
+ name="storeTransactionIdleTimeoutClose"
+ smallDelta="1000"
+ constraints="{min: 0, places: 0, pattern: '#'}"
+ placeHolder="idle timeout close time in ms"
+ missingMessage="An idle timeout close time in ms must be supplied"/>
+ </div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store Transaction Open Timeout Warn:</div>
+ <div style="float:left;" class="tableContainer-valueCell formLabel-controlCell">
+ <input data-dojo-type="dijit/form/NumberSpinner"
+ id="editVirtualHost.storeTransactionOpenTimeoutWarn"
+ name="storeTransactionOpenTimeoutWarn"
+ smallDelta="1000"
+ constraints="{min: 0, places: 0, pattern: '#'}"
+ placeHolder="open timeout warn time in ms"
+ missingMessage="An open timeout warn time in ms must be supplied"/>
+ </div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store Transaction Open Timeout Close:</div>
+ <div style="float:left;" class="tableContainer-valueCell formLabel-controlCell">
+ <input data-dojo-type="dijit/form/NumberSpinner"
+ id="editVirtualHost.storeTransactionOpenTimeoutClose"
+ name="storeTransactionOpenTimeoutClose"
+ smallDelta="1000"
+ constraints="{min: 0, places: 0, pattern: '#'}"
+ placeHolder="open timeout close time in ms"
+ missingMessage="An open timeout close time in ms must be supplied"/>
+ </div>
+ </div>
+
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">House keeping check period (ms):</div>
+ <div style="float:left;" class="tableContainer-valueCell formLabel-controlCell">
+ <input data-dojo-type="dijit/form/NumberSpinner"
+ id="editVirtualHost.housekeepingCheckPeriod"
+ name="housekeepingCheckPeriod"
+ smallDelta="1000"
+ constraints="{min: 1, places: 0, pattern: '#'}"
+ placeHolder="house keeping check period in ms"
+ missingMessage="A house keeping check period must be supplied"/>
+ </div>
+ </div>
+
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">House keeping thread count:</div>
+ <div style="float:left;" class="tableContainer-valueCell formLabel-controlCell">
+ <input data-dojo-type="dijit/form/NumberSpinner"
+ id="editVirtualHost.housekeepingThreadCount"
+ name="housekeepingThreadCount"
+ smallDelta="1"
+ constraints="{min: 1, places: 0, pattern: '#'}"
+ placeHolder="house keeping thread count"
+ missingMessage="A house keeping thread count must be supplied"/>
+ </div>
+ </div>
+
+ <div style="clear:both"></div>
+
+ <div class="dijitDialogPaneActionBar">
+ <button data-dojo-type="dijit/form/Button" id="editVirtualHost.saveButton" data-dojo-props="label: 'Save'">Save</button>
+ <button data-dojo-type="dijit/form/Button" id="editVirtualHost.cancelButton" data-dojo-props="label: 'Cancel'" ></button>
+ </div>
+ </form>
+ </div>
+</div>
Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js?rev=1613461&r1=1613460&r2=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js Fri Jul 25 16:16:12 2014
@@ -26,6 +26,9 @@ define(["dojo/_base/xhr",
"dojo/dom-construct",
"dojo/dom-geometry",
"dojo/window",
+ "dojo/query",
+ "dojo/parser",
+ "dojox/html/entities",
"dijit/TitlePane",
"dijit/Dialog",
"dijit/form/Form",
@@ -38,7 +41,7 @@ define(["dojo/_base/xhr",
"dojox/validate/web",
"dojo/domReady!"
],
- function (xhr, event, json, lang, dom, geometry, win) {
+ function (xhr, event, json, lang, dom, geometry, win, query, parser, entities) {
var util = {};
if (Array.isArray) {
util.isArray = function (object) {
@@ -491,5 +494,73 @@ define(["dojo/_base/xhr",
return object1 === object2;
}
+ util.buildUI = function(containerNode, parent, htmlTemplateLocation, fieldNames, obj)
+ {
+ xhr.get({url: htmlTemplateLocation,
+ sync: true,
+ load: function(template) {
+ containerNode.innerHTML = template;
+ parser.parse(containerNode);
+ }});
+ for(var i=0; i<fieldNames.length;i++)
+ {
+ var fieldName = fieldNames[i];
+ obj[fieldName]= query("." + fieldName, containerNode)[0];
+ }
+ }
+
+ util.updateUI = function(data, fieldNames, obj)
+ {
+ for(var i=0; i<fieldNames.length;i++)
+ {
+ var fieldName = fieldNames[i];
+ var value = data[fieldName];
+ obj[fieldName].innerHTML= (value == undefined || value == null) ? "" : entities.encode(String(value));
+ }
+ }
+
+ util.getFormWidgetValues = function (form)
+ {
+ var values = {};
+ var formWidgets = form.getChildren();
+ for(var i in formWidgets)
+ {
+ var widget = formWidgets[i];
+ var value = widget.value;
+ var propName = widget.name;
+ if (propName && (widget.required || value ))
+ {
+ if (widget instanceof dijit.form.CheckBox)
+ {
+ values[ propName ] = widget.checked;
+ }
+ else if (widget instanceof dijit.form.RadioButton && value)
+ {
+ var currentValue = values[propName];
+ if (currentValue)
+ {
+ if (lang.isArray(currentValue))
+ {
+ currentValue.push(value)
+ }
+ else
+ {
+ values[ propName ] = [currentValue, value];
+ }
+ }
+ else
+ {
+ values[ propName ] = value;
+ }
+ }
+ else
+ {
+ values[ propName ] = value ? value: null;
+ }
+ }
+ }
+ return values;
+ }
+
return util;
});
Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/VirtualHost.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/VirtualHost.js?rev=1613461&r1=1613460&r2=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/VirtualHost.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/VirtualHost.js Fri Jul 25 16:16:12 2014
@@ -32,8 +32,9 @@ define(["dojo/_base/xhr",
"qpid/management/addQueue",
"qpid/management/addExchange",
"dojox/grid/EnhancedGrid",
+ "qpid/management/editVirtualHost",
"dojo/domReady!"],
- function (xhr, parser, query, connect, registry, entities, properties, updater, util, formatter, UpdatableStore, addQueue, addExchange, EnhancedGrid) {
+ function (xhr, parser, query, connect, registry, entities, properties, updater, util, formatter, UpdatableStore, addQueue, addExchange, EnhancedGrid, editVirtualHost) {
function VirtualHost(name, parent, controller) {
this.name = name;
@@ -52,21 +53,18 @@ define(["dojo/_base/xhr",
xhr.get({url: "showVirtualHost.html",
sync: true,
load: function(data) {
- contentPane.containerNode.innerHTML = data;
- parser.parse(contentPane.containerNode);
+ var containerNode = contentPane.containerNode;
+ containerNode.innerHTML = data;
+ parser.parse(containerNode);
- that.vhostUpdater = new Updater(contentPane.containerNode, that.modelObj, that.controller);
+ that.vhostUpdater = new Updater(containerNode, that.modelObj, that.controller, that);
- updater.add( that.vhostUpdater );
-
- that.vhostUpdater.update();
-
- var addQueueButton = query(".addQueueButton", contentPane.containerNode)[0];
+ var addQueueButton = query(".addQueueButton", containerNode)[0];
connect.connect(registry.byNode(addQueueButton), "onClick", function(evt){
addQueue.show({virtualhost:that.name,virtualhostnode:that.modelObj.parent.name})
});
- var deleteQueueButton = query(".deleteQueueButton", contentPane.containerNode)[0];
+ var deleteQueueButton = query(".deleteQueueButton", containerNode)[0];
connect.connect(registry.byNode(deleteQueueButton), "onClick",
function(evt){
util.deleteGridSelections(
@@ -77,10 +75,10 @@ define(["dojo/_base/xhr",
}
);
- var addExchangeButton = query(".addExchangeButton", contentPane.containerNode)[0];
+ var addExchangeButton = query(".addExchangeButton", containerNode)[0];
connect.connect(registry.byNode(addExchangeButton), "onClick", function(evt){ addExchange.show({virtualhost:that.name,virtualhostnode:that.modelObj.parent.name}) });
- var deleteExchangeButton = query(".deleteExchangeButton", contentPane.containerNode)[0];
+ var deleteExchangeButton = query(".deleteExchangeButton", containerNode)[0];
connect.connect(registry.byNode(deleteExchangeButton), "onClick",
function(evt)
{
@@ -91,6 +89,54 @@ define(["dojo/_base/xhr",
"Are you sure you want to delete exchange");
}
);
+
+ that.stopButton = registry.byNode(query(".stopButton", containerNode)[0]);
+ that.startButton = registry.byNode(query(".startButton", containerNode)[0]);
+ that.editButton = registry.byNode(query(".editButton", containerNode)[0]);
+ that.deleteButton = registry.byNode(query(".deleteButton", containerNode)[0]);
+ that.deleteButton.on("click",
+ function(e)
+ {
+ if (confirm("Deletion of virtual host will delete message data.\n\n"
+ + "Are you sure you want to delete virtual host '" + entities.encode(String(that.name)) + "'?"))
+ {
+ if (util.sendRequest("api/latest/virtualhost/" + encodeURIComponent(that.modelObj.parent.name) + "/" + encodeURIComponent( that.name) , "DELETE"))
+ {
+ that.destroy();
+ }
+ }
+ }
+ );
+ that.startButton.on("click",
+ function(event)
+ {
+ that.startButton.set("disabled", true);
+ util.sendRequest("api/latest/virtualhost/" + encodeURIComponent(that.modelObj.parent.name) + "/" + encodeURIComponent( that.name),
+ "PUT", {desiredState: "ACTIVE"});
+ });
+
+ that.stopButton.on("click",
+ function(event)
+ {
+ if (confirm("Stopping the virtual host will also stop its children. "
+ + "Are you sure you want to stop virtual host '"
+ + entities.encode(String(that.name)) +"'?"))
+ {
+ that.stopButton.set("disabled", true);
+ util.sendRequest("api/latest/virtualhost/" + encodeURIComponent(that.modelObj.parent.name) + "/" + encodeURIComponent( that.name),
+ "PUT", {desiredState: "STOPPED"});
+ }
+ });
+
+ that.editButton.on("click",
+ function(event)
+ {
+ editVirtualHost.show({nodeName:that.modelObj.parent.name,hostName:that.name});
+ });
+
+ that.vhostUpdater.update();
+ updater.add( that.vhostUpdater );
+
}});
};
@@ -99,9 +145,17 @@ define(["dojo/_base/xhr",
updater.remove( this.vhostUpdater );
};
- function Updater(node, vhost, controller)
+ VirtualHost.prototype.destroy = function()
{
+ this.close();
+ this.contentPane.onClose()
+ this.controller.tabContainer.removeChild(this.contentPane);
+ this.contentPane.destroyRecursive();
+ }
+ function Updater(node, vhost, controller, virtualHost)
+ {
+ this.virtualHost = virtualHost;
var that = this;
function findNode(name) {
@@ -116,6 +170,7 @@ define(["dojo/_base/xhr",
}
storeNodes(["name",
+ "type",
"state",
"durable",
"lifetimePolicy",
@@ -125,9 +180,15 @@ define(["dojo/_base/xhr",
"msgOutRate",
"bytesOutRate",
"bytesOutRateUnits",
- "storeType",
- "storePath",
- "configPath"]);
+ "virtualHostDetailsContainer",
+ "deadLetterQueueEnabled",
+ "housekeepingCheckPeriod",
+ "housekeepingThreadCount",
+ "storeTransactionIdleTimeoutClose",
+ "storeTransactionIdleTimeoutWarn",
+ "storeTransactionOpenTimeoutClose",
+ "storeTransactionOpenTimeoutWarn"
+ ]);
this.query = "api/latest/virtualhost/"+ encodeURIComponent(vhost.parent.name) + "/" + encodeURIComponent(vhost.name);
@@ -136,11 +197,6 @@ define(["dojo/_base/xhr",
xhr.get({url: this.query, sync: properties.useSyncGet, handleAs: "json"}).then(function(data) {
that.vhostData = data[0];
- if (!that.vhostData.hasOwnProperty("configPath"))
- {
- var node = findNode("configPathDiv");
- node.style.display = "none";
- }
// flatten statistics into attributes
util.flattenStatistics( that.vhostData );
@@ -231,24 +287,33 @@ define(["dojo/_base/xhr",
Updater.prototype.updateHeader = function()
{
this.name.innerHTML = entities.encode(String(this.vhostData[ "name" ]));
+ this.type.innerHTML = entities.encode(String(this.vhostData[ "type" ]));
this.state.innerHTML = entities.encode(String(this.vhostData[ "state" ]));
this.durable.innerHTML = entities.encode(String(this.vhostData[ "durable" ]));
this.lifetimePolicy.innerHTML = entities.encode(String(this.vhostData[ "lifetimePolicy" ]));
- if (this.vhostData.messageStoreSettings)
- {
- this.storeType.innerHTML = entities.encode(String(this.vhostData[ "messageStoreSettings" ].storeType));
- this.storePath.innerHTML = entities.encode(String(this.vhostData[ "messageStoreSettings" ].storePath));
- }
+ this.deadLetterQueueEnabled.innerHTML = entities.encode(String(this.vhostData[ "queue.deadLetterQueueEnabled" ]));
+ util.updateUI(this.vhostData,
+ ["housekeepingCheckPeriod",
+ "housekeepingThreadCount",
+ "storeTransactionIdleTimeoutClose",
+ "storeTransactionIdleTimeoutWarn",
+ "storeTransactionOpenTimeoutClose",
+ "storeTransactionOpenTimeoutWarn"],
+ this)
};
Updater.prototype.update = function()
{
-
var thisObj = this;
xhr.get({url: this.query, sync: properties.useSyncGet, handleAs: "json"})
.then(function(data) {
thisObj.vhostData = data[0];
+
+ thisObj.virtualHost.startButton.set("disabled", thisObj.vhostData.state != "STOPPED");
+ thisObj.virtualHost.stopButton.set("disabled", thisObj.vhostData.state != "ACTIVE");
+ thisObj.virtualHost.editButton.set("disabled", false);
+
util.flattenStatistics( thisObj.vhostData );
var connections = thisObj.vhostData[ "connections" ];
var queues = thisObj.vhostData[ "queues" ];
@@ -348,7 +413,20 @@ define(["dojo/_base/xhr",
// update connections
thisObj.connectionsGrid.update(thisObj.vhostData.connections)
-
+ if (thisObj.details)
+ {
+ thisObj.details.update(thisObj.vhostData);
+ }
+ else
+ {
+ require(["qpid/management/virtualhost/" + thisObj.vhostData.type.toLowerCase() + "/show"],
+ function(VirtualHostDetails)
+ {
+ thisObj.details = new VirtualHostDetails({containerNode:thisObj.virtualHostDetailsContainer, parent: thisObj});
+ thisObj.details.update(thisObj.vhostData);
+ }
+ );
+ }
});
};
Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/VirtualHostNode.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/VirtualHostNode.js?rev=1613461&r1=1613460&r2=1613461&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/VirtualHostNode.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/VirtualHostNode.js Fri Jul 25 16:16:12 2014
@@ -138,7 +138,7 @@ define(["dojo/_base/xhr",
}
}
- storeNodes(["name", "state", "type", "messageStoreProviderYes","messageStoreProviderNo"]);
+ storeNodes(["name", "state", "type"]);
this.detailsDiv = findNode("virtualhostnodedetails");
this.query = "api/latest/virtualhostnode/" + encodeURIComponent(nodeObject.name);
@@ -163,8 +163,6 @@ define(["dojo/_base/xhr",
this.name.innerHTML = entities.encode(String(data[ "name" ]));
this.state.innerHTML = entities.encode(String(data[ "state" ]));
this.type.innerHTML = entities.encode(String(data[ "type" ]));
- this.messageStoreProviderYes.style.display = data.messageStoreProvider? "block" : "none";
- this.messageStoreProviderNo.style.display = data.messageStoreProvider? "none" : "block";
if (!this.details)
{
var that = this;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org