ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhew...@apache.org
Subject ambari git commit: AMBARI-15720 AGGREGATE Alerts Should Not Expose Repeat Tolerance or Tolerance Enabled Settings (zhewang)
Date Wed, 06 Apr 2016 18:05:57 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 3e57dc24c -> 1d93c53b8


AMBARI-15720 AGGREGATE Alerts Should Not Expose Repeat Tolerance or Tolerance Enabled Settings
(zhewang)


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

Branch: refs/heads/trunk
Commit: 1d93c53b81e56d107d075c97b2399788015f7c4e
Parents: 3e57dc2
Author: Zhe (Joe) Wang <zhewang@apache.org>
Authored: Wed Apr 6 11:05:18 2016 -0700
Committer: Zhe (Joe) Wang <zhewang@apache.org>
Committed: Wed Apr 6 11:05:18 2016 -0700

----------------------------------------------------------------------
 .../app/models/alerts/alert_definition.js       |  2 +
 .../main/alerts/definition_details.hbs          | 76 ++++++++++----------
 2 files changed, 41 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1d93c53b/ambari-web/app/models/alerts/alert_definition.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/alerts/alert_definition.js b/ambari-web/app/models/alerts/alert_definition.js
index bdc8431..5cdec61 100644
--- a/ambari-web/app/models/alerts/alert_definition.js
+++ b/ambari-web/app/models/alerts/alert_definition.js
@@ -167,6 +167,8 @@ App.AlertDefinition = DS.Model.extend({
 
   typeIconClass: Em.computed.getByKey('typeIcons', 'type'),
 
+  isTypeAggregate: Em.computed.equal('type', 'AGGREGATE'),
+
   /**
    * if this definition is in state: CRITICAL / WARNING, if true, will show up in alerts
fast access popup
    * instances with maintenance mode ON are ignored

http://git-wip-us.apache.org/repos/asf/ambari/blob/1d93c53b/ambari-web/app/templates/main/alerts/definition_details.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/alerts/definition_details.hbs b/ambari-web/app/templates/main/alerts/definition_details.hbs
index 95a8a08..fab41c7 100644
--- a/ambari-web/app/templates/main/alerts/definition_details.hbs
+++ b/ambari-web/app/templates/main/alerts/definition_details.hbs
@@ -158,47 +158,49 @@
           <div class="span6 property-name">{{t alerts.table.header.lastTrigger}}:</div>
           <div class="span6">{{controller.content.lastTriggeredFormatted}}</div>
         </div>
-        <div class="row-fluid">
-          <div class="span6 property-name">{{t alerts.table.header.repeatToleranceEnabled}}:</div>
-          <div class="span6">
-            {{#if controller.content.repeat_tolerance_enabled}}
-              {{#isAuthorized "SERVICE.TOGGLE_ALERTS"}}
-                <a href="#" {{action toggleRepeatTolerance target="controller"}} {{bindAttr
class="controller.content.repeat_tolerance_enabled:alert-definition-enable:alert-definition-disable"}}>
-                  <span class="repeat-tolerance-button" {{translateAttr data-original-title="alerts.table.repeatTolerance.enabled.tooltip"}}>
-                    {{view.enabledDisplay}}
-                  </span>
-                </a>
-              {{else}}
-                {{view.enabledDisplay}}
-              {{/isAuthorized}}
-            {{else}}
-              {{#isAuthorized "SERVICE.TOGGLE_ALERTS"}}
-                <a href="#" {{action toggleRepeatTolerance target="controller"}} {{bindAttr
class="controller.content.repeat_tolerance_enabled:alert-definition-enable:alert-definition-disable"}}>
-                  <span class="repeat-tolerance-button" {{translateAttr data-original-title="alerts.table.repeatTolerance.disabled.tooltip"}}>
-                    {{view.disabledDisplay}}
-                  </span>
-                </a>
-              {{else}}
-                {{view.disabledDisplay}}
-              {{/isAuthorized}}
-            {{/if}}
-          </div>
-        </div>
-        {{#if controller.content.repeat_tolerance_enabled}}
+        {{#unless controller.content.isTypeAggregate}}
           <div class="row-fluid">
-            <div class="span6 property-name">{{t alerts.table.header.repeatTolerance}}:</div>
+            <div class="span6 property-name">{{t alerts.table.header.repeatToleranceEnabled}}:</div>
             <div class="span6">
-              <span>
-                {{controller.content.repeat_tolerance}}
-              </span>
-              {{#isAuthorized "SERVICE.TOGGLE_ALERTS"}}
-                <a {{action editRepeatTolerance target="controller"}} class="edit-description-button">
-                  <i class="icon-pencil"></i>
-                </a>
-              {{/isAuthorized}}
+              {{#if controller.content.repeat_tolerance_enabled}}
+                {{#isAuthorized "SERVICE.TOGGLE_ALERTS"}}
+                  <a href="#" {{action toggleRepeatTolerance target="controller"}} {{bindAttr
class="controller.content.repeat_tolerance_enabled:alert-definition-enable:alert-definition-disable"}}>
+                    <span class="repeat-tolerance-button" {{translateAttr data-original-title="alerts.table.repeatTolerance.enabled.tooltip"}}>
+                      {{view.enabledDisplay}}
+                    </span>
+                  </a>
+                {{else}}
+                  {{view.enabledDisplay}}
+                {{/isAuthorized}}
+              {{else}}
+                {{#isAuthorized "SERVICE.TOGGLE_ALERTS"}}
+                  <a href="#" {{action toggleRepeatTolerance target="controller"}} {{bindAttr
class="controller.content.repeat_tolerance_enabled:alert-definition-enable:alert-definition-disable"}}>
+                    <span class="repeat-tolerance-button" {{translateAttr data-original-title="alerts.table.repeatTolerance.disabled.tooltip"}}>
+                      {{view.disabledDisplay}}
+                    </span>
+                  </a>
+                {{else}}
+                  {{view.disabledDisplay}}
+                {{/isAuthorized}}
+              {{/if}}
             </div>
           </div>
-        {{/if}}
+          {{#if controller.content.repeat_tolerance_enabled}}
+            <div class="row-fluid">
+              <div class="span6 property-name">{{t alerts.table.header.repeatTolerance}}:</div>
+              <div class="span6">
+                <span>
+                  {{controller.content.repeat_tolerance}}
+                </span>
+                {{#isAuthorized "SERVICE.TOGGLE_ALERTS"}}
+                  <a {{action editRepeatTolerance target="controller"}} class="edit-description-button">
+                    <i class="icon-pencil"></i>
+                  </a>
+                {{/isAuthorized}}
+              </div>
+            </div>
+          {{/if}}
+        {{/unless}}
       </div>
     </div>
   </div>


Mime
View raw message