mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
ability to skip dxcc update (advanced settings)
This commit is contained in:
@@ -10,6 +10,7 @@ if ($_POST['database_check'] ?? false == true) {
|
|||||||
$result = $database->database_check($_POST);
|
$result = $database->database_check($_POST);
|
||||||
echo $result;
|
echo $result;
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,7 +23,7 @@ if ($_POST['database_check'] ?? false == true) {
|
|||||||
|
|
||||||
if ($_POST['run_config_file'] ?? false == true) {
|
if ($_POST['run_config_file'] ?? false == true) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
$data = json_decode($_POST['data'], true);
|
$data = $_POST['data'];
|
||||||
if ($core->validate_post($data)) {
|
if ($core->validate_post($data)) {
|
||||||
if($core->write_configfile($data)) {
|
if($core->write_configfile($data)) {
|
||||||
$result = 'success';
|
$result = 'success';
|
||||||
@@ -38,7 +39,7 @@ if ($_POST['run_config_file'] ?? false == true) {
|
|||||||
|
|
||||||
if ($_POST['run_database_file'] ?? false == true) {
|
if ($_POST['run_database_file'] ?? false == true) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
$data = json_decode($_POST['data'], true);
|
$data = $_POST['data'];
|
||||||
if ($core->validate_post($data)) {
|
if ($core->validate_post($data)) {
|
||||||
if($core->write_config($data)) {
|
if($core->write_config($data)) {
|
||||||
$result = 'success';
|
$result = 'success';
|
||||||
@@ -53,7 +54,7 @@ if ($_POST['run_database_file'] ?? false == true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['run_database_tables'] ?? false == true) {
|
if ($_POST['run_database_tables'] ?? false == true) {
|
||||||
$data = json_decode($_POST['data'], true);
|
$data = $_POST['data'];
|
||||||
if ($core->validate_post($data)) {
|
if ($core->validate_post($data)) {
|
||||||
$result = $database->create_tables($data);
|
$result = $database->create_tables($data);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
2801
install/index.php
2801
install/index.php
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@
|
|||||||
<i id="database_migrations_spinner" class="ld-ext-right"><?= __("Running database migrations") ?><div class="ld ld-ring ld-spin"></div></i><i id="database_migrations_check" class="ms-2 fas fa-check-circle" style="display: none;"></i>
|
<i id="database_migrations_spinner" class="ld-ext-right"><?= __("Running database migrations") ?><div class="ld ld-ring ld-spin"></div></i><i id="database_migrations_check" class="ms-2 fas fa-check-circle" style="display: none;"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3" id="update_dxcc" style="opacity: 50%;">
|
<div class="mb-3" id="update_dxcc" style="opacity: 50%;">
|
||||||
<i id="update_dxcc_spinner" class="ld-ext-right"><?= __("Updating DXCC data") ?><div class="ld ld-ring ld-spin"></div></i><i id="update_dxcc_check" class="ms-2 fas fa-check-circle" style="display: none;"></i>
|
<i id="update_dxcc_spinner" class="ld-ext-right"><?= __("Updating DXCC data") ?><i id="skip_dxcc_update_message"></i><div class="ld ld-ring ld-spin"></div></i><i id="update_dxcc_check" class="ms-2 fas fa-check-circle" style="display: none;"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@@ -45,6 +45,9 @@
|
|||||||
</body>
|
</body>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
let _POST = <?php echo json_encode($_POST); ?>;
|
||||||
|
|
||||||
$(document).ready(async function() {
|
$(document).ready(async function() {
|
||||||
try {
|
try {
|
||||||
await config_file();
|
await config_file();
|
||||||
@@ -72,8 +75,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let _POST = '<?php echo json_encode($_POST); ?>';
|
|
||||||
|
|
||||||
async function config_file() {
|
async function config_file() {
|
||||||
|
|
||||||
var field = '#config_file';
|
var field = '#config_file';
|
||||||
@@ -193,26 +194,32 @@
|
|||||||
|
|
||||||
async function update_dxcc() {
|
async function update_dxcc() {
|
||||||
var field = '#update_dxcc';
|
var field = '#update_dxcc';
|
||||||
|
|
||||||
running(field, true);
|
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
$.ajax({
|
if(_POST.skip_dxcc_update == 0) {
|
||||||
url: "<?php echo $_POST['websiteurl']; ?>" + "index.php/update/dxcc",
|
|
||||||
success: function(response) {
|
running(field, true);
|
||||||
if (response == 'success') {
|
|
||||||
running(field, false);
|
$.ajax({
|
||||||
resolve();
|
url: "<?php echo $_POST['websiteurl']; ?>" + "index.php/update/dxcc",
|
||||||
} else {
|
success: function(response) {
|
||||||
|
if (response == 'success') {
|
||||||
|
running(field, false);
|
||||||
|
resolve();
|
||||||
|
} else {
|
||||||
|
running(field, false, true);
|
||||||
|
reject("<?= __("Could not update DXCC data"); ?>");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(error) {
|
||||||
running(field, false, true);
|
running(field, false, true);
|
||||||
reject("<?= __("Could not update DXCC data"); ?>");
|
reject(error);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
error: function(error) {
|
} else {
|
||||||
running(field, false, true);
|
$('#skip_dxcc_update_message').text(" "+"<?= __("(skipped)"); ?>");
|
||||||
reject(error);
|
resolve();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user