You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/09/14 07:12:49 UTC

[GitHub] [ozone] sadanand48 commented on a diff in pull request #3520: HDDS-6863. Add Group-Id & Ratis-Roles Information for OM UI.

sadanand48 commented on code in PR #3520:
URL: https://github.com/apache/ozone/pull/3520#discussion_r970411221


##########
hadoop-ozone/ozone-manager/src/main/resources/webapps/ozoneManager/ozoneManager.js:
##########
@@ -113,5 +113,36 @@
         require: {
             overview: "^overview"
         },
+        controller: function ($http) {
+            var ctrl = this;
+            $http.get("jmx?qry=Ratis:service=RaftServer,group=*,id=*")
+                .then(function (result) {
+                    ctrl.role = result.data.beans[0];
+                });
+
+            $http.get("jmx?qry=ratis:name=ratis.leader_election.*electionCount")
+                .then(function (result) {
+                    ctrl.electionCount = result.data.beans[0];
+                });
+
+            $http.get("jmx?qry=ratis:name=ratis.leader_election.*lastLeaderElectionElapsedTime")
+                .then(function (result) {
+                    ctrl.elapsedTime = result.data.beans[0];
+                    ctrl.elapsedTime.Value = convertMsToTime(ctrl.elapsedTime.Value);
+                });
+        }
     });
+        function convertMsToTime(ms) {
+          if(ms == -1){

Review Comment:
   Is this a valid case? ms==-1 or should we remove it?



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org