You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2016/03/30 14:35:24 UTC
svn commit: r1737108 - in
/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources: ./
js/qpid/common/ js/qpid/management/ store/
Author: orudyy
Date: Wed Mar 30 12:35:23 2016
New Revision: 1737108
URL: http://svn.apache.org/viewvc?rev=1737108&view=rev
Log:
QPID-7037: Add ability into Web Management Console to configure trust store as message source
Added:
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/showTrustStore.html
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/store/keystore.html
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/store/truststore.html
Modified:
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/addStore.html
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addStore.js
Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/addStore.html
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/addStore.html?rev=1737108&r1=1737107&r2=1737108&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/addStore.html (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/addStore.html Wed Mar 30 12:35:23 2016
@@ -50,6 +50,7 @@
</div>
</div>
<div class="clear">
+ <div id="addStore.categoryFields"></div>
<div id="addStore.typeFields"></div>
</div>
</div>
Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js?rev=1737108&r1=1737107&r2=1737108&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js Wed Mar 30 12:35:23 2016
@@ -547,13 +547,13 @@ define(["dojo/_base/xhr",
for(var i in formWidgets)
{
var widget = formWidgets[i];
- var value = widget.get("value") != "undefined" ? widget.get("value") : "";
- var propName = widget.get("name") != "undefined" ? widget.get("name") : "";
- var required = widget.get("required") != "undefined" ? widget.get("required") : "";
- var excluded = widget.get("excluded") != "undefined" ? widget.get("excluded") : "";
- var checked = widget.get("checked") != "undefined" ? widget.get("checked") : "";
- var type = widget.get("type") != "undefined" ? widget.get("type") : "";
- if (!excluded && propName && (value || required))
+ var value = widget.get("value") != "undefined" ? widget.get("value") : undefined;
+ var propName = widget.get("name") != "undefined" ? widget.get("name") : undefined;
+ var required = widget.get("required") != "undefined" ? widget.get("required") : undefined;
+ var excluded = widget.get("excluded") != "undefined" ? widget.get("excluded") : undefined;
+ var checked = widget.get("checked") != "undefined" ? widget.get("checked") : undefined;
+ var type = widget.get("type") != "undefined" ? widget.get("type") : undefined;
+ if (!excluded && propName && (value !== undefined || required))
{
if (widget instanceof dijit.form.RadioButton)
{
Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js?rev=1737108&r1=1737107&r2=1737108&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js Wed Mar 30 12:35:23 2016
@@ -29,7 +29,7 @@ define(["dojo/dom",
"qpid/common/util",
"qpid/common/formatter",
"qpid/management/addStore",
- "dojo/text!showStore.html",
+ "dojo/text!showTrustStore.html",
"dojo/domReady!"],
function (dom, parser, query, connect, registry, entities, properties, updater, util, formatter, addStore, template) {
@@ -102,7 +102,8 @@ define(["dojo/dom",
storeNodes(["name",
"type",
- "state"
+ "state",
+ "exposedAsMessageSource"
]);
}
@@ -112,6 +113,7 @@ define(["dojo/dom",
this.name.innerHTML = entities.encode(String(this.trustStoreData[ "name" ]));
this.type.innerHTML = entities.encode(String(this.trustStoreData[ "type" ]));
this.state.innerHTML = entities.encode(String(this.trustStoreData[ "state" ]));
+ this.exposedAsMessageSource.innerHTML = entities.encode(String(this.trustStoreData[ "exposedAsMessageSource" ]));
};
KeyStoreUpdater.prototype.update = function(callback)
Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addStore.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addStore.js?rev=1737108&r1=1737107&r2=1737108&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addStore.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addStore.js Wed Mar 30 12:35:23 2016
@@ -29,6 +29,7 @@ define(["dojo/_base/lang",
'dojo/json',
"qpid/common/util",
"dojo/text!addStore.html",
+ "dojo/_base/xhr",
"dojo/store/Memory",
"dojox/validate/us",
"dojox/validate/web",
@@ -43,10 +44,11 @@ define(["dojo/_base/lang",
"dijit/layout/ContentPane",
"dojox/layout/TableContainer",
"dojo/domReady!"],
- function (lang, dom, construct, registry, parser, memory, array, event, json, util, template)
+ function (lang, dom, construct, registry, parser, memory, array, event, json, util, template, xhr)
{
var addStore =
{
+ categoryTemplates: {},
init: function()
{
var that=this;
@@ -66,6 +68,7 @@ define(["dojo/_base/lang",
this.addButton.on("click", function(e){that._add(e);});
this.storeTypeFieldsContainer = dom.byId("addStore.typeFields");
+ this.storeCategoryFieldsContainer = dom.byId("addStore.categoryFields");
this.storeForm = registry.byId("addStore.form");
this.storeType = registry.byId("addStore.type");
@@ -85,7 +88,9 @@ define(["dojo/_base/lang",
show: function(effectiveData)
{
this.effectiveData = effectiveData;
- this._destroyTypeFields(this.containerNode);
+ this._destroyTypeFields(this.storeTypeFieldsContainer);
+ this._destroyTypeFields(this.storeCategoryFieldsContainer);
+ this._loadCategoryUI = true;
this.storeForm.reset();
if (effectiveData)
@@ -122,6 +127,7 @@ define(["dojo/_base/lang",
{
event.stop(e);
this._destroyTypeFields(this.storeTypeFieldsContainer);
+ this._destroyTypeFields(this.storeCategoryFieldsContainer);
this.dialog.hide();
},
_add: function(e)
@@ -172,9 +178,9 @@ define(["dojo/_base/lang",
_typeChanged: function(type, typeFieldsContainer, baseUrl, category )
{
this._destroyTypeFields(typeFieldsContainer);
-
if (type)
{
+ this._addCategoryMarkupIfRequired(category, type, this.effectiveData);
var that = this;
require([ baseUrl + type.toLowerCase() + "/add"], function(typeUI)
{
@@ -190,6 +196,44 @@ define(["dojo/_base/lang",
}
});
}
+ },
+ _addCategoryMarkupIfRequired: function(category, type, data)
+ {
+ if (this._loadCategoryUI)
+ {
+ this._loadCategoryUI = false;
+ var containerNode = this.storeCategoryFieldsContainer;
+ var metadata = this.management.metadata;
+ this._destroyTypeFields(this.storeCategoryFieldsContainer);
+
+ var templateHandler = function(template)
+ {
+ containerNode.innerHTML = template;
+ parser.parse(containerNode).then(function(instances)
+ {
+ if (type)
+ {
+ util.applyToWidgets(containerNode, category, type, data, metadata);
+ }
+ });
+ };
+
+ if (this.categoryTemplates[category])
+ {
+ templateHandler(new String(this.categoryTemplates[category]));
+ }
+ else
+ {
+ var that = this;
+ xhr.get({url: "store/" + category.toLowerCase() + ".html",
+ load: function(template)
+ {
+ that.categoryTemplates[category]= template;
+ templateHandler(new String(template));
+ }
+ });
+ }
+ }
}
};
Added: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/showTrustStore.html
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/showTrustStore.html?rev=1737108&view=auto
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/showTrustStore.html (added)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/showTrustStore.html Wed Mar 30 12:35:23 2016
@@ -0,0 +1,50 @@
+<!--
+ ~ 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 data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Show Store', open: true">
+ <div id="showStore.contentPane">
+ <div class="clear">
+ <div class="formLabel-labelCell">Name:</div>
+ <div class="name"></div>
+ </div>
+ <div class="clear">
+ <div class="formLabel-labelCell">Type:</div>
+ <div class="type"></div>
+ </div>
+ <div class="clear">
+ <div class="formLabel-labelCell">State:</div>
+ <div class="state"></div>
+ </div>
+ <div class="clear">
+ <div class="formLabel-labelCell">Message Source:</div>
+ <div class="exposedAsMessageSource"></div>
+ </div>
+ <div class="clear">
+ <div class="typeFieldsContainer"></div>
+ </div>
+ <div class="clear">
+ </div>
+ </div>
+
+ <div class="dijitDialogPaneActionBar">
+ <button data-dojo-type="dijit.form.Button" class="editStoreButton" type="button">Edit</button>
+ <button data-dojo-type="dijit.form.Button" class="deleteStoreButton" type="button">Delete</button>
+ </div>
+ </div>
+</div>
Added: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/store/keystore.html
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/store/keystore.html?rev=1737108&view=auto
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/store/keystore.html (added)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/store/keystore.html Wed Mar 30 12:35:23 2016
@@ -0,0 +1,19 @@
+<!--
+ ~ 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>
Added: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/store/truststore.html
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/store/truststore.html?rev=1737108&view=auto
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/store/truststore.html (added)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/store/truststore.html Wed Mar 30 12:35:23 2016
@@ -0,0 +1,30 @@
+<!--
+ ~ 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="clear">
+ <div id="addStore.exposedAsMessageSourceLabel" class="formLabel-labelCell tableContainer-labelCell">Exposed As Message Source:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell">
+ <input type="text" id="addStore.exposedAsMessageSource"
+ data-dojo-type="dijit/form/CheckBox"
+ data-dojo-props="
+ name: 'exposedAsMessageSource',
+ promptMessage: 'Expose trust store as message source',
+ title: 'Tick to expose trust store as message source'" />
+ </div>
+</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org