You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by ji...@apache.org on 2017/03/10 06:29:22 UTC
eagle git commit: [EAGLE-945] support queue in JPM overview
Repository: eagle
Updated Branches:
refs/heads/master 1085dae69 -> dd16620e2
[EAGLE-945] support queue in JPM overview
JPM overviewCtrl add queue type
Author: zombieJ <sm...@gmail.com>
Closes #861 from zombieJ/EAGLE-945.
Project: http://git-wip-us.apache.org/repos/asf/eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/eagle/commit/dd16620e
Tree: http://git-wip-us.apache.org/repos/asf/eagle/tree/dd16620e
Diff: http://git-wip-us.apache.org/repos/asf/eagle/diff/dd16620e
Branch: refs/heads/master
Commit: dd16620e235478b27e83565432ac2c98d070a175
Parents: 1085dae
Author: zombieJ <sm...@gmail.com>
Authored: Fri Mar 10 14:29:12 2017 +0800
Committer: zombieJ <sm...@gmail.com>
Committed: Fri Mar 10 14:29:12 2017 +0800
----------------------------------------------------------------------
.../webapp/app/apps/jpm/ctrl/overviewCtrl.js | 5 +++--
.../src/main/webapp/app/apps/jpm/index.js | 19 ++++++++++++++++---
2 files changed, 19 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/eagle/blob/dd16620e/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js
index 7d7b949..85c4547 100644
--- a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js
+++ b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js
@@ -26,7 +26,8 @@
$scope.aggregationMap = {
job: "jobId",
user: "user",
- jobType: "jobType"
+ jobType: "jobType",
+ queue: "queue",
};
$scope.site = $wrapState.param.siteId;
@@ -88,7 +89,7 @@
var aggPromise = cache[metric] = cache[metric] || JPM.aggMetricsToEntities(
JPM.aggMetrics({site: $scope.site}, metric, [aggregation], "avg(value), sum(value) desc", intervalMin, startTime, endTime, 10)
- )._promise.then(function (list) {
+ , [0])._promise.then(function (list) {
var series = $.map(list, function (metrics) {
return JPM.metricsToSeries(metrics[0].tags[aggregation], metrics, {
stack: "stack",
http://git-wip-us.apache.org/repos/asf/eagle/blob/dd16620e/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/index.js
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/index.js b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/index.js
index 234c539..178b24f 100644
--- a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/index.js
+++ b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/index.js
@@ -327,6 +327,12 @@
return _list;
};
+ /**
+ *
+ * @param list
+ * @param flatten {bool|[]} bool will set merge result. array will pick only contains value
+ * @return {Array}
+ */
JPM.aggMetricsToEntities = function (list, flatten) {
var _list = [];
_list.done = false;
@@ -351,14 +357,21 @@
};
});
- if(flatten) {
- _list.push.apply(_list, _subList);
+ if ($.isArray(flatten)) {
+ if (flatten.indexOf(j) !== -1) {
+ _list.push(_subList);
+ }
} else {
- _list.push(_subList);
+ if(flatten) {
+ _list.push.apply(_list, _subList);
+ } else {
+ _list.push(_subList);
+ }
}
});
});
_list.done = true;
+
return _list;
});
return _list;