You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "fapifta (via GitHub)" <gi...@apache.org> on 2023/02/09 17:47:14 UTC

[GitHub] [ozone] fapifta commented on a diff in pull request #4256: HDDS-7816. Add DataNode list to the SCM WebUI

fapifta commented on code in PR #4256:
URL: https://github.com/apache/ozone/pull/4256#discussion_r1101624773


##########
hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm-overview.html:
##########
@@ -28,25 +28,53 @@ <h2>SCM Information</h2>
     </tbody>
 </table>
 
-<h2>Node counts</h2>
-
-<table class="table table-bordered table-striped" class="col-md-6">
+<h2>Node Status</h2>
+<div class="row">
+    <div class="col-md-6 text-left">
+        <label>Show: </label>
+        <select class="form-select" ng-model="RecordsToDisplay" ng-change="UpdateRecordsToShow()">
+            <option value="10" ng-selected="{true}">10</option>
+            <option value="20">20</option>
+            <option value="50">50</option>

Review Comment:
   Can we add the option "All" here as well? As we get all the nodes, and all the paging happens on the client side, I think it might be reasonable to enable the users to show all the nodes as well.



##########
hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm.js:
##########
@@ -24,12 +24,46 @@
         require: {
             overview: "^overview"
         },
-        controller: function ($http) {
+        controller: function ($http,$scope) {
             var ctrl = this;
+            $scope.reverse=true;
+            $scope.columnName="";
+            let nodeStatusCopy=[];
+            $scope.RecordsToDisplay ="10";
+            $scope.currentPage=1;
+            $scope.lastIndex = 0;
+
             $http.get("jmx?qry=Hadoop:service=SCMNodeManager,name=SCMNodeManagerInfo")
                 .then(function (result) {
                     ctrl.nodemanagermetrics = result.data.beans[0];
-                });
+                $scope.nodeStatus = ctrl.nodemanagermetrics && ctrl.nodemanagermetrics.NodeStatus && ctrl.nodemanagermetrics.NodeStatus.map(({ key, value}) =>{

Review Comment:
   From this point on indentation seems to be shifted and a bit ad-hoc, please fix that, and also please go over the file, and fix missing spaces here and there (around = sign, after { and before }, after ,) 



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