You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/02/21 15:38:32 UTC
git commit: AMBARI-4781 Suppressed alerts should be shown with a
medpack icon, rather than question mark. (ababiichuk)
Repository: ambari
Updated Branches:
refs/heads/trunk 0f9a5bf53 -> 267f679b6
AMBARI-4781 Suppressed alerts should be shown with a medpack icon, rather than question mark. (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/267f679b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/267f679b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/267f679b
Branch: refs/heads/trunk
Commit: 267f679b6e379e87cb1e0316e2c2ba70d48c4628
Parents: 0f9a5bf
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Fri Feb 21 16:31:06 2014 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Fri Feb 21 16:37:17 2014 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/main/alerts_controller.js | 5 +++--
ambari-web/app/messages.js | 1 +
ambari-web/app/models/alert.js | 10 ++++++++++
.../app/templates/main/service/info/summary_alert.hbs | 6 +++++-
4 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/267f679b/ambari-web/app/controllers/main/alerts_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/alerts_controller.js b/ambari-web/app/controllers/main/alerts_controller.js
index 8f8f632..560e8f4 100644
--- a/ambari-web/app/controllers/main/alerts_controller.js
+++ b/ambari-web/app/controllers/main/alerts_controller.js
@@ -111,7 +111,8 @@ App.MainAlertsController = Em.Controller.extend({
statusNumberMap: {
"OK" : "0",
"WARNING": "1",
- "CRITICAL": "2"
+ "CRITICAL": "2",
+ "PASSIVE": "3"
},
getAlertsSuccessCallback: function (json) {
@@ -122,7 +123,7 @@ App.MainAlertsController = Em.Controller.extend({
title: _alert.description,
serviceType: _alert.service_name,
lastTime: _alert.status_time,
- status: this.get('statusNumberMap')[_alert.status] || "3",
+ status: this.get('statusNumberMap')[_alert.status] || "4",
message: _alert.output,
hostName: _alert.host_name,
lastCheck: _alert.last_status_time
http://git-wip-us.apache.org/repos/asf/ambari/blob/267f679b/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 2dfbeb3..0516037 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -277,6 +277,7 @@ Em.I18n.translations = {
'services.alerts.OK.timePrefix': 'OK for ',
'services.alerts.WARN.timePrefix': 'WARN for ',
'services.alerts.CRIT.timePrefix': 'CRIT for ',
+ 'services.alerts.MAINT.timePrefix': 'MAINT for ',
'services.alerts.UNKNOWN.timePrefix': 'UNKNOWN for ',
'services.alerts.headingOfList': 'Alerts and Health Checks',
'services.alerts.goToService': 'Go to Service',
http://git-wip-us.apache.org/repos/asf/ambari/blob/267f679b/ambari-web/app/models/alert.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/alert.js b/ambari-web/app/models/alert.js
index e5eeec8..c75239a 100644
--- a/ambari-web/app/models/alert.js
+++ b/ambari-web/app/models/alert.js
@@ -57,6 +57,13 @@ App.Alert = Em.Object.extend({
}.property('status'),
/**
+ * Used to show correct icon in UI
+ */
+ isPassive: function() {
+ return this.get('status') == '3';
+ }.property('status'),
+
+ /**
* Used to show only required alerts at the service level
*/
ignoredForServices: function() {
@@ -87,6 +94,9 @@ App.Alert = Em.Object.extend({
prefix = this.t('services.alerts.CRIT.timePrefix');
break;
case "3":
+ prefix = this.t('services.alerts.MAINT.timePrefix');
+ break;
+ case "4":
prefix = this.t('services.alerts.UNKNOWN.timePrefix');
break;
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/267f679b/ambari-web/app/templates/main/service/info/summary_alert.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary_alert.hbs b/ambari-web/app/templates/main/service/info/summary_alert.hbs
index 73a42a4..cfa8171 100644
--- a/ambari-web/app/templates/main/service/info/summary_alert.hbs
+++ b/ambari-web/app/templates/main/service/info/summary_alert.hbs
@@ -28,7 +28,11 @@
{{#if isCritical}}
<i class="icon-remove icon-large"></i>
{{else}}
- <i class="icon-question-sign icon-large"></i>
+ {{#if isPassive}}
+ <i class="icon-medkit icon-large"></i>
+ {{else}}
+ <i class="icon-question-sign icon-large"></i>
+ {{/if}}
{{/if}}
{{/if}}
{{/if}}