mirror of
https://github.com/unraid/webgui.git
synced 2026-01-01 06:59:56 -06:00
* Added `ReplaceKey` initialization and check to `Registration.page`, `Downgrade.page`, `Update.page`, and `unraidcheck` script. * Ensures consistent handling of key replacement across relevant components.
55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
Menu="About:10"
|
|
Title="Update OS"
|
|
Icon="icon-update"
|
|
Tag="upload"
|
|
---
|
|
<?php
|
|
/* Copyright 2005-2023, Lime Technology
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*/
|
|
require_once "$docroot/plugins/dynamix/include/ReplaceKey.php";
|
|
$replaceKey = new ReplaceKey();
|
|
$replaceKey->check();
|
|
|
|
require_once "$docroot/plugins/dynamix.my.servers/include/reboot-details.php";
|
|
$rebootDetails = new RebootDetails();
|
|
?>
|
|
<script>
|
|
function cleanUpFlashBackup(zip) {
|
|
if (document.hasFocus()) {
|
|
$('input[value="_(Creating Flash backup)_..."]').val("_(Flash backup)_").prop('disabled',false);
|
|
$('div.spinner').hide('slow');
|
|
$('#pleaseWait').hide('slow');
|
|
$.post('/webGui/include/Download.php',{cmd:'unlink',file:zip});
|
|
} else {
|
|
setTimeout(function(){cleanUpFlashBackup(zip);},2000);
|
|
}
|
|
}
|
|
function flashBackup() {
|
|
$('input[value="_(Flash backup)_"]').val('_(Creating Flash backup)_...').prop('disabled',true);
|
|
$('div.spinner').show('slow');
|
|
$('#pleaseWait').show('slow');
|
|
$.post('/webGui/include/Download.php',{cmd:'backup'},function(zip) {
|
|
if (zip) {
|
|
location = '/'+zip;
|
|
setTimeout(function(){cleanUpFlashBackup(zip);},6000);
|
|
} else {
|
|
$('input[value="_(Creating Flash backup)_..."]').val("_(Flash backup)_");
|
|
$('div.spinner').hide('slow');
|
|
$('#pleaseWait').hide('slow');
|
|
swal({title:"_(Creation error)_",text:"_(Insufficient free disk space available)_",type:'error',html:true,confirmButtonText:"_(Ok)_"});
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<unraid-i18n-host>
|
|
<unraid-update-os reboot-version="<?= $rebootDetails->rebootVersion ?>"></unraid-update-os>
|
|
</unraid-i18n-host>
|