qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject svn commit: r1642841 - in /qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources: ./ authenticationprovider/external/ authenticationprovider/filebased/ authenticationprovider/passwordfile/ authenticationprovider/simpleldap/ js/qpi...
Date Tue, 02 Dec 2014 10:56:38 GMT
Author: orudyy
Date: Tue Dec  2 10:56:37 2014
New Revision: 1642841

URL: http://svn.apache.org/r1642841
Log:
QPID-6246: Display authentication provider specific fields on authentication provider tab

Added:
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/show.html
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/filebased/
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/filebased/add.html
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/passwordfile/add.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/filebased/show.html
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/simpleldap/show.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/anonymous/show.js
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/show.js
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/external/show.js
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/kerberos/show.js
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/md5/show.js
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plain/show.js
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plainpasswordfile/show.js
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/scram-sha-1/show.js
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/scram-sha-256/show.js
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/simpleldap/show.js
      - copied, changed from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
Removed:
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/passwordfile/add.html
Modified:
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addAuthenticationProvider.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/simpleldap/add.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
    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/PreferencesProvider.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAuthenticationProvider.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plainpasswordfile/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/simpleldap/add.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showAuthProvider.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showPreferencesProvider.html

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addAuthenticationProvider.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addAuthenticationProvider.html?rev=1642841&r1=1642840&r2=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addAuthenticationProvider.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addAuthenticationProvider.html Tue Dec  2 10:56:37 2014
@@ -57,7 +57,7 @@
             <div id="addPreferencesProvider.form" xxx-data-dojo-type="qpid/management/preferencesprovider/PreferencesProviderForm"></div>
         </div>
         <div class="dijitDialogPaneActionBar">
-            <button data-dojo-type="dijit/form/Button" id="addAuthenticationProvider.addButton" data-dojo-props="label: 'Add'" type="submit"></button>
+            <button data-dojo-type="dijit/form/Button" id="addAuthenticationProvider.addButton" data-dojo-props="label: 'Save'" type="submit"></button>
             <button data-dojo-type="dijit/form/Button" id="addAuthenticationProvider.cancelButton" data-dojo-props="label: 'Cancel'" ></button>
         </div>
     </div>

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html?rev=1642841&r1=1642840&r2=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html Tue Dec  2 10:56:37 2014
@@ -19,8 +19,12 @@
 <div class="clear">
     <div class="formLabel-labelCell tableContainer-labelCell">Use full DN:</div>
     <div class="formLabel-controlCell tableContainer-valueCell">
-        <input type="text" class="useFullDN"
+        <input type="text" class="useFullDN" id="external.useFullDN"
                data-dojo-type="dijit/form/CheckBox"
                data-dojo-props=" name: 'useFullDN' " />
     </div>
+    <div data-dojo-type="dijit/Tooltip"
+         data-dojo-props="connectId: ['external.useFullDN'],
+                                      label: 'If selected, full distinguished name will be used as principal name'">
+    </div>
 </div>

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/show.html (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/show.html?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/show.html&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/show.html Tue Dec  2 10:56:37 2014
@@ -16,11 +16,11 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<div class="clear">
-    <div class="formLabel-labelCell tableContainer-labelCell">Use full DN:</div>
-    <div class="formLabel-controlCell tableContainer-valueCell">
-        <input type="text" class="useFullDN"
-               data-dojo-type="dijit/form/CheckBox"
-               data-dojo-props=" name: 'useFullDN' " />
+<div>
+    <div class="clear">
+        <div class="formLabel-labelCell">Use full DN:</div>
+        <div ><span class="useFullDN" ></span></div>
     </div>
+    <div class="clear"></div>
 </div>
+

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/filebased/add.html (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/passwordfile/add.html)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/filebased/add.html?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/filebased/add.html&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/passwordfile/add.html&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
    (empty)

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/filebased/show.html (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/filebased/show.html?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/filebased/show.html&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/external/add.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/filebased/show.html Tue Dec  2 10:56:37 2014
@@ -16,11 +16,11 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<div class="clear">
-    <div class="formLabel-labelCell tableContainer-labelCell">Use full DN:</div>
-    <div class="formLabel-controlCell tableContainer-valueCell">
-        <input type="text" class="useFullDN"
-               data-dojo-type="dijit/form/CheckBox"
-               data-dojo-props=" name: 'useFullDN' " />
+<div>
+    <div class="clear">
+        <div class="formLabel-labelCell">Path to file:</div>
+        <div ><span class="path" ></span></div>
     </div>
+    <div class="clear"></div>
 </div>
+

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/simpleldap/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/simpleldap/add.html?rev=1642841&r1=1642840&r2=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/simpleldap/add.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/simpleldap/add.html Tue Dec  2 10:56:37 2014
@@ -31,6 +31,32 @@
         </div>
     </div>
     <div class="clear">
+        <div class="formLabel-labelCell tableContainer-labelCell">LDAP authentication URL</div>
+        <div class="formLabel-controlCell tableContainer-valueCell">
+            <input type="text" class="providerAuthUrl"
+                   data-dojo-type="dijit/form/ValidationTextBox"
+                   data-dojo-props="
+                              name: 'providerAuthUrl',
+                              placeHolder: 'ldap://host:port',
+                              title: 'Enter optional LDAP authentication URL',
+                              promptMessage: 'URL of LDAP server for performing \'ldap bind\'. If not specified, the LDAP server URL will be used for both searches and authentications'"/>
+        </div>
+    </div>
+    <div class="clear">
+        <div class="formLabel-labelCell tableContainer-labelCell">Trust Store:</div>
+        <div class="tableContainer-valueCell formLabel-controlCell">
+            <select class="trustStore" data-dojo-type="dijit/form/FilteringSelect"
+                    data-dojo-props="
+                                    required: false,
+                                    name: 'trustStore',
+                                    placeHolder: 'Select trust store',
+                                    promptMessage: 'Select the trust store containing the certificate of the CA that signs to LDAP servers certificate',
+                                    title: 'Select trust store for secure connection',
+                                    searchAttr: 'name'">
+            </select>
+        </div>
+    </div>
+    <div class="clear">
         <div class="formLabel-labelCell tableContainer-labelCell">Search context*:</div>
         <div class="formLabel-controlCell tableContainer-valueCell">
             <input type="text" class="searchContext"
@@ -40,7 +66,7 @@
                               required: true,
                               placeHolder: 'dc=users,dc=example,dc=com',
                               title: 'Enter search context',
-                              promptMessage: 'The distinguished name of the search base object'"/>
+                              promptMessage: 'Identifies the entry that is the base of the subtree containing users'"/>
         </div>
     </div>
     <div class="clear">
@@ -53,7 +79,7 @@
                               required: true,
                               placeHolder: '(uid={0})',
                               title: 'Enter user search filter ',
-                              promptMessage: 'DN template to find an LDAP user entry by provided user name'"/>
+                              promptMessage: 'Filter expression used to locate users within the subtree. {0} will be replaced by the user id.'"/>
         </div>
     </div>
     <div class="clear">
@@ -65,43 +91,33 @@
                               name: 'searchUsername',
                               placeHolder: 'username',
                               title: 'Enter username for authenticated search',
-                              promptMessage: 'Username for authenticated search'"/>
+                              promptMessage: 'The username used to authenticate to the directory in order to perform the search. If not specified, an anonymous bind is used to perform the search'"/>
         </div>
     </div>
     <div class="clear">
         <div class="formLabel-labelCell tableContainer-labelCell">Search password:</div>
         <div class="formLabel-controlCell tableContainer-valueCell">
-            <input type="text" class="searchPassword"
+            <input type="password" class="searchPassword"
                    data-dojo-type="dijit/form/ValidationTextBox"
                    data-dojo-props="
                               name: 'searchPassword',
                               placeHolder: '****',
                               title: 'Enter password for authenticated search',
-                              promptMessage: 'Password for authenticated search'"/>
+                              promptMessage: 'The password to be used with the search username'"/>
         </div>
     </div>
     <div class="clear">
-        <div class="formLabel-labelCell tableContainer-labelCell">Trust Store:</div>
-        <div class="tableContainer-valueCell formLabel-controlCell">
-            <select class="trustStore" data-dojo-type="dijit/form/FilteringSelect"
-                    data-dojo-props="
-                                    required: false,
-                                    name: 'trustStore',
-                                    placeHolder: 'Select trust store',
-                                    promptMessage: 'Trust store containing certificate for SSL transport',
-                                    title: 'Select trust store for secure connection',
-                                    searchAttr: 'name'">
-            </select>
-        </div>
-    </div>
-    <div class="clear">
-        <div class="formLabel-labelCell tableContainer-labelCell">Bind without search:</div>
+        <div class="formLabel-labelCell tableContainer-labelCell">Authenticate without search:</div>
         <div class="formLabel-controlCell tableContainer-valueCell">
-            <input type="text" class="bindWithoutSearch"
+            <input type="text" class="bindWithoutSearch" id="addAuthenticationProvider.simpleldap.bindWithoutSearch"
                    data-dojo-type="dijit/form/CheckBox"
                    data-dojo-props=" name: 'bindWithoutSearch' " />
         </div>
     </div>
+    <div data-dojo-type="dijit/Tooltip"
+         data-dojo-props="connectId: ['addAuthenticationProvider.simpleldap.bindWithoutSearch'],
+                                          label: 'If selected, the provider will not search the directory'">
+    </div>
     <div class="clear">
         <div class="formLabel-labelCell tableContainer-labelCell">LDAP Context Factory:</div>
         <div class="formLabel-controlCell tableContainer-valueCell">
@@ -114,16 +130,4 @@
                               promptMessage: 'Fully qualified class name for LDAP Context Factory'"/>
         </div>
     </div>
-    <div class="clear">
-        <div class="formLabel-labelCell tableContainer-labelCell">LDAP authentication URL</div>
-        <div class="formLabel-controlCell tableContainer-valueCell">
-            <input type="text" class="providerAuthUrl"
-                   data-dojo-type="dijit/form/ValidationTextBox"
-                   data-dojo-props="
-                              name: 'providerAuthUrl',
-                              placeHolder: 'ldap://host:port',
-                              title: 'Enter optional LDAP authentication URL',
-                              promptMessage: 'URL of LDAP server for performing \'ldap bind\'. If not specified, the LDAP server URL will be used for both searches and authentications'"/>
-        </div>
-    </div>
 </div>

Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/simpleldap/show.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/simpleldap/show.html?rev=1642841&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/simpleldap/show.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/simpleldap/show.html Tue Dec  2 10:56:37 2014
@@ -0,0 +1,58 @@
+<!--
+  ~ 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">LDAP server URL:</div>
+        <div ><span class="providerUrl" ></span></div>
+    </div>
+    <div class="clear">
+        <div class="formLabel-labelCell">Search context:</div>
+        <div><span class="searchContext" ></span></div>
+    </div>
+    <div class="clear">
+        <div class="formLabel-labelCell">Search filter:</div>
+        <div><span class="searchFilter" ></span></div>
+    </div>
+    <div class="clear">
+        <div class="formLabel-labelCell">Search user name:</div>
+        <div><span class="searchUsername" ></span></div>
+    </div>
+    <div class="clear">
+        <div class="formLabel-labelCell">Search password:</div>
+        <div><span class="searchPassword" ></span></div>
+    </div>
+    <div class="clear">
+        <div class="formLabel-labelCell">Trust Store:</div>
+        <div><span class="trustStore" ></span></div>
+    </div>
+    <div class="clear">
+        <div class="formLabel-labelCell">Bind without search:</div>
+        <div><span class="bindWithoutSearch" ></span></div>
+    </div>
+    <div class="clear">
+        <div class="formLabel-labelCell">LDAP Context Factory:</div>
+        <div><span class="ldapContextFactory" ></span></div>
+    </div>
+    <div class="clear">
+        <div class="formLabel-labelCell">LDAP authentication URL:</div>
+        <div><span class="providerAuthUrl" ></span></div>
+    </div>
+    <div class="clear"></div>
+</div>
+

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=1642841&r1=1642840&r2=1642841&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 Tue Dec  2 10:56:37 2014
@@ -570,7 +570,11 @@ define(["dojo/_base/xhr",
              {
                var fieldName = fieldNames[i];
                var value = data[fieldName];
-               obj[fieldName].innerHTML= (value == undefined || value == null) ? "" : entities.encode(String(value));
+               var fieldNode = obj[fieldName];
+               if (fieldNode)
+               {
+                 fieldNode.innerHTML= (value == undefined || value == null) ? "" : entities.encode(String(value));
+               }
              }
            }
 

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=1642841&r1=1642840&r2=1642841&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 Dec  2 10:56:37 2014
@@ -59,17 +59,17 @@ define(["dojo/_base/xhr",
                             contentPane.containerNode.innerHTML = data;
                             parser.parse(contentPane.containerNode);
 
-                            that.authProviderUpdater = new AuthProviderUpdater(contentPane.containerNode, that.modelObj, that.controller, that);
+                            var authProviderUpdater = new AuthProviderUpdater(contentPane.containerNode, that.modelObj, that.controller, that);
+                            that.authProviderUpdater = authProviderUpdater;
 
-                            that.authProviderUpdater.update();
-
-                            var editButton = query(".editAuthenticationProviderButton", contentPane.containerNode)[0];
-                            var editWidget = registry.byNode(editButton);
-                            connect.connect(editWidget, "onClick",
+                            var editButtonNode = query(".editAuthenticationProviderButton", contentPane.containerNode)[0];
+                            var editButtonWidget = registry.byNode(editButtonNode);
+                            editButtonWidget.on("click",
                                             function(evt){
                                                 event.stop(evt);
-                                                addAuthenticationProvider.show(that.name);
+                                                addAuthenticationProvider.show(authProviderUpdater.authProviderData);
                                             });
+                            authProviderUpdater.editButton = editButtonWidget;
 
                             var deleteButton = query(".deleteAuthenticationProviderButton", contentPane.containerNode)[0];
                             var deleteWidget = registry.byNode(deleteButton);
@@ -86,6 +86,25 @@ define(["dojo/_base/xhr",
                                                 event.stop(evt);
                                                 that.addPreferencesProvider();
                                             });
+
+                            authProviderUpdater.update();
+                            if (util.isProviderManagingUsers(authProviderUpdater.authProviderData.type))
+                            {
+                                 authProviderUpdater.managingUsersUI = new PrincipalDatabaseAuthenticationManager(contentPane.containerNode, authProviderUpdater.authProviderData, that.controller);
+                                 authProviderUpdater.managingUsersUI.update(authProviderUpdater.authProviderData);
+                            }
+
+                            if (!util.supportsPreferencesProvider(authProviderUpdater.authProviderData.type))
+                            {
+                                var authenticationProviderPanel =  registry.byNode( query(".preferencesPanel", contentPane.containerNode)[0]);
+                                domStyle.set(authenticationProviderPanel.domNode, "display","none");
+                            }
+                            else
+                            {
+                                var preferencesProviderData = authProviderUpdater.authProviderData.preferencesproviders? authProviderUpdater.authProviderData.preferencesproviders[0]: null;
+                                authProviderUpdater.updatePreferencesProvider(preferencesProviderData);
+                            }
+
                             updater.add( that.authProviderUpdater );
                         }});
            };
@@ -140,43 +159,10 @@ 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.query = "api/latest/authenticationprovider/" + encodeURIComponent(authProviderObj.name);
 
-               var that = this;
-
-               xhr.get({url: this.query, sync: properties.useSyncGet, handleAs: "json"})
-                   .then(function(data)
-                         {
-                             that.authProviderData = data[0];
-
-                             util.flattenStatistics( that.authProviderData );
-
-                             that.updateHeader();
-
-                             var editButton = query(".editAuthenticationProviderButton", node)[0];
-                             var editWidget = registry.byNode(editButton);
-                             var hideEdit = (that.authProviderData.type === 'Anonymous' || that.authProviderData.type === 'External' || that.authProviderData.type === 'Kerberos')
-                             domStyle.set(editWidget.domNode, "display", hideEdit ? "none": "");
-
-                             if (util.isProviderManagingUsers(that.authProviderData.type))
-                             {
-                                     that.details = new PrincipalDatabaseAuthenticationManager(node, that.authProviderData, controller);
-                                     that.details.update(that.authProviderData);
-                             }
-                             if (that.authProviderData.type == "Anonymous")
-                             {
-                               var authenticationProviderPanel =  registry.byNode( query(".preferencesPanel", node)[0]);
-                               domStyle.set(authenticationProviderPanel.domNode, "display","none");
-                             }
-                             else
-                             {
-                               var preferencesProviderData = that.authProviderData.preferencesproviders? that.authProviderData.preferencesproviders[0]: null;
-
-                               that.updatePreferencesProvider(preferencesProviderData);
-                             }
-                         });
-
            }
 
            AuthProviderUpdater.prototype.updatePreferencesProvider = function(preferencesProviderData)
@@ -186,8 +172,9 @@ define(["dojo/_base/xhr",
                this.addPreferencesProviderButton.style.display = 'none';
                if (!this.preferencesProvider)
                {
-                 this.preferencesProvider=new PreferencesProvider(preferencesProviderData.name, this.authProviderData);
-                 this.preferencesProvider.init(this.preferencesNode);
+                 var preferencesProvider =new PreferencesProvider(preferencesProviderData.name, this.authProviderData);
+                 preferencesProvider.init(this.preferencesNode);
+                 this.preferencesProvider = preferencesProvider;
                }
                this.preferencesProvider.update(preferencesProviderData);
              }
@@ -212,45 +199,58 @@ define(["dojo/_base/xhr",
            AuthProviderUpdater.prototype.update = function()
            {
              var that = this;
+             xhr.get({url: this.query, sync: true, handleAs: "json"}).then(function(data) {that._update(data[0]);});
+           };
 
-             xhr.get({url: this.query, sync: properties.useSyncGet, handleAs: "json"})
-                 .then(function(data) {
-                     that.authProviderData = data[0];
-                     that.name = data[0].name
-                     util.flattenStatistics( that.authProviderData );
-                     that.updateHeader();
-                     if (that.details)
-                     {
-                       try
-                       {
-                         that.details.update(that.authProviderData);
-                       }
-                       catch(e)
-                       {
-                         if (console)
+            AuthProviderUpdater.prototype._update = function(data)
+            {
+                var that = this;
+                this.authProviderData = data;
+                util.flattenStatistics(data );
+                this.updateHeader();
+
+                if (this.details)
+                {
+                    this.details.update(data);
+                }
+                else
+                {
+                    require(["qpid/management/authenticationprovider/" + encodeURIComponent(data.type.toLowerCase()) + "/show"],
+                         function(DetailsUI)
                          {
-                           console.error(e);
+                           that.details = new DetailsUI({containerNode:that.authenticationProviderDetailsContainer, parent: that});
+                           that.details.update(data);
                          }
-                       }
-                     }
-                     var preferencesProviderData = that.authProviderData.preferencesproviders? that.authProviderData.preferencesproviders[0]: null;
-                     try
-                     {
-                       that.updatePreferencesProvider(preferencesProviderData);
-                     }
-                     catch(e)
-                     {
-                       if (console)
-                       {
-                         console.error(e);
-                       }
-                     }
-                 });
-
-
-           };
-
+                       );
+                }
 
+                if (this.managingUsersUI)
+                {
+                    try
+                    {
+                        this.managingUsersUI.update(data);
+                    }
+                    catch(e)
+                    {
+                        if (console)
+                        {
+                            console.error(e);
+                        }
+                    }
+                }
+                var preferencesProviderData = data.preferencesproviders? data.preferencesproviders[0]: null;
+                try
+                {
+                    this.updatePreferencesProvider(preferencesProviderData);
+                }
+                catch(e)
+                {
+                    if (console)
+                    {
+                        console.error(e);
+                    }
+                }
+            }
 
            return AuthenticationProvider;
        });

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProvider.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProvider.js?rev=1642841&r1=1642840&r2=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProvider.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProvider.js Tue Dec  2 10:56:37 2014
@@ -64,12 +64,12 @@ define(["dojo/_base/xhr",
                    var deletePreferencesProviderWidget = registry.byNode(that.deletePreferencesProviderButton);
                    deletePreferencesProviderWidget.on("click", function(evt){ event.stop(evt); that.deletePreferencesProvider();});
                }});
-             this.reload();
            };
 
            PreferencesProvider.prototype.open = function(contentPane) {
                this.contentPane = contentPane;
                this.init(contentPane.containerNode);
+               this.reload();
                this.updater = new PreferencesProviderUpdater(this);
                updater.add(this.updater);
            };

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAuthenticationProvider.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAuthenticationProvider.js?rev=1642841&r1=1642840&r2=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAuthenticationProvider.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAuthenticationProvider.js Tue Dec  2 10:56:37 2014
@@ -58,8 +58,8 @@ define(["dojo/_base/xhr",
                 this.containerNode = construct.create("div", {innerHTML: template});
                 parser.parse(this.containerNode);
 
-                var authenticationProviderName = registry.byId("addAuthenticationProvider.name");
-                authenticationProviderName.set("regExpGen", util.nameOrContextVarRegexp);
+                this.authenticationProviderName = registry.byId("addAuthenticationProvider.name");
+                this.authenticationProviderName.set("regExpGen", util.nameOrContextVarRegexp);
 
                 this.dialog = registry.byId("addAuthenticationProvider");
                 this.addButton = registry.byId("addAuthenticationProvider.addButton");
@@ -79,11 +79,42 @@ define(["dojo/_base/xhr",
                 this.preferencesProviderForm = new qpid.preferencesprovider.PreferencesProviderForm({disabled: true});
                 this.preferencesProviderForm.placeAt(dom.byId("addPreferencesProvider.form"));
             },
-            show:function(providerName)
+            show:function(effectiveData)
             {
                 this.authenticationProviderForm.reset();
                 this.preferencesProviderForm.reset();
 
+                if (effectiveData)
+                {
+                    // editing
+                    var actualData = null;
+                    xhr.get(
+                                {
+                                  url: "api/latest/authenticationprovider/" + encodeURIComponent(effectiveData.name),
+                                  sync: true,
+                                  content: { actuals: true },
+                                  handleAs: "json",
+                                  load: function(data)
+                                  {
+                                    actualData = data[0];
+                                  }
+                                }
+                            );
+                    this.initialData = actualData;
+                    this.effectiveData = effectiveData;
+                    this.authenticationProviderType.set("value", actualData.type);
+                    this.authenticationProviderName.set("value", actualData.name);
+                    this.authenticationProviderType.set("disabled", true);
+                    this.authenticationProviderName.set("disabled", true);
+                }
+                else
+                {
+                    this.authenticationProviderType.set("disabled", false);
+                    this.authenticationProviderName.set("disabled", false);
+                    this.initialData = {};
+                    this.effectiveData = {};
+                }
+
                 this.dialog.show();
                 if (!this.resizeEventRegistered)
                 {
@@ -107,9 +138,9 @@ define(["dojo/_base/xhr",
                 {
                     var success = false,failureReason=null;
 
-                    var authenticationProviderData = util.getFormWidgetValues(this.authenticationProviderForm); // TODO initialValues
+                    var authenticationProviderData = util.getFormWidgetValues(this.authenticationProviderForm, this.initialData);
 
-                    var encodedAuthenticationProviderName = encodeURIComponent(authenticationProviderData.name);
+                    var encodedAuthenticationProviderName = encodeURIComponent(this.authenticationProviderName.value);
                     xhr.put({
                         url: "api/latest/authenticationprovider/" + encodedAuthenticationProviderName,
                         sync: true,
@@ -149,6 +180,7 @@ define(["dojo/_base/xhr",
             {
                 var widgets = registry.findWidgets(typeFieldsContainer);
                 array.forEach(widgets, function(item) { item.destroyRecursive();});
+                construct.empty(typeFieldsContainer);
                 this.preferencesProviderForm.set("disabled", !type || !util.supportsPreferencesProvider(type));
                 if (type)
                 {
@@ -157,7 +189,7 @@ define(["dojo/_base/xhr",
                     {
                         try
                         {
-                            typeUI.show({containerNode:typeFieldsContainer, parent: that});
+                            typeUI.show({containerNode:typeFieldsContainer, parent: that, data: that.initialData, effectiveData: that.effectiveData});
                             util.applyMetadataToWidgets(typeFieldsContainer, category, type);
                         }
                         catch(e)

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/anonymous/show.js (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/anonymous/show.js?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/anonymous/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/anonymous/show.js Tue Dec  2 10:56:37 2014
@@ -18,20 +18,18 @@
  * under the License.
  *
  */
-define(["dojo/query","dijit/registry","qpid/common/util"],
-    function (query, registry, util)
+define([],
+  function ()
+  {
+
+    function NoFieldAuthenticationProvider(data)
+    {
+    }
+
+    NoFieldAuthenticationProvider.prototype.update = function(data)
     {
-        return {
-            show: function(data)
-            {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
-                if (data.data)
-                {
-                    var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
-                }
-            }
-        };
     }
-);
 
+    return NoFieldAuthenticationProvider;
+  }
+);

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js?rev=1642841&r1=1642840&r2=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js Tue Dec  2 10:56:37 2014
@@ -24,11 +24,11 @@ define(["dojo/query","dijit/registry","q
         return {
             show: function(data)
             {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
+                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/filebased/add.html");
                 if (data.data)
                 {
                     var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
+                    path.set("value", data.data.path);
                 }
             }
         };

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/show.js (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/show.js?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/show.js Tue Dec  2 10:56:37 2014
@@ -18,20 +18,21 @@
  * under the License.
  *
  */
-define(["dojo/query","dijit/registry","qpid/common/util"],
-    function (query, registry, util)
+define(["qpid/common/util", "dojo/domReady!"],
+  function (util, metadata)
+  {
+
+    function Base64MD5PasswordFile(data)
     {
-        return {
-            show: function(data)
-            {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
-                if (data.data)
-                {
-                    var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
-                }
-            }
-        };
+        util.buildUI(data.containerNode, data.parent, "authenticationprovider/filebased/show.html", ["path"], this);
+        data.parent.editButton.set("disabled", false);
+    }
+
+    Base64MD5PasswordFile.prototype.update = function(data)
+    {
+        util.updateUI(data, ["path"], this);
     }
-);
 
+    return Base64MD5PasswordFile;
+  }
+);

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/external/show.js (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/external/show.js?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/external/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/external/show.js Tue Dec  2 10:56:37 2014
@@ -18,20 +18,21 @@
  * under the License.
  *
  */
-define(["dojo/query","dijit/registry","qpid/common/util"],
-    function (query, registry, util)
+define(["qpid/common/util", "dojo/domReady!"],
+  function (util, metadata)
+  {
+
+    function External(data)
     {
-        return {
-            show: function(data)
-            {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
-                if (data.data)
-                {
-                    var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
-                }
-            }
-        };
+        util.buildUI(data.containerNode, data.parent, "authenticationprovider/external/show.html", ["useFullDN"], this);
+        data.parent.editButton.set("disabled", false);
+    }
+
+    External.prototype.update = function(data)
+    {
+        util.updateUI(data, ["useFullDN"], this);
     }
-);
 
+    return External;
+  }
+);

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/kerberos/show.js (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/kerberos/show.js?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/kerberos/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/kerberos/show.js Tue Dec  2 10:56:37 2014
@@ -18,20 +18,18 @@
  * under the License.
  *
  */
-define(["dojo/query","dijit/registry","qpid/common/util"],
-    function (query, registry, util)
+define([],
+  function ()
+  {
+
+    function NoFieldAuthenticationProvider(data)
+    {
+    }
+
+    NoFieldAuthenticationProvider.prototype.update = function(data)
     {
-        return {
-            show: function(data)
-            {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
-                if (data.data)
-                {
-                    var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
-                }
-            }
-        };
     }
-);
 
+    return NoFieldAuthenticationProvider;
+  }
+);

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/md5/show.js (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/md5/show.js?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/md5/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/md5/show.js Tue Dec  2 10:56:37 2014
@@ -18,20 +18,18 @@
  * under the License.
  *
  */
-define(["dojo/query","dijit/registry","qpid/common/util"],
-    function (query, registry, util)
+define([],
+  function ()
+  {
+
+    function NoFieldAuthenticationProvider(data)
+    {
+    }
+
+    NoFieldAuthenticationProvider.prototype.update = function(data)
     {
-        return {
-            show: function(data)
-            {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
-                if (data.data)
-                {
-                    var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
-                }
-            }
-        };
     }
-);
 
+    return NoFieldAuthenticationProvider;
+  }
+);

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plain/show.js (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plain/show.js?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plain/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plain/show.js Tue Dec  2 10:56:37 2014
@@ -18,20 +18,18 @@
  * under the License.
  *
  */
-define(["dojo/query","dijit/registry","qpid/common/util"],
-    function (query, registry, util)
+define([],
+  function ()
+  {
+
+    function NoFieldAuthenticationProvider(data)
+    {
+    }
+
+    NoFieldAuthenticationProvider.prototype.update = function(data)
     {
-        return {
-            show: function(data)
-            {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
-                if (data.data)
-                {
-                    var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
-                }
-            }
-        };
     }
-);
 
+    return NoFieldAuthenticationProvider;
+  }
+);

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plainpasswordfile/add.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plainpasswordfile/add.js?rev=1642841&r1=1642840&r2=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plainpasswordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plainpasswordfile/add.js Tue Dec  2 10:56:37 2014
@@ -24,11 +24,11 @@ define(["dojo/query","dijit/registry","q
         return {
             show: function(data)
             {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
+                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/filebased/add.html");
                 if (data.data)
                 {
                     var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
+                    path.set("value", data.data.path);
                 }
             }
         };

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plainpasswordfile/show.js (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plainpasswordfile/show.js?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plainpasswordfile/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/plainpasswordfile/show.js Tue Dec  2 10:56:37 2014
@@ -18,20 +18,21 @@
  * under the License.
  *
  */
-define(["dojo/query","dijit/registry","qpid/common/util"],
-    function (query, registry, util)
+define(["qpid/common/util", "dojo/domReady!"],
+  function (util, metadata)
+  {
+
+    function PlainPasswordFile(data)
     {
-        return {
-            show: function(data)
-            {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
-                if (data.data)
-                {
-                    var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
-                }
-            }
-        };
+        util.buildUI(data.containerNode, data.parent, "authenticationprovider/filebased/show.html", ["path"], this);
+        data.parent.editButton.set("disabled", false);
+    }
+
+    PlainPasswordFile.prototype.update = function(data)
+    {
+        util.updateUI(data, ["path"], this);
     }
-);
 
+    return PlainPasswordFile;
+  }
+);

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/scram-sha-1/show.js (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/scram-sha-1/show.js?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/scram-sha-1/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/scram-sha-1/show.js Tue Dec  2 10:56:37 2014
@@ -18,20 +18,18 @@
  * under the License.
  *
  */
-define(["dojo/query","dijit/registry","qpid/common/util"],
-    function (query, registry, util)
+define([],
+  function ()
+  {
+
+    function NoFieldAuthenticationProvider(data)
+    {
+    }
+
+    NoFieldAuthenticationProvider.prototype.update = function(data)
     {
-        return {
-            show: function(data)
-            {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
-                if (data.data)
-                {
-                    var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
-                }
-            }
-        };
     }
-);
 
+    return NoFieldAuthenticationProvider;
+  }
+);

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/scram-sha-256/show.js (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/scram-sha-256/show.js?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/scram-sha-256/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/scram-sha-256/show.js Tue Dec  2 10:56:37 2014
@@ -18,20 +18,18 @@
  * under the License.
  *
  */
-define(["dojo/query","dijit/registry","qpid/common/util"],
-    function (query, registry, util)
+define([],
+  function ()
+  {
+
+    function NoFieldAuthenticationProvider(data)
+    {
+    }
+
+    NoFieldAuthenticationProvider.prototype.update = function(data)
     {
-        return {
-            show: function(data)
-            {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
-                if (data.data)
-                {
-                    var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
-                }
-            }
-        };
     }
-);
 
+    return NoFieldAuthenticationProvider;
+  }
+);

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/simpleldap/add.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/simpleldap/add.js?rev=1642841&r1=1642840&r2=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/simpleldap/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/simpleldap/add.js Tue Dec  2 10:56:37 2014
@@ -28,15 +28,15 @@ define(["dojo/_base/xhr","dojo/query","d
 
                 var that = this;
                 xhr.get({url: "api/latest/truststore", sync: true, handleAs: "json"}).then(
-                    function(data)
+                    function(trustStores)
                     {
-                        that._initTrustStores(data,data.containerNode);
+                        that._initTrustStores(trustStores, data.containerNode);
                     }
                 );
 
                 if (data.data)
                 {
-                    this._initFields(data.data);
+                    this._initFields(data.data, data.containerNode );
                 }
             },
             _initTrustStores: function(trustStores, containerNode)
@@ -48,29 +48,31 @@ define(["dojo/_base/xhr","dojo/query","d
                 }
                 var trustStoresStore = new Memory({ data: data });
 
-                var trustStore = registry.byNode(query(".trustStore", data.containerNode)[0]);
+                var trustStore = registry.byNode(query(".trustStore", containerNode)[0]);
                 trustStore.set("store", trustStoresStore);
             },
-            _initFields:function(data)
+            _initFields:function(data, containerNode)
             {
                 var attributes = metadata.getMetaData("AuthenticationProvider", "SimpleLDAP").attributes;
                 for(var name in attributes)
                 {
-                    var widget = registry.byNode(query("." + name, data.containerNode)[0]);
-                    if (widget)
+                    var domNode = query("." + name, containerNode)[0];
+                    if (domNode)
                     {
-                        if (widget instanceof dijit.form.CheckBox)
+                        var widget = registry.byNode(domNode);
+                        if (widget)
                         {
-                            widget.set("checked", data[name]);
-                        }
-                        else
-                        {
-                            widget.set("value", data[name]);
+                            if (widget instanceof dijit.form.CheckBox)
+                            {
+                                widget.set("checked", data[name]);
+                            }
+                            else
+                            {
+                                widget.set("value", data[name]);
+                            }
                         }
                     }
                 }
-                var bindWithoutSearch =
-                bindWithoutSearch.set("checked", data.data.bindWithoutSearch);
             }
         };
     }

Copied: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/simpleldap/show.js (from r1642758, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/simpleldap/show.js?p2=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/simpleldap/show.js&p1=qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js&r1=1642758&r2=1642841&rev=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/base64md5passwordfile/add.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/authenticationprovider/simpleldap/show.js Tue Dec  2 10:56:37 2014
@@ -1,5 +1,4 @@
 /*
- *
  * 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
@@ -16,22 +15,29 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-define(["dojo/query","dijit/registry","qpid/common/util"],
-    function (query, registry, util)
+
+define(["qpid/common/util", "qpid/common/metadata", "dojo/domReady!"],
+  function (util, metadata)
+  {
+
+    function SimpleLdapAuthenticationProvider(data)
     {
-        return {
-            show: function(data)
-            {
-                util.parseHtmlIntoDiv(data.containerNode, "authenticationprovider/passwordfile/add.html");
-                if (data.data)
-                {
-                    var path = registry.byNode(query(".path", data.containerNode)[0]);
-                    path.set("value", data.data.useFullDN);
-                }
-            }
-        };
+        this.fields = [];
+        var attributes = metadata.getMetaData("AuthenticationProvider", "SimpleLDAP").attributes;
+        for(var name in attributes)
+        {
+            this.fields.push(name);
+        }
+        util.buildUI(data.containerNode, data.parent, "authenticationprovider/simpleldap/show.html", this.fields, this);
+        data.parent.editButton.set("disabled", false);
     }
-);
 
+    SimpleLdapAuthenticationProvider.prototype.update = function(data)
+    {
+        util.updateUI(data, this.fields, this);
+    }
+
+    return SimpleLdapAuthenticationProvider;
+  }
+);

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showAuthProvider.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showAuthProvider.html?rev=1642841&r1=1642840&r2=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showAuthProvider.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showAuthProvider.html Tue Dec  2 10:56:37 2014
@@ -32,19 +32,17 @@
             <div class="formLabel-labelCell">State:</div>
             <div class="state"></div>
         </div>
-
+        <div class="clear authenticationProviderDetails"></div>
         <div class="clear"></div>
         <div class="clear dijitDialogPaneActionBar">
-            <button data-dojo-type="dijit.form.Button" class="editAuthenticationProviderButton" type="button">Edit</button>
+            <button data-dojo-type="dijit.form.Button" class="editAuthenticationProviderButton" type="button" data-dojo-props="disabled: true">Edit</button>
             <button data-dojo-type="dijit.form.Button" class="deleteAuthenticationProviderButton" type="button">Delete</button>
         </div>
-        <br/>
-        <br/>
-        <div class="clear"></div>
-        <div class="clear preferencesPanel" data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Preferences Provider',  open: true">
-          <div class="preferencesProviderDetails"></div>
-          <button data-dojo-type="dijit.form.Button" class="addPreferencesProviderButton">Add</button>
-        </div>
-        <br/>
     </div>
+    <br/>
+    <div class="clear preferencesPanel" data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Preferences Provider',  open: true">
+        <div class="preferencesProviderDetails"></div>
+        <button data-dojo-type="dijit.form.Button" class="addPreferencesProviderButton">Add</button>
+    </div>
+    <br/>
 </div>

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showPreferencesProvider.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showPreferencesProvider.html?rev=1642841&r1=1642840&r2=1642841&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showPreferencesProvider.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showPreferencesProvider.html Tue Dec  2 10:56:37 2014
@@ -34,7 +34,6 @@
      </div>
      <div class="preferencesDetails"></div>
   </div>
-  <br/>
   <div class="clear"></div>
   <div class="clear dijitDialogPaneActionBar">
     <button data-dojo-type="dijit.form.Button" class="editPreferencesProviderButton">Edit</button>



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


Mime
View raw message