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