|
@@ -136,6 +136,7 @@ App.WizardStep3Controller = Em.Controller.extend({
|
|
console.log("TRACE: Loading step3: Confirm Hosts");
|
|
console.log("TRACE: Loading step3: Confirm Hosts");
|
|
this.set('registrationStartedAt', null);
|
|
this.set('registrationStartedAt', null);
|
|
this.set('isLoaded', false);
|
|
this.set('isLoaded', false);
|
|
|
|
+ this.disablePreviousSteps();
|
|
|
|
|
|
this.clearStep();
|
|
this.clearStep();
|
|
this.loadHosts();
|
|
this.loadHosts();
|
|
@@ -158,14 +159,14 @@ App.WizardStep3Controller = Em.Controller.extend({
|
|
hosts.pushObject(hostInfo);
|
|
hosts.pushObject(hostInfo);
|
|
}
|
|
}
|
|
|
|
|
|
- if(hosts.length > 100) {
|
|
|
|
|
|
+ if(hosts.length > 200) {
|
|
lazyloading.run({
|
|
lazyloading.run({
|
|
destination: this.get('hosts'),
|
|
destination: this.get('hosts'),
|
|
source: hosts,
|
|
source: hosts,
|
|
context: this,
|
|
context: this,
|
|
- initSize: 20,
|
|
|
|
- chunkSize: 100,
|
|
|
|
- delay: 300
|
|
|
|
|
|
+ initSize: 100,
|
|
|
|
+ chunkSize: 150,
|
|
|
|
+ delay: 50
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
this.set('hosts', hosts);
|
|
this.set('hosts', hosts);
|
|
@@ -192,14 +193,21 @@ App.WizardStep3Controller = Em.Controller.extend({
|
|
return this.get('bootHosts').length != 0 && this.get('bootHosts').someProperty('bootStatus', 'RUNNING');
|
|
return this.get('bootHosts').length != 0 && this.get('bootHosts').someProperty('bootStatus', 'RUNNING');
|
|
},
|
|
},
|
|
|
|
|
|
- /* Returns the current set of visible hosts on view (All, Succeeded, Failed) */
|
|
|
|
- visibleHosts: function () {
|
|
|
|
- if (this.get('category.hostsBootStatus')) {
|
|
|
|
- return this.hosts.filterProperty('bootStatus', this.get('category.hostsBootStatus'));
|
|
|
|
|
|
+ filterByCategory: function () {
|
|
|
|
+ var category = this.get('category.hostsBootStatus');
|
|
|
|
+ if (category) {
|
|
|
|
+ this.get('hosts').forEach(function (host) {
|
|
|
|
+ host.set('isVisible', (category === host.get('bootStatus')));
|
|
|
|
+ });
|
|
} else { // if (this.get('category') === 'All Hosts')
|
|
} else { // if (this.get('category') === 'All Hosts')
|
|
- return this.hosts;
|
|
|
|
|
|
+ this.get('hosts').setEach('isVisible', true);
|
|
}
|
|
}
|
|
- }.property('category', 'hosts.@each.bootStatus'),
|
|
|
|
|
|
+ }.observes('category', 'hosts.@each.bootStatus'),
|
|
|
|
+
|
|
|
|
+ /* Returns the current set of visible hosts on view (All, Succeeded, Failed) */
|
|
|
|
+ visibleHosts: function () {
|
|
|
|
+ return this.get('hosts').filterProperty('isVisible');
|
|
|
|
+ }.property('hosts.@each.isVisible'),
|
|
|
|
|
|
removeHosts: function (hosts) {
|
|
removeHosts: function (hosts) {
|
|
var self = this;
|
|
var self = this;
|
|
@@ -272,33 +280,29 @@ App.WizardStep3Controller = Em.Controller.extend({
|
|
this.doBootstrap();
|
|
this.doBootstrap();
|
|
},
|
|
},
|
|
|
|
|
|
- installationProcess: function() {
|
|
|
|
- Ember.run.once(this, 'setInstallationInProgress');
|
|
|
|
- }.observes('bootHosts.@each.bootStatus'),
|
|
|
|
|
|
+ isRegistrationInProgress: true,
|
|
|
|
|
|
- isInstallInProgress: true,
|
|
|
|
-
|
|
|
|
- setInstallationInProgress: function() {
|
|
|
|
- var result = false;
|
|
|
|
- this.get('bootHosts').forEach(function(host) {
|
|
|
|
- var status = host.get('bootStatus');
|
|
|
|
- if (status != 'REGISTERED' && status != 'FAILED') {
|
|
|
|
|
|
+ setRegistrationInProgress: function () {
|
|
|
|
+ var bootHosts = this.get('bootHosts');
|
|
|
|
+ //if hosts aren't loaded yet then registration should be in progress
|
|
|
|
+ var result = (bootHosts.length === 0);
|
|
|
|
+ for (var i = 0, l = bootHosts.length; i < l; i++) {
|
|
|
|
+ if (bootHosts[i].get('bootStatus') !== 'REGISTERED' && bootHosts[i].get('bootStatus') !== 'FAILED') {
|
|
result = true;
|
|
result = true;
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
- });
|
|
|
|
- this.set('isInstallInProgress',result);
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
+ this.set('isRegistrationInProgress', result);
|
|
|
|
+ }.observes('bootHosts.@each.bootStatus'),
|
|
|
|
|
|
- disablePreviousSteps: function(){
|
|
|
|
- if(this.get('isInstallInProgress')){
|
|
|
|
- App.router.get('installerController').setLowerStepsDisable(3);
|
|
|
|
|
|
+ disablePreviousSteps: function () {
|
|
|
|
+ App.router.get('installerController.isStepDisabled').filter(function (step) {
|
|
|
|
+ if (step.step >= 0 && step.step <= 2) return true;
|
|
|
|
+ }).setEach('value', this.get('isRegistrationInProgress'));
|
|
|
|
+ if (this.get('isRegistrationInProgress')) {
|
|
this.set('isSubmitDisabled', true);
|
|
this.set('isSubmitDisabled', true);
|
|
- } else {
|
|
|
|
- App.router.get('installerController.isStepDisabled').filter(function(step){
|
|
|
|
- if(step.step >= 0 && step.step <= 2) return true;
|
|
|
|
- }).setEach('value', false);
|
|
|
|
}
|
|
}
|
|
- }.observes('isInstallInProgress','isLoaded'),
|
|
|
|
|
|
+ }.observes('isRegistrationInProgress'),
|
|
|
|
|
|
doBootstrap: function () {
|
|
doBootstrap: function () {
|
|
if (this.get('stopBootstrap')) {
|
|
if (this.get('stopBootstrap')) {
|
|
@@ -735,8 +739,8 @@ App.WizardStep3Controller = Em.Controller.extend({
|
|
}.property('warnings'),
|
|
}.property('warnings'),
|
|
|
|
|
|
isWarningsBoxVisible: function(){
|
|
isWarningsBoxVisible: function(){
|
|
- return (App.testMode) ? true : !this.get('isInstallInProgress');
|
|
|
|
- }.property('isInstallInProgress'),
|
|
|
|
|
|
+ return (App.testMode) ? true : !this.get('isRegistrationInProgress');
|
|
|
|
+ }.property('isRegistrationInProgress'),
|
|
|
|
|
|
checksUpdateProgress:0,
|
|
checksUpdateProgress:0,
|
|
checksUpdateStatus: null,
|
|
checksUpdateStatus: null,
|
|
@@ -1216,7 +1220,7 @@ App.WizardStep3Controller = Em.Controller.extend({
|
|
},
|
|
},
|
|
|
|
|
|
back: function () {
|
|
back: function () {
|
|
- if (this.get('isInstallInProgress')) {
|
|
|
|
|
|
+ if (this.get('isRegistrationInProgress')) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
App.router.send('back');
|
|
App.router.send('back');
|