Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CED0A18EF7 for ; Tue, 10 Nov 2015 21:33:38 +0000 (UTC) Received: (qmail 60755 invoked by uid 500); 10 Nov 2015 21:33:38 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 60725 invoked by uid 500); 10 Nov 2015 21:33:38 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 60716 invoked by uid 99); 10 Nov 2015 21:33:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Nov 2015 21:33:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2A113E0A36; Tue, 10 Nov 2015 21:33:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jaimin@apache.org To: commits@ambari.apache.org Message-Id: <8ada9efb50ed4cf088fc0d1d2f59f5ce@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) 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 Authored: Tue Nov 10 13:33:08 2015 -0800 Committer: Jaimin Jetly 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, {