You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2014/08/16 17:03:23 UTC

svn commit: r1618373 [2/2] - in /qpid/trunk/qpid/java: bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/ bdbstore/src/main/java/resources/virtualhost/bdb_ha/ bdbstore/src/main/java/resources/virtualhostnode/bdb/ bdbstore/src/main/...

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html Sat Aug 16 15:03:21 2014
@@ -19,111 +19,112 @@
 <div class="dijitHidden">
   <div data-dojo-type="dijit/Dialog" data-dojo-props="title:'Edit Virtual Host'" id="editVirtualHostDialog">
       <form id="editVirtualHostForm" method="post" data-dojo-type="dijit/form/Form">
-          <div class="editNoteBanner">NOTE: All changes will only take effect after Virtual Host restart.</div>
-          <div class="clear">
-              <div class="formLabel-labelCell tableContainer-labelCell">Name*:</div>
-              <div class="formLabel-controlCell tableContainer-valueCell">
-                  <input type="text" id="editVirtualHost.name"
-                         data-dojo-type="dijit/form/ValidationTextBox"
-                         data-dojo-props="
+          <div id="editVirtualHost.allFields">
+              <div class="editNoteBanner">NOTE: All changes will only take effect after Virtual Host restart.</div>
+              <div class="clear">
+                  <div class="formLabel-labelCell tableContainer-labelCell">Name*:</div>
+                  <div class="formLabel-controlCell tableContainer-valueCell">
+                      <input type="text" id="editVirtualHost.name"
+                             data-dojo-type="dijit/form/ValidationTextBox"
+                             data-dojo-props="
                               name: 'name',
                               placeHolder: 'name',
                               required: true,
-                              missingMessage: 'Name must be supplied',
                               disabled: true,
                               title: 'Enter virtual host name'" />
+                  </div>
               </div>
-          </div>
 
-          <div id="editVirtualHost.typeFields"></div>
+              <div id="editVirtualHost.typeFields"></div>
 
-          <div class="clear formBox">
-              <fieldset>
-                  <legend>Store transaction settings</legend>
-                  <div class="clear">
-                      <div class="formLabel-labelCell tableContainer-labelCell">Idle Timeout Warn:</div>
-                      <div class="tableContainer-valueCell formLabel-controlCell">
-                          <input data-dojo-type="dijit/form/ValidationTextBox"
-                                 id="editVirtualHost.storeTransactionIdleTimeoutWarn"
-                                 name="storeTransactionIdleTimeoutWarn"
-                                 placeHolder="idle timeout warn time in ms"
-                                 missingMessage="An idle timeout warn time in ms must be supplied"/>
-                      </div>
-                  </div>
-                  <div class="clear">
-                      <div class="formLabel-labelCell tableContainer-labelCell">Idle Timeout Close:</div>
-                      <div class="tableContainer-valueCell formLabel-controlCell">
-                          <input data-dojo-type="dijit/form/ValidationTextBox"
-                                 id="editVirtualHost.storeTransactionIdleTimeoutClose"
-                                 name="storeTransactionIdleTimeoutClose"
-                                 placeHolder="idle timeout close time in ms"
-                                 missingMessage="An idle timeout close time in ms must be supplied"/>
-                      </div>
-                  </div>
-                  <div class="clear">
-                      <div class="formLabel-labelCell tableContainer-labelCell">Open Timeout Warn:</div>
-                      <div class="tableContainer-valueCell formLabel-controlCell">
-                          <input data-dojo-type="dijit/form/ValidationTextBox"
-                                 id="editVirtualHost.storeTransactionOpenTimeoutWarn"
-                                 name="storeTransactionOpenTimeoutWarn"
-                                 placeHolder="open timeout warn time in ms"
-                                 missingMessage="An open timeout warn time in ms must be supplied"/>
-                      </div>
-                  </div>
-                  <div class="clear">
-                      <div class="formLabel-labelCell tableContainer-labelCell">Open Timeout Close:</div>
-                      <div class="tableContainer-valueCell formLabel-controlCell">
-                          <input data-dojo-type="dijit/form/ValidationTextBox"
-                                 id="editVirtualHost.storeTransactionOpenTimeoutClose"
-                                 name="storeTransactionOpenTimeoutClose"
-                                 placeHolder="open timeout close time in ms"
-                                 missingMessage="An open timeout close time in ms must be supplied"/>
+              <div class="clear formBox">
+                  <fieldset>
+                      <legend>Store transaction settings</legend>
+                      <div class="clear">
+                          <div class="formLabel-labelCell tableContainer-labelCell">Idle Timeout Warn:</div>
+                          <div class="tableContainer-valueCell formLabel-controlCell">
+                              <input data-dojo-type="dijit/form/ValidationTextBox"
+                                     id="editVirtualHost.storeTransactionIdleTimeoutWarn"
+                                     name="storeTransactionIdleTimeoutWarn"
+                                     placeHolder="idle timeout warn time in ms"
+                                     promptMessage="Length of time a transaction must be idle before warnings produced"/>
+                          </div>
+                      </div>
+                      <div class="clear">
+                          <div class="formLabel-labelCell tableContainer-labelCell">Idle Timeout Close:</div>
+                          <div class="tableContainer-valueCell formLabel-controlCell">
+                              <input data-dojo-type="dijit/form/ValidationTextBox"
+                                     id="editVirtualHost.storeTransactionIdleTimeoutClose"
+                                     name="storeTransactionIdleTimeoutClose"
+                                     placeHolder="idle timeout close time in ms"
+                                     promptMessage="Length of time a transaction must be idle before the connection is closed"/>
+                          </div>
+                      </div>
+                      <div class="clear">
+                          <div class="formLabel-labelCell tableContainer-labelCell">Open Timeout Warn:</div>
+                          <div class="tableContainer-valueCell formLabel-controlCell">
+                              <input data-dojo-type="dijit/form/ValidationTextBox"
+                                     id="editVirtualHost.storeTransactionOpenTimeoutWarn"
+                                     name="storeTransactionOpenTimeoutWarn"
+                                     placeHolder="open timeout warn time in ms"
+                                     promptMessage="Length of time a transaction must be open before warnings produced"/>
+                          </div>
+                      </div>
+                      <div class="clear">
+                          <div class="formLabel-labelCell tableContainer-labelCell">Open Timeout Close:</div>
+                          <div class="tableContainer-valueCell formLabel-controlCell">
+                              <input data-dojo-type="dijit/form/ValidationTextBox"
+                                     id="editVirtualHost.storeTransactionOpenTimeoutClose"
+                                     name="storeTransactionOpenTimeoutClose"
+                                     placeHolder="open timeout close time in ms"
+                                     promptMessage="Length of time a transaction must be open before the connection is closed"/>
+                          </div>
                       </div>
-                  </div>
-              </fieldset>
-          </div>
+                  </fieldset>
+              </div>
 
-          <div class="clear formBox">
-              <fieldset>
-                  <legend>House keeping settings</legend>
-                  <div class="clear">
-                      <div class="formLabel-labelCell tableContainer-labelCell">Check period (ms):</div>
-                      <div class="tableContainer-valueCell formLabel-controlCell">
-                          <input data-dojo-type="dijit/form/ValidationTextBox"
-                                  id="editVirtualHost.housekeepingCheckPeriod"
-                                  name="housekeepingCheckPeriod"
-                                  placeHolder="house keeping check period in ms"
-                                  missingMessage="A house keeping check period must be supplied"/>
-                      </div>
-                  </div>
-                  <div class="clear">
-                      <div class="formLabel-labelCell tableContainer-labelCell">Thread count:</div>
-                      <div class="tableContainer-valueCell formLabel-controlCell">
-                          <input data-dojo-type="dijit/form/ValidationTextBox"
-                                 id="editVirtualHost.housekeepingThreadCount"
-                                 name="housekeepingThreadCount"
-                                 placeHolder="house keeping thread count"
-                                 missingMessage="A house keeping thread count must be supplied"/>
+              <div class="clear formBox">
+                  <fieldset>
+                      <legend>House keeping settings</legend>
+                      <div class="clear">
+                          <div class="formLabel-labelCell tableContainer-labelCell">Check period (ms):</div>
+                          <div class="tableContainer-valueCell formLabel-controlCell">
+                              <input data-dojo-type="dijit/form/ValidationTextBox"
+                                     id="editVirtualHost.housekeepingCheckPeriod"
+                                     name="housekeepingCheckPeriod"
+                                     placeHolder="house keeping check period in ms"
+                                     promptMessage="Frequency with which the housekeeper runs"/>
+                          </div>
+                      </div>
+                      <div class="clear">
+                          <div class="formLabel-labelCell tableContainer-labelCell">Thread count:</div>
+                          <div class="tableContainer-valueCell formLabel-controlCell">
+                              <input data-dojo-type="dijit/form/ValidationTextBox"
+                                     id="editVirtualHost.housekeepingThreadCount"
+                                     name="housekeepingThreadCount"
+                                     placeHolder="house keeping thread count"
+                                     promptMessage="Number of threads used to perform housekeeping"/>
+                          </div>
                       </div>
-                  </div>
-              </fieldset>
-          </div>
-          <div class="clear"></div>
+                  </fieldset>
+              </div>
+              <div class="clear"></div>
 
-          <div class="clear">
-              <div class="formLabel-labelCell tableContainer-labelCell">Dead letter queue enabled:</div>
-              <div class="tableContainer-valueCell formLabel-controlCell">
-                  <input type="checkbox" id="editVirtualHost.queue.deadLetterQueueEnabled"
-                         data-dojo-type="dijit/form/CheckBox"
-                         data-dojo-props="name: 'queue.deadLetterQueueEnabled'">
-                  </input>
+              <div class="clear">
+                  <div class="formLabel-labelCell tableContainer-labelCell">Dead letter queue enabled:</div>
+                  <div class="tableContainer-valueCell formLabel-controlCell">
+                      <input type="checkbox" id="editVirtualHost.queue.deadLetterQueueEnabled"
+                             data-dojo-type="dijit/form/CheckBox"
+                             data-dojo-props="name: 'queue.deadLetterQueueEnabled'">
+                      </input>
+                  </div>
               </div>
-          </div>
-          <div class="clear"></div>
+              <div class="clear"></div>
 
-          <div class="dijitDialogPaneActionBar">
-              <button data-dojo-type="dijit/form/Button" id="editVirtualHost.saveButton" data-dojo-props="label: 'Save'">Save</button>
-              <button data-dojo-type="dijit/form/Button" id="editVirtualHost.cancelButton" data-dojo-props="label: 'Cancel'" ></button>
+              <div class="dijitDialogPaneActionBar">
+                  <button data-dojo-type="dijit/form/Button" id="editVirtualHost.saveButton" data-dojo-props="label: 'Save'">Save</button>
+                  <button data-dojo-type="dijit/form/Button" id="editVirtualHost.cancelButton" data-dojo-props="label: 'Cancel'" ></button>
+              </div>
           </div>
       </form>
   </div>

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/index.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/index.html?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/index.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/index.html Sat Aug 16 15:03:21 2014
@@ -86,7 +86,7 @@
         <div id="header" class="header" style="float: left; width: 300px"></div>
         <div style="float: right;">
           <div id="login" class="hidden"><span id="authenticatedUser" class="hidden"></span>
-            <div id="authenticatedUserControls" data-dojo-type="dijit.form.DropDownButton" data-dojo-props="iconClass: 'preferencesIcon', style:{'max-width': '100px'}">
+            <div id="authenticatedUserControls" data-dojo-type="dijit.form.DropDownButton" data-dojo-props="iconClass: 'preferencesIcon'">
             <div data-dojo-type="dijit.Menu">
                 <div data-dojo-type="dijit.MenuItem" data-dojo-props="onClick: function(){window.location='logout';}" >Log out</div>
                 <div data-dojo-type="dijit.MenuItem"

Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/metadata.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/metadata.js?rev=1618373&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/metadata.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/metadata.js Sat Aug 16 15:03:21 2014
@@ -0,0 +1,57 @@
+/*
+ * 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",
+        "dojox/lang/functional/object",
+        "qpid/common/properties",
+        "dojo/domReady!"
+        ],
+  function (xhr, fobject, properties)
+  {
+   var metadata =
+   {
+     _init: function ()
+     {
+       var that = this;
+       xhr.get({sync: true, handleAs: "json", url: "service/metadata", load: function(metadata){that._onMetadata(metadata)}});
+     },
+     _onMetadata: function (metadata)
+     {
+       this.metadata = metadata;
+     },
+     getMetaData: function (category, type)
+     {
+       return this.metadata[category][type];
+     },
+     getDefaultValueForAttribute: function (category, type, attributeName)
+     {
+       var metaDataForInstance = this.getMetaData(category, type);
+       var attributesForType =  metaDataForInstance["attributes"];
+       var attributesForName = attributesForType[attributeName];
+       return attributesForName ? attributesForName["defaultValue"] : undefined;
+     },
+     getTypesForCategory: function (category)
+     {
+        return fobject.keys(this.metadata[category]);
+     }
+   };
+
+   metadata._init();
+
+   return metadata;
+  });

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js Sat Aug 16 15:03:21 2014
@@ -19,15 +19,19 @@
  *
  */
 define(["dojo/_base/xhr",
+        "dojo/_base/array",
         "dojo/_base/event",
-        "dojo/json",
         "dojo/_base/lang",
+        "dojo/json",
         "dojo/dom-construct",
         "dojo/dom-geometry",
         "dojo/window",
         "dojo/query",
         "dojo/parser",
+        "dojo/store/Memory",
         "dojox/html/entities",
+        "qpid/common/metadata",
+        "qpid/common/widgetconfigurer",
         "dijit/registry",
         "dijit/TitlePane",
         "dijit/Dialog",
@@ -35,13 +39,15 @@ define(["dojo/_base/xhr",
         "dijit/form/Button",
         "dijit/form/RadioButton",
         "dijit/form/CheckBox",
+        "dijit/form/FilteringSelect",
+        "dijit/form/ValidationTextBox",
         "dojox/layout/TableContainer",
         "dijit/layout/ContentPane",
         "dojox/validate/us",
         "dojox/validate/web",
         "dojo/domReady!"
         ],
-       function (xhr, event, json, lang, dom, geometry, win, query, parser, entities, registry) {
+       function (xhr, array, event, lang, json, dom, geometry, win, query, parser, Memory, entities, metadata, widgetconfigurer, registry) {
            var util = {};
            if (Array.isArray) {
                util.isArray = function (object) {
@@ -146,7 +152,7 @@ define(["dojo/_base/xhr",
                return (type === "PlainPasswordFile" || type === "Base64MD5PasswordFile" || type === "SCRAM-SHA-1" || type === "SCRAM-SHA-256");
            };
 
-           util.showSetAttributesDialog = function(attributeWidgetFactories, data, putURL, dialogTitle, appendNameToUrl)
+           util.showSetAttributesDialog = function(attributeWidgetFactories, data, putURL, dialogTitle, category, type, appendNameToUrl)
            {
               var layout = new dojox.layout.TableContainer({
                    cols: 1,
@@ -200,7 +206,7 @@ define(["dojo/_base/xhr",
                    {
                      groupFieldContainer = new dojox.layout.TableContainer({
                            cols: 1,
-                           "labelWidth": "290",
+                           "labelWidth": "300",
                            showLabels: true,
                            orientation: "horiz",
                            customClass: "formLabel"
@@ -220,6 +226,8 @@ define(["dojo/_base/xhr",
                  }
               }
 
+              this.applyMetadataToWidgets(dialogContent, category, type);
+
               // add onchange handler to set required property for dependent widget
               for(var widgetName in requiredFor)
               {
@@ -310,14 +318,17 @@ define(["dojo/_base/xhr",
                      aproximateHeight += 30;
                  }
              }
-             var viewport = win.getBox();
-             var maxHeight = Math.max(Math.floor(viewport.h * 0.6), 100);
              dialogContentArea.style.overflow= "auto";
-             dialogContentArea.style.height = Math.min(aproximateHeight, maxHeight ) + "px";
+             dialogContentArea.style.height = "300";
              setAttributesDialog.on("hide", function(e){setAttributesDialog.destroy();});
              setAttributesDialog.show();
            };
 
+           util.findAllWidgets = function(root)
+           {
+               return query("[widgetid]", root).map(registry.byNode).filter(function(w){ return w;});
+           };
+
            util.xhrErrorHandler = function(error)
            {
              if (error)
@@ -540,6 +551,16 @@ define(["dojo/_base/xhr",
              }
            }
 
+           util.applyMetadataToWidgets = function(domRoot, category, type)
+           {
+             var widgets = util.findAllWidgets(domRoot);
+             array.forEach(widgets,
+               function (widget)
+               {
+                 widgetconfigurer.config(widget, category, type);
+               });
+           }
+
            util.getFormWidgetValues = function (form, initialData)
            {
                var values = {};
@@ -636,6 +657,16 @@ define(["dojo/_base/xhr",
                }
            }
 
+           util.makeTypeStore = function (types)
+           {
+               var typeData = [];
+               for (var i = 0; i < types.length; i++) {
+                   var type = types[i];
+                   typeData.push({id: type, name: type});
+               }
+               return new Memory({ data: typeData });
+           }
+
            var singleContextVarRegexp = "(\\${[\\w\\.\\-]+})";
 
            util.numericOrContextVarRegexp = function(constraints)

Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js?rev=1618373&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js Sat Aug 16 15:03:21 2014
@@ -0,0 +1,97 @@
+/*
+ * 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/string",
+        "dojo/query",
+        "dojo/dom",
+        "dojo/dom-construct",
+        "dojo/dom-attr",
+        "qpid/common/properties",
+        "qpid/common/metadata",
+        "dojo/text!strings.html",
+        "dojo/domReady!"
+        ],
+  function (xhr, string, query, dom, domConstruct, domAttr, properties, metadata, template)
+  {
+   var widgetconfigurer =
+   {
+     _init: function ()
+     {
+       var stringsTemplate = domConstruct.create("div", {innerHTML: template});
+       var promptTemplateWithDefaultNode = query("[id='promptTemplateWithDefault']", stringsTemplate)[0];
+
+       // The following will contain ${prompt} and ${default} formatted with html elements
+       this.promptTemplateWithDefault = promptTemplateWithDefaultNode.innerHTML;
+
+       domConstruct.destroy(stringsTemplate);
+     },
+     _processWidgetPrompt: function (widget, category, type)
+     {
+       var widgetName = widget.name;
+       if (widgetName && (widget instanceof dijit.form.ValidationTextBox || widget instanceof dijit.form.FilteringSelect))
+       {
+           // If not done so already, save the prompt text specified on the widget.  We do this so if we
+           // config the same widget again, we can apply the default again (which may be different if the user
+           // has selected a different type within the category).
+           if (typeof widget.get("qpid.originalPromptMessage") == "undefined")
+           {
+               widget.set("qpid.originalPromptMessage", widget.get("promptMessage"));
+           }
+
+           var promptMessage = widget.get("qpid.originalPromptMessage");
+           var defaultValue = metadata.getDefaultValueForAttribute(category, type, widgetName);
+           if (defaultValue)
+           {
+               var newPromptMessage = string.substitute(this.promptTemplateWithDefault, { 'default': defaultValue, 'prompt': promptMessage });
+
+               if (promptMessage != newPromptMessage)
+               {
+                   widget.set("promptMessage", newPromptMessage);
+               }
+           }
+       }
+     },
+     _processWidgetValue: function (widget, category, type)
+     {
+       var widgetName = widget.name;
+
+       if (widgetName && (widget instanceof dijit.form.FilteringSelect || widget instanceof dojox.form.CheckedMultiSelect))
+       {
+           if (!widget.get("value"))
+           {
+               var defaultValue = metadata.getDefaultValueForAttribute(category, type, widgetName);
+               if (defaultValue)
+               {
+                   widget.set("value", defaultValue);
+               }
+           }
+       }
+     },
+     config: function (widget, category, type)
+     {
+         this._processWidgetPrompt(widget, category, type);
+         this._processWidgetValue(widget, category, type);
+     }
+   };
+
+   widgetconfigurer._init();
+
+   return widgetconfigurer;
+  });

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=1618373&r1=1618372&r2=1618373&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 Sat Aug 16 15:03:21 2014
@@ -69,7 +69,8 @@ define(["dojo/_base/xhr",
                           regExpGen: util.nameOrContextVarRegexp,
                           value: brokerData.name,
                           label: "Name*:",
-                          name: "name"})
+                          name: "name",
+                          promptMessage: "Identifies the broker instance."})
                     }
                }, {
                        name: "defaultVirtualHost",
@@ -89,7 +90,8 @@ define(["dojo/_base/xhr",
                            required: true, store: hostsStore,
                            value: brokerData.defaultVirtualHost,
                            label: "Default Virtual Host*:",
-                           name: "defaultVirtualHost"})
+                           name: "defaultVirtualHost",
+                           promptMessage: "Default virtual host used for clients that don't specify one when connecting."})
                        }
                }, {
                        name: "statisticsReportingPeriod",
@@ -97,12 +99,12 @@ define(["dojo/_base/xhr",
                          return new dijit.form.ValidationTextBox({
                            trim: "true",
                            regExpGen: util.numericOrContextVarRegexp,
-                           invalidMessage: "Invalid value",
                            required: false,
                            value: brokerData.statisticsReportingPeriod,
                            placeholder: "Time in ms",
                            label: "Statistics reporting period (ms):",
-                           name: "statisticsReportingPeriod"
+                           name: "statisticsReportingPeriod",
+                           promptMessage: "Frequency with which statistics are reported to broker log."
                          });
                        }
                }, {
@@ -123,11 +125,12 @@ define(["dojo/_base/xhr",
                          return new dijit.form.ValidationTextBox({
                            trim: "true",
                            regExpGen: util.numericOrContextVarRegexp,
-                           invalidMessage: "Invalid value",
                            required: false,
                            value: brokerData["connection.sessionCountLimit"],
+                           placeholder: "Number of sessions",
                            label: "Maximum number of sessions:",
-                           name: "connection.sessionCountLimit"
+                           name: "connection.sessionCountLimit",
+                           promptMessage: "Maximum number of sessions per connection"
                          });
                        }
                }, {
@@ -141,7 +144,8 @@ define(["dojo/_base/xhr",
                            value: brokerData["connection.heartBeatDelay"],
                            placeholder: "Time in ms",
                            label: "Heart beat delay (ms):",
-                           name: "connection.heartBeatDelay"
+                           name: "connection.heartBeatDelay",
+                           promptMessage: "Interval between heart beat messages exchanged between broker and clients"
                          });
                        }
                } ];
@@ -235,7 +239,7 @@ define(["dojo/_base/xhr",
                                           that.attributeWidgetFactories,
                                           brokerData,
                                           query,
-                                          "Set broker attributes");
+                                          "Set broker attributes", "Broker", "broker");
                                       });
                                 }
                             );

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=1618373&r1=1618372&r2=1618373&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 Sat Aug 16 15:03:21 2014
@@ -74,6 +74,7 @@ define(["dojo/dom",
                                   xhr.get({url: that.url, sync: properties.useSyncGet, handleAs: "json", content: { actuals: true }})
                                     .then(function(data)
                                     {
+                                      // calls showKeystoreDialog
                                       that.dialog(data[0], that.url);
                                     });
                                 });

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAccessControlProvider.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAccessControlProvider.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAccessControlProvider.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAccessControlProvider.js Sat Aug 16 15:03:21 2014
@@ -56,6 +56,8 @@ define(["dojo/_base/lang",
                     disabled: accessControlProvider.name ? true : false,
                     label: "Name*:",
                     regexp: "^[\x20-\x2e\x30-\x7F]{1,255}$",
+                    promptMessage: "Name of access control provider.",
+                    placeHolder: "name",
                     name: "name"});
               }
           }, {
@@ -171,6 +173,8 @@ define(["dojo/_base/lang",
               accessControlProvider ? accessControlProvider : {},
               "api/latest/accesscontrolprovider" + (name ? "/" + encodeURIComponent(name.name) : ""),
               accessControlProvider ? "Edit access control provider - " + accessControlProvider.name : "Add access control provider",
+              "AccessControlProvider",
+              accessControlProvider && accessControlProvider.type ? accessControlProvider.type : "AclFile",
               accessControlProvider ? false : true);
         };
         return addAccessControlProvider;

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addBinding.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addBinding.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addBinding.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addBinding.js Sat Aug 16 15:03:21 2014
@@ -386,7 +386,9 @@ define(["dojo/_base/connect",
                     that.queueChooser = new FilteringSelect({ id: "addBindingSelectQueue",
                                                               name: "queue",
                                                               store: queueStore,
-                                                              searchAttr: "name"}, input);
+                                                              searchAttr: "name",
+                                                              promptMessage: "Name of the queue",
+                                                              title: "Select the name of the queue"}, input);
 
                     if(obj.queue)
                     {
@@ -414,7 +416,9 @@ define(["dojo/_base/connect",
                             that.exchangeChooser = new FilteringSelect({ id: "addBindingSelectExchange",
                                                                       name: "exchange",
                                                                       store: exchangeStore,
-                                                                      searchAttr: "name"}, input);
+                                                                      searchAttr: "name",
+                                                                      promptMessage: "Name of the exchange",
+                                                                      title: "Select the name of the exchange"}, input);
 
                             if(obj.exchange)
                             {

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addGroupProvider.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addGroupProvider.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addGroupProvider.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addGroupProvider.js Sat Aug 16 15:03:21 2014
@@ -56,6 +56,8 @@ define(["dojo/_base/lang",
                     disabled: groupProvider.name ? true : false,
                     label: "Name*:",
                     regexp: "^[\x20-\x2e\x30-\x7F]{1,255}$",
+                    promptMessage: "Name of group provider.",
+                    placeHolder: "name",
                     name: "name"});
               }
           }, {
@@ -171,6 +173,8 @@ define(["dojo/_base/lang",
               groupProvider ? groupProvider : {},
               "api/latest/groupprovider" + (name ? "/" + encodeURIComponent(name.name) : ""),
               groupProvider ? "Edit group provider - " + groupProvider.name : "Add group provider",
+              "Group",
+              groupProvider && groupProvider.type ? groupProvider.type : "Group",
               groupProvider ? false : true);
         };
         return addGroupProvider;

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js Sat Aug 16 15:03:21 2014
@@ -57,6 +57,8 @@ define(["dojo/_base/lang",
                       disabled: keystore.name ? true : false,
                       label: "Name:",
                       regExpGen: util.nameOrContextVarRegexp,
+                      promptMessage: "Name of keystore. Used to refer to the keystore from other objects within the Broker.",
+                      placeHolder: "name",
                       name: "name"});
                 }
             }, {
@@ -66,6 +68,8 @@ define(["dojo/_base/lang",
                       required: true,
                       value: keystore.path,
                       label: "Path to keystore:",
+                      promptMessage: "File system location to the keystore file",
+                      placeHolder: "path/to/keystore",
                       name: "path"});
                 }
             }, {
@@ -75,7 +79,7 @@ define(["dojo/_base/lang",
                     return new dijit.form.ValidationTextBox({
                       required: false,
                       label: "Keystore password:",
-                      invalidMessage: "Missed keystore password",
+                      promptMessage: "Password used to open the keystore",
                       name: "password",
                       placeHolder: keystore["password"] ? keystore["password"] : ""
                       });
@@ -96,10 +100,11 @@ define(["dojo/_base/lang",
             }
             fields.push({
               name: "Options",
+
               createWidget: function(keystore) {
                 var optionalFieldContainer = new dojox.layout.TableContainer({
                   cols: 1,
-                  "labelWidth": "290",
+                  "labelWidth": "300",
                   showLabels: true,
                   orientation: "horiz",
                   customClass: "formLabel"
@@ -110,12 +115,16 @@ define(["dojo/_base/lang",
                     required: false,
                     value: keystore.certificateAlias,
                     label: "Keystore certificate alias:",
-                    name: "certificateAlias"}));
+                    name: "certificateAlias",
+                    placeHolder: "alias",
+                    promptMessage: "Used to identify one certificate in a store that has many"}));
+
                   optionalFieldContainer.addChild( new dijit.form.ValidationTextBox({
                     required: false,
                     value: keystore.keyManagerFactoryAlgorithm,
                     label: "Key manager factory algorithm:",
-                    placeHolder: "Use default",
+                    placeHolder: "algorithm name",
+                    promptMessage: "Name of the key manager algorithm known to Java",
                     name: "keyManagerFactoryAlgorithm"}));
                 }
                 else
@@ -124,16 +133,20 @@ define(["dojo/_base/lang",
                     required: false,
                     value: keystore.trustManagerFactoryAlgorithm,
                     label: "Trust manager factory algorithm:",
-                    placeHolder: "Use default",
+                    placeHolder: "algorithm name",
+                    promptMessage: "Name of the trust manager algorithm known to Java",
                     name: "trustManagerFactoryAlgorithm"}));
                 }
                 optionalFieldContainer.addChild(new dijit.form.ValidationTextBox({
                   required: false,
                   value: isKeystore ? keystore.keyStoreType : keystore.trustStoreType,
                   label: "Key store type:",
-                  placeHolder: "Use default",
+                  placeHolder: "store type",
+                  promptMessage: "Name of the store type known to Java",
                   name: isKeystore ? "keyStoreType" : "trustStoreType"}));
+
                 var panel = new dijit.TitlePane({title: "Optional Attributes", content: optionalFieldContainer.domNode, open: false});
+
                 return panel;
               }
             });
@@ -148,6 +161,8 @@ define(["dojo/_base/lang",
               keystore ? keystore : {},
               keystore ? putURL : "api/latest/keystore",
               keystore ? "Edit keystore - " + keystore.name : "Add keystore",
+              "KeyStore",
+              keystore && keystore.type ? keystore.type : "FileKeyStore",  // GET?actuals=true doesn't get type for objects of the default type for the category
               keystore ? false : true);
         };
 
@@ -158,6 +173,8 @@ define(["dojo/_base/lang",
               truststore ? truststore : {},
               truststore ? putURL : "api/latest/truststore",
               truststore ? "Edit truststore - " + truststore.name : "Add truststore",
+              "TrustStore",
+              truststore && truststore.type ? truststore.type : "FileTrustStore",
               truststore ? false : true);
         };
         return addKeystore;

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js Sat Aug 16 15:03:21 2014
@@ -72,7 +72,7 @@ define(["dojo/_base/xhr",
                 }
                 for(var propName in formValues)
                 {
-                    if(formValues.hasOwnProperty(propName))
+                    if(formValues.hasOwnProperty(propName) && formValues[propName])
                     {
                         if (propName == "needClientAuth" || propName == "wantClientAuth")
                         {
@@ -81,6 +81,12 @@ define(["dojo/_base/xhr",
                         else if (propName === "protocols")
                         {
                             var val = formValues[propName];
+
+                            if(val === "" || (lang.isArray(val) && val.length == 0) )
+                            {
+                                continue;
+                            }
+
                             if (!lang.isArray(val))
                             {
                                 val = [ val ];
@@ -91,7 +97,7 @@ define(["dojo/_base/xhr",
                         {
                             var val = formValues[propName];
 
-                            if(val === "")
+                            if(val === "" || (lang.isArray(val) && val.length == 0) )
                             {
                                 continue;
                             }
@@ -496,10 +502,13 @@ define(["dojo/_base/xhr",
                        providerWidget.initialValue = providerWidget.value;
 
                        registry.byId("addPort").show();
-               });
+                       util.applyMetadataToWidgets(registry.byId("addPort").domNode, "Port", typeWidget.get("value"));
+
+                   });
             }
             else
             {
+                // Creating new port
                 var typeWidget = registry.byId("formAddPort.type");
                 if (typeWidget.get("disabled"))
                 {
@@ -510,7 +519,10 @@ define(["dojo/_base/xhr",
                 name.set("disabled", false);
                 editWarning.style.display = "none";
                 registry.byId("addPort").show();
+
+                util.applyMetadataToWidgets(registry.byId("addPort").domNode, "Port", "AMQP");
             }
+
         };
 
         return addPort;

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addQueue.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addQueue.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addQueue.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addQueue.js Sat Aug 16 15:03:21 2014
@@ -27,6 +27,7 @@ define(["dojo/_base/xhr",
         "dojo/_base/array",
         "dojo/_base/event",
         'dojo/_base/json',
+        'qpid/common/util',
         "dijit/form/NumberSpinner", // required by the form
         /* dojox/ validate resources */
         "dojox/validate/us", "dojox/validate/web",
@@ -41,7 +42,7 @@ define(["dojo/_base/xhr",
         /* basic dojox classes */
         "dojox/form/BusyButton", "dojox/form/CheckedMultiSelect",
         "dojo/domReady!"],
-    function (xhr, dom, construct, win, registry, parser, array, event, json) {
+    function (xhr, dom, construct, win, registry, parser, array, event, json, util) {
 
         var addQueue = {};
 
@@ -147,6 +148,8 @@ define(["dojo/_base/xhr",
                                                 {
                                                     dijit.byId('formAddQueue.' + requiredFields[widgetValue]).required = isChecked;
                                                 }
+
+                                                util.applyMetadataToWidgets(obj.domNode, "Queue", widgetValue);
                                             }
                                         })
                                     }
@@ -192,9 +195,12 @@ define(["dojo/_base/xhr",
         addQueue.show = function(data) {
                             addQueue.vhost = data.virtualhost;
                             addQueue.vhostnode = data.virtualhostnode;
-                            registry.byId("formAddQueue").reset();
+                            var form = registry.byId("formAddQueue");
+                            form.reset();
                             registry.byId("addQueue").show();
-                        };
+                            util.applyMetadataToWidgets(form.domNode, "Queue", "standard");
+
+        };
 
         return addQueue;
     });

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js Sat Aug 16 15:03:21 2014
@@ -34,6 +34,7 @@ define(["dojo/_base/xhr",
         "dijit/form/FilteringSelect",
         "qpid/common/properties",
         "qpid/common/util",
+        "qpid/common/metadata",
         "dojo/text!addVirtualHostNodeAndVirtualHost.html",
         "dijit/form/Form",
         "dijit/form/CheckBox",
@@ -41,7 +42,7 @@ define(["dojo/_base/xhr",
         "dojox/validate/us",
         "dojox/validate/web",
         "dojo/domReady!"],
-  function (xhr, event, lang, array, dom, domConstruct, json, parser, Memory, fobject, registry, Dialog, Button, FilteringSelect, properties, util, template)
+  function (xhr, event, lang, array, dom, domConstruct, json, parser, Memory, fobject, registry, Dialog, Button, FilteringSelect, properties, util, metadata, template)
   {
 
     var addVirtualHostNodeAndVirtualHost =
@@ -71,38 +72,26 @@ define(["dojo/_base/xhr",
         this.virtualHostType = registry.byId("addVirtualHost.type");
         this.virtualHostType.set("disabled", true);
 
-        xhr.get({sync: properties.useSyncGet, handleAs: "json", url: "api/latest/broker?depth=0", load: function(data){that._onBrokerData(data[0]) }});
-      },
-      _makeTypeStore: function (types) {
-          var typeData = [];
-          for (var i = 0; i < types.length; i++) {
-              var type = types[i];
-              typeData.push({id: type, name: type});
-          }
-          return new Memory({ data: typeData });
-      },
-      _onBrokerData: function(brokerData)
-      {
-          var that=this;
-          this.supportedVirtualHostNodeTypes = brokerData.supportedVirtualHostNodeTypes;
-          this.supportedVirtualHostNodeTypes.sort();
-          this.supportedVirtualHostTypes = brokerData.supportedVirtualHostTypes;
-          this.supportedVirtualHostTypes.sort();
-
-          //VH Type BDB_HA_REPLICA is not user creatable. This is only needed until we have model meta data available.
-          this.supportedVirtualHostTypes = array.filter(this.supportedVirtualHostTypes, function(item){
-              return item != "BDB_HA_REPLICA" && item != "BDB_HA";
-          });
+        this.supportedVirtualHostNodeTypes = metadata.getTypesForCategory("VirtualHostNode");
+        this.supportedVirtualHostNodeTypes.sort();
+        this.supportedVirtualHostTypes = metadata.getTypesForCategory("VirtualHost");
+        this.supportedVirtualHostTypes.sort();
+
+        //VH Type BDB_HA_REPLICA is not user creatable. This is only needed until we have model meta data available.
+        this.supportedVirtualHostTypes = array.filter(this.supportedVirtualHostTypes, function(item){
+            return item != "BDB_HA_REPLICA" && item != "BDB_HA";
+        });
+
+        var virtualHostNodeTypeStore = util.makeTypeStore(this.supportedVirtualHostNodeTypes);
+        this.virtualHostNodeType.set("store", virtualHostNodeTypeStore);
+        this.virtualHostNodeType.set("disabled", false);
+        this.virtualHostNodeType.on("change", function(type){that._vhnTypeChanged(type, that.virtualHostNodeTypeFieldsContainer, "qpid/management/virtualhostnode/");});
+
+        this.virtualHostTypeStore = util.makeTypeStore(this.supportedVirtualHostTypes);
+        this.virtualHostType.set("store", this.virtualHostTypeStore);
+        this.virtualHostType.set("disabled", false);
+        this.virtualHostType.on("change", function(type){that._vhTypeChanged(type, that.virtualHostTypeFieldsContainer, "qpid/management/virtualhost/");});
 
-          var virtualHostNodeTypeStore = this._makeTypeStore(this.supportedVirtualHostNodeTypes);
-          this.virtualHostNodeType.set("store", virtualHostNodeTypeStore);
-          this.virtualHostNodeType.set("disabled", false);
-          this.virtualHostNodeType.on("change", function(type){that._vhnTypeChanged(type, that.virtualHostNodeTypeFieldsContainer, "qpid/management/virtualhostnode/");});
-
-          this.virtualHostTypeStore = this._makeTypeStore(this.supportedVirtualHostTypes);
-          this.virtualHostType.set("store", this.virtualHostTypeStore);
-          this.virtualHostType.set("disabled", false);
-          this.virtualHostType.on("change", function(type){that._vhTypeChanged(type, that.virtualHostTypeFieldsContainer, "qpid/management/virtualhost/");});
       },
       show: function()
       {
@@ -132,13 +121,14 @@ define(["dojo/_base/xhr",
       {
         this._processDropDownsForBdbHa(type);
         this._processDropDownsForJson(type);
-        this._typeChanged(type, typeFieldsContainer, urlStem);
+
+        this._typeChanged(type, typeFieldsContainer, urlStem, "VirtualHostNode");
       },
       _vhTypeChanged: function (type, typeFieldsContainer, urlStem)
       {
-        this._typeChanged(type, typeFieldsContainer, urlStem);
+        this._typeChanged(type, typeFieldsContainer, urlStem, "VirtualHost");
       },
-      _typeChanged: function (type, typeFieldsContainer, urlStem)
+      _typeChanged: function (type, typeFieldsContainer, urlStem, category)
       {
           var widgets = registry.findWidgets(typeFieldsContainer);
           array.forEach(widgets, function(item) { item.destroyRecursive();});
@@ -148,11 +138,13 @@ define(["dojo/_base/xhr",
           {
             var that = this;
             require([urlStem + type.toLowerCase() + "/add"],
-              function(TypeUI)
+              function(typeUI)
               {
                   try
                   {
-                      TypeUI.show({containerNode:typeFieldsContainer, parent: that});
+                      typeUI.show({containerNode:typeFieldsContainer, parent: that});
+
+                      util.applyMetadataToWidgets(typeFieldsContainer,category, type);
                   }
                   catch(e)
                   {

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js Sat Aug 16 15:03:21 2014
@@ -56,6 +56,7 @@ define(["dojo/_base/xhr",
         var that=this;
         this.containerNode = domConstruct.create("div", {innerHTML: template});
         parser.parse(this.containerNode);
+        this.allFieldsContainer = dom.byId("editVirtualHost.allFields");
         this.typeFieldsContainer = dom.byId("editVirtualHost.typeFields");
         this.dialog = registry.byId("editVirtualHostDialog");
         this.saveButton = registry.byId("editVirtualHost.saveButton");
@@ -176,6 +177,8 @@ define(["dojo/_base/xhr",
                 {
                     TypeUI.show({containerNode:that.typeFieldsContainer, parent: that, data: virtualHostData});
                     that.form.connectChildren();
+
+                    util.applyMetadataToWidgets(that.allFieldsContainer, "VirtualHost", virtualHostData.type);
                 }
                 catch(e)
                 {

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js Sat Aug 16 15:03:21 2014
@@ -147,6 +147,8 @@ define(["dojo/_base/xhr",
                 {
                     TypeUI.show({containerNode:that.typeFieldsContainer, parent: that, data: nodeData});
                     that.form.connectChildren();
+
+                    util.applyMetadataToWidgets(that.allFieldsContainer, "VirtualHostNode", nodeData.type);
                 }
                 catch(e)
                 {

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/plugin/managementhttp.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/plugin/managementhttp.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/plugin/managementhttp.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/plugin/managementhttp.js Sat Aug 16 15:03:21 2014
@@ -139,7 +139,9 @@ define(["dojo/_base/xhr",
               widgetFactories,
               data,
               "api/latest/plugin/" + encodeURIComponent(data.name),
-              "Edit plugin - " + data.name);
+              "Edit plugin - " + data.name,
+              "Plugin",
+              "MANAGEMENT-HTTP");
         };
 
         function ManagementHttpUpdater(node, pluginObject, controller)

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/plugin/managementjmx.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/plugin/managementjmx.js?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/plugin/managementjmx.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/plugin/managementjmx.js Sat Aug 16 15:03:21 2014
@@ -86,7 +86,9 @@ define(["dojo/_base/xhr",
               widgetFactories,
               data,
               "api/latest/plugin/" + encodeURIComponent(data.name),
-              "Edit plugin - " + data.name);
+              "Edit plugin - " + data.name,
+              "Plugin",
+              "MANAGEMENT-JMX");
         };
 
         function ManagementJmxUpdater(node, pluginObject, controller)

Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/strings.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/strings.html?rev=1618373&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/strings.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/strings.html Sat Aug 16 15:03:21 2014
@@ -0,0 +1,21 @@
+<!--
+  ~ 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="promptTemplateWithDefault"><i>Optional:</i> ${prompt}.<br/>Defaults to <code>${default}</code></div>
+</div>

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/add.html?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/add.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/add.html Sat Aug 16 15:03:21 2014
@@ -28,7 +28,8 @@
                               name: 'storeOverfullSize',
                               placeHolder: 'size in bytes',
                               required: false,
-                              title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'" />
+                              title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages',
+                              promptMessage: 'Ceiling (in bytes) at which store will begin to throttle sessions producing messages'" />
         </div>
     </div>
     <div class="clear">
@@ -40,7 +41,8 @@
                               name: 'storeUnderfullSize',
                               placeHolder: 'size in bytes',
                               required: false,
-                              title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'" />
+                              title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages',
+                              promptMessage: 'Floor (in bytes) at which store will cease to throttle sessions producing messages'" />
         </div>
     </div>
    </div>

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/edit.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/edit.html?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/edit.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/edit.html Sat Aug 16 15:03:21 2014
@@ -28,7 +28,8 @@
                               name: 'storeOverfullSize',
                               placeHolder: 'size in bytes',
                               required: false,
-                              title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'"
+                              title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages',
+                              promptMessage: 'Ceiling (in bytes) at which store will begin to throttle sessions producing messages'"
                    />
         </div>
     </div>
@@ -41,7 +42,8 @@
                               name: 'storeUnderfullSize',
                               placeHolder: 'size in bytes',
                               required: false,
-                              title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'"
+                              title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages',
+                              promptMessage: 'Floor (in bytes) at which store will cease to throttle sessions producing messages'"
                    />
         </div>
     </div>

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/add.html?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/add.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/add.html Sat Aug 16 15:03:21 2014
@@ -26,7 +26,8 @@
                    data-dojo-props="
                               name: 'storePath',
                               placeHolder: 'path/to/store',
-                              title: 'Enter message store path'" />
+                              title: 'Enter message store path',
+                              promptMessage: 'File system location for the message store'" />
         </div>
     </div>
     <div class="clear">
@@ -38,7 +39,8 @@
                               name: 'storeOverfullSize',
                               placeHolder: 'size in bytes',
                               required: false,
-                              title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'" />
+                              title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages',
+                              promptMessage: 'Ceiling (in bytes) at which store will begin to throttle sessions producing messages'" />
         </div>
     </div>
     <div class="clear">
@@ -50,7 +52,8 @@
                               name: 'storeUnderfullSize',
                               placeHolder: 'size in bytes',
                               required: false,
-                              title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'" />
+                              title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages',
+                              promptMessage: 'Floor (in bytes) at which store will cease to throttle sessions producing messages'" />
         </div>
     </div>
     <div class="clear"></div>

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html?rev=1618373&r1=1618372&r2=1618373&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html Sat Aug 16 15:03:21 2014
@@ -26,7 +26,6 @@
                    data-dojo-type="dijit/form/ValidationTextBox"
                    data-dojo-props="
                               name: 'storePath',
-                              placeHolder: 'path/to/store',
                               disabled: true,
                               title: 'Enter message store path'" />
         </div>
@@ -41,7 +40,8 @@
                               name: 'storeOverfullSize',
                               placeHolder: 'size in bytes',
                               required: false,
-                              title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'"
+                              title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages',
+                              promptMessage: 'Ceiling (in bytes) at which store will begin to throttle sessions producing messages'"
                    />
         </div>
     </div>
@@ -54,7 +54,8 @@
                               name: 'storeUnderfullSize',
                               placeHolder: 'size in bytes',
                               required: false,
-                              title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'"
+                              title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages',
+                              promptMessage: 'Floor (in bytes) at which store will cease to throttle sessions producing messages'"
                    />
         </div>
     </div>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org