You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/09/05 20:20:12 UTC
git commit: AMBARI-3105. Random change of blocks for Summary and
Alerts and health checks on some Service pages. (xiwang via yusaku)
Updated Branches:
refs/heads/trunk 8420c8773 -> a8ba15f48
AMBARI-3105. Random change of blocks for Summary and Alerts and health checks on some Service pages. (xiwang via yusaku)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/a8ba15f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/a8ba15f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/a8ba15f4
Branch: refs/heads/trunk
Commit: a8ba15f48e5a142d0e7d7b6501deec461548e00d
Parents: 8420c87
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Thu Sep 5 11:08:12 2013 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Thu Sep 5 11:08:31 2013 -0700
----------------------------------------------------------------------
.../app/views/main/service/info/summary.js | 34 +++++++++++---------
1 file changed, 18 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a8ba15f4/ambari-web/app/views/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js
index 3178ce5..03f3d42 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -476,24 +476,26 @@ App.MainServiceInfoSummaryView = Em.View.extend({
// for alerts window
var summaryTable = document.getElementById('summary-info');
var alertsList = document.getElementById('summary-alerts-list');
- var summaryActualHeight = summaryTable.clientHeight;
var alertsNum = App.router.get('mainServiceInfoSummaryController.alerts.length');
- var alertsActualHeight = alertsNum * 60;
- var alertsMinHeight = 58;
- if (alertsNum == 0) {
- $(alertsList).attr('style', "height:" + alertsMinHeight + "px;");
- } else if ( alertsNum <= 4) {
- // set window size to actual alerts height
- $(alertsList).attr('style', "height:" + alertsActualHeight + "px;");
- } else {
- // set window size : sum of first 4 alerts height
- $(alertsList).attr('style', "height:" + 240 + "px;");
- }
- var curSize = alertsList.clientHeight;
- if ( summaryActualHeight >= curSize) {
- $(alertsList).attr('style', "height:" + summaryActualHeight + "px;");
+ if (summaryTable && alertsList && alertsNum != null) {
+ var summaryActualHeight = summaryTable.clientHeight;
+ var alertsActualHeight = alertsNum * 60;
+ var alertsMinHeight = 58;
+ if (alertsNum == 0) {
+ $(alertsList).attr('style', "height:" + alertsMinHeight + "px;");
+ } else if ( alertsNum <= 4) {
+ // set window size to actual alerts height
+ $(alertsList).attr('style', "height:" + alertsActualHeight + "px;");
+ } else {
+ // set window size : sum of first 4 alerts height
+ $(alertsList).attr('style', "height:" + 240 + "px;");
+ }
+ var curSize = alertsList.clientHeight;
+ if ( summaryActualHeight >= curSize) {
+ $(alertsList).attr('style', "height:" + summaryActualHeight + "px;");
+ }
}
- },
+ }.observes('App.router.mainServiceInfoSummaryController.alerts.length'),
clientHosts:App.Host.find(),