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 2015/01/13 00:48:48 UTC
ambari git commit: AMBARI-9053. Alert badge color is inconsistent.
(xiwang via yusaku)
Repository: ambari
Updated Branches:
refs/heads/trunk c7c8c6d94 -> 0fe4ac5ce
AMBARI-9053. Alert badge color is inconsistent. (xiwang via yusaku)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0fe4ac5c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0fe4ac5c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0fe4ac5c
Branch: refs/heads/trunk
Commit: 0fe4ac5ce3fafa3107474a11f1b628a8401ccada
Parents: c7c8c6d
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Mon Jan 12 15:48:28 2015 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Mon Jan 12 15:48:28 2015 -0800
----------------------------------------------------------------------
ambari-web/app/config.js | 3 ++
ambari-web/app/styles/application.less | 48 ++++++++++++++------
ambari-web/app/styles/common.less | 2 +-
ambari-web/app/templates/main/host.hbs | 4 +-
ambari-web/app/templates/main/menu_item.hbs | 2 +-
ambari-web/app/views/main/dashboard/widget.js | 2 +-
.../main/dashboard/widgets/datanode_live.js | 2 +-
.../main/dashboard/widgets/flume_agent_live.js | 2 +-
.../dashboard/widgets/hbase_average_load.js | 2 +-
.../widgets/hbase_regions_in_transition.js | 2 +-
.../main/dashboard/widgets/namenode_rpc.js | 2 +-
.../dashboard/widgets/node_managers_live.js | 2 +-
.../main/dashboard/widgets/pie_chart_widget.js | 6 +--
.../main/dashboard/widgets/supervisor_live.js | 2 +-
ambari-web/app/views/main/host/menu.js | 4 +-
15 files changed, 55 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index 8e2e562..4b5f41c 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -50,6 +50,9 @@ App.healthIconClassRed = 'icon-warning-sign'; // bootstrap icon class for master
App.healthIconClassOrange = 'icon-minus-sign'; // bootstrap icon class for slave down/decommissioned host/host-component
App.healthIconClassYellow = 'icon-question-sign'; // bootstrap icon class for heartbeat lost service/host/host-component
App.isManagedMySQLForHiveEnabled = false;
+App.healthStatusRed = '#ff0000';
+App.healthStatusGreen = '#5AB400';
+App.healthStatusOrange = '#FF8E00';
// experimental features are automatically enabled if running on brunch server
App.enableExperimental = false;
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 783846e..0e13ff4 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -291,6 +291,7 @@ footer {
}
.alerts-count {
margin: 1px;
+ background: @health-status-red;
}
.icon-th {
font-size: 1.3em;
@@ -338,7 +339,7 @@ footer {
padding: 0 0 0 3px;
}
.operations-count {
- background: #953B39;
+ background: @health-status-red;
padding: 1px 4px;
float: right;
margin-right: 5px;
@@ -1674,19 +1675,19 @@ a:focus {
#min-height-limit .progress{
margin-left: 40px;
.bar-success {
- background-image: linear-gradient(to bottom, #95b000, #95a800);
+ background-image: linear-gradient(to bottom, @health-status-green, @health-status-green);
background-repeat: repeat-x;
- filter: progid:dximagetransform.microsoft.gradient(startColorstr='#95b000', endColorstr='#95a800', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#5AB400', endColorstr='#5AB400', GradientType=0);
}
.bar-warning {
- background-image: linear-gradient(to bottom, #FF9E00, #FF8E00);
+ background-image: linear-gradient(to bottom,@health-status-orange, @health-status-orange);
background-repeat: repeat-x;
- filter: progid:dximagetransform.microsoft.gradient(startColorstr='#FF9E00', endColorstr='#FF8E00', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#FF8E00', endColorstr='#FF8E00', GradientType=0);
}
.bar-danger {
- background-image: linear-gradient(to bottom, #B81000, #B80000);
+ background-image: linear-gradient(to bottom, @health-status-red, @health-status-red);
background-repeat: repeat-x;
- filter: progid:dximagetransform.microsoft.gradient(startColorstr='#B81000', endColorstr='#B80000', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0000', endColorstr='#ff0000', GradientType=0);
}
}
@@ -2812,7 +2813,7 @@ width:100%;
}
.label.operations-count {
padding: 1px 4px;
- background: #953B39;
+ background: @health-status-red;
float: right;
margin-right: 5px;
margin-top: 3px;
@@ -3358,21 +3359,21 @@ table.graphs {
.is-red{
.widget-content {
- color: #B80000;
+ color: @health-status-red;
padding-top: 70px;
font-weight: bold;
}
}
.is-orange{
.widget-content {
- color: #FF8E00;
+ color: @health-status-orange;
padding-top: 70px;
font-weight: bold;
}
}
.is-green {
.widget-content {
- color: #95A800;
+ color: @health-status-green;
padding-top: 70px;
font-weight: bold;
}
@@ -4047,14 +4048,35 @@ table.graphs {
margin-left: 4px;
}
}
-#hosts, #host-details, #serviceConfig {
+#host-details, #serviceConfig {
.icon-refresh {
color: @restart-indicator-color;
}
- .alerts-count {
+ .alerts-crit-count {
margin-left: 0;
+ background: @health-status-red;
+ }
+ .alerts-warn-count {
+ margin-left: 0;
+ background: @health-status-orange;
}
}
+#hosts{
+ .icon-refresh {
+ color: @restart-indicator-color;
+ }
+ .alerts-crit-count {
+ margin-left: 0;
+ background: @health-status-red;
+ cursor: pointer;
+ }
+ .alerts-warn-count {
+ margin-left: 0;
+ background: @health-status-orange;
+ cursor: pointer;
+ }
+}
+
.background-operations {
.progress {
margin-bottom: 5px;
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/styles/common.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/common.less b/ambari-web/app/styles/common.less
index 1fb82e0..8af64d4 100644
--- a/ambari-web/app/styles/common.less
+++ b/ambari-web/app/styles/common.less
@@ -19,7 +19,7 @@
/************************************************************************
* Health status(service/host/host component health)icon colors
***********************************************************************/
-@health-status-red: red;
+@health-status-red: #ff0000;
@health-status-green: #5AB400;
@health-status-yellow: #FFD13D;
@health-status-orange: #FF8E00;
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/templates/main/host.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host.hbs b/ambari-web/app/templates/main/host.hbs
index db18f0c..c76ab34 100644
--- a/ambari-web/app/templates/main/host.hbs
+++ b/ambari-web/app/templates/main/host.hbs
@@ -107,9 +107,9 @@
</span>
{{#if host.criticalWarningAlertsCount}}
{{#if host.alertsSummary.CRITICAL}}
- <span class="label alerts-count label-important" {{action "goToHostAlerts" host target="controller"}}>{{host.criticalWarningAlertsCount}}</span>
+ <span class="label alerts-crit-count" {{action "goToHostAlerts" host target="controller"}}>{{host.criticalWarningAlertsCount}}</span>
{{else}}
- <span class="label alerts-count label-warning" {{action "goToHostAlerts" host target="controller"}}>{{host.criticalWarningAlertsCount}}</span>
+ <span class="label alerts-warn-count" {{action "goToHostAlerts" host target="controller"}}>{{host.criticalWarningAlertsCount}}</span>
{{/if}}
{{/if}}
</td>
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/templates/main/menu_item.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/menu_item.hbs b/ambari-web/app/templates/main/menu_item.hbs
index 22c900f..a135f9e 100644
--- a/ambari-web/app/templates/main/menu_item.hbs
+++ b/ambari-web/app/templates/main/menu_item.hbs
@@ -20,7 +20,7 @@
<a href="#" {{action goToSection view.content.routing target="view"}}>
{{{unbound view.content.label}}}
{{#if view.hasAlertsLabel}}
- <span class="label label-important alerts-count">
+ <span class="label alerts-count">
{{view.alertsCount}}
</span>
{{/if}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/views/main/dashboard/widget.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widget.js b/ambari-web/app/views/main/dashboard/widget.js
index d13324c..be027c2 100644
--- a/ambari-web/app/views/main/dashboard/widget.js
+++ b/ambari-web/app/views/main/dashboard/widget.js
@@ -268,7 +268,7 @@ App.DashboardWidgetView = Em.View.extend({
didInsertElement: function () {
var browserVersion = self.getInternetExplorerVersion();
var handlers = [configObj.get('thresh1'), configObj.get('thresh2')];
- var colors = ['#95A800', '#FF8E00', '#B80000']; //color green, orange ,red
+ var colors = [App.healthStatusGreen, App.healthStatusOrange, App.healthStatusRed]; //color green, orange ,red
if (browserVersion == -1 || browserVersion > 9) {
configObj.set('isIE9', false);
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/views/main/dashboard/widgets/datanode_live.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/datanode_live.js b/ambari-web/app/views/main/dashboard/widgets/datanode_live.js
index 7b9110f..4521558 100644
--- a/ambari-web/app/views/main/dashboard/widgets/datanode_live.js
+++ b/ambari-web/app/views/main/dashboard/widgets/datanode_live.js
@@ -140,7 +140,7 @@ App.DataNodeUpView = App.TextDashboardWidgetView.extend({
didInsertElement: function () {
var handlers = [configObj.get('thresh1'), configObj.get('thresh2')];
- var colors = ['#B80000', '#FF8E00', '#95A800']; //color red, orange, green
+ var colors = [App.healthStatusRed, App.healthStatusOrange, App.healthStatusGreen]; //color red, orange, green
if (browserVerion == -1 || browserVerion > 9) {
configObj.set('isIE9', false);
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/views/main/dashboard/widgets/flume_agent_live.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/flume_agent_live.js b/ambari-web/app/views/main/dashboard/widgets/flume_agent_live.js
index 3e9b57d..33024aa 100644
--- a/ambari-web/app/views/main/dashboard/widgets/flume_agent_live.js
+++ b/ambari-web/app/views/main/dashboard/widgets/flume_agent_live.js
@@ -145,7 +145,7 @@ App.FlumeAgentUpView = App.TextDashboardWidgetView.extend({
didInsertElement: function () {
var handlers = [configObj.get('thresh1'), configObj.get('thresh2')];
- var colors = ['#B80000', '#FF8E00', '#95A800']; //color red, orange, green
+ var colors = [App.healthStatusRed, App.healthStatusOrange, App.healthStatusGreen]; //color red, orange, green
if (browserVerion == -1 || browserVerion > 9) {
configObj.set('isIE9', false);
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/views/main/dashboard/widgets/hbase_average_load.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/hbase_average_load.js b/ambari-web/app/views/main/dashboard/widgets/hbase_average_load.js
index 0065333..f58e0bf 100644
--- a/ambari-web/app/views/main/dashboard/widgets/hbase_average_load.js
+++ b/ambari-web/app/views/main/dashboard/widgets/hbase_average_load.js
@@ -135,7 +135,7 @@ App.HBaseAverageLoadView = App.TextDashboardWidgetView.extend({
},
didInsertElement: function () {
- var colors = ['#95A800', '#FF8E00', '#B80000']; //color green, orange ,red
+ var colors = [App.healthStatusGreen, App.healthStatusOrange, App.healthStatusRed]; //color green, orange ,red
var handlers = [33, 66]; //fixed value
if (browserVerion == -1 || browserVerion > 9) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/views/main/dashboard/widgets/hbase_regions_in_transition.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/hbase_regions_in_transition.js b/ambari-web/app/views/main/dashboard/widgets/hbase_regions_in_transition.js
index 734a729..debbb1d 100644
--- a/ambari-web/app/views/main/dashboard/widgets/hbase_regions_in_transition.js
+++ b/ambari-web/app/views/main/dashboard/widgets/hbase_regions_in_transition.js
@@ -131,7 +131,7 @@ App.HBaseRegionsInTransitionView = App.TextDashboardWidgetView.extend({
},
didInsertElement: function () {
- var colors = ['#95A800', '#FF8E00', '#B80000']; //color green, orange ,red
+ var colors = [App.healthStatusGreen, App.healthStatusOrange, App.healthStatusRed]; //color green, orange ,red
var handlers = [33, 66]; //fixed value
if (browserVerion == -1 || browserVerion > 9) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js b/ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js
index 59c9c6a..798e828 100644
--- a/ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js
+++ b/ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js
@@ -138,7 +138,7 @@ App.NameNodeRpcView = App.TextDashboardWidgetView.extend({
},
didInsertElement: function () {
- var colors = ['#95A800', '#FF8E00', '#B80000']; //color green, orange ,red
+ var colors = [App.healthStatusGreen, App.healthStatusOrange, App.healthStatusRed]; //color green, orange ,red
var handlers = [33, 66]; //fixed value
if (browserVerion == -1 || browserVerion > 9) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js b/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js
index a7d0e42..fff5ecf 100644
--- a/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js
+++ b/ambari-web/app/views/main/dashboard/widgets/node_managers_live.js
@@ -145,7 +145,7 @@ App.NodeManagersLiveView = App.TextDashboardWidgetView.extend({
didInsertElement: function () {
var self = this;
var handlers = [configObj.get('thresh1'), configObj.get('thresh2')];
- var colors = ['#B80000', '#FF8E00', '#95A800']; //color red, orange, green
+ var colors = [App.healthStatusRed, App.healthStatusOrange, App.healthStatusGreen]; //color red, orange, green
if (browserVerion == -1 || browserVerion > 9) {
configObj.set('isIE9', false);
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js b/ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js
index 4b5f338..83fc0f5 100644
--- a/ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js
+++ b/ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js
@@ -113,9 +113,9 @@ App.PieChartDashboardWidgetView = App.DashboardWidgetView.extend({
var used = parseFloat(this.get('parentView.dataForPieChart')[1]);
var thresh1 = parseFloat(this.get('thresh1'));
var thresh2 = parseFloat(this.get('thresh2'));
- var color_green = '#95A800';
- var color_red = '#B80000';
- var color_orange = '#FF8E00';
+ var color_green = App.healthStatusGreen;
+ var color_red = App.healthStatusRed;
+ var color_orange = App.healthStatusOrange;
if (used <= thresh1) {
this.set('palette', new Rickshaw.Color.Palette({
scheme: [ '#FFFFFF', color_green ].reverse()
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js b/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
index 7b3180f..79a0cb0 100644
--- a/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
+++ b/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
@@ -144,7 +144,7 @@ App.SuperVisorUpView = App.TextDashboardWidgetView.extend({
didInsertElement: function () {
var handlers = [configObj.get('thresh1'), configObj.get('thresh2')];
- var colors = ['#B80000', '#FF8E00', '#95A800']; //color red, orange, green
+ var colors = [App.healthStatusRed, App.healthStatusOrange, App.healthStatusGreen]; //color red, orange, green
if (browserVerion == -1 || browserVerion > 9) {
configObj.set('isIE9', false);
http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe4ac5c/ambari-web/app/views/main/host/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/menu.js b/ambari-web/app/views/main/host/menu.js
index 399e227..d1c26d7 100644
--- a/ambari-web/app/views/main/host/menu.js
+++ b/ambari-web/app/views/main/host/menu.js
@@ -65,9 +65,9 @@ App.MainHostMenuView = Em.CollectionView.extend({
var badgeText = "" + criticalWarningCount;
var badgeClasses = "label";
if (criticalCount > 0) {
- badgeClasses += " label-important";
+ badgeClasses += " alerts-crit-count";
} else if (warningCount > 0) {
- badgeClasses += " label-warning";
+ badgeClasses += " alerts-warn-count";
}
var alertOption = this.get('content').findProperty('name', 'alerts');
alertOption.set('badgeText', badgeText);