bug 12315

-Show summary of actions being performed on installation
This commit is contained in:
Brian Federle 2011-12-05 16:37:55 -08:00
parent 214e81e781
commit 8de59166a4
4 changed files with 72 additions and 10 deletions

View File

@ -684,6 +684,17 @@ body.login {
margin-bottom: 9px;
}
.install-wizard .step.intro .subtitle li {
position: relative;
width: 45%;
height: 24px;
list-style: circle;
}
.install-wizard .step.intro .subtitle li img {
float: right;
}
/*Notifications*/
div.notification-box {
width: 323px;

View File

@ -3,7 +3,7 @@
// Check if install wizard should be invoked
check: function(args) {
args.response.success({
doInstall: true
doInstall: args.context.users[0].username == 'newuser'
});
},
@ -218,38 +218,62 @@
action: function(args) {
var complete = args.response.success;
var message = args.response.message;
var createZone = function(args) {
createPod();
message('Creating zone');
setTimeout(function() {
createPod();
}, 500);
};
var createPod = function(args) {
createIPRange();
message('Creating pod');
setTimeout(function() {
createIPRange();
}, 500);
};
var createIPRange = function(args) {
createCluster();
message('Creating network');
setTimeout(function() {
createCluster();
}, 500);
};
var createCluster = function(args) {
createHost();
message('Creating cluster');
setTimeout(function() {
createHost();
}, 500);
};
var createHost = function(args) {
createPrimaryStorage();
message('Creating host');
setTimeout(function() {
createPrimaryStorage();
}, 500);
};
var createPrimaryStorage = function(args) {
createSecondaryStorage();
message('Creating primary storage');
setTimeout(function() {
createSecondaryStorage();
}, 500);
};
var createSecondaryStorage = function(args) {
pollSystemVMs();
message('Creating secondary storage');
setTimeout(function() {
pollSystemVMs();
}, 500);
};
var pollSystemVMs = function() {
message('Creating system VMs (this may take a while)');
setTimeout(function() {
complete();
message('Done!', { ignoreLoadingAnim: true });
setTimeout(complete, 1000);
}, 5000);
};

View File

@ -230,9 +230,11 @@
action: function(args) {
var complete = args.response.success;
var message = args.response.message;
var data = args.data;
var createZone = function(args) {
message('Creating zone');
var addZoneAction = function(args) {
var array1 = [];
@ -445,6 +447,7 @@
};
var createPod = function(args) {
message('Creating pod');
var array1 = [];
array1.push("&zoneId=" + args.data.zone.id);
array1.push("&name=" + todb(data.pod.name));
@ -471,6 +474,7 @@
};
var createNetwork = function(args) {
message('Creating network');
var createNetworkAction = function(selectedZoneObj, args) {
var array1 = [];
array1.push("&zoneId=" + selectedZoneObj.id);
@ -626,6 +630,7 @@
};
var createCluster = function(args) {
message('Creating cluster');
$.ajax({
url: createURL('addCluster'),
data: {
@ -648,6 +653,7 @@
};
var createHost = function(args) {
message('Creating host');
$.ajax({
url: createURL('addHost'),
data: {
@ -673,6 +679,7 @@
};
var createPrimaryStorage = function(args) {
message('Creating primary storage');
$.ajax({
url: createURL('createStoragePool'),
data: {
@ -697,6 +704,7 @@
};
var createSecondaryStorage = function(args) {
message('Creating secondary storage');
$.ajax({
url: createURL('addSecondaryStorage'),
data: {
@ -713,6 +721,7 @@
};
var pollSystemVMs = function() {
message('Creating system VMs (this may take a while)');
var poll = setInterval(function() {
$.ajax({
url: createURL('listSystemVms'),
@ -726,7 +735,8 @@
return vm.state == 'Running';
}).length) {
clearInterval(poll);
complete();
message('Done!');
setTimeout(complete, 1000);
}
}
}

View File

@ -625,10 +625,27 @@
.html('Now building your cloud...');
var $subtitle = $('<div></div>').addClass('subtitle')
.html('');
var $loading = $('<img>').attr({
src: 'images/ajax-loader-small.gif'
});
cloudStack.installWizard.action({
data: state,
response: {
message: function(msg, options) {
if (!options) options = {};
$subtitle.append(function() {
var $li = $('<li>').html(msg);
if (!options.ignoreLoadingAnim) {
$li.append($loading);
} else {
$loading.remove();
}
return $li;
});
},
success: function() {
complete();
}