From c89b97bbc5befe52afd4e6f32480df91010f3da3 Mon Sep 17 00:00:00 2001 From: rum2mojito Date: Wed, 26 Sep 2018 13:55:38 +0800 Subject: [PATCH 1/2] Add node statistic info in node page --- .../src/app/dashboard/services/models/models.js | 2 +- .../dashboard/views/cluster/nodeinfo/nodes.html | 16 +++++++++++----- .../dashboard/views/cluster/nodeinfo/nodes.js | 4 ++++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/services/models/models.js b/smart-zeppelin/zeppelin-web/src/app/dashboard/services/models/models.js index 7200bb320ac..a654d5965ec 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/services/models/models.js +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/services/models/models.js @@ -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) diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.html b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.html index a7d78a86dd2..c3284be60b9 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.html +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.html @@ -23,8 +23,11 @@ Id - Location - Executor Type + Port + Regist Time + Number of Executors + Cmdlets Executed + Cmdlets In Execution @@ -41,9 +44,12 @@

No node is running

- {{node.id}} - {{node.host}} - {{node.executorType}} + {{node.nodeInfo.id}} | Pending Schedule: {{node.numPendingSchedule}} | Pending Dispatch: {{node.numPendingDispatch}} + {{node.nodeInfo.port}} + {{node.registTime}} + {{node.numExecutors}} + {{node.cmdletsExecuted}} + {{node.cmdletsInExecution}} diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.js b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.js index aceb7085f0c..59d9e15b11c 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.js +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.js @@ -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'); + }); } From 4f6a53c79217f9f2af3625f2d372e4942f79c499 Mon Sep 17 00:00:00 2001 From: rum2mojito Date: Wed, 26 Sep 2018 15:07:58 +0800 Subject: [PATCH 2/2] remove port col --- .../src/app/dashboard/views/cluster/nodeinfo/nodes.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.html b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.html index c3284be60b9..32c9800439a 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.html +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/cluster/nodeinfo/nodes.html @@ -23,7 +23,6 @@ Id - Port Regist Time Number of Executors Cmdlets Executed @@ -44,8 +43,7 @@

No node is running

- {{node.nodeInfo.id}} | Pending Schedule: {{node.numPendingSchedule}} | Pending Dispatch: {{node.numPendingDispatch}} - {{node.nodeInfo.port}} + {{node.nodeInfo.id}} (Pending Schedule: {{node.numPendingSchedule}} Pending Dispatch: {{node.numPendingDispatch}}) {{node.registTime}} {{node.numExecutors}} {{node.cmdletsExecuted}}