|
@@ -23,6 +23,7 @@ App.WizardStep3Controller = Em.Controller.extend({
|
|
hosts: [],
|
|
hosts: [],
|
|
content: [],
|
|
content: [],
|
|
bootHosts: [],
|
|
bootHosts: [],
|
|
|
|
+ registeredHosts: [],
|
|
registrationStartedAt: null,
|
|
registrationStartedAt: null,
|
|
registrationTimeoutSecs: 120,
|
|
registrationTimeoutSecs: 120,
|
|
stopBootstrap: false,
|
|
stopBootstrap: false,
|
|
@@ -455,6 +456,31 @@ App.WizardStep3Controller = Em.Controller.extend({
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ hasMoreRegisteredHosts: false,
|
|
|
|
+
|
|
|
|
+ getAllRegisteredHosts: function() {
|
|
|
|
+ App.ajax.send({
|
|
|
|
+ name: 'wizard.step3.is_hosts_registered',
|
|
|
|
+ sender: this,
|
|
|
|
+ success: 'getAllRegisteredHostsCallback'
|
|
|
|
+ });
|
|
|
|
+ }.observes('bootHosts.@each.name'),
|
|
|
|
+
|
|
|
|
+ getAllRegisteredHostsCallback: function(hosts) {
|
|
|
|
+ var registeredHosts = [];
|
|
|
|
+ var addedHosts = this.get('bootHosts').getEach('name');
|
|
|
|
+ hosts.items.forEach(function(host){
|
|
|
|
+ (addedHosts.contains(host.Hosts.host_name)) ? null : registeredHosts.push(host.Hosts.host_name);
|
|
|
|
+ });
|
|
|
|
+ if(registeredHosts.length) {
|
|
|
|
+ this.set('hasMoreRegisteredHosts',true);
|
|
|
|
+ this.set('registeredHosts',registeredHosts);
|
|
|
|
+ } else {
|
|
|
|
+ this.set('hasMoreRegisteredHosts',false);
|
|
|
|
+ this.set('registeredHosts','');
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
allHostsComplete: function() {
|
|
allHostsComplete: function() {
|
|
var result = true;
|
|
var result = true;
|
|
this.get('bootHosts').forEach(function(host) {
|
|
this.get('bootHosts').forEach(function(host) {
|
|
@@ -1085,6 +1111,24 @@ App.WizardStep3Controller = Em.Controller.extend({
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ registeredHostsPopup: function(){
|
|
|
|
+ var self = this;
|
|
|
|
+ App.ModalPopup.show({
|
|
|
|
+ header: Em.I18n.t('installer.step3.warning.registeredHosts').format(this.get('registeredHosts').length),
|
|
|
|
+ secondary: null,
|
|
|
|
+ bodyClass: Ember.View.extend({
|
|
|
|
+ template: Ember.Handlebars.compile([
|
|
|
|
+ '<p>{{view.message}}</p>',
|
|
|
|
+ '<ul>{{#each host in view.registeredHosts}}',
|
|
|
|
+ '<li>{{host}}</li>',
|
|
|
|
+ '{{/each}}</ul>'
|
|
|
|
+ ].join('')),
|
|
|
|
+ message: Em.I18n.t('installer.step3.registeredHostsPopup'),
|
|
|
|
+ registeredHosts: self.get('registeredHosts')
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
back: function () {
|
|
back: function () {
|
|
if (this.get('isInstallInProgress')) {
|
|
if (this.get('isInstallInProgress')) {
|
|
return;
|
|
return;
|