You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2013/11/13 20:55:05 UTC
git commit: AMBARI-3759. Add host wizard: After successfully
bootstrapping host, "next" button is disabled (alexantonenko)
Updated Branches:
refs/heads/trunk 4d910297a -> eef606b1e
AMBARI-3759. Add host wizard: After successfully bootstrapping host, "next" button is disabled (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/eef606b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/eef606b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/eef606b1
Branch: refs/heads/trunk
Commit: eef606b1ea38e58ef4287b2253bc150259fce73d
Parents: 4d91029
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Nov 13 19:54:50 2013 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Nov 13 20:50:24 2013 +0200
----------------------------------------------------------------------
.../app/controllers/wizard/step3_controller.js | 37 +++++++++++---------
1 file changed, 20 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/eef606b1/ambari-web/app/controllers/wizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js
index 3c10bdc..0375cc0 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -589,26 +589,29 @@ App.WizardStep3Controller = Em.Controller.extend({
* Check if the customized os group contains the registered host os type. If not the repo on that host is invalid.
*/
checkHostOSType: function (osType, hostName) {
- var selectedStack = this.get('content.stacks').findProperty('isSelected', true);
- var selectedOS = [];
- var isValid = false;
- if (selectedStack && selectedStack.operatingSystems) {
- selectedStack.get('operatingSystems').filterProperty('selected', true).forEach( function(os) {
- selectedOS.pushObject(os.osType);
- if ( os.osType == osType) {
- isValid = true;
- }
- });
- }
+ if(this.get('content.stacks')){
+ var selectedStack = this.get('content.stacks').findProperty('isSelected', true);
+ var selectedOS = [];
+ var isValid = false;
+ if (selectedStack && selectedStack.operatingSystems) {
+ selectedStack.get('operatingSystems').filterProperty('selected', true).forEach( function(os) {
+ selectedOS.pushObject(os.osType);
+ if ( os.osType == osType) {
+ isValid = true;
+ }
+ });
+ }
- if (!isValid) {
- console.log('WARNING: Getting host os type does NOT match the user selected os group in step1. ' +
- 'Host Name: '+ hostName + '. Host os type:' + osType + '. Selected group:' + selectedOS);
- return Em.I18n.t('installer.step3.hostWarningsPopup.repositories.context').format(hostName, osType, selectedOS);
- } else {
+ if (!isValid) {
+ console.log('WARNING: Getting host os type does NOT match the user selected os group in step1. ' +
+ 'Host Name: '+ hostName + '. Host os type:' + osType + '. Selected group:' + selectedOS);
+ return Em.I18n.t('installer.step3.hostWarningsPopup.repositories.context').format(hostName, osType, selectedOS);
+ } else {
+ return null;
+ }
+ }else{
return null;
}
-
},
selectCategory: function(event, context){