Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 316F9200B66 for ; Thu, 18 Aug 2016 18:21:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2E82E160AB7; Thu, 18 Aug 2016 16:21:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5DB82160A86 for ; Thu, 18 Aug 2016 18:21:49 +0200 (CEST) Received: (qmail 14300 invoked by uid 500); 18 Aug 2016 16:21:48 -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 14291 invoked by uid 99); 18 Aug 2016 16:21:48 -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; Thu, 18 Aug 2016 16:21:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6E5FEE0556; Thu, 18 Aug 2016 16:21:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: akovalenko@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-18200. Add Service button is not disabled if all services are installed (akovalenko) Date: Thu, 18 Aug 2016 16:21:48 +0000 (UTC) archived-at: Thu, 18 Aug 2016 16:21:50 -0000 Repository: ambari Updated Branches: refs/heads/trunk 2bc8690a3 -> d3bac1d45 AMBARI-18200. Add Service button is not disabled if all services are installed (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d3bac1d4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d3bac1d4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d3bac1d4 Branch: refs/heads/trunk Commit: d3bac1d45e9bf57d562b447d1d4540ac867ad602 Parents: 2bc8690 Author: Aleksandr Kovalenko Authored: Thu Aug 18 19:02:31 2016 +0300 Committer: Aleksandr Kovalenko Committed: Thu Aug 18 19:02:31 2016 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/main/service.js | 8 +++++-- ambari-web/app/styles/application.less | 4 ---- .../main/service/all_services_actions.hbs | 2 +- .../test/controllers/main/service_test.js | 24 ++++++++++++++++---- 4 files changed, 27 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac1d4/ambari-web/app/controllers/main/service.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service.js b/ambari-web/app/controllers/main/service.js index 7fe5b68..d6fbfbb 100644 --- a/ambari-web/app/controllers/main/service.js +++ b/ambari-web/app/controllers/main/service.js @@ -51,8 +51,12 @@ App.MainServiceController = Em.ArrayController.extend({ */ isAllServicesInstalled: function () { if (!this.get('content')) return false; - var availableServices = App.StackService.find().mapProperty('serviceName'); - return this.get('content').length == availableServices.length; + var notAvailableServices = App.ServiceSimple.find().filterProperty('doNotShowAndInstall').mapProperty('name'); + var availableServices = App.ServiceSimple.find().filterProperty('doNotShowAndInstall', false); + var installedServices = this.get('content').filter(function (service) { + return !notAvailableServices.contains(service.get('serviceName')); + }); + return installedServices.length == availableServices.length; }.property('content.@each', 'content.length'), /** http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac1d4/ambari-web/app/styles/application.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 2449443..3a41cd2 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -2459,10 +2459,6 @@ a:focus { } - .add-service-button { - margin: 20px 20px 10px; - } - .start-stop-all-service-button { margin: 5px 5px 10px 10px; text-align: center; http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac1d4/ambari-web/app/templates/main/service/all_services_actions.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/all_services_actions.hbs b/ambari-web/app/templates/main/service/all_services_actions.hbs index edcd29c..081d3eb 100644 --- a/ambari-web/app/templates/main/service/all_services_actions.hbs +++ b/ambari-web/app/templates/main/service/all_services_actions.hbs @@ -24,7 +24,7 @@