ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rz...@apache.org
Subject ambari git commit: AMBARI-20194 - Enable/Disable UI objects related to managing alert targets based on user's privileges (rzang)
Date Tue, 28 Feb 2017 02:03:28 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f5f9b760b -> 4fff64970


AMBARI-20194 - Enable/Disable UI objects related to managing alert targets based on user's
privileges (rzang)


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

Branch: refs/heads/trunk
Commit: 4fff6497087e8bc137c44c866c790c9f92a4fbc1
Parents: f5f9b76
Author: Richard Zang <rzang@apache.org>
Authored: Mon Feb 27 18:01:57 2017 -0800
Committer: Richard Zang <rzang@apache.org>
Committed: Mon Feb 27 18:01:57 2017 -0800

----------------------------------------------------------------------
 .../alert_definitions_actions_controller.js     | 26 +++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4fff6497/ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js
b/ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js
index a397b7b..f37876f 100644
--- a/ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js
+++ b/ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js
@@ -29,31 +29,33 @@ App.MainAlertDefinitionActionsController = Em.ArrayController.extend({
   content: function() {
     var content = [];
     if (App.supports.createAlerts) {
-      content = [{
+      content.push({
         title: Em.I18n.t('alerts.actions.create'),
         icon: 'glyphicon glyphicon-plus',
         action: 'createNewAlertDefinition',
         showDivider: true
-      }];
+      });
     }
-    content = content.concat([{
+    content.push({
       title: Em.I18n.t('alerts.actions.manageGroups'),
       icon: 'glyphicon glyphicon-th-large',
       action: 'manageAlertGroups',
       showDivider: false
-      },
-      {
+    });
+    if (App.isAuthorized('CLUSTER.MANAGE_ALERT_NOTIFICATIONS')) {
+      content.push({
         title: Em.I18n.t('alerts.actions.manageNotifications'),
         icon: 'glyphicon glyphicon-envelope',
         action: 'manageNotifications',
         showDivider: false
-      },
-      {
-        title: Em.I18n.t('alerts.actions.manageSettings'),
-        icon: 'glyphicon glyphicon-cog',
-        action: 'manageSettings',
-        showDivider: false
-      }]);
+      });
+    }
+    content.push({
+      title: Em.I18n.t('alerts.actions.manageSettings'),
+      icon: 'glyphicon glyphicon-cog',
+      action: 'manageSettings',
+      showDivider: false
+    });
     return content;
   }.property('App.supports.createAlerts'),
 


Mime
View raw message