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 2656320049D for ; Wed, 9 Aug 2017 17:55:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 25112169736; Wed, 9 Aug 2017 15:55:21 +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 C84C2169711 for ; Wed, 9 Aug 2017 17:55:19 +0200 (CEST) Received: (qmail 49016 invoked by uid 500); 9 Aug 2017 15:55:16 -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 48885 invoked by uid 99); 9 Aug 2017 15:55:16 -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; Wed, 09 Aug 2017 15:55:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8FE67F5569; Wed, 9 Aug 2017 15:55:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jluniya@apache.org To: commits@ambari.apache.org Date: Wed, 09 Aug 2017 15:55:44 -0000 Message-Id: In-Reply-To: <1bd593aa6951467e925c8996f5b2760e@git.apache.org> References: <1bd593aa6951467e925c8996f5b2760e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [31/52] [abbrv] ambari git commit: AMBARI-21660 Stack selection page does not load the HDP stacks. (ababiichuk) archived-at: Wed, 09 Aug 2017 15:55:21 -0000 AMBARI-21660 Stack selection page does not load the HDP stacks. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4cd96576 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4cd96576 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4cd96576 Branch: refs/heads/branch-feature-AMBARI-14714 Commit: 4cd96576ed5cab53a271b4892d548002c33fb2e7 Parents: 2d1ac66 Author: ababiichuk Authored: Fri Aug 4 15:05:39 2017 +0300 Committer: ababiichuk Committed: Fri Aug 4 15:05:39 2017 +0300 ---------------------------------------------------------------------- .../app/controllers/wizard/step1_controller.js | 2 + ambari-web/app/routes/installer.js | 4 +- ambari-web/app/templates/wizard/step1.hbs | 326 ++++++++++--------- ambari-web/app/views/wizard/step1_view.js | 2 +- .../test/controllers/wizard/step1_test.js | 2 + ambari-web/test/views/wizard/step1_view_test.js | 2 +- 6 files changed, 182 insertions(+), 156 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/4cd96576/ambari-web/app/controllers/wizard/step1_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step1_controller.js b/ambari-web/app/controllers/wizard/step1_controller.js index 22456af..c137d96 100644 --- a/ambari-web/app/controllers/wizard/step1_controller.js +++ b/ambari-web/app/controllers/wizard/step1_controller.js @@ -136,6 +136,8 @@ App.WizardStep1Controller = Em.Controller.extend({ */ selectedStackType: Em.computed.findBy('availableStackTypes', 'isSelected', true), + isLoadingComplete: Em.computed.equal('wizardController.loadStacksRequestsCounter', 0), + /** * Load selected file to current page content */ http://git-wip-us.apache.org/repos/asf/ambari/blob/4cd96576/ambari-web/app/routes/installer.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js index eae03a7..ec8f1b9 100644 --- a/ambari-web/app/routes/installer.js +++ b/ambari-web/app/routes/installer.js @@ -149,9 +149,11 @@ module.exports = Em.Route.extend(App.RouterRedirections, { connectOutlets: function (router) { console.time('step1 connectOutlets'); var self = this; - var controller = router.get('installerController'); + var controller = router.get('installerController'), + wizardStep1Controller = router.get('wizardStep1Controller'); controller.setCurrentStep('1'); controller.loadAllPriorSteps().done(function () { + wizardStep1Controller.set('wizardController', controller); controller.connectOutlet('wizardStep1', controller.get('content')); self.scrollTop(); console.timeEnd('step1 connectOutlets'); http://git-wip-us.apache.org/repos/asf/ambari/blob/4cd96576/ambari-web/app/templates/wizard/step1.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/wizard/step1.hbs b/ambari-web/app/templates/wizard/step1.hbs index 5faf056..6b15e65 100644 --- a/ambari-web/app/templates/wizard/step1.hbs +++ b/ambari-web/app/templates/wizard/step1.hbs @@ -21,121 +21,136 @@
- {{! left tabs }} -
- -
-
-
-
- - -
-
- {{#unless servicesForSelectedStack}} - - {{/unless}} - - + {{#if isLoadingComplete}} + {{! left tabs }} +
+ +
+
+
+
+ + +
+
+ {{#unless servicesForSelectedStack}} + + {{/unless}} +
+ {{#each service in servicesForSelectedStack}} {{/each}} - -
{{service.displayName}} {{service.latestVersion}}
+ + +
-
- {{! left tabs end }} + {{! left tabs end }} - {{#if App.router.nextBtnClickInProgress}} - {{view App.SpinnerView}} - {{else}} -
+ {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView}} + {{else}} + -
-
-

{{t common.repositories}}

-
-

{{t installer.step1.repo.body}}

-
-
- {{! Public Repository radio }} -
- {{view view.usePublicRepoRadioButton classNames="display-inline-block" labelIdentifier="use-public-repo"}} - {{#if stackRepoUpdateLinkExists}} - {{#if networkIssuesExist}} - {{t installer.step1.selectUseRepoOptions.public.networkLost}} - {{/if}} - {{/if}} +
+
+

{{t common.repositories}}

- {{!--Local repo radio--}} - {{view view.useLocalRepoRadioButton classNames="radio big-radio col-sm-4" labelIdentifier="use-local-repo"}} -
- - {{#if view.showWarning}} -
{{t installer.step1.attentionNeeded}}
- {{/if}} +

{{t installer.step1.repo.body}}

+
+
+ {{! Public Repository radio }} +
+ {{view view.usePublicRepoRadioButton classNames="display-inline-block" labelIdentifier="use-public-repo"}} + {{#if stackRepoUpdateLinkExists}} + {{#if networkIssuesExist}} + {{t installer.step1.selectUseRepoOptions.public.networkLost}} + {{/if}} + {{/if}} +
+ {{!--Local repo radio--}} + {{view view.useLocalRepoRadioButton classNames="radio big-radio col-sm-4" labelIdentifier="use-local-repo"}} +
+ + {{#if view.showWarning}} +
{{t installer.step1.attentionNeeded}}
+ {{/if}} - {{! OSes and Repositories }} -
-
-
- {{! Add OS }} -
- - + {{! OSes and Repositories }} +
+
+
+ {{! Add OS }} +
+ + +
+ {{! Add OS END}} +
- {{! Add OS END}}
-
-
- - - - - - - - - - - {{#each operatingSystem in selectedStack.operatingSystems}} - {{#if operatingSystem.isSelected}} - - - + - - {{/if}} - {{/each}} - -
{{t common.os}}{{t common.name}}{{t installer.step1.advancedRepo.localRepo.column.baseUrl}}
{{operatingSystem.osType}} - - +
+ + + + + + + + + + {{#each operatingSystem in selectedStack.operatingSystems}} + {{#if operatingSystem.isSelected}} + + + - +
{{t common.os}}{{t common.name}}{{t installer.step1.advancedRepo.localRepo.column.baseUrl}}
{{operatingSystem.osType}} + + {{#each repository in operatingSystem.repositories}} @@ -161,63 +176,68 @@ - {{/each}} - -
{{repository.repoId}}
-
- - + {{/each}} +
+
+ + {{t common.remove}} - -
- {{! OSes and Repositories END }} + + + + {{/if}} + {{/each}} + + + {{! OSes and Repositories END }} - {{! Skip Repository Base URL validation }} -
- {{#view App.CheckboxView - labelTranslate="installer.step1.advancedRepo.skipValidation.message" - labelClassNamesBinding="controller.selectedStack.useRedhatSatellite:disabled" - checkedBinding="skipValidationChecked" - disabledBinding="controller.selectedStack.useRedhatSatellite" - labelIdentifier="skip-validation" - }} - - - {{/view}} -
-
- {{! Skip Repository Base URL validation END }} + {{! Skip Repository Base URL validation }} +
+ {{#view App.CheckboxView + labelTranslate="installer.step1.advancedRepo.skipValidation.message" + labelClassNamesBinding="controller.selectedStack.useRedhatSatellite:disabled" + checkedBinding="skipValidationChecked" + disabledBinding="controller.selectedStack.useRedhatSatellite" + labelIdentifier="skip-validation" + }} + + + {{/view}} +
+
+ {{! Skip Repository Base URL validation END }} - {{! Use RedHat Satellite/Spacewalk }} -
- {{#view view.redhatCheckBoxView - classNames="use-redhat-checkbox" - }} - - - - {{/view}} + {{! Use RedHat Satellite/Spacewalk }} +
+ {{#view view.redhatCheckBoxView + classNames="use-redhat-checkbox" + }} + + + + {{/view}} +
+ {{! Use RedHat Satellite/Spacewalk END }} +
- {{! Use RedHat Satellite/Spacewalk END }} + + {{/if}} + {{#if view.invalidUrlExist}} +
+ {{t installer.step1.invalidURLAttention}} + {{t installer.step1.retryRepoUrls}}
-
- - {{/if}} - {{#if view.invalidUrlExist}} -
- {{t installer.step1.invalidURLAttention}} - {{t installer.step1.retryRepoUrls}} -
+ {{/if}} + {{else}} + {{view App.SpinnerView}} {{/if}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4cd96576/ambari-web/app/views/wizard/step1_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step1_view.js b/ambari-web/app/views/wizard/step1_view.js index 9ab4fde..a12c0c7 100644 --- a/ambari-web/app/views/wizard/step1_view.js +++ b/ambari-web/app/views/wizard/step1_view.js @@ -80,7 +80,7 @@ App.WizardStep1View = Em.View.extend({ * * @type {bool} */ - isSubmitDisabled: Em.computed.or('invalidFormatUrlExist', 'isNoOsChecked', 'isNoOsFilled', 'controller.content.isCheckInProgress', 'App.router.btnClickInProgress'), + isSubmitDisabled: Em.computed.or('invalidFormatUrlExist', 'isNoOsChecked', 'isNoOsFilled', 'controller.content.isCheckInProgress', 'App.router.btnClickInProgress', '!controller.isLoadingComplete'), /** * Show warning message flag http://git-wip-us.apache.org/repos/asf/ambari/blob/4cd96576/ambari-web/test/controllers/wizard/step1_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/wizard/step1_test.js b/ambari-web/test/controllers/wizard/step1_test.js index 296fe50..88cb231 100644 --- a/ambari-web/test/controllers/wizard/step1_test.js +++ b/ambari-web/test/controllers/wizard/step1_test.js @@ -76,6 +76,8 @@ describe('App.WizardStep1Controller', function () { App.TestAliases.testAsComputedEveryBy(getController(), 'networkIssuesExist', 'content.stacks', 'stackDefault', true); + App.TestAliases.testAsComputedEqual(getController(), 'isLoadingComplete', 'wizardController.loadStacksRequestsCounter', 0); + describe('#usePublicRepo', function () { beforeEach(function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/4cd96576/ambari-web/test/views/wizard/step1_view_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/wizard/step1_view_test.js b/ambari-web/test/views/wizard/step1_view_test.js index edf8e0c..12ce412 100644 --- a/ambari-web/test/views/wizard/step1_view_test.js +++ b/ambari-web/test/views/wizard/step1_view_test.js @@ -35,7 +35,7 @@ describe('App.WizardStep1View', function () { App.TestAliases.testAsComputedEveryBy(getView(), 'isNoOsChecked', 'controller.selectedStack.operatingSystems', 'isSelected', false); - App.TestAliases.testAsComputedOr(getView(), 'isSubmitDisabled', ['invalidFormatUrlExist', 'isNoOsChecked', 'isNoOsFilled', 'controller.content.isCheckInProgress', 'App.router.btnClickInProgress']); + App.TestAliases.testAsComputedOr(getView(), 'isSubmitDisabled', ['invalidFormatUrlExist', 'isNoOsChecked', 'isNoOsFilled', 'controller.content.isCheckInProgress', 'App.router.btnClickInProgress', '!controller.isLoadingComplete']); App.TestAliases.testAsComputedSomeBy(getView(), 'invalidUrlExist', 'allRepositories', 'validation', 'INVALID');