eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject eagle git commit: [EAGLE-945] support queue in JPM overview
Date Fri, 10 Mar 2017 06:29:22 GMT
Repository: eagle
Updated Branches:
  refs/heads/master 1085dae69 -> dd16620e2


[EAGLE-945] support queue in JPM overview

JPM overviewCtrl add queue type

Author: zombieJ <smith3816@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 <smith3816@gmail.com>
Authored: Fri Mar 10 14:29:12 2017 +0800
Committer: zombieJ <smith3816@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;


Mime
View raw message