Author: kwall Date: Tue Jan 20 16:25:28 2015 New Revision: 1653285 URL: http://svn.apache.org/r1653285 Log: QPID-6318: [Java Broker] Make UI support the upload of JKS files
Work completed by Andrew MacBean <[email protected]> Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addStore.html qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addStore.js qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/add.js qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/show.js qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/add.js qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/show.js qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showStore.html qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/add.html qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/show.html qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/add.html qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/show.html Removed: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showKeyStore.html qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showTrustStore.html Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/aclfile/add.html qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/AuthenticationProvider.js qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/aclfile/add.js Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/aclfile/add.html URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/aclfile/add.html?rev=1653285&r1=1653284&r2=1653285&view=diff ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/aclfile/add.html (original) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/aclfile/add.html Tue Jan 20 16:25:28 2015 @@ -18,6 +18,7 @@ --> <div> + <div id="addAccessControlProvider.oldBrowserWarning" class="infoMessage hidden clear"></div> <div class="clear"> <div id="addAccessControlProvider.serverPathLabel" class="formLabel-labelCell tableContainer-labelCell">Server path or upload*:</div> <div class="formLabel-controlCell tableContainer-valueCell"> @@ -54,7 +55,8 @@ <button id="addAccessControlProvider.fileClearButton" data-dojo-type="dijit/form/Button" data-dojo-props="label: 'Clear', - disabled: true" /> + disabled: true"> + </button> </div> </div> Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addStore.html URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addStore.html?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addStore.html (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addStore.html Tue Jan 20 16:25:28 2015 @@ -0,0 +1,66 @@ +<!-- + ~ 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:'Add Store'" id="addStore"> + <div id="addStore.contentPane"> + <form id="addStore.form" method="post" data-dojo-type="dijit/form/Form"> + <div class="formBox"> + <div class="clear"> + <div class="formLabel-labelCell tableContainer-labelCell">Name*:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="text" id="addStore.name" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'name', + placeHolder: 'store name', + required: true, + promptMessage: 'Name of store, must be unique', + title: 'Enter a unique store name per broker'" /> + </div> + </div> + <div class="clear"> + <div class="formLabel-labelCell tableContainer-labelCell">Type*:</div> + <div class="tableContainer-valueCell formLabel-controlCell"> + <select id="addStore.type" data-dojo-type="dijit/form/FilteringSelect" + data-dojo-props=" + name: 'type', + required: true, + placeHolder: 'store type', + promptMessage: 'Type of store', + title: 'Select type', + searchAttr: 'name'"> + </select> + </div> + </div> + <div class="clear"> + <div id="addStore.typeFields"></div> + </div> + </div> + </form> + <div class="clear"> + </div> + </div> + + <div class="dijitDialogPaneActionBar"> + <button data-dojo-type="dijit/form/Button" id="addStore.addButton" data-dojo-props="label: 'Save'" type="submit"></button> + <button data-dojo-type="dijit/form/Button" id="addStore.cancelButton" data-dojo-props="label: 'Cancel'" ></button> + </div> + </div> +</div> Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/AuthenticationProvider.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/AuthenticationProvider.js?rev=1653285&r1=1653284&r2=1653285&view=diff ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/AuthenticationProvider.js (original) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/AuthenticationProvider.js Tue Jan 20 16:25:28 2015 @@ -159,8 +159,8 @@ define(["dojo/_base/xhr", this.deletePreferencesProviderButton = query(".deletePreferencesProviderButton", node)[0]; this.preferencesProviderAttributes = dom.byId("preferencesProviderAttributes") this.preferencesNode = query(".preferencesProviderDetails", node)[0]; - this.authenticationProviderDetailsContainer = query(".authenticationProviderDetails", node)[0]; +this.authenticationProviderDetailsContainer = query(".authenticationProviderDetails", node)[0]; this.query = "api/latest/authenticationprovider/" + encodeURIComponent(authProviderObj.name); } Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js?rev=1653285&r1=1653284&r2=1653285&view=diff ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js (original) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js Tue Jan 20 16:25:28 2015 @@ -23,6 +23,7 @@ define(["dojo/_base/xhr", "dojo/query", "dojo/json", "dojo/_base/connect", + "dojo/store/Memory", "qpid/common/properties", "qpid/common/updater", "qpid/common/util", @@ -33,7 +34,7 @@ define(["dojo/_base/xhr", "qpid/management/addAuthenticationProvider", "qpid/management/addVirtualHostNodeAndVirtualHost", "qpid/management/addPort", - "qpid/management/addKeystore", + "qpid/management/addStore", "qpid/management/addGroupProvider", "qpid/management/addAccessControlProvider", "qpid/management/editBroker", @@ -50,8 +51,8 @@ define(["dojo/_base/xhr", "dijit/Menu", "dijit/MenuItem", "dojo/domReady!"], - function (xhr, parser, query, json, connect, properties, updater, util, UpdatableStore, EnhancedGrid, registry, entities, - addAuthenticationProvider, addVirtualHostNodeAndVirtualHost, addPort, addKeystore, addGroupProvider, addAccessControlProvider, editBroker) { + function (xhr, parser, query, json, connect, memory, properties, updater, util, UpdatableStore, EnhancedGrid, registry, entities, + addAuthenticationProvider, addVirtualHostNodeAndVirtualHost, addPort, addStore, addGroupProvider, addAccessControlProvider, editBroker) { var brokerAttributeNames = ["name", "operatingSystem", "platform", "productVersion", "modelVersion", "defaultVirtualHost", "statisticsReportingPeriod", "statisticsReportingResetEnabled", @@ -153,7 +154,11 @@ define(["dojo/_base/xhr", var addKeystoreButton = query(".addKeystore", contentPane.containerNode)[0]; connect.connect(registry.byNode(addKeystoreButton), "onClick", - function(evt){ addKeystore.showKeystoreDialog() }); + function(evt) + { + addStore.setupTypeStore("KeyStore"); + addStore.show(); + }); var deleteKeystore = query(".deleteKeystore", contentPane.containerNode)[0]; connect.connect(registry.byNode(deleteKeystore), "onClick", @@ -168,7 +173,11 @@ define(["dojo/_base/xhr", var addTruststoreButton = query(".addTruststore", contentPane.containerNode)[0]; connect.connect(registry.byNode(addTruststoreButton), "onClick", - function(evt){ addKeystore.showTruststoreDialog() }); + function(evt) + { + addStore.setupTypeStore("TrustStore"); + addStore.show(); + }); var deleteTruststore = query(".deleteTruststore", contentPane.containerNode)[0]; connect.connect(registry.byNode(deleteTruststore), "onClick", Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js?rev=1653285&r1=1653284&r2=1653285&view=diff ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js (original) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js Tue Jan 20 16:25:28 2015 @@ -29,16 +29,15 @@ define(["dojo/dom", "qpid/common/updater", "qpid/common/util", "qpid/common/formatter", - "qpid/management/addKeystore", + "qpid/management/addStore", "dojo/domReady!"], - function (dom, xhr, parser, query, connect, registry, entities, properties, updater, util, formatter, addKeystore) { + function (dom, xhr, parser, query, connect, registry, entities, properties, updater, util, formatter, addStore) { - function KeyStore(name, parent, controller, objectType) { + function KeyStore(name, parent, controller) { this.keyStoreName = name; this.controller = controller; this.modelObj = { type: "keystore", name: name, parent: parent}; this.url = "api/latest/keystore/" + encodeURIComponent(name); - this.dialog = addKeystore.showKeystoreDialog; } KeyStore.prototype.getTitle = function() { @@ -48,7 +47,7 @@ define(["dojo/dom", KeyStore.prototype.open = function(contentPane) { var that = this; this.contentPane = contentPane; - xhr.get({url: "showKeyStore.html", + xhr.get({url: "showStore.html", sync: true, load: function(data) { contentPane.containerNode.innerHTML = data; @@ -60,22 +59,22 @@ define(["dojo/dom", that.keyStoreUpdater.update(); - var deleteKeyStoreButton = query(".deleteKeyStoreButton", contentPane.containerNode)[0]; + var deleteKeyStoreButton = query(".deleteStoreButton", contentPane.containerNode)[0]; var node = registry.byNode(deleteKeyStoreButton); connect.connect(node, "onClick", function(evt){ that.deleteKeyStore(); }); - var editKeyStoreButton = query(".editKeyStoreButton", contentPane.containerNode)[0]; + var editKeyStoreButton = query(".editStoreButton", contentPane.containerNode)[0]; var node = registry.byNode(editKeyStoreButton); connect.connect(node, "onClick", function(evt){ xhr.get({url: that.url, sync: properties.useSyncGet, handleAs: "json", content: { actuals: true }}) .then(function(data) { - // calls showKeystoreDialog - that.dialog(data[0], that.url); + addStore.setupTypeStore("KeyStore"); + addStore.show(data[0], that.url); }); }); }}); @@ -88,9 +87,10 @@ define(["dojo/dom", function KeyStoreUpdater(containerNode, keyStoreObj, controller, url) { var that = this; + this.keyStoreDetailsContainer = query(".typeFieldsContainer", containerNode)[0]; function findNode(name) { - return query("." + name + "Value", containerNode)[0]; + return query("." + name, containerNode)[0]; } function storeNodes(names) @@ -101,12 +101,8 @@ define(["dojo/dom", } storeNodes(["name", - "path", - "keyStoreType", - "keyStoreState", - "keyManagerFactoryAlgorithm", - "certificateAlias", - "peersOnly" + "type", + "state" ]); this.query = url; @@ -122,22 +118,27 @@ define(["dojo/dom", KeyStoreUpdater.prototype.updateHeader = function() { this.name.innerHTML = entities.encode(String(this.keyStoreData[ "name" ])); - this.path.innerHTML = entities.encode(String(this.keyStoreData[ "path" ])); - this.keyStoreType.innerHTML = entities.encode(String(this.keyStoreData[ "keyStoreType" ])); - this.keyStoreState.innerHTML = entities.encode(String(this.keyStoreData[ "state" ])); - this.keyManagerFactoryAlgorithm.innerHTML = entities.encode(String(this.keyStoreData[ "keyManagerFactoryAlgorithm" ])); - this.certificateAlias.innerHTML = this.keyStoreData[ "certificateAlias" ] ? entities.encode(String( this.keyStoreData[ "certificateAlias" ])) : ""; + this.type.innerHTML = entities.encode(String(this.keyStoreData[ "type" ])); + this.state.innerHTML = entities.encode(String(this.keyStoreData[ "state" ])); }; KeyStoreUpdater.prototype.update = function() { - var thisObj = this; + var that = this; xhr.get({url: this.query, sync: properties.useSyncGet, handleAs: "json"}).then(function(data) { - thisObj.keyStoreData = data[0]; - thisObj.updateHeader(); + that.keyStoreData = data[0]; + that.updateHeader(); + + require(["qpid/management/store/" + encodeURIComponent(that.keyStoreData.type.toLowerCase()) + "/show"], + function(DetailsUI) + { + that.details = new DetailsUI({containerNode:that.keyStoreDetailsContainer, parent: that}); + that.details.update(that.keyStoreData); + } + ); }); }; Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js?rev=1653285&r1=1653284&r2=1653285&view=diff ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js (original) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js Tue Jan 20 16:25:28 2015 @@ -29,16 +29,15 @@ define(["dojo/dom", "qpid/common/updater", "qpid/common/util", "qpid/common/formatter", - "qpid/management/addKeystore", + "qpid/management/addStore", "dojo/domReady!"], - function (dom, xhr, parser, query, connect, registry, entities, properties, updater, util, formatter, addKeystore) { + function (dom, xhr, parser, query, connect, registry, entities, properties, updater, util, formatter, addStore) { function TrustStore(name, parent, controller) { this.keyStoreName = name; this.controller = controller; this.modelObj = { type: "truststore", name: name, parent: parent}; this.url = "api/latest/truststore/" + encodeURIComponent(name); - this.dialog = addKeystore.showTruststoreDialog; } TrustStore.prototype.getTitle = function() { @@ -48,7 +47,7 @@ define(["dojo/dom", TrustStore.prototype.open = function(contentPane) { var that = this; this.contentPane = contentPane; - xhr.get({url: "showTrustStore.html", + xhr.get({url: "showStore.html", sync: true, load: function(data) { contentPane.containerNode.innerHTML = data; @@ -60,28 +59,27 @@ define(["dojo/dom", that.keyStoreUpdater.update(); - var deleteTrustStoreButton = query(".deleteTrustStoreButton", contentPane.containerNode)[0]; + var deleteTrustStoreButton = query(".deleteStoreButton", contentPane.containerNode)[0]; var node = registry.byNode(deleteTrustStoreButton); connect.connect(node, "onClick", function(evt){ that.deleteKeyStore(); }); - var editTrustStoreButton = query(".editTrustStoreButton", contentPane.containerNode)[0]; + var editTrustStoreButton = query(".editStoreButton", contentPane.containerNode)[0]; var node = registry.byNode(editTrustStoreButton); connect.connect(node, "onClick", function(evt){ xhr.get({url: that.url, sync: properties.useSyncGet, handleAs: "json", content: { actuals: true }}) .then(function(data) { - that.dialog(data[0], that.url); + addStore.setupTypeStore("TrustStore"); + addStore.show(data[0], that.url); }); }); }}); }; - - TrustStore.prototype.close = function() { updater.remove( this.keyStoreUpdater ); }; @@ -89,9 +87,10 @@ define(["dojo/dom", function KeyStoreUpdater(containerNode, keyStoreObj, controller, url) { var that = this; + this.keyStoreDetailsContainer = query(".typeFieldsContainer", containerNode)[0]; function findNode(name) { - return query("." + name + "Value", containerNode)[0]; + return query("." + name , containerNode)[0]; } function storeNodes(names) @@ -102,12 +101,8 @@ define(["dojo/dom", } storeNodes(["name", - "path", - "trustStoreType", - "trustStoreState", - "trustManagerFactoryAlgorithm", - "certificateAlias", - "peersOnly" + "type", + "state" ]); this.query = url; @@ -123,23 +118,26 @@ define(["dojo/dom", KeyStoreUpdater.prototype.updateHeader = function() { this.name.innerHTML = entities.encode(String(this.keyStoreData[ "name" ])); - this.path.innerHTML = entities.encode(String(this.keyStoreData[ "path" ])); - this.trustStoreType.innerHTML = entities.encode(String(this.keyStoreData[ "trustStoreType" ])); - this.trustStoreState.innerHTML = entities.encode(String(this.keyStoreData[ "state" ])); - this.trustManagerFactoryAlgorithm.innerHTML = entities.encode(String(this.keyStoreData[ "trustManagerFactoryAlgorithm" ])); - this.peersOnly.innerHTML = "<input type='checkbox' disabled='disabled' "+(this.keyStoreData[ "peersOnly" ] ? "checked='checked'": "")+" />" ; + this.type.innerHTML = entities.encode(String(this.keyStoreData[ "type" ])); + this.state.innerHTML = entities.encode(String(this.keyStoreData[ "state" ])); }; KeyStoreUpdater.prototype.update = function() { - - var thisObj = this; - + var that = this; xhr.get({url: this.query, sync: properties.useSyncGet, handleAs: "json"}).then(function(data) - { - thisObj.keyStoreData = data[0]; - thisObj.updateHeader(); - }); + { + that.trustStoreData = data[0]; + that.updateHeader(); + + require(["qpid/management/store/" + encodeURIComponent(that.trustStoreData.type.toLowerCase()) + "/show"], + function(DetailsUI) + { + that.details = new DetailsUI({containerNode:that.keyStoreDetailsContainer, parent: that}); + that.details.update(that.trustStoreData); + } + ); + }); }; TrustStore.prototype.deleteKeyStore = function() { Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/aclfile/add.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/aclfile/add.js?rev=1653285&r1=1653284&r2=1653285&view=diff ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/aclfile/add.js (original) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/aclfile/add.js Tue Jan 20 16:25:28 2015 @@ -39,6 +39,7 @@ define(["dojo/dom","dojo/query","dijit/r this.aclSelectedFileStatusContainer = dom.byId("addAccessControlProvider.selectedFileStatus"); this.aclFile = registry.byId("addAccessControlProvider.file"); this.aclFileClearButton = registry.byId("addAccessControlProvider.fileClearButton"); + this.aclFileOldBrowserWarning = dom.byId("addAccessControlProvider.oldBrowserWarning"); //Only submitted field this.aclPath = registry.byId("addAccessControlProvider.path"); @@ -56,6 +57,8 @@ define(["dojo/dom","dojo/query","dijit/r { // Fall back for IE8/9 which do not support FileReader this.aclUploadFields.style.display = "none"; + this.aclFileOldBrowserWarning.innerHTML = "File upload requires a more recent browser with HTML5 support"; + this.aclFileOldBrowserWarning.className = this.aclFileOldBrowserWarning.className.replace("hidden", ""); } this.aclServerPath.on("blur", function(){that._aclServerPathChanged()}); Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addStore.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addStore.js?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addStore.js (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addStore.js Tue Jan 20 16:25:28 2015 @@ -0,0 +1,211 @@ +/* + * + * 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/lang", + "dojo/_base/xhr", + "dojo/dom", + "dojo/dom-construct", + "dijit/registry", + "dojo/parser", + "dojo/store/Memory", + "dojo/_base/array", + "dojo/_base/event", + 'dojo/json', + "qpid/common/util", + "qpid/common/metadata", + "dojo/text!addStore.html", + "dojo/store/Memory", + "dojox/validate/us", + "dojox/validate/web", + "dijit/Dialog", + "dijit/form/CheckBox", + "dijit/form/Textarea", + "dijit/form/ComboBox", + "dijit/form/TextBox", + "dijit/form/ValidationTextBox", + "dijit/form/Button", + "dijit/form/Form", + "dijit/layout/ContentPane", + "dojox/layout/TableContainer", + "dojo/domReady!"], + function (lang, xhr, dom, construct, registry, parser, memory, array, event, json, util, metadata, template) + { + var addStore = + { + init: function() + { + var that=this; + this.containerNode = construct.create("div", {innerHTML: template}); + parser.parse(this.containerNode); + + this.storeName = registry.byId("addStore.name"); + this.storeName.set("regExpGen", util.nameOrContextVarRegexp); + + this.dialog = registry.byId("addStore"); + this.addButton = registry.byId("addStore.addButton"); + this.cancelButton = registry.byId("addStore.cancelButton"); + this.cancelButton.on("click", function(e){that._cancel(e);}); + this.addButton.on("click", function(e){that._add(e);}); + + this.storeTypeFieldsContainer = dom.byId("addStore.typeFields"); + this.storeForm = registry.byId("addStore.form"); + + this.storeType = registry.byId("addStore.type"); + this.storeType.on("change", function(type){that._storeTypeChanged(type);}); + }, + setupTypeStore: function(category) + { + this.category = category; + var storeTypeSupportedTypes = metadata.getTypesForCategory(category); + storeTypeSupportedTypes.sort(); + var storeTypeStore = util.makeTypeStore(storeTypeSupportedTypes); + this.storeType.set("store", storeTypeStore); + }, + show: function(effectiveData) + { + this.storeForm.reset(); + + if (effectiveData) + { + this.effectiveData = effectiveData; + this._destroyTypeFields(this.containerNode); + this._initFields(effectiveData); + } + this.storeName.set("disabled", effectiveData == null ? false : true); + this.storeType.set("disabled", effectiveData == null ? false : true); + this.dialog.show(); + }, + _initFields:function(data) + { + var type = data["type"]; + var attributes = metadata.getMetaData(this.category, type).attributes; + for(var name in attributes) + { + var widget = registry.byId("addStore."+name); + if (widget) + { + widget.set("value", data[name]); + } + } + }, + _cancel: function(e) + { + event.stop(e); + if (this.reader) + { + this.reader.abort(); + } + this.dialog.hide(); + }, + _add: function(e) + { + event.stop(e); + this._submit(); + }, + _submit: function() + { + if (this.storeForm.validate()) + { + var success = false,failureReason=null; + + var storeData = util.getFormWidgetValues(this.storeForm, this.initialData); + var encodedStoreName = encodeURIComponent(this.storeName.value); + var encodedCategory = encodeURIComponent(this.category.toLowerCase()); + var jsonString = json.stringify(storeData); + + try { + xhr.put( + { + url: "api/latest/" + encodedCategory + "/" + encodedStoreName, + sync: true, + handleAs: "json", + headers: { "Content-Type": "application/json"}, + putData: jsonString, + load: function(x) {success = true; }, + error: function(error) {success = false; failureReason = error;} + }); + } + catch (e) + { + console.warn(e); + } + + if (success == true) + { + this.dialog.hide(); + } + else + { + util.xhrErrorHandler(failureReason); + } + } + else + { + alert('Form contains invalid data. Please correct first'); + } + }, + _storeTypeChanged: function(type) + { + this._typeChanged(type, this.storeTypeFieldsContainer, "qpid/management/store/", this.category ); + }, + _destroyTypeFields: function(typeFieldsContainer) + { + var widgets = registry.findWidgets(typeFieldsContainer); + array.forEach(widgets, function(item) { item.destroyRecursive();}); + construct.empty(typeFieldsContainer); + }, + _typeChanged: function(type, typeFieldsContainer, baseUrl, category ) + { + this._destroyTypeFields(typeFieldsContainer); + + if (type) + { + var that = this; + require([ baseUrl + type.toLowerCase() + "/add"], function(typeUI) + { + try + { + typeUI.show({containerNode:typeFieldsContainer, parent: that, data: that.initialData, effectiveData: that.effectiveData}); + util.applyMetadataToWidgets(typeFieldsContainer, category, type); + if (that.effectiveData) + { + typeUI.update(that.effectiveData); + that.effectiveData = undefined; + } + } + catch(e) + { + console.warn(e); + } + }); + } + } + }; + + try + { + addStore.init(); + } + catch(e) + { + console.warn(e); + } + return addStore; + }); Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/add.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/add.js?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/add.js (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/add.js Tue Jan 20 16:25:28 2015 @@ -0,0 +1,152 @@ +/* + * + * 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/dom","dojo/query", "dojo/_base/array", "dijit/registry","qpid/common/util", "qpid/common/metadata"], + function (dom, query, array, registry, util, metadata) + { + var addKeyStore = + { + init: function() + { + // Readers are HTML5 + this.reader = window.FileReader ? new FileReader() : undefined; + }, + show: function(data) + { + var that=this; + util.parseHtmlIntoDiv(data.containerNode, "store/filekeystore/add.html"); + + this.containerNode = data.containerNode; + this.keyStoreServerPath = registry.byId("addStore.serverPath"); + this.keyStoreUploadFields = dom.byId("addStore.uploadFields"); + this.keyStoreSelectedFileContainer = dom.byId("addStore.selectedFile"); + this.keyStoreSelectedFileStatusContainer = dom.byId("addStore.selectedFileStatus"); + this.keyStoreFile = registry.byId("addStore.file"); + this.keyStoreFileClearButton = registry.byId("addStore.fileClearButton"); + this.keyStoreOldBrowserWarning = dom.byId("addStore.oldBrowserWarning"); + + //Only submitted field + this.keyStorePath = registry.byId("addStore.path"); + + this.addButton = data.parent.addButton; + + if (this.reader) + { + this.reader.onload = function(evt) {that._keyStoreUploadFileComplete(evt);}; + this.reader.onerror = function(ex) {console.error("Failed to load key store file", ex);}; + this.keyStoreFile.on("change", function(selected){that._keyStoreFileChanged(selected)}); + this.keyStoreFileClearButton.on("click", function(event){that._keyStoreFileClearButtonClicked(event)}); + } + else + { + // Fall back for IE8/9 which do not support FileReader + this.keyStoreUploadFields.style.display = "none"; + this.keyStoreOldBrowserWarning.innerHTML = "File upload requires a more recent browser with HTML5 support"; + this.keyStoreOldBrowserWarning.className = this.keyStoreOldBrowserWarning.className.replace("hidden", ""); + } + + this.keyStoreServerPath.on("blur", function(){that._keyStoreServerPathChanged()}); + }, + _keyStoreFileChanged: function (evt) + { + // We only ever expect a single file + var file = this.keyStoreFile.domNode.children[0].files[0]; + + this.addButton.setDisabled(true); + this.keyStoreSelectedFileContainer.innerHTML = file.name; + this.keyStoreSelectedFileStatusContainer.className = "loadingIcon"; + + console.log("Beginning to read key store file " + file.name); + this.reader.readAsDataURL(file); + }, + _keyStoreUploadFileComplete: function(evt) + { + var reader = evt.target; + var result = reader.result; + console.log("Key store file read complete, contents " + result); + this.addButton.setDisabled(false); + this.keyStoreSelectedFileStatusContainer.className = "loadedIcon"; + + this.keyStoreServerPath.set("value", ""); + this.keyStoreServerPath.setDisabled(true); + this.keyStoreServerPath.set("required", false); + + this.keyStoreFileClearButton.setDisabled(false); + + this.keyStorePath.set("value", result); + }, + _keyStoreFileClearButtonClicked: function(event) + { + this.keyStoreFile.reset(); + this.keyStoreSelectedFileStatusContainer.className = ""; + this.keyStoreSelectedFileContainer.innerHTML = ""; + this.keyStoreServerPath.set("required", true); + this.keyStoreServerPath.setDisabled(false); + this.keyStoreFileClearButton.setDisabled(true); + + this.keyStorePath.set("value", ""); + }, + _keyStoreServerPathChanged: function() + { + var serverPathValue = this.keyStoreServerPath.get("value"); + this.keyStorePath.set("value", serverPathValue); + }, + update: function(effectiveData) + { + var attributes = metadata.getMetaData("KeyStore", "FileKeyStore").attributes; + var widgets = registry.findWidgets(this.containerNode); + array.forEach(widgets, function(item) + { + var name = item.id.replace("addStore.",""); + if (name in attributes && item.type != "password") + { + item.set("value", effectiveData[name]); + } + }); + + var keyStorePathValue = effectiveData["path"]; + var isDataUrl = keyStorePathValue.indexOf("data:") == 0; + + if (isDataUrl) + { + this.keyStoreSelectedFileStatusContainer.className = "loadedIcon"; + this.keyStoreSelectedFileContainer.innerHTML = "uploaded.jks"; + this.keyStoreServerPath.setDisabled(true); + this.keyStoreServerPath.set("required", false); + this.keyStoreFileClearButton.setDisabled(false); + } + else + { + this.keyStoreServerPath.set("value", keyStorePathValue); + } + } + }; + + try + { + addKeyStore.init(); + } + catch(e) + { + console.warn(e); + } + return addKeyStore; + } +); Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/show.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/show.js?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/show.js (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filekeystore/show.js Tue Jan 20 16:25:28 2015 @@ -0,0 +1,42 @@ +/* + * 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", "qpid/common/metadata", "dojo/domReady!"], + function (util, metadata) + { + + function FileKeyStoreProvider(data) + { + this.fields = []; + var attributes = metadata.getMetaData("KeyStore", "FileKeyStore").attributes; + for(var name in attributes) + { + this.fields.push(name); + } + util.buildUI(data.containerNode, data.parent, "store/filekeystore/show.html", this.fields, this); + } + + FileKeyStoreProvider.prototype.update = function(data) + { + util.updateUI(data, this.fields, this); + } + + return FileKeyStoreProvider; + } +); Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/add.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/add.js?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/add.js (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/add.js Tue Jan 20 16:25:28 2015 @@ -0,0 +1,152 @@ +/* + * + * 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/dom","dojo/query", "dojo/_base/array", "dijit/registry","qpid/common/util", "qpid/common/metadata"], + function (dom, query, array, registry, util, metadata) + { + var addTrustStore = + { + init: function() + { + // Readers are HTML5 + this.reader = window.FileReader ? new FileReader() : undefined; + }, + show: function(data) + { + var that=this; + util.parseHtmlIntoDiv(data.containerNode, "store/filetruststore/add.html"); + + this.containerNode = data.containerNode; + this.keyStoreServerPath = registry.byId("addStore.serverPath"); + this.keyStoreUploadFields = dom.byId("addStore.uploadFields"); + this.keyStoreSelectedFileContainer = dom.byId("addStore.selectedFile"); + this.keyStoreSelectedFileStatusContainer = dom.byId("addStore.selectedFileStatus"); + this.keyStoreFile = registry.byId("addStore.file"); + this.keyStoreFileClearButton = registry.byId("addStore.fileClearButton"); + this.keyStoreOldBrowserWarning = dom.byId("addStore.oldBrowserWarning"); + + //Only submitted field + this.keyStorePath = registry.byId("addStore.path"); + + this.addButton = data.parent.addButton; + + if (this.reader) + { + this.reader.onload = function(evt) {that._keyStoreUploadFileComplete(evt);}; + this.reader.onerror = function(ex) {console.error("Failed to load trust store file", ex);}; + this.keyStoreFile.on("change", function(selected){that._keyStoreFileChanged(selected)}); + this.keyStoreFileClearButton.on("click", function(event){that._keyStoreFileClearButtonClicked(event)}); + } + else + { + // Fall back for IE8/9 which do not support FileReader + this.keyStoreUploadFields.style.display = "none"; + this.keyStoreOldBrowserWarning.innerHTML = "File upload requires a more recent browser with HTML5 support"; + this.keyStoreOldBrowserWarning.className = this.keyStoreOldBrowserWarning.className.replace("hidden", ""); + } + + this.keyStoreServerPath.on("blur", function(){that._keyStoreServerPathChanged()}); + }, + _keyStoreFileChanged: function (evt) + { + // We only ever expect a single file + var file = this.keyStoreFile.domNode.children[0].files[0]; + + this.addButton.setDisabled(true); + this.keyStoreSelectedFileContainer.innerHTML = file.name; + this.keyStoreSelectedFileStatusContainer.className = "loadingIcon"; + + console.log("Beginning to read trust store file " + file.name); + this.reader.readAsDataURL(file); + }, + _keyStoreUploadFileComplete: function(evt) + { + var reader = evt.target; + var result = reader.result; + console.log("Trust store file read complete, contents " + result); + this.addButton.setDisabled(false); + this.keyStoreSelectedFileStatusContainer.className = "loadedIcon"; + + this.keyStoreServerPath.set("value", ""); + this.keyStoreServerPath.setDisabled(true); + this.keyStoreServerPath.set("required", false); + + this.keyStoreFileClearButton.setDisabled(false); + + this.keyStorePath.set("value", result); + }, + _keyStoreFileClearButtonClicked: function(event) + { + this.keyStoreFile.reset(); + this.keyStoreSelectedFileStatusContainer.className = ""; + this.keyStoreSelectedFileContainer.innerHTML = ""; + this.keyStoreServerPath.set("required", true); + this.keyStoreServerPath.setDisabled(false); + this.keyStoreFileClearButton.setDisabled(true); + + this.keyStorePath.set("value", ""); + }, + _keyStoreServerPathChanged: function() + { + var serverPathValue = this.keyStoreServerPath.get("value"); + this.keyStorePath.set("value", serverPathValue); + }, + update: function(effectiveData) + { + var attributes = metadata.getMetaData("TrustStore", "FileTrustStore").attributes; + var widgets = registry.findWidgets(this.containerNode); + array.forEach(widgets, function(item) + { + var name = item.id.replace("addStore.",""); + if (name in attributes && item.type != "password") + { + item.set("value", effectiveData[name]); + } + }); + + var keyStorePathValue = effectiveData["path"]; + var isDataUrl = keyStorePathValue.indexOf("data:") == 0; + + if (isDataUrl) + { + this.keyStoreSelectedFileStatusContainer.className = "loadedIcon"; + this.keyStoreSelectedFileContainer.innerHTML = "uploaded.jks"; + this.keyStoreServerPath.setDisabled(true); + this.keyStoreServerPath.set("required", false); + this.keyStoreFileClearButton.setDisabled(false); + } + else + { + this.keyStoreServerPath.set("value", keyStorePathValue); + } + } + }; + + try + { + addTrustStore.init(); + } + catch(e) + { + console.warn(e); + } + return addTrustStore; + } +); Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/show.js URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/show.js?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/show.js (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/store/filetruststore/show.js Tue Jan 20 16:25:28 2015 @@ -0,0 +1,42 @@ +/* + * 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", "qpid/common/metadata", "dojo/domReady!"], + function (util, metadata) + { + + function FileTrustStoreProvider(data) + { + this.fields = []; + var attributes = metadata.getMetaData("TrustStore", "FileTrustStore").attributes; + for(var name in attributes) + { + this.fields.push(name); + } + util.buildUI(data.containerNode, data.parent, "store/filetruststore/show.html", this.fields, this); + } + + FileTrustStoreProvider.prototype.update = function(data) + { + util.updateUI(data, this.fields, this); + } + + return FileTrustStoreProvider; + } +); Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showStore.html URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showStore.html?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showStore.html (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showStore.html Tue Jan 20 16:25:28 2015 @@ -0,0 +1,46 @@ +<!-- + ~ 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="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/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/add.html URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/add.html?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/add.html (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/add.html Tue Jan 20 16:25:28 2015 @@ -0,0 +1,114 @@ +<!-- + ~ 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 id="addStore.oldBrowserWarning" class="infoMessage hidden clear"></div> + <div class="clear"> + <div id="addStore.serverPathLabel" class="formLabel-labelCell tableContainer-labelCell">Server path or upload*:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="text" id="addStore.serverPath" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'serverPath', + placeHolder: 'key store file server path', + required: true, + excluded: true, + promptMessage: 'Location of the key store file on the server', + title: 'Enter the key store file path'" /> + + <!-- Hidden and used purely for form submission --> + <input type="hidden" id="addStore.path" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'path', + required: true" /> + </div> + + <div id="addStore.uploadFields"> + <div id="addStore.fileLabel" class="formLabel-labelCell tableContainer-labelCell"></div> + <div class="fileUpload clear"> + <span id="addStore.selectedFile" class="infoMessage"></span> + <span id="addStore.selectedFileStatus"></span> + </div> + + <div class="fileUpload clear"> + <input type="file" id="addStore.file" + multiple="false" + data-dojo-type="dojox/form/Uploader" + data-dojo-props="label: 'Upload'"/> + <button id="addStore.fileClearButton" + data-dojo-type="dijit/form/Button" + data-dojo-props="label: 'Clear', + disabled: true"> + </button> + </div> + </div> + + <div class="clear"> + <div class="formLabel-labelCell tableContainer-labelCell">Password*:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="password" id="addStore.password" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'password', + placeHolder: 'store password', + required: true, + promptMessage: 'password for store', + title: 'Enter a password for the store'" /> + </div> + </div> + <div class="clear"> + <div class="formLabel-labelCell tableContainer-labelCell">Certificate alias:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="text" id="addStore.certificateAlias" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'certificateAlias', + placeHolder: 'certificate alias', + promptMessage: 'Used to identify one certificate in a store that has many', + title: 'Enter an alias to identify one certificate in a store with many'" /> + </div> + </div> + <div class="clear"> + <div class="formLabel-labelCell tableContainer-labelCell clear">Key manager factory algorithm:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="text" id="addStore.keyManagerFactoryAlgorithm" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'keyManagerFactoryAlgorithm', + placeHolder: 'key manager factory algorithm', + promptMessage: 'Name of the key manager algorithm known to Java', + title: 'Enter the key manager algorithm known to Java'" /> + </div> + </div> + <div class="clear"> + <div class="formLabel-labelCell tableContainer-labelCell">Java key store type:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="text" id="addStore.keyStoreType" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'keyStoreType', + placeHolder: 'java key store type', + promptMessage: 'Name of the store type known to Java', + title: 'Enter the store type known to Java'" /> + </div> + </div> + + </div> +</div> Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/show.html URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/show.html?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/show.html (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filekeystore/show.html Tue Jan 20 16:25:28 2015 @@ -0,0 +1,39 @@ +<!-- + ~ 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 class="clear"> + <div class="formLabel-labelCell">Path:</div> + <div ><span class="path" ></span></div> + </div> + <div class="clear"> + <div class="formLabel-labelCell">Certificate alias:</div> + <div><span class="certificateAlias" ></span></div> + </div> + <div class="clear"> + <div class="formLabel-labelCell">Java key store type:</div> + <div><span class="keyStoreType" ></span></div> + </div> + <div class="clear"> + <div class="formLabel-labelCell">Key manager factory algorithm:</div> + <div><span class="keyManagerFactoryAlgorithm" ></span></div> + </div> + <div class="clear"></div> +</div> + Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/add.html URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/add.html?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/add.html (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/add.html Tue Jan 20 16:25:28 2015 @@ -0,0 +1,109 @@ +<!-- + ~ 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 id="addStore.oldBrowserWarning" class="infoMessage hidden clear"></div> + <div class="clear"> + <div id="addStore.serverPathLabel" class="formLabel-labelCell tableContainer-labelCell">Server path or upload*:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="text" id="addStore.serverPath" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'serverPath', + placeHolder: 'trust store file server path', + required: true, + excluded: true, + promptMessage: 'Location of the trust store file on the server', + title: 'Enter the store file path'" /> + <!-- Hidden and used purely for form submission --> + <input type="hidden" id="addStore.path" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'path', + required: true" /> + </div> + <div id="addStore.uploadFields"> + <div id="addStore.fileLabel" class="formLabel-labelCell tableContainer-labelCell"></div> + <div class="fileUpload clear"> + <span id="addStore.selectedFile" class="infoMessage"></span> + <span id="addStore.selectedFileStatus"></span> + </div> + <div class="fileUpload clear"> + <input type="file" id="addStore.file" + multiple="false" + data-dojo-type="dojox/form/Uploader" + data-dojo-props="label: 'Upload'"/> + <button id="addStore.fileClearButton" + data-dojo-type="dijit/form/Button" + data-dojo-props="label: 'Clear', + disabled: true"> + </button> + </div> + </div> + <div class="clear"> + <div class="formLabel-labelCell tableContainer-labelCell">Password*:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="password" id="addStore.password" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'password', + placeHolder: 'store password', + required: true, + promptMessage: 'password for store', + title: 'Enter a password for the store'" /> + </div> + </div> + <div class="clear"> + <div class="formLabel-labelCell tableContainer-labelCell">Peers only:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="text" id="addStore.peersOnly" + data-dojo-type="dijit/form/CheckBox" + data-dojo-props=" + name: 'peersOnly', + promptMessage: 'Peers only or not', + title: 'Tick if peers only'" /> + </div> + </div> + <div class="clear"> + <div class="formLabel-labelCell tableContainer-labelCell">Trust manager factory algorithm:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="text" id="addStore.keyManagerFactoryAlgorithm" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'trustManagerFactoryAlgorithm', + placeHolder: 'trust manager factory algorithm', + promptMessage: 'Name of the trust manager algorithm known to Java', + title: 'Enter the trust manager algorithm known to Java'" /> + </div> + </div> + <div class="clear"> + <div class="formLabel-labelCell tableContainer-labelCell">Java trust store type:</div> + <div class="formLabel-controlCell tableContainer-valueCell"> + <input type="text" id="addStore.trustStoreType" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'trustStoreType', + placeHolder: 'java trust store type', + promptMessage: 'Name of the store type known to Java', + title: 'Enter the store type known to Java'" /> + </div> + </div> + + </div> +</div> Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/show.html URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/show.html?rev=1653285&view=auto ============================================================================== --- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/show.html (added) +++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/store/filetruststore/show.html Tue Jan 20 16:25:28 2015 @@ -0,0 +1,39 @@ +<!-- + ~ 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 class="clear"> + <div class="formLabel-labelCell">Path:</div> + <div ><span class="path" ></span></div> + </div> + <div class="clear"> + <div class="formLabel-labelCell">Peers only:</div> + <div><span class="peersOnly" ></span></div> + </div> + <div class="clear"> + <div class="formLabel-labelCell">Java trust store type:</div> + <div><span class="trustStoreType" ></span></div> + </div> + <div class="clear"> + <div class="formLabel-labelCell">Trust manager factory algorithm:</div> + <div><span class="trustManagerFactoryAlgorithm" ></span></div> + </div> + <div class="clear"></div> +</div> + --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
