Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 702D61186F for ; Thu, 17 Jul 2014 10:25:23 +0000 (UTC) Received: (qmail 74733 invoked by uid 500); 17 Jul 2014 10:25:23 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 74704 invoked by uid 500); 17 Jul 2014 10:25:23 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 74695 invoked by uid 99); 17 Jul 2014 10:25:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jul 2014 10:25:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jul 2014 10:25:19 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1834A238890D; Thu, 17 Jul 2014 10:24:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1611314 - in /qpid/trunk/qpid/java: bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/ bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/ bdbstore/src/main/java/resources/js/qpid/management/vir... Date: Thu, 17 Jul 2014 10:24:52 -0000 To: commits@qpid.apache.org From: kwall@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140717102453.1834A238890D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwall Date: Thu Jul 17 10:24:52 2014 New Revision: 1611314 URL: http://svn.apache.org/r1611314 Log: QPID-5413: [Java Broker] Add VHN/VH creation dialog for BDB HA. Work completed by Andrew MacBean and me. Added: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/add.js - copied, changed from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js - copied, changed from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html - copied, changed from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html Removed: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/add.html qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.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/management/addVirtualHostNodeAndVirtualHost.js Copied: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/add.js (from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js) URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/add.js?p2=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/add.js&p1=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js&r1=1611181&r2=1611314&rev=1611314&view=diff ============================================================================== --- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js (original) +++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/add.js Thu Jul 17 10:24:52 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,36 +15,25 @@ * 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/_base/window", + "dojo/json", "dijit/registry", - "dojo/parser", - "dojo/_base/array", + "dojo/text!virtualhost/bdb_ha/add.html", + "dijit/form/ValidationTextBox", + "dijit/form/CheckBox", "dojo/domReady!"], - function (xhr, dom, construct, win, registry, parser, array) { - return { - show: function() { - - var node = dom.byId("addVirtualHost.typeSpecificDiv"); - var that = this; - - array.forEach(registry.toArray(), - function(item) { - if(item.id.substr(0,27) == "formAddVirtualHost.specific") { - item.destroyRecursive(); - } - }); - - xhr.get({url: "virtualhost/bdb_ha/add.html", - sync: true, - load: function(data) { - node.innerHTML = data; - parser.parse(node); - }}); - } - }; - }); + function (xhr, parser, dom, domConstruct, json, registry, template) + { + return { + show: function(data) + { + this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode); + parser.parse(this.containerNode); + } + }; + } +); Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js?rev=1611314&r1=1611313&r2=1611314&view=diff ============================================================================== --- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js (original) +++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js Thu Jul 17 10:24:52 2014 @@ -20,6 +20,7 @@ */ define(["dojo/_base/xhr", "dojo/parser", + "dojo/_base/array", "dojo/dom", "dojo/dom-construct", "dojo/json", @@ -28,46 +29,48 @@ define(["dojo/_base/xhr", "dijit/form/ValidationTextBox", "dijit/form/RadioButton", "dojo/domReady!"], - function (xhr, parser, dom, domConstruct, json, registry, template) + function (xhr, parser, array, dom, domConstruct, json, registry, template) { + return { + show: function(data) + { + var that=this; - var nodeFields = ["address", "helperAddress", "joinGroup", "newGroup"]; + this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode); + parser.parse(this.containerNode); - return { - show: function(data) - { - var that = this; - this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode); - parser.parse(this.containerNode); - for(var i=0; i - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Path to store location*: - -
Node Name*: - -
Replication Group*: - -
Node Address*: - -
Helper Address*: - -
Durability: - -
Coalesce local sync: - - - -
Designated Primary: - - -
+
+
+
The virtualhost will have the same name as the group.
+
\ No newline at end of file Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html?rev=1611314&r1=1611313&r2=1611314&view=diff ============================================================================== --- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html (original) +++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html Thu Jul 17 10:24:52 2014 @@ -20,84 +20,23 @@ -->
-
Node Group*:
+
Create new group or join existing group*:
- - - - + +
+
-
-
Node Name*:
-
- -
-
-
-
Virtual Host Name*:
-
- -
-
-
-
Address*:
-
- -
-
-
-
Store path*:
-
- -
-
-
+
Added: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html?rev=1611314&view=auto ============================================================================== --- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html (added) +++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html Thu Jul 17 10:24:52 2014 @@ -0,0 +1,117 @@ + +
+ +
+
+ Existing details +
+
Group Name*:
+
+ +
+
+
+
Node name from group*:
+
+ +
+
+
+
Node address of same node*:
+
+ +
+
+
+
+ + +
+
+ New node details +
+
Node Name*:
+
+ +
+
+
+
Address*:
+
+ +
+
+
+
Store path*:
+
+ +
+
+
+
+
+
Copied: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html (from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html) URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html?p2=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html&p1=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html&r1=1611181&r2=1611314&rev=1611314&view=diff ============================================================================== --- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html (original) +++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html Thu Jul 17 10:24:52 2014 @@ -1,36 +1,23 @@ + ~ 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. + -->
-
Node Group*:
-
-
- - - - -
-
-
-
Node Name*:
-
Virtual Host Name*:
+
Group Name*:
@@ -75,7 +62,7 @@
Store path*:
-
- + + +
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=1611314&r1=1611313&r2=1611314&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 Thu Jul 17 10:24:52 2014 @@ -92,7 +92,7 @@ div .messages { .formBox { border: .1em solid lightgrey; - margin: 10px 0px 20px 0px; + margin: 10px 5px; border-radius: 5px; } @@ -104,7 +104,7 @@ div .messages { } .formBox fieldset { - padding: 10px 0px 10px 0px; + padding: 5px; } .formBox .formLabel-labelCell { @@ -187,4 +187,10 @@ div .messages { background: url("../images/help.png") no-repeat; width: 16px; height: 16px; +} + +.infoMessage +{ + padding: 5px; + font-style: italic; } \ No newline at end of file Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js?rev=1611314&r1=1611313&r2=1611314&view=diff ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js (original) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js Thu Jul 17 10:24:52 2014 @@ -86,18 +86,18 @@ define(["dojo/_base/xhr", //VH Type BDB_HA_REPLICA is not user creatable. This is only needed until we have model meta data available. this.supportedVirtualHostTypes = array.filter(this.supportedVirtualHostTypes, function(item){ - return item != "BDB_HA_REPLICA"; + return item != "BDB_HA_REPLICA" && item != "BDB_HA"; }); var virtualHostNodeTypeStore = this._makeTypeStore(this.supportedVirtualHostNodeTypes); this.virtualHostNodeType.set("store", virtualHostNodeTypeStore); this.virtualHostNodeType.set("disabled", false); - this.virtualHostNodeType.on("change", function(type){that._typeChanged(type, that.virtualHostNodeTypeFieldsContainer, "qpid/management/virtualhostnode/");}); + this.virtualHostNodeType.on("change", function(type){that._vhnTypeChanged(type, that.virtualHostNodeTypeFieldsContainer, "qpid/management/virtualhostnode/");}); - var virtualHostTypeStore = this._makeTypeStore(this.supportedVirtualHostTypes); - this.virtualHostType.set("store", virtualHostTypeStore); + this.virtualHostTypeStore = this._makeTypeStore(this.supportedVirtualHostTypes); + this.virtualHostType.set("store", this.virtualHostTypeStore); this.virtualHostType.set("disabled", false); - this.virtualHostType.on("change", function(type){that._typeChanged(type, that.virtualHostTypeFieldsContainer, "qpid/management/virtualhost/");}); + this.virtualHostType.on("change", function(type){that._vhTypeChanged(type, that.virtualHostTypeFieldsContainer, "qpid/management/virtualhost/");}); }, show: function() { @@ -122,6 +122,16 @@ define(["dojo/_base/xhr", this.containerNode = null; } }, + _vhnTypeChanged: function (type, typeFieldsContainer, urlStem) + { + this._processDropDownsForBdbHa(type); + this._processDropDownsForJson(type); + this._typeChanged(type, typeFieldsContainer, urlStem); + }, + _vhTypeChanged: function (type, typeFieldsContainer, urlStem) + { + this._typeChanged(type, typeFieldsContainer, urlStem); + }, _typeChanged: function (type, typeFieldsContainer, urlStem) { var widgets = registry.findWidgets(typeFieldsContainer); @@ -146,6 +156,52 @@ define(["dojo/_base/xhr", ); } }, + _processDropDownsForBdbHa: function (type) + { + if (type == "BDB_HA") + { + this.virtualHostType.set("disabled", true); + if (!this.virtualHostTypeStore.get("BDB_HA")) + { + this.virtualHostTypeStore.add({id: "BDB_HA", name: "BDB_HA"}); + } + this.virtualHostType.set("value", "BDB_HA"); + } + else + { + if (this.virtualHostType.value == "BDB_HA") + { + if (this.virtualHostTypeStore.get("BDB_HA")) + { + this.virtualHostTypeStore.remove("BDB_HA"); + } + this.virtualHostType.set("value", ""); + } + this.virtualHostType.set("disabled", false); + } + }, + _processDropDownsForJson: function (type) + { + if (type == "JSON") + { + if (this.virtualHostType.value == "ProvidedStore") + { + this.virtualHostType.set("value", ""); + } + + if (this.virtualHostTypeStore.get("ProvidedStore")) + { + this.virtualHostTypeStore.remove("ProvidedStore"); + } + } + else + { + if (!this.virtualHostTypeStore.get("ProvidedStore")) + { + this.virtualHostTypeStore.add({id: "ProvidedStore", name: "ProvidedStore"}); + } + } + }, _cancel: function(e) { this.dialog.hide(); @@ -164,12 +220,6 @@ define(["dojo/_base/xhr", var virtualHostNodeData = this._getValues(this.virtualHostNodeForm); var virtualHostData = this._getValues(this.virtualHostForm); - if (virtualHostNodeData["type"] == "JSON" && virtualHostData["type"] == "ProvidedStore") - { - alert('Cannot use a JSON Virtual Host Node with a ProvidedStore Virtual Host'); - return; - } - //Default the VH name to be the same as the VHN name. virtualHostData["name"] = virtualHostNodeData["name"]; @@ -184,7 +234,7 @@ define(["dojo/_base/xhr", error: function(error) {success = false; failureReason = error;} }); - if(success === true) + if(success === true && virtualHostNodeData["type"] != "BDB_HA") { var encodedVirtualHostName = encodeURIComponent(virtualHostData.name); xhr.put({ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org