Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Solve #1941, Add node statistic info in node page (#1944)
Browse files Browse the repository at this point in the history
  • Loading branch information
rum2mojito authored and littlezhou committed Sep 26, 2018
1 parent 597d3a9 commit 9f17c76
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ angular.module('org.apache.hadoop.ssm.models', [])
return get('cluster/primary/utilization/' + resourceName, decoder.default)
},
nodes: function () {
return get('cluster/primary/ssmnodesinfo', decoder.nodes);
return get('cluster/primary/ssmnodescmdletmetrics', decoder.nodes);
},
notebookInfo: function () {
return get('note/info', decoder.default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
<thead ng-show="nodes.length > 0">
<tr>
<th>Id</th>
<th>Location</th>
<th>Executor Type</th>
<th>Regist Time</th>
<th>Number of Executors</th>
<th>Cmdlets Executed</th>
<th>Cmdlets In Execution</th>
</tr>
</thead>
<thead ng-if="nodes.length <= 0">
Expand All @@ -41,9 +43,11 @@ <h4>No node is running</h4>
</thead>
<tbody>
<tr ng-repeat="node in nodes">
<td>{{node.id}}</td>
<td>{{node.host}}</td>
<td>{{node.executorType}}</td>
<td>{{node.nodeInfo.id}} (Pending Schedule: {{node.numPendingSchedule}} Pending Dispatch: {{node.numPendingDispatch}})</td>
<td>{{node.registTime}}</td>
<td>{{node.numExecutors}}</td>
<td>{{node.cmdletsExecuted}}</td>
<td>{{node.cmdletsInExecution}}</td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ angular.module('zeppelinWebApp')
NodesCtrl.$inject = ['$scope', '$filter', 'nodes0'];
function NodesCtrl($scope, $filter, nodes0) {
$scope.nodes = nodes0.body;
angular.forEach($scope.nodes, function (data,index) {
data.registTime = data.registTime === 0 ? "-" :
$filter('date')(data.registTime,'yyyy-MM-dd HH:mm:ss');
});
}

0 comments on commit 9f17c76

Please sign in to comment.