qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1639650 - in /qpid/trunk/qpid/java: broker-core/src/main/resources/system.properties broker-plugins/management-http/src/main/java/resources/js/qpid/common/ConsoleHelper.js
Date Fri, 14 Nov 2014 14:36:21 GMT
Author: kwall
Date: Fri Nov 14 14:36:21 2014
New Revision: 1639650

URL: http://svn.apache.org/r1639650
Log:
QPID-6227: [Java Broker] Refactor ConsoleHelper.js to avoid the need to hardcode docbook urls
by reading url from context

Modified:
    qpid/trunk/qpid/java/broker-core/src/main/resources/system.properties
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/ConsoleHelper.js

Modified: qpid/trunk/qpid/java/broker-core/src/main/resources/system.properties
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/resources/system.properties?rev=1639650&r1=1639649&r2=1639650&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/resources/system.properties (original)
+++ qpid/trunk/qpid/java/broker-core/src/main/resources/system.properties Fri Nov 14 14:36:21
2014
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+qpid.helpURL = http://qpid.apache.org/releases/qpid-0.32-SNAPSHOT/java-broker/book
\ No newline at end of file

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/ConsoleHelper.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/ConsoleHelper.js?rev=1639650&r1=1639649&r2=1639650&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/ConsoleHelper.js
(original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/ConsoleHelper.js
Fri Nov 14 14:36:21 2014
@@ -20,10 +20,8 @@
  */
 define(["dojo/_base/xhr", "dojo/domReady!"], function (xhr) {
 
-    var qpidHelpLocation = "http://qpid.apache.org/releases/qpid-";
     var preferencesDialog = null;
     var helpURL = null;
-    var qpidVersion = null;
 
     return {
         showPreferencesDialog: function () {
@@ -41,26 +39,27 @@ define(["dojo/_base/xhr", "dojo/domReady
               preferencesDialog.showDialog();
           }
         },
-        getVersion: function()
+        getHelpUrl: function()
         {
-          if (!qpidVersion)
+          if (!helpURL)
           {
             xhr.get({
               sync: true,
-              url: "service/helper?action=version",
+              url: "api/latest/broker",
+              content: { "depth" : 1, "includeSysContext" : true },
               handleAs: "json"
-             }).then(function(version) {
-               qpidVersion = version;
+             }).then(function(data) {
+              var broker = data[0];
+              if ("context" in broker && "qpid.helpURL" in broker["context"] )
+              {
+                helpURL = broker["context"]["qpid.helpURL"];
+              }
+              else
+              {
+                helpURL = "http://qpid.apache.org/";
+              }
              });
           }
-          return qpidVersion;
-        },
-        getHelpUrl: function()
-        {
-          if (!helpURL)
-          {
-            helpURL = qpidHelpLocation + this.getVersion() + "/java-broker/book/index.html";
-          }
           return helpURL;
         },
         showHelp: function()



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


Mime
View raw message