ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-13821. Info about kafka ranger plugin state does not appear after adding kafka. (jaimin)
Date Tue, 10 Nov 2015 21:34:48 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 590a27119 -> 9ef7b802a


AMBARI-13821. Info about kafka ranger plugin state does not appear after adding kafka. (jaimin)


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

Branch: refs/heads/trunk
Commit: 9ef7b802aa28a6f3e45a2f58d3e8d9ed39453621
Parents: 590a271
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Tue Nov 10 13:33:08 2015 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Tue Nov 10 13:34:15 2015 -0800

----------------------------------------------------------------------
 .../controllers/main/service/info/summary.js    | 24 ++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9ef7b802/ambari-web/app/controllers/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js
index d03ba90..36508c1 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -56,6 +56,12 @@ App.MainServiceInfoSummaryController = Em.Controller.extend(App.WidgetSectionMix
       valueForEnable: 'Yes'
     },
     {
+      serviceName: 'YARN',
+      type: 'ranger-yarn-plugin-properties',
+      propertyName: 'ranger-yarn-plugin-enabled',
+      valueForEnable: 'Yes'
+    },
+    {
       serviceName: 'HBASE',
       type: 'ranger-hbase-plugin-properties',
       propertyName: 'ranger-hbase-plugin-enabled',
@@ -80,9 +86,9 @@ App.MainServiceInfoSummaryController = Em.Controller.extend(App.WidgetSectionMix
       valueForEnable: 'Yes'
     },
     {
-      serviceName: 'YARN',
-      type: 'ranger-yarn-plugin-properties',
-      propertyName: 'ranger-yarn-plugin-enabled',
+      serviceName: 'KAFKA',
+      type: 'ranger-kafka-plugin-properties',
+      propertyName: 'ranger-kafka-plugin-enabled',
       valueForEnable: 'Yes'
     },
     {
@@ -106,8 +112,18 @@ App.MainServiceInfoSummaryController = Em.Controller.extend(App.WidgetSectionMix
    */
   setRangerPlugins: function () {
     if (App.get('router.clusterController.isLoaded') && !this.get('isRangerPluginsArraySet'))
{
+      // Display order of ranger plugin for services should be decided from  App.StackService.displayOrder
to keep consistency
+      // with display order of services at other places in the application like `select service's
page` and `service menu bar`
+      var displayOrderLength = App.StackService.displayOrder.length;
+      var rangerPlugins = this.get('rangerPlugins').map(function (item, index) {
+        var displayOrderIndex = App.StackService.displayOrder.indexOf(item.serviceName);
+        return $.extend(item, {
+          index: displayOrderIndex == -1 ? displayOrderLength + index : displayOrderIndex
+        });
+      }).sortProperty('index');
+
       this.setProperties({
-        rangerPlugins: this.get('rangerPlugins').map(function (item) {
+        rangerPlugins: rangerPlugins.map(function (item) {
           var stackService = App.StackService.find().findProperty('serviceName', item.serviceName);
           var displayName = (stackService) ? stackService.get('displayName') : item.serviceName;
           return $.extend(item, {


Mime
View raw message