Repository: ambari Updated Branches: refs/heads/branch-2.4 a3bbb50fb -> 6bda7d16d
AMBARI-17777 Unexpected behavior on Select Version page (zhewang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6bda7d16 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6bda7d16 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6bda7d16 Branch: refs/heads/branch-2.4 Commit: 6bda7d16d834608d0c955e1929c01d142a6f7e65 Parents: a3bbb50 Author: Zhe (Joe) Wang <[email protected]> Authored: Tue Jul 19 13:01:10 2016 -0700 Committer: Zhe (Joe) Wang <[email protected]> Committed: Tue Jul 19 13:02:25 2016 -0700 ---------------------------------------------------------------------- ambari-web/app/controllers/installer.js | 4 +++- ambari-web/app/models/operating_system.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/6bda7d16/ambari-web/app/controllers/installer.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js index 037e555..3253de2 100644 --- a/ambari-web/app/controllers/installer.js +++ b/ambari-web/app/controllers/installer.js @@ -818,7 +818,9 @@ App.InstallerController = App.WizardController.extend({ var stackVersion = nameVersionCombo.split('-')[1]; var dfd = $.Deferred(); if (selectedStack && selectedStack.get('operatingSystems')) { - this.set('validationCnt', selectedStack.get('repositories').filterProperty('isSelected').filterProperty('isEmpty', false).length); + this.set('validationCnt', selectedStack.get('operatingSystems').filterProperty('isSelected').filterProperty('isEmpty', false).map(function (os) { + return os.get('repositories.length'); + }).reduce(Em.sum, 0)); var verifyBaseUrl = !wizardStep1Controller.get('skipValidationChecked') && !wizardStep1Controller.get('selectedStack.useRedhatSatellite'); selectedStack.get('operatingSystems').forEach(function (os) { if (os.get('isSelected') && !os.get('isEmpty')) { http://git-wip-us.apache.org/repos/asf/ambari/blob/6bda7d16/ambari-web/app/models/operating_system.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/operating_system.js b/ambari-web/app/models/operating_system.js index c2588fe..b137108 100644 --- a/ambari-web/app/models/operating_system.js +++ b/ambari-web/app/models/operating_system.js @@ -29,7 +29,7 @@ App.OperatingSystem = DS.Model.extend({ isSelected: DS.attr('boolean', {defaultValue: true}), isDeselected: Em.computed.not('isSelected'), - isEmpty: Em.computed.someBy('repositories', 'isEmpty', true) + isEmpty: Em.computed.everyBy('repositories', 'isEmpty', true) });
