Repository: ambari
Updated Branches:
  refs/heads/trunk 38880143a -> 47f4e1c49


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/47f4e1c4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/47f4e1c4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/47f4e1c4

Branch: refs/heads/trunk
Commit: 47f4e1c490f569ff93234b17a502331f2d5cae20
Parents: 3888014
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:01:10 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/47f4e1c4/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/47f4e1c4/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)
 });
 
 

Reply via email to