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-1042] support preview chart title
Date Wed, 14 Jun 2017 07:27:45 GMT
Repository: eagle
Updated Branches:
  refs/heads/master e963abeda -> f7994cd2f


[EAGLE-1042] support preview chart title

https://issues.apache.org/jira/browse/EAGLE-1042

For metric preview page. There should be display the title of the chart for quick snapshot

Author: zombieJ <smith3816@gmail.com>

Closes #948 from zombieJ/EAGLE-1042.


Project: http://git-wip-us.apache.org/repos/asf/eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/eagle/commit/f7994cd2
Tree: http://git-wip-us.apache.org/repos/asf/eagle/tree/f7994cd2
Diff: http://git-wip-us.apache.org/repos/asf/eagle/diff/f7994cd2

Branch: refs/heads/master
Commit: f7994cd2f586ebba3fa3005783c3911f929b3fb8
Parents: e963abe
Author: zombieJ <smith3816@gmail.com>
Authored: Wed Jun 14 15:26:59 2017 +0800
Committer: zombieJ <smith3816@gmail.com>
Committed: Wed Jun 14 15:26:59 2017 +0800

----------------------------------------------------------------------
 .../src/main/webapp/app/dev/partials/metric/preview.html         | 1 +
 .../src/main/webapp/app/dev/public/js/ctrls/metricCtrl.js        | 4 ++++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/eagle/blob/f7994cd2/eagle-server/src/main/webapp/app/dev/partials/metric/preview.html
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/partials/metric/preview.html b/eagle-server/src/main/webapp/app/dev/partials/metric/preview.html
index 0c16ec0..0410dba 100644
--- a/eagle-server/src/main/webapp/app/dev/partials/metric/preview.html
+++ b/eagle-server/src/main/webapp/app/dev/partials/metric/preview.html
@@ -61,6 +61,7 @@
 				<h3 class="box-title">Preview</h3>
 			</div>
 			<div class="box-body">
+				<h3 class="no-margin text-center">{{currentMetricName}}</h3>
 				<div chart style="height: 400px;" series="series" option="commonOption"></div>
 			</div>
 		</div>

http://git-wip-us.apache.org/repos/asf/eagle/blob/f7994cd2/eagle-server/src/main/webapp/app/dev/public/js/ctrls/metricCtrl.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/metricCtrl.js b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/metricCtrl.js
index e0f0f15..8edd8fd 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/metricCtrl.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/metricCtrl.js
@@ -35,6 +35,8 @@
 		$scope.groups = $wrapState.param.groups;
 		$scope.fields = $wrapState.param.fields;
 
+		$scope.currentMetricName = '';
+
 		$scope.commonOption = {};
 
 		$scope.metricList = [$scope.metricName];
@@ -50,6 +52,8 @@
 		});
 
 		$scope.loadSeries = function() {
+			$scope.currentMetricName = $scope.metricName;
+
 			$scope.series = CompatibleEntity.timeSeries({
 				condition: { site: $scope.site },
 				groups: $scope.groups,


Mime
View raw message