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 BFE97200B4B for ; Thu, 21 Jul 2016 22:26:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BE67D160A73; Thu, 21 Jul 2016 20:26:03 +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 141EC160A72 for ; Thu, 21 Jul 2016 22:26:02 +0200 (CEST) Received: (qmail 9753 invoked by uid 500); 21 Jul 2016 20:26:02 -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 9744 invoked by uid 99); 21 Jul 2016 20:26:02 -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, 21 Jul 2016 20:26:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 105A5E2C1A; Thu, 21 Jul 2016 20:26:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rzang@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-17821 Atlas: Add Service Customize Services Page Issues (rzang) Date: Thu, 21 Jul 2016 20:26:02 +0000 (UTC) archived-at: Thu, 21 Jul 2016 20:26:03 -0000 Repository: ambari Updated Branches: refs/heads/branch-2.4 2d9a27245 -> 76aa496c4 AMBARI-17821 Atlas: Add Service Customize Services Page Issues (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/76aa496c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76aa496c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76aa496c Branch: refs/heads/branch-2.4 Commit: 76aa496c47ea25b8b4ce2641d94dcba32e23ee21 Parents: 2d9a272 Author: Richard Zang Authored: Wed Jul 20 16:35:56 2016 -0700 Committer: Richard Zang Committed: Thu Jul 21 13:06:54 2016 -0700 ---------------------------------------------------------------------- .../common/configs/service_config_container_view.js | 12 ++++++++++-- .../configs/service_config_container_view_test.js | 9 ++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/76aa496c/ambari-web/app/views/common/configs/service_config_container_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/configs/service_config_container_view.js b/ambari-web/app/views/common/configs/service_config_container_view.js index 8b6a9ce..a7cee0c 100644 --- a/ambari-web/app/views/common/configs/service_config_container_view.js +++ b/ambari-web/app/views/common/configs/service_config_container_view.js @@ -96,7 +96,15 @@ App.ServiceConfigContainerView = Em.ContainerView.extend({ } //terminate lazy loading when switch service if (this.get('lazyLoading')) lazyLoading.terminate(this.get('lazyLoading')); - this.pushView(); - }.observes('controller.selectedService') + this.pushViewAfterRecommendation(); + }.observes('controller.selectedService'), + + pushViewAfterRecommendation: function() { + if (this.get('controller.isRecommendedLoaded')) { + this.pushView(); + } else { + Em.run.later(this.pushViewAfterRecommendation.bind(this), 300); + } + } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/76aa496c/ambari-web/test/views/common/configs/service_config_container_view_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/common/configs/service_config_container_view_test.js b/ambari-web/test/views/common/configs/service_config_container_view_test.js index e7aaa62..c5fe88a 100644 --- a/ambari-web/test/views/common/configs/service_config_container_view_test.js +++ b/ambari-web/test/views/common/configs/service_config_container_view_test.js @@ -45,7 +45,8 @@ describe('App.ServiceConfigContainerView', function () { selectedService: { configCategories: [], configs: [] - } + }, + isRecommendedLoaded: true })); expect(view.get('childViews')).to.have.length(1); }); @@ -56,7 +57,8 @@ describe('App.ServiceConfigContainerView', function () { selectedService: { configCategories: [], configs: [] - } + }, + isRecommendedLoaded: true })); expect(view.get('childViews.firstObject.controller.name')).to.equal('controller'); }); @@ -66,7 +68,8 @@ describe('App.ServiceConfigContainerView', function () { selectedService: { configCategories: [Em.Object.create(), Em.Object.create()], configs: [] - } + }, + isRecommendedLoaded: true })); expect(view.get('childViews.firstObject.serviceConfigsByCategoryView.childViews')).to.have.length(2); });