hyo-ryeong commented on code in PR #4993:
URL: https://github.com/apache/zeppelin/pull/4993#discussion_r2239339887


##########
zeppelin-web/src/app/credential/credential.controller.js:
##########
@@ -199,10 +199,13 @@ function CredentialController($scope, $rootScope, $http, 
baseUrlSrv, ngToast) {
   }
 
   $scope.getCredentialDocsLink = function() {
-    const currentVersion = $rootScope.zeppelinVersion;
-    const isVersionOver0Point7 = currentVersion && 
currentVersion.split('.')[1] > 7;
+    let currentVersion = $rootScope.zeppelinVersion || '0.12.0';
+    currentVersion = currentVersion.replace('-SNAPSHOT', '');
+
+    const isVersionOver0Point7 = currentVersion.split('.')[1] > 7;
+
     /*
-     * Add '/setup' to doc link on the version over 0.7.0
+     * Add '/setup' to doc link on the version over 0.7.0, add '/setup' to the 
doc URL

Review Comment:
   Thanks for the review!
   I updated the code to remove the hardcoded default version and added a 
fallback to 'latest' when zeppelinVersion is not available.
   Also simplified the comment to avoid duplication.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to