Github user chitin commented on a diff in the pull request:
https://github.com/apache/eagle/pull/753#discussion_r94210235
--- Diff:
eagle-hadoop-metric/src/main/webapp/app/apps/hadoop_metric/index.js ---
@@ -23,24 +23,271 @@
var hadoopMetricApp = register(['ngRoute', 'ngAnimate', 'ui.router',
'eagle.service']);
hadoopMetricApp.route("HadoopMetric", {
- url: "/hadoopMetric/",
+ url: "/hadoopMetric?startTime&endTime",
site: true,
templateUrl: "partials/overview.html",
controller: "overviewCtrl",
+ resolve: {time: true}
}).route("HadoopMetric_HDFS", {
url: "/hadoopMetric/hdfs",
site: true,
templateUrl: "partials/hdfs/index.html",
controller: "hdfsCtrl",
+ resolve: {time: true}
+ }).route("regionDetail", {
+ url: "/hadoopMetric/regionDetail/:hostname",
+ site: true,
+ templateUrl: "partials/region/regionDetail.html",
+ controller: "regionDetailCtrl",
+ resolve: {time: true}
+ }).route("regionList", {
+ url: "/hadoopMetric/regionList",
+ site: true,
+ templateUrl: "partials/region/regionList.html",
+ controller: "regionListCtrl"
+ }).route("masterDetail", {
+ url: "/hadoopMetric/:hostname?startTime&endTime",
+ site: true,
+ reloadOnSearch: false,
+ templateUrl: "partials/overview.html",
+ controller: "overviewCtrl",
+ resolve: {time: true}
});
- hadoopMetricApp.portal({name: "Services", icon: "heartbeat", list: [
- {name: "Overview", path: "hadoopMetric/"},
- {name: "HDFS", path: "hadoopMetric/hdfs"},
- ]}, true);
+ hadoopMetricApp.portal({
+ name: "Services", icon: "heartbeat", list: [
+ {name: "Overview", path: "hadoopMetric"},
+ {name: "HDFS", path: "hadoopMetric/hdfs"}
+ ]
+ }, true);
+
+ hadoopMetricApp.service("METRIC", function ($q, $http, Time, Site,
Application) {
+ var METRIC = window._METRIC = {};
+
+ METRIC.QUERY_HBASE_METRICS =
'${baseURL}/rest/entities?query=GenericMetricService[${condition}]{*}&metricName=${metric}&pageSize=${limit}';
+ METRIC.QUERY_HBASE_METRICS_WITHTIME =
'${baseURL}/rest/entities?query=GenericMetricService[${condition}]{*}&metricName=${metric}&pageSize=${limit}&startTime=${startTime}&endTime=${endTime}';
+ METRIC.QUERY_HBASE_INSTANCE =
'${baseURL}/rest/entities?query=HbaseServiceInstance[${condition}]{*}&pageSize=${limit}';
+
+ METRIC.QUERY_HBASE_METRICS_INTERVAL =
'${baseURL}/rest/entities?query=GenericMetricService[${condition}]<${groups}>{${field}}${order}${top}&metricName=${metric}&pageSize=${limit}&startTime=${startTime}&endTime=${endTime}&intervalmin=${intervalMin}&timeSeries=true';
+ /**
+ * Fetch query content with current site application
configuration
+ * @param {string} queryName
+ */
+ var getQuery = METRIC.getQuery = function (queryName, siteId) {
+ var baseURL;
+ siteId = siteId || Site.current().siteId;
+ var app = Application.find("HADOOP_METRIC_MONITOR",
siteId)[0];
+ var host = app.configuration["service.host"];
+ var port = app.configuration["service.port"];
--- End diff --
I have added config of service.host & service.port in
HadoopMetricMonitorAppProdiver.xml
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---