Install wizard updates

-Fix tooltips

-Poll system VMs and enable zone at end
This commit is contained in:
bfederle 2012-01-23 13:27:49 -08:00
parent 078f80bbe5
commit 96d0383a4a
2 changed files with 46 additions and 7 deletions

View File

@ -64,37 +64,37 @@
});
},
'tooltip.addGuestNetwork.name': function(args) {
'tooltip.configureGuestTraffic.name': function(args) {
args.response.success({
text: 'A name for your network'
});
},
'tooltip.addGuestNetwork.description': function(args) {
'tooltip.configureGuestTraffic.description': function(args) {
args.response.success({
text: 'A description for your network'
});
},
'tooltip.addGuestNetwork.guestGateway': function(args) {
'tooltip.configureGuestTraffic.guestGateway': function(args) {
args.response.success({
text: 'The gateway that the guests should use'
});
},
'tooltip.addGuestNetwork.guestNetmask': function(args) {
'tooltip.configureGuestTraffic.guestNetmask': function(args) {
args.response.success({
text: 'The netmask in use on the subnet that the guests should use'
});
},
'tooltip.addGuestNetwork.guestStartIp': function(args) {
'tooltip.configureGuestTraffic.guestStartIp': function(args) {
args.response.success({
text: 'The range of IP addresses that will be available for allocation to guests in this zone. If one NIC is used, these IPs should be in the same CIDR as the pod CIDR.'
});
},
'tooltip.addGuestNetwork.guestEndIp': function(args) {
'tooltip.configureGuestTraffic.guestEndIp': function(args) {
args.response.success({
text: 'The range of IP addresses that will be available for allocation to guests in this zone. If one NIC is used, these IPs should be in the same CIDR as the pod CIDR.'
});
@ -229,6 +229,8 @@
},
action: function(args) {
var success = args.response.success;
var message = args.response.message;
// Get default network offering
var selectedNetworkOffering;
@ -258,6 +260,43 @@
domain: 1,
networkOfferingId: selectedNetworkOffering.id
}
},
response: {
success: function(args) {
// Poll System VMs, then enable zone
message('Creating system VMs (this may take a while)');
var poll = setInterval(function() {
$.ajax({
url: createURL('listSystemVms'),
dataType: 'json',
async: true,
success: function(data) {
var systemVMs = data.listsystemvmsresponse.systemvm;
if (systemVMs && systemVMs.length > 1) {
if (systemVMs.length == $.grep(systemVMs, function(vm) {
return vm.state == 'Running';
}).length) {
clearInterval(poll);
message('System VMs are up.');
message('Enabling zone...');
cloudStack.zoneWizard.enableZoneAction({
data: args.data,
formData: args.formData,
response: {
success: function(args) {
message('Done!');
setTimeout(success, 2000);
}
}
})
}
}
}
});
}, 5000);
}
}
}));
}

View File

@ -2209,7 +2209,7 @@
var complete = function(args) {
message('Zone creation complete!');
success({});
success(args);
};
if (startFn) {