From 7dffa6c6bd8db286afa61108ef6c70bc4875251c Mon Sep 17 00:00:00 2001 From: Alex Rudyy Date: Wed, 7 May 2014 09:27:02 +0000 Subject: 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 --- .../qpid/server/store/jdbc/JDBCMessageStore.java | 2 +- .../virtualhostnode/jdbc/JDBCVirtualHostNode.java | 4 +- .../jdbc/JDBCVirtualHostNodeImpl.java | 2 +- .../qpid/management/virtualhost/store/jdbc/add.js | 2 +- .../qpid/management/virtualhostnode/jdbc/show.js | 61 ++++++++++++++++++++++ .../java/resources/virtualhost/store/jdbc/add.html | 2 +- .../java/resources/virtualhostnode/jdbc/show.html | 44 ++++++++++++++++ 7 files changed, 111 insertions(+), 6 deletions(-) create mode 100644 qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js create mode 100644 qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html (limited to 'qpid/java/broker-plugins/jdbc-store/src/main') 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> extends VirtualHostNode { //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 implements JDBCVirtualHostNode +public class JDBCVirtualHostNodeImpl extends AbstractStandardVirtualHostNode implements JDBCVirtualHostNode { @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; iJDBC Url*: + name="connectionUrl" placeholder="jdbc:provider:info" /> Connection Pool: 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 @@ + +
+
+
Connection URL:
+
+
+
+
Big Integer Type:
+
+
+
+
Var Binary Type:
+
+
+
+
Blob Type:
+
+
+
+
Bytes For Blob:
+
+
+
+
Connection Pool Type:
+
+
+
+
+ -- cgit v1.2.1