From 7fac78b94237b89c9fd0a5f3e41c4b9430b52f56 Mon Sep 17 00:00:00 2001 From: koone Date: Thu, 9 Feb 2017 10:12:46 +0800 Subject: [PATCH 1/5] [EAGLE-886] Refactor HBase JMX Metric with appropriate navigation path --- .../webapp/app/apps/hadoop_metric/index.js | 19 +++++++++++-------- .../partials/backupMasterList.html | 2 +- .../hadoop_metric/partials/hdfs/index.html | 2 +- .../apps/hadoop_metric/partials/overview.html | 2 +- .../partials/region/regionList.html | 2 +- .../src/main/webapp/app/dev/index.html | 9 +++++++++ 6 files changed, 24 insertions(+), 12 deletions(-) diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js index 43ab12abae..12189763c2 100644 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js +++ b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js @@ -23,35 +23,35 @@ var hadoopMetricApp = register(['ngRoute', 'ngAnimate', 'ui.router', 'eagle.service']); hadoopMetricApp.route("HadoopMetric", { - url: "/hadoopMetric?startTime&endTime", + url: "/Service/HBase/overview?startTime&endTime", site: true, templateUrl: "partials/overview.html", controller: "overviewCtrl", resolve: {time: true} }).route("HadoopMetric_HDFS", { - url: "/hadoopMetric/hdfs", + url: "/Service/HDFS", site: true, templateUrl: "partials/hdfs/index.html", controller: "hdfsCtrl", resolve: {time: true} }).route("regionDetail", { - url: "/hadoopMetric/regionDetail/:hostname", + url: "/Service/HBase/RegionServer/:hostname", site: true, templateUrl: "partials/region/regionDetail.html", controller: "regionDetailCtrl", resolve: {time: true} }).route("regionList", { - url: "/hadoopMetric/regionList", + url: "/Service/HBase/RegionServers", site: true, templateUrl: "partials/region/regionList.html", controller: "regionListCtrl" }).route("backupMasterList", { - url: "/hadoopMetric/backupMasterList", + url: "/Service/HBase/backupMasterList", site: true, templateUrl: "partials/backupMasterList.html", controller: "backupMasterListCtrl" }).route("masterDetail", { - url: "/hadoopMetric/:hostname?startTime&endTime", + url: "/Service/HBase/:hostname?startTime&endTime", site: true, reloadOnSearch: false, templateUrl: "partials/overview.html", @@ -61,8 +61,11 @@ hadoopMetricApp.portal({ name: "Services", icon: "heartbeat", list: [ - {name: "HBase", path: "hadoopMetric"}, - {name: "HDFS", path: "hadoopMetric/hdfs"} + { + name: "HBase", + list: [{name: "Overview", path: "Service/HBase/overview"},{name: "RegionServer", path: "Service/HBase/RegionServers"},{name: "BackupMaster", path: "Service/HBase/backupMasterList"}] + }, + {name: "HDFS", path: "Service/HDFS"} ] }, true); diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/backupMasterList.html b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/backupMasterList.html index 960a33c29a..28626aa00a 100644 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/backupMasterList.html +++ b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/backupMasterList.html @@ -37,7 +37,7 @@

- {{item.tags.hostname}} + {{item.tags.hostname}} {{item.tags.rack}} {{item.tags.site}} diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/hdfs/index.html b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/hdfs/index.html index cf5960adb4..33acb15bd2 100644 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/hdfs/index.html +++ b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/hdfs/index.html @@ -16,4 +16,4 @@ limitations under the License. --> -HDFS Page \ No newline at end of file +HDFS Page diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/overview.html b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/overview.html index 5e3d00caa0..d598bcb816 100644 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/overview.html +++ b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/overview.html @@ -40,7 +40,7 @@

- + {{hmasterstandbynum}} 0 diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionList.html b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionList.html index 507de72615..d1a74407e2 100644 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionList.html +++ b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/partials/region/regionList.html @@ -37,7 +37,7 @@

- {{item.tags.hostname}} + {{item.tags.hostname}} {{item.tags.rack}} {{item.tags.site}} diff --git a/eagle-server/src/main/webapp/app/dev/index.html b/eagle-server/src/main/webapp/app/dev/index.html index 74d5c579e2..e67875a210 100644 --- a/eagle-server/src/main/webapp/app/dev/index.html +++ b/eagle-server/src/main/webapp/app/dev/index.html @@ -141,7 +141,16 @@ {{subPortal.name}} + + From be15387e7dbcb98bde5c6fdbfaaf620fc661c627 Mon Sep 17 00:00:00 2001 From: koone Date: Thu, 9 Feb 2017 16:38:28 +0800 Subject: [PATCH 2/5] modify url path accoding to nav --- .../main/webapp/app/apps/hadoop_metric/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js index 12189763c2..59a9ec2bed 100644 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js +++ b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js @@ -23,35 +23,35 @@ var hadoopMetricApp = register(['ngRoute', 'ngAnimate', 'ui.router', 'eagle.service']); hadoopMetricApp.route("HadoopMetric", { - url: "/Service/HBase/overview?startTime&endTime", + url: "/Services/HBase/overview?startTime&endTime", site: true, templateUrl: "partials/overview.html", controller: "overviewCtrl", resolve: {time: true} }).route("HadoopMetric_HDFS", { - url: "/Service/HDFS", + url: "/Services/HDFS", site: true, templateUrl: "partials/hdfs/index.html", controller: "hdfsCtrl", resolve: {time: true} }).route("regionDetail", { - url: "/Service/HBase/RegionServer/:hostname", + url: "/Services/HBase/RegionServer/:hostname", site: true, templateUrl: "partials/region/regionDetail.html", controller: "regionDetailCtrl", resolve: {time: true} }).route("regionList", { - url: "/Service/HBase/RegionServers", + url: "/Services/HBase/RegionServers", site: true, templateUrl: "partials/region/regionList.html", controller: "regionListCtrl" }).route("backupMasterList", { - url: "/Service/HBase/backupMasterList", + url: "/Services/HBase/backupMasterList", site: true, templateUrl: "partials/backupMasterList.html", controller: "backupMasterListCtrl" }).route("masterDetail", { - url: "/Service/HBase/:hostname?startTime&endTime", + url: "/Services/HBase/:hostname?startTime&endTime", site: true, reloadOnSearch: false, templateUrl: "partials/overview.html", @@ -63,9 +63,9 @@ name: "Services", icon: "heartbeat", list: [ { name: "HBase", - list: [{name: "Overview", path: "Service/HBase/overview"},{name: "RegionServer", path: "Service/HBase/RegionServers"},{name: "BackupMaster", path: "Service/HBase/backupMasterList"}] + list: [{name: "Overview", path: "Services/HBase/overview"},{name: "RegionServer", path: "Services/HBase/RegionServers"},{name: "BackupMaster", path: "Service/HBase/backupMasterList"}] }, - {name: "HDFS", path: "Service/HDFS"} + {name: "HDFS", path: "Services/HDFS"} ] }, true); From 68b478c345f1f0ccc1787ec2fa6097d7e6b3acff Mon Sep 17 00:00:00 2001 From: koone Date: Tue, 14 Feb 2017 10:20:17 +0800 Subject: [PATCH 3/5] rename metrix router use hadoopService instead of hadoopMetrix --- .../main/webapp/app/apps/hadoop_metric/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js index 59a9ec2bed..7221ef2835 100644 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js +++ b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js @@ -23,35 +23,35 @@ var hadoopMetricApp = register(['ngRoute', 'ngAnimate', 'ui.router', 'eagle.service']); hadoopMetricApp.route("HadoopMetric", { - url: "/Services/HBase/overview?startTime&endTime", + url: "/hadoopService/HBase/overview?startTime&endTime", site: true, templateUrl: "partials/overview.html", controller: "overviewCtrl", resolve: {time: true} }).route("HadoopMetric_HDFS", { - url: "/Services/HDFS", + url: "/hadoopService/HDFS", site: true, templateUrl: "partials/hdfs/index.html", controller: "hdfsCtrl", resolve: {time: true} }).route("regionDetail", { - url: "/Services/HBase/RegionServer/:hostname", + url: "/hadoopService/HBase/RegionServer/:hostname", site: true, templateUrl: "partials/region/regionDetail.html", controller: "regionDetailCtrl", resolve: {time: true} }).route("regionList", { - url: "/Services/HBase/RegionServers", + url: "/hadoopService/HBase/RegionServers", site: true, templateUrl: "partials/region/regionList.html", controller: "regionListCtrl" }).route("backupMasterList", { - url: "/Services/HBase/backupMasterList", + url: "/hadoopService/HBase/backupMasterList", site: true, templateUrl: "partials/backupMasterList.html", controller: "backupMasterListCtrl" }).route("masterDetail", { - url: "/Services/HBase/:hostname?startTime&endTime", + url: "/hadoopService/HBase/:hostname?startTime&endTime", site: true, reloadOnSearch: false, templateUrl: "partials/overview.html", @@ -63,9 +63,9 @@ name: "Services", icon: "heartbeat", list: [ { name: "HBase", - list: [{name: "Overview", path: "Services/HBase/overview"},{name: "RegionServer", path: "Services/HBase/RegionServers"},{name: "BackupMaster", path: "Service/HBase/backupMasterList"}] + list: [{name: "Overview", path: "hadoopService/HBase/overview"},{name: "RegionServer", path: "hadoopService/HBase/RegionServers"},{name: "BackupMaster", path: "Service/HBase/backupMasterList"}] }, - {name: "HDFS", path: "Services/HDFS"} + {name: "HDFS", path: "hadoopService/HDFS"} ] }, true); From 9c393e25173875265c142385b3dcb5cd62f5e25c Mon Sep 17 00:00:00 2001 From: koone Date: Fri, 17 Feb 2017 15:11:48 +0800 Subject: [PATCH 4/5] reset to two level nav bar --- .../main/webapp/app/apps/hadoop_metric/index.js | 13 +++++-------- eagle-server/src/main/webapp/app/dev/index.html | 15 +++------------ 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js index 7221ef2835..d4789b2796 100644 --- a/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js +++ b/eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js @@ -29,19 +29,19 @@ controller: "overviewCtrl", resolve: {time: true} }).route("HadoopMetric_HDFS", { - url: "/hadoopService/HDFS", + url: "/hadoopService/hdfs", site: true, templateUrl: "partials/hdfs/index.html", controller: "hdfsCtrl", resolve: {time: true} }).route("regionDetail", { - url: "/hadoopService/HBase/RegionServer/:hostname", + url: "/hadoopService/HBase/regionDetail/:hostname", site: true, templateUrl: "partials/region/regionDetail.html", controller: "regionDetailCtrl", resolve: {time: true} }).route("regionList", { - url: "/hadoopService/HBase/RegionServers", + url: "/hadoopService/HBase/regionList", site: true, templateUrl: "partials/region/regionList.html", controller: "regionListCtrl" @@ -61,11 +61,8 @@ hadoopMetricApp.portal({ name: "Services", icon: "heartbeat", list: [ - { - name: "HBase", - list: [{name: "Overview", path: "hadoopService/HBase/overview"},{name: "RegionServer", path: "hadoopService/HBase/RegionServers"},{name: "BackupMaster", path: "Service/HBase/backupMasterList"}] - }, - {name: "HDFS", path: "hadoopService/HDFS"} + {name: "HBase", path: "hadoopService/HBase/overview"}, + {name: "HDFS", path: "hadoopService/hdfs"} ] }, true); diff --git a/eagle-server/src/main/webapp/app/dev/index.html b/eagle-server/src/main/webapp/app/dev/index.html index bb83994cd1..74d5c579e2 100644 --- a/eagle-server/src/main/webapp/app/dev/index.html +++ b/eagle-server/src/main/webapp/app/dev/index.html @@ -141,16 +141,7 @@ {{subPortal.name}} - - @@ -171,13 +162,13 @@