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:33:38 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 3765894ad -> a64cb365d


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/a64cb365
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a64cb365
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a64cb365

Branch: refs/heads/branch-2.1
Commit: a64cb365d4d0cd13f03205f5bc16d932d3f0b1da
Parents: 3765894
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:33:21 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/a64cb365/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 04c1992..8aaf6e1 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'
     }
   ],
@@ -100,8 +106,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