Basic way of showing installation is done is implemented
This commit is contained in:
parent
9d2283ecf7
commit
bda53ff143
@ -69,31 +69,33 @@ function printRow($version) {
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Installation Progress</div>
|
||||
<table class="table table-striped" style="table-layout:fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Version</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<div id="install-information">
|
||||
<table class="table table-striped" style="table-layout:fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Version</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php echoInitialVersionRows($startingVersion); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-striped" style="table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Task</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="row-banmigrate">
|
||||
<td>Migrate IP / Email Bans</td>
|
||||
<td><i id="spinner-banmigrate" class="fa fa-spinner"></i> <span id="span-banmigrate">Waiting...</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-striped" style="table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Task</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="row-banmigrate">
|
||||
<td>Migrate IP / Email Bans</td>
|
||||
<td><i id="spinner-banmigrate" class="fa fa-spinner"></i> <span id="span-banmigrate">Waiting...</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -136,7 +136,7 @@ function appendToInstallConsole(text) {
|
||||
function processUpdates(startingVersion) {
|
||||
if (startingVersion < 1) {
|
||||
startVersionUpgrade('p140');
|
||||
executeUpdate(1000, 'p140');
|
||||
executeUpdate(1, 'p140');
|
||||
} else if (startingVersion < 140) {
|
||||
startVersionUpgrade('140');
|
||||
executeUpdate(140, '140');
|
||||
@ -194,7 +194,7 @@ function migrateIpEmailBans(version, cssclass) {
|
||||
markUpdateAsAttention(version);
|
||||
prepareAttentionPanel(getContentForMigratePrompt(parsedData.users));
|
||||
} else {
|
||||
markUpdateAsSuccess(version);
|
||||
migrateComplete();
|
||||
}
|
||||
//if ask user, markUpdateAsAttention and append to Attention! div
|
||||
//otherwise, mark success and move to completion script.
|
||||
@ -206,6 +206,11 @@ function migrateIpEmailBans(version, cssclass) {
|
||||
});
|
||||
}
|
||||
|
||||
function installationFinished() {
|
||||
var html = '<p>Hey! We finished!</p>';
|
||||
$('#install-information').html(html);
|
||||
}
|
||||
|
||||
function getContentForMigratePrompt(users) {
|
||||
var beginningText = '<h2>Migrating IP / E-mail Bans</h2><p>Mods for HESK has detected that you have added IP address ' +
|
||||
'and/or email bans using Mods for HESK. As part of the upgrade process, Mods for HESK will migrate these bans ' +
|
||||
@ -218,7 +223,7 @@ function getContentForMigratePrompt(users) {
|
||||
});
|
||||
selectMarkup += '</select></div></div><br>';
|
||||
var submitMarkup = '<div class="row"><div class="col-md-9 col-md-offset-3 col-xs-12"><button onclick="runMigration()" class="btn btn-default">Migrate</button> ' +
|
||||
'<a href="javascript:void(0)" onclick="dontMigrate()" class="btn btn-danger">Don\'t Migrate</a> </div></div>';
|
||||
'<a href="javascript:void(0)" onclick="migrateComplete()" class="btn btn-danger">Don\'t Migrate</a> </div></div>';
|
||||
|
||||
return beginningText + selectMarkup + submitMarkup;
|
||||
}
|
||||
@ -239,8 +244,7 @@ function runMigration() {
|
||||
url: 'ajax/task-ajax.php',
|
||||
data: { task: 'migrate-bans', user: userId },
|
||||
success: function(data) {
|
||||
markUpdateAsSuccess('banmigrate');
|
||||
//TODO cover entire install area with success message.
|
||||
migrateComplete();
|
||||
},
|
||||
error: function(data) {
|
||||
appendToInstallConsole('ERROR: ' + data.responseText);
|
||||
@ -249,4 +253,10 @@ function runMigration() {
|
||||
})
|
||||
}
|
||||
|
||||
function migrateComplete() {
|
||||
$('#attention-row').hide();
|
||||
markUpdateAsSuccess('banmigrate');
|
||||
installationFinished();
|
||||
}
|
||||
|
||||
jQuery(document).ready(loadJquery);
|
||||
|
Loading…
x
Reference in New Issue
Block a user