ivandika3 commented on code in PR #7206:
URL: https://github.com/apache/ozone/pull/7206#discussion_r1832222571


##########
hadoop-hdds/container-service/src/main/resources/webapps/hddsDatanode/dn-overview.html:
##########
@@ -22,8 +22,28 @@
     </tbody>
 </table>
 
+<h2>HeartBeat Information</h2>
+<table class="table" class="col-md-6">
+    <thead>
+    <tr>
+        <th>Address</th>
+        <th>Last Successful HeartBeat</th>
+        <th>Missed Count</th>
+        <th>State</th>
+    </tr>
+    </thead>
+    <tbody>
+    <tr ng-repeat="scm in $ctrl.dnmetrics2[0].SCMServers">
+        <td>{{scm.addressString}}</td>
+        <td>{{scm.lastSuccessfulHeartbeat}}</td>
+        <td>{{scm.missedCount}}</td>
+        <td>{{scm.state}}</td>
+    </tr>
+    </tbody>
+</table>
+
 <h2>Volume Information</h2>
-<table class="table table-bordered table-striped" class="col-md-6">

Review Comment:
   Ok, I'm fine with this change.



##########
hadoop-hdds/container-service/src/main/resources/webapps/hddsDatanode/dn.js:
##########
@@ -36,20 +36,104 @@
                  volume.TotalCapacity = transform(volume.TotalCapacity);
                 })
                 });
+
+            
$http.get("jmx?qry=Hadoop:service=HddsDatanode,name=SCMConnectionManager")
+                .then(function (result) {
+                    ctrl.dnmetrics2 = result.data.beans;
+                    ctrl.dnmetrics2.forEach(scm => {
+                        var scmServers = scm.SCMServers;
+                        scmServers.forEach(scmServer => {
+                            scmServer.lastSuccessfulHeartbeat = 
convertTimestampToDate(scmServer.lastSuccessfulHeartbeat)
+                        })
+                    })
+                });
         }
     });
-        function transform(v) {
-          var UNITS = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'ZB'];
-          var prev = 0, i = 0;
-          while (Math.floor(v) > 0 && i < UNITS.length) {
+
+    // Register ioStatus Controller
+    angular.module('ozone').config(function ($routeProvider) {
+        $routeProvider.when('/iostatus', {
+            templateUrl: 'iostatus.html',
+            controller: 'IOStatusController as ioStatusCtrl',
+        });
+    });
+
+    angular.module('ozone')
+        .controller('IOStatusController', function ($http) {
+            var ctrl = this;
+            
$http.get("jmx?qry=Hadoop:service=HddsDatanode,name=VolumeIOStats*")
+                .then(function (result) {
+                    ctrl.dniostatus = result.data.beans;
+                });
+        });
+
+    // Register Scanner Controller
+    angular.module('ozone').config(function ($routeProvider) {
+        $routeProvider.when('/dn-scanner', {
+            templateUrl: 'dn-scanner.html',
+            controller: 'DNScannerController as scannerStatusCtrl',
+        });
+    });
+
+    angular.module('ozone')
+        .controller('DNScannerController', function ($http) {
+            var ctrl = this;
+            
$http.get("jmx?qry=Hadoop:service=HddsDatanode,name=ContainerDataScannerMetrics*")
+                .then(function (result) {
+                    ctrl.dnscanner = result.data.beans;
+                });

Review Comment:
   Thanks for the info. Looks good.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to