This is an automated email from the ASF dual-hosted git repository.

khowe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 63ebca4a09a06d40ab0e3a25022fd1b833f28682
Author: Sai Boorlagadda <sai.boorlaga...@gmail.com>
AuthorDate: Tue Mar 20 15:35:27 2018 -0700

    Fix help guide url in Pulse
---
 geode-pulse/src/main/webapp/clusterDetail.html       |  2 +-
 geode-pulse/src/main/webapp/dataBrowser.html         |  2 +-
 .../src/main/webapp/scripts/pulsescript/common.js    | 20 ++++++++++++++++++++
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/geode-pulse/src/main/webapp/clusterDetail.html 
b/geode-pulse/src/main/webapp/clusterDetail.html
index 26ae3d1..c74299d 100644
--- a/geode-pulse/src/main/webapp/clusterDetail.html
+++ b/geode-pulse/src/main/webapp/clusterDetail.html
@@ -118,7 +118,7 @@
         </div>
       </div>
       <div class="left headerTopSeperator"></div>
-      <div class="left"><a data-prod-custom="pulse-help-custom" 
target="_blank" 
href="http://geode.apache.org/docs/guide/tools_modules/pulse/chapter_overview.html";
 class="left headerTopLinks" class="left headerTopLinks">Help</a></div>
+      <div class="left"><a href="#" onclick="return openHelpGuide();" 
class="left headerTopLinks">Help</a></div>
       <div class="left headerTopSeperator"></div>
       <div class="left headerTopLinks welcomeLabelPRZero">Welcome</div>
       <div class="left headerTopLinks textbold font-size12" 
id="userName"></div>
diff --git a/geode-pulse/src/main/webapp/dataBrowser.html 
b/geode-pulse/src/main/webapp/dataBrowser.html
index dac5a4d..b6d49f1 100644
--- a/geode-pulse/src/main/webapp/dataBrowser.html
+++ b/geode-pulse/src/main/webapp/dataBrowser.html
@@ -137,7 +137,7 @@
                </div>
                                </div>
                                <div class="left headerTopSeperator"></div>
-             <div class="left"><a target="_blank" 
href="http://geode.apache.org/docs/guide/tools_modules/pulse/chapter_overview.html";
 class="left headerTopLinks">Help</a></div>
+             <div class="left"><a href="#" onclick="return openHelpGuide();" 
class="left headerTopLinks">Help</a></div>
              <div class="left headerTopSeperator"></div>
              <div class="left headerTopLinks welcomeLabelPRZero">Welcome</div>
              <div class="left headerTopLinks textbold font-size12" 
id="userName"></div>
diff --git a/geode-pulse/src/main/webapp/scripts/pulsescript/common.js 
b/geode-pulse/src/main/webapp/scripts/pulsescript/common.js
index 5de8b4c..b993483 100644
--- a/geode-pulse/src/main/webapp/scripts/pulsescript/common.js
+++ b/geode-pulse/src/main/webapp/scripts/pulsescript/common.js
@@ -114,6 +114,26 @@ function getCookie(c_name) {
   }
 }
 
+function openHelpGuide() {
+    $.getJSON("pulseVersion", function(data) {
+        var pulseVersion = data.pulseVersion;
+        if (data.pulseVersion != undefined && data.pulseVersion != "") {
+            //1.6.0-SNAPSHOT
+            var pulseGuideLocation;
+            var tokens = pulseVersion.split(".");
+            if(pulseVersion.indexOf("SNAPSHOT") > 0) {
+                //fall back to one version older guide in case if its snapshot.
+                pulseGuideLocation = tokens[0] + (tokens[1] - 1);
+            } else {
+                pulseGuideLocation = tokens[0]+tokens[1];
+            }
+            var url = 
`http://geode.apache.org/docs/guide/${pulseGuideLocation}/tools_modules/pulse/pulse-overview.html`;
+            window.open(url, '_blank');
+        }
+    });
+    return false;
+}
+
 // function used for setting cookies
 function setCookie(c_name, value, exdays) {
   var exdate = new Date();

-- 
To stop receiving notification emails like this one, please contact
kh...@apache.org.

Reply via email to