summaryrefslogtreecommitdiff
path: root/qpid/java/broker-plugins/jdbc-store/src
diff options
context:
space:
mode:
authorAlex Rudyy <orudyy@apache.org>2014-05-07 09:27:02 +0000
committerAlex Rudyy <orudyy@apache.org>2014-05-07 09:27:02 +0000
commit7dffa6c6bd8db286afa61108ef6c70bc4875251c (patch)
treef02ec234a95ecdc912b2de3119c55f35db33b872 /qpid/java/broker-plugins/jdbc-store/src
parent304b0dbebc28597538b79472e97af47d4b13a7f4 (diff)
downloadqpid-python-7dffa6c6bd8db286afa61108ef6c70bc4875251c.tar.gz
QPID-5413: Add virtual host node UI to view the details about existing virtual host nodes
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1592951 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins/jdbc-store/src')
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStore.java2
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNode.java4
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java2
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js2
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js61
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/store/jdbc/add.html2
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html44
7 files changed, 111 insertions, 6 deletions
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStore.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStore.java
index 037b9ee037..d70f2a3d78 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStore.java
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStore.java
@@ -50,7 +50,7 @@ public class JDBCMessageStore extends AbstractJDBCMessageStore implements Messag
private static final Logger _logger = Logger.getLogger(JDBCMessageStore.class);
public static final String TYPE = "JDBC";
- public static final String CONNECTION_URL = "connectionURL";
+ public static final String CONNECTION_URL = "connectionUrl";
public static final String CONNECTION_POOL_TYPE = "connectionPoolType";
public static final String JDBC_BIG_INT_TYPE = "bigIntType";
public static final String JDBC_BYTES_FOR_BLOB = "bytesForBlob";
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNode.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNode.java
index f66cb74529..302ec9c59f 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNode.java
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNode.java
@@ -21,10 +21,10 @@
package org.apache.qpid.server.virtualhostnode.jdbc;
import org.apache.qpid.server.model.ManagedAttribute;
+import org.apache.qpid.server.model.VirtualHostNode;
import org.apache.qpid.server.store.jdbc.DefaultConnectionProviderFactory;
-
-public interface JDBCVirtualHostNode
+public interface JDBCVirtualHostNode<X extends JDBCVirtualHostNode<X>> extends VirtualHostNode<X>
{
//TODO: Split this attribute into connectionUrl, username and password. Make the password attribute secure.
@ManagedAttribute(mandatory=true)
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java
index 8d7c79b656..cb3077bc65 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java
@@ -31,7 +31,7 @@ import org.apache.qpid.server.store.jdbc.JDBCMessageStoreFactory;
import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode;
@ManagedObject( category = false, type = "JDBC" )
-public class JDBCVirtualHostNodeImpl extends AbstractStandardVirtualHostNode<JDBCVirtualHostNodeImpl> implements JDBCVirtualHostNode
+public class JDBCVirtualHostNodeImpl extends AbstractStandardVirtualHostNode<JDBCVirtualHostNodeImpl> implements JDBCVirtualHostNode<JDBCVirtualHostNodeImpl>
{
@ManagedAttributeField
private String _connectionUrl;
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js
index d1f4787202..21c0c17de9 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js
@@ -81,7 +81,7 @@ define(["dojo/_base/xhr",
var poolTypesDiv = dom.byId("addVirtualHost.specific.selectPoolType");
var input = construct.create("input", {id: "addPoolType", required: false}, poolTypesDiv);
that.poolTypeChooser = new FilteringSelect({ id: "addVirtualHost.specific.store.poolType",
- name: "connectionPool",
+ name: "connectionPoolType",
store: poolTypesStore,
searchAttr: "name", required: false,
onChange: selectPoolType }, input);
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js
new file mode 100644
index 0000000000..20637da6c2
--- /dev/null
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js
@@ -0,0 +1,61 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+define(["dojo/_base/xhr",
+ "dojo/_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)
+ {
+ var fieldNames = ["connectionUrl", "bigIntType", "varBinaryType", "blobType", "bytesForBlob", "connectionPoolType"];
+
+ function JdbcNode(containerNode)
+ {
+ 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];
+ }
+ }
+
+ JdbcNode.prototype.update=function(data)
+ {
+ for(var i=0; i<fieldNames.length;i++)
+ {
+ var fieldName = fieldNames[i];
+ var value = data[fieldName];
+ this[fieldName].innerHTML= value?entities.encode(String(value)):"";
+ }
+ };
+
+ return JdbcNode;
+});
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/store/jdbc/add.html b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/store/jdbc/add.html
index c3d6c287a2..0644887a43 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/store/jdbc/add.html
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/store/jdbc/add.html
@@ -19,7 +19,7 @@
<td class="tableContainer-labelCell" style="width: 300px;"><strong>JDBC Url*: </strong></td>
<td class="tableContainer-valueCell">
<input dojoType="dijit/form/ValidationTextBox" required="true" id="formAddVirtualHost.specific.store.connectionURL"
- name="connectionURL" placeholder="jdbc:provider:info" />
+ name="connectionUrl" placeholder="jdbc:provider:info" />
</tr>
<tr>
<td class="tableContainer-labelCell" style="width: 300px;"><strong>Connection Pool: </strong></td>
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html
new file mode 100644
index 0000000000..63fec28012
--- /dev/null
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html
@@ -0,0 +1,44 @@
+<!--
+ ~ 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: 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>
+ <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 style="clear:both"></div>
+</div>
+