mirror of
https://github.com/unraid/webgui.git
synced 2026-05-13 07:40:25 -05:00
Merge pull request #1497 from zackspear/refactor/web-component-updates
Refactor/web component updates
This commit is contained in:
@@ -4,252 +4,6 @@ Title="Registration"
|
||||
Icon="icon-registration"
|
||||
Tag="pencil"
|
||||
---
|
||||
<?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.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
function my_time_any($time) {
|
||||
return $time ? _(my_time($time),0) : _('Anytime');
|
||||
}
|
||||
function my_time_now($time) {
|
||||
return $time ? _(my_time($time),0) : _('Unknown');
|
||||
}
|
||||
|
||||
$regGen = (int)$var['regGen'] ?? 0;
|
||||
$trialExtensionEligible = $regGen === 0 || $regGen === 1;
|
||||
?>
|
||||
<?if ( (strstr($var['regTy'], "unregistered")) or ($var['regTy']=="Trial") or (strstr($var['regTy'], "no connection")) or (strstr($var['regTy'], "withdrawn")) or (strstr($var['regTy'], "expired")) ):?>
|
||||
|
||||
<span class="thanks">_(Thank you for trying Unraid OS)_!</span>
|
||||
|
||||
<?elseif ( ($var['regTy']=="Basic") or ($var['regTy']=="Plus") or ($var['regTy']=="Pro") ):?>
|
||||
|
||||
<span class="thanks">_(Thank you for choosing Unraid OS)_!</span>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if (strstr($var['regTy'], "unregistered")):?>
|
||||
|
||||
<div markdown="1" class="remark">
|
||||
:registration_1_plug:
|
||||
Your server will not be usable until you purchase a Registration key or install a free 30 day *Trial* key. A *Trial*
|
||||
key provides all the functionality of a *Pro* Registration key.
|
||||
|
||||
Registration keys are bound to your USB Flash boot device serial number (GUID). Please use a high quality name brand device
|
||||
at least 1GB in size (min 4GB recommended).
|
||||
|
||||
Note: USB memory card readers are generally **not** supported because most do not present unique serial numbers.
|
||||
:end
|
||||
</div>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if ($var['regTy']=="Trial"):?>
|
||||
|
||||
<div markdown="1" class="remark">
|
||||
:registration_3_plug:
|
||||
Your *Trial* key includes all the functionality and device support of a *Pro* Registration key.
|
||||
|
||||
After your *Trial* key has reached expiration, your server **still functions normally** until the next time you **Stop** the array.
|
||||
|
||||
At that point, you may either purchase a Registration key, or request a *Trial* extension.
|
||||
:end
|
||||
</div>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if (strstr($var['regTy'], "no connection")):?>
|
||||
|
||||
<div markdown="1" class="remark">
|
||||
<span class='red-text'>_(Cannot connect to key-server)_!</span>
|
||||
|
||||
_(Your *Trial* key requires an internet connection)_. _(Please check your)_ [_(Network Settings)_](NetworkSettings).
|
||||
</div>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if (strstr($var['regTy'], "withdrawn")):?>
|
||||
|
||||
<div markdown="1" class="remark">
|
||||
<span class='red-text'>_(Release has been withdrawn)_!</span>
|
||||
|
||||
_(This release has been withdrawn for use with *Trial* keys)_.
|
||||
</div>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if (strstr($var['regTy'], "expired")):?>
|
||||
|
||||
<div markdown="1" class="remark">
|
||||
<span class='red-text'>_(Your *Trial* key has expired)_.</span>
|
||||
|
||||
<? if ($trialExtensionEligible): ?>
|
||||
:registration_4_plug:
|
||||
To continue using Unraid OS you may purchase a Registration key. Alternately, you may request a *Trial* extension key.
|
||||
:end
|
||||
<? else: ?>
|
||||
:registration_trial_extension_ineligible_plug:
|
||||
You have used all your Trial extensions. To continue using Unraid OS you may purchase a Registration key.
|
||||
:end
|
||||
<? endif; ?>
|
||||
</div>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if (strstr($var['regTy'], "invalid installation")):?>
|
||||
|
||||
<span class='thanks red'>_(Invalid *Trial* Installation)_</span>
|
||||
<div markdown="1" class="remark">
|
||||
:registration_5_plug:
|
||||
It is not possible to use a *Trial* key with an existing Unraid OS installation.
|
||||
|
||||
You may purchase a Registration key corresponding to this USB Flash device to continue using this installation.
|
||||
|
||||
For more information, please [Contact Support](https://lime-technology.com/contact).
|
||||
:end
|
||||
</div>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if (strstr($var['regTy'], "missing")):?>
|
||||
|
||||
<span class='thanks red'>_(Missing Key File)_</span>
|
||||
<div markdown="1" class="remark">
|
||||
:registration_6_plug:
|
||||
It appears that your Registration key file is corrupted or missing. The key file should be located in the
|
||||
[config](/Registration/Browse?dir=/boot/config) directory on your USB Flash boot device.
|
||||
|
||||
If you do not have a backup copy of your Registration key file, [Contact Support](https://lime-technology.com/contact).
|
||||
|
||||
If this was a *Trial* installation, you may purchase a Registration key.
|
||||
:end
|
||||
</div>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if (strstr($var['regTy'], "invalid key")):?>
|
||||
|
||||
<span class='thanks red'>_(The registered GUID does not match the USB Flash boot device GUID)_</span>
|
||||
|
||||
<?if (strstr($var['regTy'], "Trial")):?>
|
||||
|
||||
<div markdown="1" class="remark">
|
||||
:registration_7_plug:
|
||||
*Trial* installations are only valid with the originally registered USB Flash device.
|
||||
|
||||
To continue using this installation with this USB Flash device, you may purchase a Registration key.
|
||||
:end
|
||||
</div>
|
||||
|
||||
<?else:?>
|
||||
|
||||
<div markdown="1" class="remark">
|
||||
:registration_8_plug:
|
||||
The Registration key file does not correspond to the USB Flash boot device.
|
||||
Please copy the correct key file to the [config](/Registration/Browse?dir=/boot/config) directory
|
||||
on your USB Flash boot device. If you do not have a backup copy of your key file, [Contact Support](https://lime-technology.com/contact).
|
||||
|
||||
If you want to replace your Registration key with a new key bound to this USB Flash device, click Replace Key below. An original key may be
|
||||
replaced anytime. Thereafter, a replacement key may be replaced again after one year has passed. If you require
|
||||
another replacement key sooner, [Contact Support](https://lime-technology.com/contact).
|
||||
|
||||
**Note:** Replacing a Registration key results in permanently *blacklisting* the previous USB Flash GUID.
|
||||
:end
|
||||
</div>
|
||||
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
|
||||
<?if (strstr($var['regTy'], "blacklisted")):?>
|
||||
|
||||
<span class='thanks red'>_(Blacklisted USB Flash GUID)_</span>
|
||||
<div markdown="1" class="remark">
|
||||
:registration_9_plug:
|
||||
This USB Flash boot device has been *blacklisted*. This can occur as a result of transfering your Registration key to
|
||||
a replacement USB Flash device, and you are currently booted from your old USB Flash device.
|
||||
|
||||
A USB Flash device may also be *blacklisted* if there is no serial number, or if we discover the serial number
|
||||
is not unique (this is common with USB card readers).
|
||||
|
||||
For more information, please [Contact Support](https://lime-technology.com/contact).
|
||||
:end
|
||||
</div>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if ( ( !(strstr($var['regTy'], "invalid key")) and ((strstr($var['regTy'], "Trial"))) ) || (strstr($var['regTy'], "no connection")) || (strstr($var['regTy'], "withdrawn")) ):?>
|
||||
|
||||
_(***Trial*** key expires on)_:
|
||||
: <?=my_time_now($var['regTm2'])?>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if ( strstr($var['regTy'], "invalid installation") || ( (strstr($var['regTy'], "invalid key")) && (strstr($var['regTy'], "Trial")) )):?>
|
||||
|
||||
_(Expiration)_:
|
||||
: <?=my_time_now($var['regTm2'])?>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if ( (strstr($var['regTy'], "invalid installation")) || (strstr($var['regTy'], "invalid key")) || ($var['regTy']=="Basic") || ($var['regTy']=="Plus") || ($var['regTy']=="Pro") ):?>
|
||||
|
||||
_(Registered to)_:
|
||||
: <?=htmlspecialchars($var['regTo'])?>
|
||||
|
||||
_(Registered on)_:
|
||||
: <?=my_time_now($var['regTm'])?>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if ( (strstr($var['regTy'], "invalid installation")) or ( (strstr($var['regTy'], "invalid key")) and (!(strstr($var['regTy'], "Trial")))) ):?>
|
||||
|
||||
_(Registered GUID)_:
|
||||
: <?=$var['regGUID']?>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if (strstr($var['regTy'], "flash device error")):?>
|
||||
|
||||
<span class='thanks red'>_(Error accessing your physical USB Flash boot device)_</span>
|
||||
<div markdown="1" class="remark">
|
||||
_(There is a physical problem accessing your USB Flash boot device)_. _(Please)_ [Contact Support](https://lime-technology.com/contact).
|
||||
|
||||
_(Flash GUID)_:
|
||||
: _(Error code)_: <?=$var['regCheck']?>
|
||||
|
||||
<?else:?>
|
||||
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor']?>
|
||||
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct']?>
|
||||
|
||||
<?if ( ((strstr($var['regTy'], "invalid key")) and !(strstr($var['regTy'], "Trial"))) || ($var['regTy']=="Basic") || ($var['regTy']=="Plus") || ($var['regTy']=="Pro") ):?>
|
||||
|
||||
_(Replaceable)_:
|
||||
: <?=my_time_any($var['regTm2'])?>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if ( !(strstr($var['regTy'], "flash device error")) || !(strstr($var['regTy'], "blacklisted")) ):?>
|
||||
|
||||
<div class="device"><?=sprintf(_("This server has %s attached storage device".($var['deviceCount']==1?'.':'s.')),$var['deviceCount'])?></div>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
|
||||
: <unraid-i18n-host><unraid-key-actions></unraid-key-actions></unraid-i18n-host>
|
||||
<unraid-i18n-host>
|
||||
<unraid-registration></unraid-registration>
|
||||
</unraid-i18n-host>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?PHP
|
||||
<?php
|
||||
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
|
||||
$var = (array)parse_ini_file('state/var.ini');
|
||||
|
||||
@@ -7,6 +7,8 @@ require_once "$docroot/webGui/include/Helpers.php";
|
||||
extract(parse_plugin_cfg('dynamix',true));
|
||||
require_once "$docroot/plugins/dynamix.my.servers/include/state.php";
|
||||
|
||||
$serverState = new ServerState();
|
||||
|
||||
header('Content-type: application/json');
|
||||
|
||||
echo json_encode($serverState);
|
||||
echo $serverState->getServerStateJson();
|
||||
|
||||
@@ -16,6 +16,15 @@
|
||||
margin-left: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tools page, rotate the Downgrade icon to prevent needing to add a new icon to the icon font.
|
||||
* The pseudo element is targeted here otherwise the rotation of the span would mess up spacing with the text.
|
||||
*/
|
||||
a[href="/Tools/Downgrade"] .icon-update:before {
|
||||
display: inline-block; /* required otherwise the rotation won't work */
|
||||
rotate: 180deg;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
// Set the path for the local manifest file
|
||||
@@ -39,4 +48,4 @@ if ($fileValue !== null) {
|
||||
echo '<script src="' . $prefixedPath . $fileValue . '"></script>';
|
||||
} else {
|
||||
echo '<script>console.error("%cNo matching key containing \'' . $searchText . '\' found.", "font-weight: bold; color: white; background-color: red");</script>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
<?PHP
|
||||
<?php
|
||||
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
|
||||
require_once("$docroot/plugins/dynamix.my.servers/include/state.php");
|
||||
require_once("$docroot/plugins/dynamix.my.servers/include/translations.php");
|
||||
|
||||
$serverState = new ServerState();
|
||||
$wCTranslations = new WebComponentTranslations();
|
||||
?>
|
||||
<script>
|
||||
window.LOCALE_DATA = '<?= rawurlencode(json_encode($webComponentTranslations, JSON_UNESCAPED_SLASHES, JSON_UNESCAPED_UNICODE)) ?>';
|
||||
window.LOCALE_DATA = '<?= $wCTranslations->getTranslationsJson(true) ?>';
|
||||
/**
|
||||
* So we're not needing to modify DefaultLayout with an additional include, we'll add the Modals web component to the bottom of the body.
|
||||
*/
|
||||
@@ -21,5 +24,5 @@ if (!document.getElementsByTagName(modalsWebComponent).length) {
|
||||
<?
|
||||
echo "
|
||||
<unraid-i18n-host>
|
||||
<unraid-user-profile server='" . json_encode($serverState) . "'></unraid-user-profile>
|
||||
<unraid-user-profile server='" . $serverState->getServerStateJson() . "'></unraid-user-profile>
|
||||
</unraid-i18n-host>";
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* RebootDetails class is responsible for detecting the type and version of a system reboot required in the context of an unRAID server.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* $rebootDetails = new RebootDetails();
|
||||
* $rebootType = $rebootDetails->getRebootType();
|
||||
* ```
|
||||
*/
|
||||
class RebootDetails
|
||||
{
|
||||
/**
|
||||
* @var string $rebootType Stores the type of reboot required, which can be 'update', 'downgrade', or 'thirdPartyDriversDownloading'.
|
||||
*/
|
||||
private $rebootType = '';
|
||||
|
||||
/**
|
||||
* Constructs a new RebootDetails object and automatically detects the reboot type during initialization.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->detectRebootType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Detects the type of reboot required based on the contents of the unRAID server's README.md file.
|
||||
* Sets the $rebootType property accordingly.
|
||||
*/
|
||||
private function detectRebootType()
|
||||
{
|
||||
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
|
||||
|
||||
$rebootReadme = @file_get_contents("$docroot/plugins/unRAIDServer/README.md", false, null, 0, 20) ?: '';
|
||||
$rebootDetected = preg_match("/^\*\*(REBOOT REQUIRED|DOWNGRADE)/", $rebootReadme);
|
||||
|
||||
$rebootForDowngrade = $rebootDetected && strpos($rebootReadme, 'DOWNGRADE') !== false;
|
||||
$rebootForUpdate = $rebootDetected && strpos($rebootReadme, 'REBOOT REQUIRED') !== false;
|
||||
|
||||
$this->rebootType = $rebootForDowngrade ? 'downgrade' : ($rebootForUpdate ? 'update' : '');
|
||||
|
||||
// Detect if third-party drivers were part of the update process
|
||||
$processWaitingThirdParthDrivers = "inotifywait -q /boot/changes.txt -e move_self,delete_self";
|
||||
// Run the ps command to list processes and check if the process is running
|
||||
$ps_command = "ps aux | grep -E \"$processWaitingThirdParthDrivers\" | grep -v \"grep -E\"";
|
||||
$output = shell_exec($ps_command) ?? '';
|
||||
if (strpos($output, $processWaitingThirdParthDrivers) !== false) {
|
||||
$this->rebootType = 'thirdPartyDriversDownloading';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the type of reboot required, which can be 'update', 'downgrade', or 'thirdPartyDriversDownloading'.
|
||||
*
|
||||
* @return string The type of reboot required.
|
||||
*/
|
||||
public function getRebootType()
|
||||
{
|
||||
return $this->rebootType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detects and retrieves the version information related to the system reboot based on the contents of the '/boot/changes.txt' file.
|
||||
*
|
||||
* @return string The system version information or 'Not found' if not found, or 'File not found' if the file is not present.
|
||||
*/
|
||||
public function getRebootVersion()
|
||||
{
|
||||
$file_path = '/boot/changes.txt';
|
||||
|
||||
// Check if the file exists
|
||||
if (file_exists($file_path)) {
|
||||
// Open the file for reading
|
||||
$file = fopen($file_path, 'r');
|
||||
|
||||
// Read the file line by line until we find a line that starts with '# Version'
|
||||
while (($line = fgets($file)) !== false) {
|
||||
if (strpos($line, '# Version') === 0) {
|
||||
// Use a regular expression to extract the full version string
|
||||
if (preg_match('/# Version\s+(\S+)/', $line, $matches)) {
|
||||
$fullVersion = $matches[1];
|
||||
return $fullVersion;
|
||||
} else {
|
||||
return 'Not found';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Close the file
|
||||
fclose($file);
|
||||
} else {
|
||||
return 'File not found';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,81 +1,173 @@
|
||||
<?php
|
||||
// read flashbackup ini file
|
||||
$flashbackup_ini = '/var/local/emhttp/flashbackup.ini';
|
||||
$flashbackup_status = (file_exists($flashbackup_ini)) ? @parse_ini_file($flashbackup_ini) : [];
|
||||
/**
|
||||
* @todo refactor globals – currently if you try to use $GLOBALS the class will break.
|
||||
*/
|
||||
$webguiGlobals = $GLOBALS;
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
|
||||
$nginx = parse_ini_file('/var/local/emhttp/nginx.ini');
|
||||
require_once "$docroot/plugins/dynamix.my.servers/include/reboot-details.php";
|
||||
/**
|
||||
* ServerState class encapsulates server-related information and settings.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* $serverStateClass = new ServerState();
|
||||
*
|
||||
* $serverStateClass->getServerState();
|
||||
* or
|
||||
* $serverStateClass->getServerStateJson();
|
||||
* ```
|
||||
*/
|
||||
class ServerState
|
||||
{
|
||||
protected $webguiGlobals;
|
||||
|
||||
// base OS only, plugin not installed • show ad for plugin
|
||||
$connectPluginInstalled = '';
|
||||
if (file_exists('/var/lib/pkgtools/packages/dynamix.unraid.net')) $connectPluginInstalled = 'dynamix.unraid.net.plg';
|
||||
if (file_exists('/var/lib/pkgtools/packages/dynamix.unraid.net.staging')) $connectPluginInstalled = 'dynamix.unraid.net.staging.plg';
|
||||
// plugin install failed if the unraid-api file doesn't fully install • append failure detected so we can show warning about failed install via UPC
|
||||
if ($connectPluginInstalled && !file_exists('/usr/local/sbin/unraid-api')) $connectPluginInstalled .= '_installFailed';
|
||||
private $var;
|
||||
private $flashbackupIni;
|
||||
private $flashbackupStatus;
|
||||
private $nginx;
|
||||
private $connectPluginInstalled = '';
|
||||
private $connectPluginVersion;
|
||||
private $myserversFlashCfgPath;
|
||||
private $myservers;
|
||||
private $configErrorEnum = [
|
||||
"error" => 'UNKNOWN_ERROR',
|
||||
"invalid" => 'INVALID',
|
||||
"nokeyserver" => 'NO_KEY_SERVER',
|
||||
"withdrawn" => 'WITHDRAWN',
|
||||
];
|
||||
private $osVersionBranch;
|
||||
private $registered;
|
||||
private $rebootDetails;
|
||||
|
||||
$connectPluginVersion = file_exists('/var/log/plugins/dynamix.unraid.net.plg')
|
||||
? trim(@exec('/usr/local/sbin/plugin version /var/log/plugins/dynamix.unraid.net.plg 2>/dev/null'))
|
||||
: (file_exists('/var/log/plugins/dynamix.unraid.net.staging.plg')
|
||||
? trim(@exec('/usr/local/sbin/plugin version /var/log/plugins/dynamix.unraid.net.staging.plg 2>/dev/null'))
|
||||
: 'base-' . $var['version']);
|
||||
/**
|
||||
* Constructor to initialize class properties and gather server information.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
/**
|
||||
* @note – necessary evil until full webgui is class based.
|
||||
* @see - getWebguiGlobal() for usage
|
||||
* */
|
||||
global $webguiGlobals;
|
||||
$this->webguiGlobals =& $webguiGlobals;
|
||||
// echo "<pre>" . json_encode($this->webguiGlobals, JSON_PRETTY_PRINT) . "</pre>";
|
||||
|
||||
$myservers_flash_cfg_path='/boot/config/plugins/dynamix.my.servers/myservers.cfg';
|
||||
$myservers = file_exists($myservers_flash_cfg_path) ? @parse_ini_file($myservers_flash_cfg_path,true) : [];
|
||||
$this->var = (array)parse_ini_file('state/var.ini');
|
||||
|
||||
$configErrorEnum = [
|
||||
"error" => 'UNKNOWN_ERROR',
|
||||
"invalid" => 'INVALID',
|
||||
"nokeyserver" => 'NO_KEY_SERVER',
|
||||
"withdrawn" => 'WITHDRAWN',
|
||||
];
|
||||
$this->flashbackupIni = '/var/local/emhttp/flashbackup.ini';
|
||||
$this->flashbackupStatus = (file_exists($this->flashbackupIni)) ? @parse_ini_file($this->flashbackupIni) : [];
|
||||
$this->nginx = parse_ini_file('/var/local/emhttp/nginx.ini');
|
||||
|
||||
$registered = !empty($myservers['remote']['username']) && $connectPluginInstalled;
|
||||
if (file_exists('/var/lib/pkgtools/packages/dynamix.unraid.net')) {
|
||||
$this->connectPluginInstalled = 'dynamix.unraid.net.plg';
|
||||
}
|
||||
if (file_exists('/var/lib/pkgtools/packages/dynamix.unraid.net.staging')) {
|
||||
$this->connectPluginInstalled = 'dynamix.unraid.net.staging.plg';
|
||||
}
|
||||
if ($this->connectPluginInstalled && !file_exists('/usr/local/sbin/unraid-api')) {
|
||||
$this->connectPluginInstalled .= '_installFailed';
|
||||
}
|
||||
|
||||
$serverState = [
|
||||
"apiKey" => $myservers['upc']['apikey'] ?? '',
|
||||
"apiVersion" => $myservers['api']['version'] ?? '',
|
||||
"avatar" => (!empty($myservers['remote']['avatar']) && $connectPluginInstalled) ? $myservers['remote']['avatar'] : '',
|
||||
"config" => [
|
||||
'valid' => ($var['configValid'] === 'yes'),
|
||||
'error' => isset($configErrorEnum[$var['configValid']]) ? $configErrorEnum[$var['configValid']] : 'UNKNOWN_ERROR',
|
||||
],
|
||||
"connectPluginInstalled" => $connectPluginInstalled,
|
||||
"connectPluginVersion" => $connectPluginVersion,
|
||||
"csrf" => $var['csrf_token'],
|
||||
"description" => $var['COMMENT'] ? htmlspecialchars($var['COMMENT']) : '',
|
||||
"deviceCount" => $var['deviceCount'],
|
||||
"email" => $myservers['remote']['email'] ?? '',
|
||||
"expireTime" => 1000 * (($var['regTy'] === 'Trial' || strstr($var['regTy'], 'expired')) ? $var['regTm2'] : 0),
|
||||
"extraOrigins" => explode(',', $myservers['api']['extraOrigins'] ?? ''),
|
||||
"flashProduct" => $var['flashProduct'],
|
||||
"flashVendor" => $var['flashVendor'],
|
||||
"flashBackupActivated" => empty($flashbackup_status['activated']) ? '' : 'true',
|
||||
"guid" => $var['flashGUID'],
|
||||
"hasRemoteApikey" => !empty($myservers['remote']['apikey']),
|
||||
"internalPort" => $_SERVER['SERVER_PORT'],
|
||||
"keyfile" => empty($var['regFILE']) ? '' : str_replace(['+', '/', '='], ['-', '_', ''], trim(base64_encode(@file_get_contents($var['regFILE'])))),
|
||||
"lanIp" => ipaddr(),
|
||||
"locale" => ($_SESSION['locale']) ? $_SESSION['locale'] : 'en_US',
|
||||
"model" => $var['SYS_MODEL'],
|
||||
"name" => htmlspecialchars($var['NAME']),
|
||||
"osVersion" => $var['version'],
|
||||
"protocol" => $_SERVER['REQUEST_SCHEME'],
|
||||
"regGen" => (int)$var['regGen'],
|
||||
"regGuid" => $var['regGUID'],
|
||||
"registered" => $registered,
|
||||
"registeredTime" => $myservers['remote']['regWizTime'] ?? '',
|
||||
"site" => $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'],
|
||||
"state" => strtoupper(empty($var['regCheck']) ? $var['regTy'] : $var['regCheck']),
|
||||
"theme" => [
|
||||
"banner" => !empty($display['banner']),
|
||||
"bannerGradient" => $display['showBannerGradient'] === 'yes' ?? false,
|
||||
"bgColor" => ($display['background']) ? '#' . $display['background'] : '',
|
||||
"descriptionShow" => (!empty($display['headerdescription']) && $display['headerdescription'] !== 'no'),
|
||||
"metaColor" => ($display['headermetacolor'] ?? '') ? '#' . $display['headermetacolor'] : '',
|
||||
"name" => $display['theme'],
|
||||
"textColor" => ($display['header']) ? '#' . $display['header'] : '',
|
||||
],
|
||||
"ts" => time(),
|
||||
"uptime" => 1000 * (time() - round(strtok(exec("cat /proc/uptime"), ' '))),
|
||||
"username" => $myservers['remote']['username'] ?? '',
|
||||
"wanFQDN" => $nginx['NGINX_WANFQDN'] ?? '',
|
||||
];
|
||||
$this->connectPluginVersion = file_exists('/var/log/plugins/dynamix.unraid.net.plg')
|
||||
? trim(@exec('/usr/local/sbin/plugin version /var/log/plugins/dynamix.unraid.net.plg 2>/dev/null'))
|
||||
: (file_exists('/var/log/plugins/dynamix.unraid.net.staging.plg')
|
||||
? trim(@exec('/usr/local/sbin/plugin version /var/log/plugins/dynamix.unraid.net.staging.plg 2>/dev/null'))
|
||||
: 'base-' . $this->var['version']);
|
||||
|
||||
$this->myserversFlashCfgPath = '/boot/config/plugins/dynamix.my.servers/myservers.cfg';
|
||||
$this->myservers = file_exists($this->myserversFlashCfgPath) ? @parse_ini_file($this->myserversFlashCfgPath, true) : [];
|
||||
|
||||
$this->osVersionBranch = trim(@exec('plugin category /var/log/plugins/unRAIDServer.plg') ?? 'stable');
|
||||
$this->registered = !empty($this->myservers['remote']['apikey']) && $this->connectPluginInstalled;
|
||||
|
||||
$this->rebootDetails = new RebootDetails();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the value of a webgui global setting.
|
||||
*/
|
||||
public function getWebguiGlobal(string $key) {
|
||||
return $this->webguiGlobals[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the server information as an associative array
|
||||
*
|
||||
* @return array An array containing server information.
|
||||
*/
|
||||
public function getServerState()
|
||||
{
|
||||
$serverState = [
|
||||
"apiKey" => $this->myservers['upc']['apikey'] ?? '',
|
||||
"apiVersion" => $this->myservers['api']['version'] ?? '',
|
||||
"avatar" => (!empty($this->myservers['remote']['avatar']) && $this->connectPluginInstalled) ? $this->myservers['remote']['avatar'] : '',
|
||||
"config" => [
|
||||
'valid' => ($this->var['configValid'] === 'yes'),
|
||||
'error' => isset($this->configErrorEnum[$this->var['configValid']]) ? $this->configErrorEnum[$this->var['configValid']] : 'UNKNOWN_ERROR',
|
||||
],
|
||||
"connectPluginInstalled" => $this->connectPluginInstalled,
|
||||
"connectPluginVersion" => $this->connectPluginVersion,
|
||||
"csrf" => $this->var['csrf_token'],
|
||||
"dateTimeFormat" => [
|
||||
"date" => @$this->getWebguiGlobal('display')['date'] ?? '',
|
||||
"time" => @$this->getWebguiGlobal('display')['time'] ?? '',
|
||||
],
|
||||
"description" => $this->var['COMMENT'] ? htmlspecialchars($this->var['COMMENT']) : '',
|
||||
"deviceCount" => $this->var['deviceCount'],
|
||||
"email" => $this->myservers['remote']['email'] ?? '',
|
||||
"expireTime" => 1000 * (($this->var['regTy'] === 'Trial' || strstr($this->var['regTy'], 'expired')) ? $this->var['regTm2'] : 0),
|
||||
"extraOrigins" => explode(',', $this->myservers['api']['extraOrigins'] ?? ''),
|
||||
"flashProduct" => $this->var['flashProduct'],
|
||||
"flashVendor" => $this->var['flashVendor'],
|
||||
"flashBackupActivated" => empty($this->flashbackupStatus['activated']) ? '' : 'true',
|
||||
"guid" => $this->var['flashGUID'],
|
||||
"hasRemoteApikey" => !empty($this->myservers['remote']['apikey']),
|
||||
"internalPort" => $_SERVER['SERVER_PORT'],
|
||||
"keyfile" => empty($this->var['regFILE']) ? '' : str_replace(['+', '/', '='], ['-', '_', ''], trim(base64_encode(@file_get_contents($this->var['regFILE'])))),
|
||||
"lanIp" => ipaddr(),
|
||||
"locale" => (!empty($_SESSION) && $_SESSION['locale']) ? $_SESSION['locale'] : 'en_US',
|
||||
"model" => $this->var['SYS_MODEL'],
|
||||
"name" => htmlspecialchars($this->var['NAME']),
|
||||
"osVersion" => $this->var['version'],
|
||||
"osVersionBranch" => $this->osVersionBranch,
|
||||
"protocol" => $_SERVER['REQUEST_SCHEME'],
|
||||
"rebootType" => $this->rebootDetails->getRebootType(),
|
||||
"regDev" => @(int)$this->var['regDev'] ?? 0,
|
||||
"regGen" => @(int)$this->var['regGen'],
|
||||
"regGuid" => @$this->var['regGUID'] ?? '',
|
||||
"regTo" => @htmlspecialchars($this->var['regTo']) ?? '',
|
||||
"regTm" => $this->var['regTm'] ? @$this->var['regTm'] * 1000 : '', // JS expects milliseconds
|
||||
"regTy" => @$this->var['regTy'] ?? '',
|
||||
"regExp" => $this->var['regExp'] ? @$this->var['regExp'] * 1000 : '', // JS expects milliseconds
|
||||
"registered" => $this->registered,
|
||||
"registeredTime" => $this->myservers['remote']['regWizTime'] ?? '',
|
||||
"site" => $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'],
|
||||
"state" => strtoupper(empty($this->var['regCheck']) ? $this->var['regTy'] : $this->var['regCheck']),
|
||||
"theme" => [
|
||||
"banner" => !empty($this->getWebguiGlobal('display')['banner']),
|
||||
"bannerGradient" => $this->getWebguiGlobal('display')['showBannerGradient'] === 'yes' ?? false,
|
||||
"bgColor" => ($this->getWebguiGlobal('display')['background']) ? '#' . $this->getWebguiGlobal('display')['background'] : '',
|
||||
"descriptionShow" => (!empty($this->getWebguiGlobal('display')['headerdescription']) && $this->getWebguiGlobal('display')['headerdescription'] !== 'no'),
|
||||
"metaColor" => ($this->getWebguiGlobal('display')['headermetacolor'] ?? '') ? '#' . $this->getWebguiGlobal('display')['headermetacolor'] : '',
|
||||
"name" => $this->getWebguiGlobal('display')['theme'],
|
||||
"textColor" => ($this->getWebguiGlobal('display')['header']) ? '#' . $this->getWebguiGlobal('display')['header'] : '',
|
||||
],
|
||||
"ts" => time(),
|
||||
"uptime" => 1000 * (time() - round(strtok(exec("cat /proc/uptime"), ' '))),
|
||||
"username" => $this->myservers['remote']['username'] ?? '',
|
||||
"wanFQDN" => $this->nginx['NGINX_WANFQDN'] ?? '',
|
||||
];
|
||||
|
||||
return $serverState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the server information as a JSON string
|
||||
*
|
||||
* @return string A JSON string containing server information.
|
||||
*/
|
||||
public function getServerStateJson() {
|
||||
return json_encode($this->getServerState());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,210 +1,385 @@
|
||||
<?php
|
||||
$webComponentTranslations = [
|
||||
($_SESSION['locale']) ? $_SESSION['locale'] : 'en_US' => [
|
||||
'LAN IP' => _('LAN IP'),
|
||||
'LAN IP {0}' => sprintf(_('LAN IP %s'), '{0}'),
|
||||
'LAN IP Copied' => _('LAN IP Copied'),
|
||||
'Click to Copy LAN IP {0}' => sprintf(_('Click to copy LAN IP %s'), '{0}'),
|
||||
'Trial Key Expired at {0}' => sprintf(_('Trial Key Expired at %s'), '{0}'),
|
||||
'Trial Key Expires at {0}' => sprintf(_('Trial Key Expires at %s'), '{0}'),
|
||||
'Trial Key Expired {0}' => sprintf(_('Trial Key Expired %s'), '{0}'),
|
||||
'Trial Key Expires in {0}' => sprintf(_('Trial Key Expires in %s'), '{0}'),
|
||||
'Server Up Since {0}' => sprintf(_('Server Up Since %s'), '{0}'),
|
||||
'Uptime {0}' => sprintf(_('Uptime %s'), '{0}'),
|
||||
'year' => sprintf(_('%s year'), '{n}') . ' | ' . sprintf(_('%s years'), '{n}'),
|
||||
'month' => sprintf(_('%s month'), '{n}') . ' | ' . sprintf(_('%s months'), '{n}'),
|
||||
'day' => sprintf(_('%s day'), '{n}') . ' | ' . sprintf(_('%s days'), '{n}'),
|
||||
'hour' => sprintf(_('%s hour'), '{n}') . ' | ' . sprintf(_('%s hours'), '{n}'),
|
||||
'minute' => sprintf(_('%s minute'), '{n}') . ' | ' . sprintf(_('%s minutes'), '{n}'),
|
||||
'second' => sprintf(_('%s second'), '{n}') . ' | ' . sprintf(_('%s seconds'), '{n}'),
|
||||
'ago' => _('ago'),
|
||||
'Purchase' => _('Purchase'),
|
||||
'Upgrade' => _('Upgrade'),
|
||||
'Fix Error' => _('Fix Error'),
|
||||
'Get Started' => _('Get Started'),
|
||||
'Trial Expired, see options below' => _('Trial Expired, see options below'),
|
||||
'Learn more about the error' => _('Learn more about the error'),
|
||||
'Close Dropdown' => _('Close Dropdown'),
|
||||
'Open Dropdown' => _('Open Dropdown'),
|
||||
'Thank you for installing Connect!' => _('Thank you for installing Connect!'),
|
||||
'Sign In to your Unraid.net account to get started' => _('Sign In to your Unraid.net account to get started'),
|
||||
'Go to Connect' => _('Go to Connect'),
|
||||
'Opens Connect in new tab' => _('Opens Connect in new tab'),
|
||||
'Manage Unraid.net Account' => _('Manage Unraid.net Account'),
|
||||
'Manage Unraid.net Account in new tab' => _('Manage Unraid.net Account in new tab'),
|
||||
'Settings' => _('Settings'),
|
||||
'Go to Connect plugin settings' => _('Go to Connect plugin settings'),
|
||||
'Enhance your Unraid experience with Connect' => _('Enhance your Unraid experience with Connect'),
|
||||
'Beta' => _('Beta'),
|
||||
'Loading' => _('Loading'),
|
||||
'Restarting unraid-api…' => _('Restarting unraid-api…'),
|
||||
'unraid-api is offline' => _('unraid-api is offline'),
|
||||
'Introducing Unraid Connect' => _('Introducing Unraid Connect'),
|
||||
'Enhance your Unraid experience' => _('Enhance your Unraid experience'),
|
||||
'Connected' => _('Connected'),
|
||||
'Dynamic Remote Access' => _('Dynamic Remote Access'),
|
||||
'Toggle on/off server accessibility with dynamic remote access. Automatically turn on UPnP and open a random WAN port on your router at the click of a button and close off access in seconds.' => _('Toggle on/off server accessibility with dynamic remote access.') . ' ' . _('Automatically turn on UPnP and open a random WAN port on your router at the click of a button and close off access in seconds.'),
|
||||
'Manage Your Server Within Connect' => _('Manage Your Server Within Connect'),
|
||||
'Servers equipped with a myunraid.net certificate can be managed directly from within the Connect web UI. Manage multiple servers from your phone, tablet, laptop, or PC in the same browser window.' => _('Servers equipped with a myunraid.net certificate can be managed directly from within the Connect web UI.') . ' ' . _('Manage multiple servers from your phone, tablet, laptop, or PC in the same browser window.'),
|
||||
'Deep Linking' => _('Deep Linking'),
|
||||
'The Connect dashboard links to relevant sections of the webgui, allowing quick access to those settings and server sections.' => _('The Connect dashboard links to relevant sections of the webgui, allowing quick access to those settings and server sections.'),
|
||||
'Online Flash Backup' => _('Online Flash Backup'),
|
||||
'Never ever be left without a backup of your config. If you need to change flash drives, generate a backup from Connect and be up and running in minutes.' => _('Never ever be left without a backup of your config.') . ' ' . _('If you need to change flash drives, generate a backup from Connect and be up and running in minutes.'),
|
||||
'Real-time Monitoring' => _('Real-time Monitoring'),
|
||||
'Get an overview of your server\'s state, storage space, apps and VMs status, and more.' => _('Get an overview of your server\'s state, storage space, apps and VMs status, and more.'),
|
||||
'Customizable Dashboard Tiles' => _('Customizable Dashboard Tiles'),
|
||||
'Set custom server tiles how you like and automatically display your server\'s banner image on your Connect Dashboard.' => _('Set custom server tiles how you like and automatically display your server\'s banner image on your Connect Dashboard.'),
|
||||
'License Management' => _('License Management'),
|
||||
'Manage your license keys at any time via the My Keys section.' => _('Manage your license keys at any time via the My Keys section.'),
|
||||
'Plus more on the way' => _('Plus more on the way'),
|
||||
'All you need is an active internet connection, an Unraid.net account, and the Connect plugin. Get started by installing the plugin.' => _('All you need is an active internet connection, an Unraid.net account, and the Connect plugin.') . ' ' . _('Get started by installing the plugin.'),
|
||||
'Checkout the Connect Documentation' => _('Checkout the Connect Documentation'),
|
||||
'No thanks' => _('No thanks'),
|
||||
'Learn more' => _('Learn more'),
|
||||
'Install Connect' => _('Install Connect'),
|
||||
'Close Modal' => _('Close Modal'),
|
||||
'Close' => _('Close'),
|
||||
'Reload' => _('Reload'),
|
||||
'Unraid logo animating with a wave like effect' => _('Unraid logo animating with a wave like effect'),
|
||||
'Click to close modal' => _('Click to close modal'),
|
||||
'Error' => _('Error'),
|
||||
'Performing actions' => _('Performing actions'),
|
||||
'Success!' => _('Success!'),
|
||||
'Something went wrong' => _('Something went wrong'),
|
||||
'Please keep this window open while we perform some actions' => _('Please keep this window open while we perform some actions'),
|
||||
'You\'re one step closer to enhancing your Unraid experience' => _('You\'re one step closer to enhancing your Unraid experience'),
|
||||
'Thank you for purchasing an Unraid {0} Key!' => sprintf(_('Thank you for purchasing an Unraid %s Key!'), '{0}'),
|
||||
'Thank you for upgrading to an Unraid {0} Key!' => sprintf(_('Thank you for upgrading to an Unraid %s Key!'), '{0}'),
|
||||
'Your {0} Key has been replaced!' => sprintf(_('Your %s Key has been replaced!'), '{0}'),
|
||||
'Your Trial key has been extended!' => _('Your Trial key has been extended!'),
|
||||
'Copied' => _('Copied'),
|
||||
'Copy Key URL' => _('Copy Key URL'),
|
||||
'Copy your Key URL: {0}' => sprintf(_('Copy your Key URL: %s'), '{0}'),
|
||||
'Then go to Tools > Registration to manually install it' => _('Then go to Tools > Registration to manually install it'),
|
||||
'Enhance your experience with Unraid Connect' => _('Enhance your experience with Unraid Connect'),
|
||||
'Sign In to utilize Unraid Connect' => _('Sign In to utilize Unraid Connect'),
|
||||
'Configure Connect Features' => _('Configure Connect Features'),
|
||||
'The primary method of support for Unraid Connect is through our forums and Discord.' => _('The primary method of support for Unraid Connect is through our forums and Discord.'),
|
||||
'If you are asked to supply logs, please open a support request on our Contact Page and reply to the email message you receive with your logs attached.' => _('If you are asked to supply logs, please open a support request on our Contact Page and reply to the email message you receive with your logs attached.'),
|
||||
'The logs may contain sensitive information so do not post them publicly.' => _('The logs may contain sensitive information so do not post them publicly.'),
|
||||
'Download unraid-api Logs' => _('Download unraid-api Logs'),
|
||||
'Unraid Connect Forums' => _('Unraid Connect Forums'),
|
||||
'Unraid Discord' => _('Unraid Discord'),
|
||||
'Unraid Contact Page' => _('Unraid Contact Page'),
|
||||
'DNS issue, unable to resolve wanip4.unraid.net' => _('DNS issue, unable to resolve wanip4.unraid.net'),
|
||||
'Unable to fetch client WAN IPv4' => _('Unable to fetch client WAN IPv4'),
|
||||
'Checking WAN IPs…' => _('Checking WAN IPs…'),
|
||||
'Remark: your WAN IPv4 is {0}' => sprintf(_('Remark: your WAN IPv4 is %s'), '{0}'),
|
||||
'Remark: Unraid\'s WAN IPv4 {0} does not match your client\'s WAN IPv4 {1}.' => sprintf(_('Remark: Unraid\'s WAN IPv4 %1s does not match your client\'s WAN IPv4 %2s.'), '{0}', '{1}'),
|
||||
'This may indicate a complex network that will not work with this Remote Access solution.' => _('This may indicate a complex network that will not work with this Remote Access solution.'),
|
||||
'Ignore this message if you are currently connected via Remote Access or VPN.' => _('Ignore this message if you are currently connected via Remote Access or VPN.'),
|
||||
'Ready to update Connect account configuration' => _('Ready to update Connect account configuration'),
|
||||
'Signing in {0}…' => sprintf(_('Signing in %s…'), '{0}'),
|
||||
'Signing out {0}…' => sprintf(_('Signing out %s…'), '{0}'),
|
||||
'{0} Signed In Successfully' => sprintf(_('%s Signed In Successfully'), '{0}'),
|
||||
'{0} Signed Out Successfully' => sprintf(_('%s Signed Out Successfully'), '{0}'),
|
||||
'Sign In Failed' => _('Sign In Failed'),
|
||||
'Sign Out Failed' => _('Sign Out Failed'),
|
||||
'Failed to update Connect account configuration' => _('Failed to update Connect account configuration'),
|
||||
'Callback redirect type not present or incorrect' => _('Callback redirect type not present or incorrect'),
|
||||
'Failed to install key' => _('Failed to install key'),
|
||||
'Ready to Install Key' => _('Ready to Install Key'),
|
||||
'Installing Extended Trial' => _('Installing Extended Trial'),
|
||||
'Installing Recovered' => _('Installing Recovered'),
|
||||
'Installing Replaced' => _('Installing Replaced'),
|
||||
'{0} {1} Key…' => sprintf(_('%1s %2s Key…'), '{0}', '{1}'),
|
||||
'{1} Key {0} Successfully' => sprintf(_('%2s Key %1s Successfully'), '{0}', '{1}'),
|
||||
'Failed to {0} {1} Key' => sprintf(_('Failed to %1s %2s Key'), '{0}', '{1}'),
|
||||
'Purchase Key' => _('Purchase Key'),
|
||||
'Upgrade Key' => _('Upgrade Key'),
|
||||
'Recover Key' => _('Recover Key'),
|
||||
'Redeem Activation Code' => _('Redeem Activation Code'),
|
||||
'Replace Key' => _('Replace Key'),
|
||||
'Sign In with Unraid.net Account' => _('Sign In with Unraid.net Account'),
|
||||
'Sign Out of Unraid.net' => _('Sign Out of Unraid.net'),
|
||||
'Extend Trial' => _('Extend Trial'),
|
||||
'Start Free 30 Day Trial' => _('Start Free 30 Day Trial'),
|
||||
'Go to Management Access Now' => _('Go to Management Access Now'),
|
||||
'Contact Support' => _('Contact Support'),
|
||||
'Learn More' => _('Learn More'),
|
||||
'No Keyfile' => _('No Keyfile'),
|
||||
'Let\'s Unleash your Hardware!' => _('Let\'s Unleash your Hardware!'),
|
||||
'<p>Your server will not be usable until you purchase a Registration key or install a free 30 day <em>Trial</em> key. A <em>Trial</em> key provides all the functionality of a Pro Registration key.</p><p>Registration keys are bound to your USB Flash boot device serial number (GUID). Please use a high quality name brand device at least 1GB in size.</p><p>Note: USB memory card readers are generally not supported because most do not present unique serial numbers.</p><p><strong>Important:</strong></p><ul class="list-disc pl-16px"><li>Please make sure your server time is accurate to within 5 minutes</li><li>Please make sure there is a DNS server specified</li></ul>' => '<p>' . _('Your server will not be usable until you purchase a Registration key or install a free 30 day <em>Trial</em> key.') . ' ' . _('A <em>Trial</em> key provides all the functionality of a Pro Registration key.') . '</p><p>' . _('Registration keys are bound to your USB Flash boot device serial number (GUID).') . ' ' . _('Please use a high quality name brand device at least 1GB in size.') . '</p><p>' . _('Note: USB memory card readers are generally not supported because most do not present unique serial numbers.') . '</p><p>' . _('*Important:*') . '</p><ul class="list-disc pl-16px"><li>' . _('Please make sure your server time is accurate to within 5 minutes') . '</li><li>' . _('Please make sure there is a DNS server specified') . '</li>>' . '</ul>',
|
||||
'Trial' => _('Trial'),
|
||||
'Thank you for choosing Unraid OS!' => _('Thank you for choosing Unraid OS!'),
|
||||
'<p>Your <em>Trial</em> key includes all the functionality and device support of a <em>Pro</em> key.</p><p>After your <em>Trial</em> has reached expiration, your server <strong>still functions normally</strong> until the next time you Stop the array or reboot your server.</p><p>At that point you may either purchase a license key or request a <em>Trial</em> extension.</p>' => '<p>' . _('Your **Trial** key includes all the functionality and device support of a **Pro** key') . '</p><p>' . _('After your **Trial** has reached expiration, your server *still functions normally* until the next time you Stop the array or reboot your server') . '</p><p>' . _('At that point you may either purchase a license key or request a *Trial* extension.') . '</p>',
|
||||
'Trial Expired' => _('Trial Expired'),
|
||||
'Your Trial has expired' => _('Your Trial has expired'),
|
||||
'<p>To continue using Unraid OS you may purchase a license key. Alternately, you may request a Trial extension.</p>' => '<p>' . _('To continue using Unraid OS you may purchase a license key.') . ' ' . _('Alternately, you may request a Trial extension.') . '</p>',
|
||||
'<p>You have used all your Trial extensions. To continue using Unraid OS you may purchase a license key.</p>' => '<p>' . _('You have used all your Trial extensions.') . ' ' . _('To continue using Unraid OS you may purchase a license key.') . '</p>',
|
||||
'Basic' => _('Basic'),
|
||||
'<p>Register for Connect by signing in to your Unraid.net account</p>' => '<p>' . _('Register for Connect by signing in to your Unraid.net account') . '</p>',
|
||||
'<p>To support more storage devices as your server grows, click Upgrade Key.</p>' => '<p>' . _('To support more storage devices as your server grows, click Upgrade Key.') . '</p>',
|
||||
'Plus' => _('Plus'),
|
||||
'Pro' => _('Pro'),
|
||||
'Flash GUID Error' => _('Flash GUID Error'),
|
||||
'Registration key / USB Flash GUID mismatch' => _('Registration key / USB Flash GUID mismatch'),
|
||||
'<p>Your Unraid registration key is ineligible for replacement as it has been replaced within the last 12 months.</p>' => '<p>' . _('Your Unraid registration key is ineligible for replacement as it has been replaced within the last 12 months.') . '</p>',
|
||||
'<p>The license key file does not correspond to the USB Flash boot device. Please copy the correct key file to the /config directory on your USB Flash boot device or choose Purchase Key.</p><p>Your Unraid registration key is ineligible for replacement as it is blacklisted.</p>' => '<p>' . _('The license key file does not correspond to the USB Flash boot device.') . ' ' . _('Please copy the correct key file to the /config directory on your USB Flash boot device or choose Purchase Key') . '</p><p>' . _('Your Unraid registration key is ineligible for replacement as it is blacklisted.') . '</p>',
|
||||
'<p>The license key file does not correspond to the USB Flash boot device. Please copy the correct key file to the /config directory on your USB Flash boot device or choose Purchase Key.</p><p>Your Unraid registration key is ineligible for replacement as it has been replaced within the last 12 months.</p>' => '<p>' . _('The license key file does not correspond to the USB Flash boot device.') . ' ' . _('Please copy the correct key file to the /config directory on your USB Flash boot device or choose Purchase Key') . '</p><p>' . _('Your Unraid registration key is ineligible for replacement as it has been replaced within the last 12 months.') . '</p>',
|
||||
'<p>The license key file does not correspond to the USB Flash boot device. Please copy the correct key file to the /config directory on your USB Flash boot device.</p><p>You may also attempt to Purchase or Replace your key.</p>' => '<p>' . _('The license key file does not correspond to the USB Flash boot device.') . ' ' . _('Please copy the correct key file to the /config directory on your USB Flash boot device') . '</p><p>' . _('You may also attempt to Purchase or Replace your key.') . '</p>',
|
||||
'Multiple License Keys Present' => _('Multiple License Keys Present'),
|
||||
'<p>There are multiple license key files present on your USB flash device and none of them correspond to the USB Flash boot device. Please remove all key files, except the one you want to replace, from the /config directory on your USB Flash boot device.</p><p>Alternately you may purchase a license key for this USB flash device.</p><p>If you want to replace one of your license keys with a new key bound to this USB Flash device, please first remove all other key files first.</p>' => '<p>' . _('There are multiple license key files present on your USB flash device and none of them correspond to the USB Flash boot device.') . ' ' . _('Please remove all key files, except the one you want to replace, from the /config directory on your USB Flash boot device') . '</p><p>' . _('Alternately you may purchase a license key for this USB flash device') . '</p><p>' . _('If you want to replace one of your license keys with a new key bound to this USB Flash device, please first remove all other key files first.') . '</p>',
|
||||
'Missing key file' => _('Missing key file'),
|
||||
'<p>Your license key file is corrupted or missing. The key file should be located in the /config directory on your USB Flash boot device.</p><p>You may attempt to recover your key with your Unraid.net account.</p><p>If this was an expired Trial installation, you may purchase a license key.</p>' => '<p>' . _('Your license key file is corrupted or missing.') . ' ' . _('The key file should be located in the /config directory on your USB Flash boot device') . '</p><p>' . _('If you do not have a backup copy of your license key file you may attempt to recover your key with your Unraid.net account') . '</p><p>' . _('If this was an expired Trial installation, you may purchase a license key.') . '</p>',
|
||||
'<p>Your license key file is corrupted or missing. The key file should be located in the /config directory on your USB Flash boot device.</p><p>If you do not have a backup copy of your license key file you may attempt to recover your key.</p><p>If this was an expired Trial installation, you may purchase a license key.</p>' => '<p>' . _('Your license key file is corrupted or missing.') . ' ' . _('The key file should be located in the /config directory on your USB Flash boot device') . '</p><p>' . _('If you do not have a backup copy of your license key file you may attempt to recover your key with your Unraid.net account') . '</p><p>' . _('If this was an expired Trial installation, you may purchase a license key.') . '</p>',
|
||||
'Invalid installation' => _('Invalid installation'),
|
||||
'<p>It is not possible to use a Trial key with an existing Unraid OS installation.</p><p>You may purchase a license key corresponding to this USB Flash device to continue using this installation.</p>' => '<p>' . _('It is not possible to use a Trial key with an existing Unraid OS installation') . '</p><p>' . _('You may purchase a license key corresponding to this USB Flash device to continue using this installation.') . '</p>',
|
||||
/**
|
||||
* Welcome to the Thunderdome. A place where you can get lost in a sea of translations.
|
||||
*
|
||||
* This file is used to generate the translations for the Vue3 based web components.
|
||||
*
|
||||
* These key value pairs are derived from web/locales/en_US.json.
|
||||
* We use the en_US.json file as the source of truth for the translations.
|
||||
* This file is then used to generate the translations for the web components and delivered to them via PHP as a JSON object in myservers2.php (my favorite file name).
|
||||
* The web components then use the translations to display the appropriate text to the user.
|
||||
*
|
||||
* Workflow is as follows:
|
||||
* 1. Create a new translation in en_US.json
|
||||
* 2. Create a new translation in this file
|
||||
* 3. Open unraid/lang-en_US and add the new translation to the appropriate file – typically translations.txt.
|
||||
* 3a. This is done so that the translation is available to the rest of the Unraid webgui.
|
||||
* 3b. Unfortunately there are numerous "special characters" that aren't allowed in Unraid's translation keys as they're automatically stripped out.
|
||||
* 3c. This means that we have to create a new translation key that is a "safe" version of the translation key used in the web components.
|
||||
* 3d. Special characters that are not allowed are: . ( ) { } [ ] ; ' " < > * /
|
||||
* 3e. There are likely more but I'm unable to find the documentation PDF. Go figure.
|
||||
*
|
||||
* Usage example:
|
||||
* ```
|
||||
* $wCTranslations = new WebComponentTranslations();
|
||||
* $wCTranslations->getTranslations();
|
||||
* ```
|
||||
*/
|
||||
class WebComponentTranslations
|
||||
{
|
||||
private $translations = [];
|
||||
|
||||
'No USB flash configuration data' => _('No USB flash configuration data'),
|
||||
'<p>There is a problem with your USB Flash device</p>' => '<p>' . _('There is a problem with your USB Flash device') . '</p>',
|
||||
'No Flash' => _('No Flash'),
|
||||
'Cannot access your USB Flash boot device' => _('Cannot access your USB Flash boot device'),
|
||||
'<p>There is a physical problem accessing your USB Flash boot device</p>' => '<p>' . _('There is a physical problem accessing your USB Flash boot device') . '</p>',
|
||||
'BLACKLISTED' => _('BLACKLISTED'),
|
||||
'Blacklisted USB Flash GUID' => _('Blacklisted USB Flash GUID'),
|
||||
'<p>This USB Flash boot device has been blacklisted. This can occur as a result of transferring your license key to a replacement USB Flash device, and you are currently booted from your old USB Flash device.</p><p>A USB Flash device may also be blacklisted if we discover the serial number is not unique – this is common with USB card readers.</p>' => '<p>' . _('This USB Flash boot device has been blacklisted.') . ' ' . _('This can occur as a result of transferring your license key to a replacement USB Flash device, and you are currently booted from your old USB Flash device.') . '</p><p>' . _('A USB Flash device may also be blacklisted if we discover the serial number is not unique – this is common with USB card readers.') . '</p>',
|
||||
'USB Flash device error' => _('USB Flash device error'),
|
||||
'<p>This USB Flash device has an invalid GUID. Please try a different USB Flash device</p>' => '<p>' . _('This USB Flash device has an invalid GUID. Please try a different USB Flash device') . '</p>',
|
||||
'USB Flash has no serial number' => _('USB Flash has no serial number'),
|
||||
'Trial Requires Internet Connection' => _('Trial Requires Internet Connection'),
|
||||
'Cannot validate Unraid Trial key' => _('Cannot validate Unraid Trial key'),
|
||||
'<p>Your Trial key requires an internet connection.</p><p><a href="/Settings/NetworkSettings" class="underline">Please check Settings > Network</a></p>' => '<p>' . _('Your Trial key requires an internet connection') . '</p><p><a href="/Settings/NetworkSettings" class="underline">' . _('Please check Settings > Network') . '</a></p>',
|
||||
'Stale' => _('Stale'),
|
||||
'Stale Server' => _('Stale Server'),
|
||||
'<p>Please refresh the page to ensure you load your latest configuration</p>' => '<p>' . _('Please refresh the page to ensure you load your latest configuration') . '</p>',
|
||||
'Invalid API Key' => _('Invalid API Key'),
|
||||
'Please sign out then sign back in to refresh your API key.' => _('Please sign out then sign back in to refresh your API key.'),
|
||||
'Invalid API Key Format' => _('Invalid API Key Format'),
|
||||
'Too Many Devices' => _('Too Many Devices'),
|
||||
'You have exceeded the number of devices allowed for your license. Please remove a device before adding another.' => _('You have exceeded the number of devices allowed for your license. Please remove a device before adding another.'),
|
||||
'Unraid Connect Install Failed' => _('Unraid Connect Install Failed'),
|
||||
'Rebooting will likely solve this.' => _('Rebooting will likely solve this.'),
|
||||
'SSL certificates for unraid.net deprecated' => _('SSL certificates for unraid.net deprecated'),
|
||||
'On January 1st, 2023 SSL certificates for unraid.net were deprecated. You MUST provision a new SSL certificate to use our new myunraid.net domain. You can do this on the Settings > Management Access page.' => _('On January 1st, 2023 SSL certificates for unraid.net were deprecated. You MUST provision a new SSL certificate to use our new myunraid.net domain. You can do this on the Settings > Management Access page.'),
|
||||
'Unraid Connect Error' => _('Unraid Connect Error'),
|
||||
'Trial Key Creation Failed' => _('Trial Key Creation Failed'),
|
||||
'Error creatiing a trial key. Please try again later.' => _('Error creatiing a trial key. Please try again later.'),
|
||||
'Extending your free trial by 15 days' => _('Extending your free trial by 15 days'),
|
||||
'Please keep this window open' => _('Please keep this window open'),
|
||||
'Starting your free 30 day trial' => _('Starting your free 30 day trial'),
|
||||
'Trial Key Created' => _('Trial Key Created'),
|
||||
'Please wait while the page reloads to install your trial key' => _('Please wait while the page reloads to install your trial key'),
|
||||
'A Trial key provides all the functionality of a Pro Registration key' => _('A Trial key provides all the functionality of a Pro Registration key'),
|
||||
'Extension Installed' => _('Extension Installed'),
|
||||
'Recovered' => _('Recovered'),
|
||||
'Replaced' => _('Replaced'),
|
||||
'Installing' => _('Installing'),
|
||||
'Installed' => _('Installed'),
|
||||
'Install' => _('Install'),
|
||||
'Install Extended' => _('Install Extended'),
|
||||
'Install Recovered' => _('Install Recovered'),
|
||||
'Install Replaced' => _('Install Replaced'),
|
||||
'Your free Trial key provides all the functionality of a Pro Registration key' => _('Your free Trial key provides all the functionality of a Pro Registration key'),
|
||||
'Calculating trial expiration…' => _('Calculating trial expiration…'),
|
||||
'Signing In' => _('Signing In'),
|
||||
'Signing Out' => _('Signing Out'),
|
||||
'Sign In requires the local unraid-api to be running' => _('Sign In requires the local unraid-api to be running'),
|
||||
'Sign Out requires the local unraid-api to be running' => _('Sign Out requires the local unraid-api to be running')
|
||||
],
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
$this->initializeTranslations();
|
||||
}
|
||||
|
||||
private function initializeTranslations()
|
||||
{
|
||||
$this->translations[$_SESSION['locale'] ?? 'en_US'] = [
|
||||
'LAN IP' => _('LAN IP'),
|
||||
'LAN IP {0}' => sprintf(_('LAN IP %s'), '{0}'),
|
||||
'LAN IP Copied' => _('LAN IP Copied'),
|
||||
'Click to Copy LAN IP {0}' => sprintf(_('Click to copy LAN IP %s'), '{0}'),
|
||||
'Trial Key Expired at {0}' => sprintf(_('Trial Key Expired at %s'), '{0}'),
|
||||
'Trial Key Expires at {0}' => sprintf(_('Trial Key Expires at %s'), '{0}'),
|
||||
'Trial Key Expired {0}' => sprintf(_('Trial Key Expired %s'), '{0}'),
|
||||
'Trial Key Expires in {0}' => sprintf(_('Trial Key Expires in %s'), '{0}'),
|
||||
'Server Up Since {0}' => sprintf(_('Server Up Since %s'), '{0}'),
|
||||
'Uptime {0}' => sprintf(_('Uptime %s'), '{0}'),
|
||||
'year' => sprintf(_('%s year'), '{n}') . ' | ' . sprintf(_('%s years'), '{n}'),
|
||||
'month' => sprintf(_('%s month'), '{n}') . ' | ' . sprintf(_('%s months'), '{n}'),
|
||||
'day' => sprintf(_('%s day'), '{n}') . ' | ' . sprintf(_('%s days'), '{n}'),
|
||||
'hour' => sprintf(_('%s hour'), '{n}') . ' | ' . sprintf(_('%s hours'), '{n}'),
|
||||
'minute' => sprintf(_('%s minute'), '{n}') . ' | ' . sprintf(_('%s minutes'), '{n}'),
|
||||
'second' => sprintf(_('%s second'), '{n}') . ' | ' . sprintf(_('%s seconds'), '{n}'),
|
||||
'ago' => _('ago'),
|
||||
'Purchase' => _('Purchase'),
|
||||
'Upgrade' => _('Upgrade'),
|
||||
'Fix Error' => _('Fix Error'),
|
||||
'Get Started' => _('Get Started'),
|
||||
'Trial Expired, see options below' => _('Trial Expired, see options below'),
|
||||
'Learn more about the error' => _('Learn more about the error'),
|
||||
'Close Dropdown' => _('Close Dropdown'),
|
||||
'Open Dropdown' => _('Open Dropdown'),
|
||||
'Thank you for installing Connect!' => _('Thank you for installing Connect!'),
|
||||
'Sign In to your Unraid.net account to get started' => _('Sign In to your Unraid.net account to get started'),
|
||||
'Go to Connect' => _('Go to Connect'),
|
||||
'Opens Connect in new tab' => _('Opens Connect in new tab'),
|
||||
'Manage Unraid.net Account' => _('Manage Unraid.net Account'),
|
||||
'Manage Unraid.net Account in new tab' => _('Manage Unraid.net Account in new tab'),
|
||||
'Settings' => _('Settings'),
|
||||
'Go to Connect plugin settings' => _('Go to Connect plugin settings'),
|
||||
'Enhance your Unraid experience with Connect' => _('Enhance your Unraid experience with Connect'),
|
||||
'Beta' => _('Beta'),
|
||||
'Loading' => _('Loading'),
|
||||
'Restarting unraid-api…' => _('Restarting unraid-api…'),
|
||||
'unraid-api is offline' => _('unraid-api is offline'),
|
||||
'Introducing Unraid Connect' => _('Introducing Unraid Connect'),
|
||||
'Enhance your Unraid experience' => _('Enhance your Unraid experience'),
|
||||
'Connected' => _('Connected'),
|
||||
'Dynamic Remote Access' => _('Dynamic Remote Access'),
|
||||
'Toggle on/off server accessibility with dynamic remote access. Automatically turn on UPnP and open a random WAN port on your router at the click of a button and close off access in seconds.' => _('Toggle on/off server accessibility with dynamic remote access.') . ' ' . _('Automatically turn on UPnP and open a random WAN port on your router at the click of a button and close off access in seconds.'),
|
||||
'Manage Your Server Within Connect' => _('Manage Your Server Within Connect'),
|
||||
'Servers equipped with a myunraid.net certificate can be managed directly from within the Connect web UI. Manage multiple servers from your phone, tablet, laptop, or PC in the same browser window.' => _('Servers equipped with a myunraid.net certificate can be managed directly from within the Connect web UI.') . ' ' . _('Manage multiple servers from your phone, tablet, laptop, or PC in the same browser window.'),
|
||||
'Deep Linking' => _('Deep Linking'),
|
||||
'The Connect dashboard links to relevant sections of the webgui, allowing quick access to those settings and server sections.' => _('The Connect dashboard links to relevant sections of the webgui, allowing quick access to those settings and server sections.'),
|
||||
'Online Flash Backup' => _('Online Flash Backup'),
|
||||
'Never ever be left without a backup of your config. If you need to change flash drives, generate a backup from Connect and be up and running in minutes.' => _('Never ever be left without a backup of your config.') . ' ' . _('If you need to change flash drives, generate a backup from Connect and be up and running in minutes.'),
|
||||
'Real-time Monitoring' => _('Real-time Monitoring'),
|
||||
'Get an overview of your server\'s state, storage space, apps and VMs status, and more.' => _('Get an overview of your server\'s state, storage space, apps and VMs status, and more.'),
|
||||
'Customizable Dashboard Tiles' => _('Customizable Dashboard Tiles'),
|
||||
'Set custom server tiles how you like and automatically display your server\'s banner image on your Connect Dashboard.' => _('Set custom server tiles how you like and automatically display your server\'s banner image on your Connect Dashboard.'),
|
||||
'License Management' => _('License Management'),
|
||||
'Manage your license keys at any time via the My Keys section.' => _('Manage your license keys at any time via the My Keys section.'),
|
||||
'Plus more on the way' => _('Plus more on the way'),
|
||||
'All you need is an active internet connection, an Unraid.net account, and the Connect plugin. Get started by installing the plugin.' => _('All you need is an active internet connection, an Unraid.net account, and the Connect plugin.') . ' ' . _('Get started by installing the plugin.'),
|
||||
'Checkout the Connect Documentation' => _('Checkout the Connect Documentation'),
|
||||
'No thanks' => _('No thanks'),
|
||||
'Learn more' => _('Learn more'),
|
||||
'Install Connect' => _('Install Connect'),
|
||||
'Close Modal' => _('Close Modal'),
|
||||
'Close' => _('Close'),
|
||||
'Reload' => _('Reload'),
|
||||
'Unraid logo animating with a wave like effect' => _('Unraid logo animating with a wave like effect'),
|
||||
'Click to close modal' => _('Click to close modal'),
|
||||
'Error' => _('Error'),
|
||||
'Performing actions' => _('Performing actions'),
|
||||
'Success!' => _('Success!'),
|
||||
'Something went wrong' => _('Something went wrong'),
|
||||
'Please keep this window open while we perform some actions' => _('Please keep this window open while we perform some actions'),
|
||||
'You\'re one step closer to enhancing your Unraid experience' => _('You\'re one step closer to enhancing your Unraid experience'),
|
||||
'Thank you for purchasing an Unraid {0} Key!' => sprintf(_('Thank you for purchasing an Unraid %s Key!'), '{0}'),
|
||||
'Thank you for upgrading to an Unraid {0} Key!' => sprintf(_('Thank you for upgrading to an Unraid %s Key!'), '{0}'),
|
||||
'Your {0} Key has been replaced!' => sprintf(_('Your %s Key has been replaced!'), '{0}'),
|
||||
'Your Trial key has been extended!' => _('Your Trial key has been extended!'),
|
||||
'Copied' => _('Copied'),
|
||||
'Copy Key URL' => _('Copy Key URL'),
|
||||
'Copy your Key URL: {0}' => sprintf(_('Copy your Key URL: %s'), '{0}'),
|
||||
'Then go to Tools > Registration to manually install it' => _('Then go to Tools > Registration to manually install it'),
|
||||
'Enhance your experience with Unraid Connect' => _('Enhance your experience with Unraid Connect'),
|
||||
'Sign In to utilize Unraid Connect' => _('Sign In to utilize Unraid Connect'),
|
||||
'Configure Connect Features' => _('Configure Connect Features'),
|
||||
'The primary method of support for Unraid Connect is through our forums and Discord.' => _('The primary method of support for Unraid Connect is through our forums and Discord.'),
|
||||
'If you are asked to supply logs, please open a support request on our Contact Page and reply to the email message you receive with your logs attached.' => _('If you are asked to supply logs, please open a support request on our Contact Page and reply to the email message you receive with your logs attached.'),
|
||||
'The logs may contain sensitive information so do not post them publicly.' => _('The logs may contain sensitive information so do not post them publicly.'),
|
||||
'Download unraid-api Logs' => _('Download unraid-api Logs'),
|
||||
'Unraid Connect Forums' => _('Unraid Connect Forums'),
|
||||
'Unraid Discord' => _('Unraid Discord'),
|
||||
'Unraid Contact Page' => _('Unraid Contact Page'),
|
||||
'DNS issue, unable to resolve wanip4.unraid.net' => _('DNS issue, unable to resolve wanip4.unraid.net'),
|
||||
'Unable to fetch client WAN IPv4' => _('Unable to fetch client WAN IPv4'),
|
||||
'Checking WAN IPs…' => _('Checking WAN IPs…'),
|
||||
'Remark: your WAN IPv4 is {0}' => sprintf(_('Remark: your WAN IPv4 is %s'), '{0}'),
|
||||
'Remark: Unraid\'s WAN IPv4 {0} does not match your client\'s WAN IPv4 {1}.' => sprintf(_('Remark: Unraid\'s WAN IPv4 %1s does not match your client\'s WAN IPv4 %2s.'), '{0}', '{1}'),
|
||||
'This may indicate a complex network that will not work with this Remote Access solution.' => _('This may indicate a complex network that will not work with this Remote Access solution.'),
|
||||
'Ignore this message if you are currently connected via Remote Access or VPN.' => _('Ignore this message if you are currently connected via Remote Access or VPN.'),
|
||||
'Ready to update Connect account configuration' => _('Ready to update Connect account configuration'),
|
||||
'Signing in {0}…' => sprintf(_('Signing in %s…'), '{0}'),
|
||||
'Signing out {0}…' => sprintf(_('Signing out %s…'), '{0}'),
|
||||
'{0} Signed In Successfully' => sprintf(_('%s Signed In Successfully'), '{0}'),
|
||||
'{0} Signed Out Successfully' => sprintf(_('%s Signed Out Successfully'), '{0}'),
|
||||
'Sign In Failed' => _('Sign In Failed'),
|
||||
'Sign Out Failed' => _('Sign Out Failed'),
|
||||
'Failed to update Connect account configuration' => _('Failed to update Connect account configuration'),
|
||||
'Callback redirect type not present or incorrect' => _('Callback redirect type not present or incorrect'),
|
||||
'Failed to install key' => _('Failed to install key'),
|
||||
'Ready to Install Key' => _('Ready to Install Key'),
|
||||
'Installing Extended Trial' => _('Installing Extended Trial'),
|
||||
'Installing Recovered' => _('Installing Recovered'),
|
||||
'Installing Replaced' => _('Installing Replaced'),
|
||||
'{0} {1} Key…' => sprintf(_('%1s %2s Key…'), '{0}', '{1}'),
|
||||
'{1} Key {0} Successfully' => sprintf(_('%2s Key %1s Successfully'), '{0}', '{1}'),
|
||||
'Failed to {0} {1} Key' => sprintf(_('Failed to %1s %2s Key'), '{0}', '{1}'),
|
||||
'Purchase Key' => _('Purchase Key'),
|
||||
'Upgrade Key' => _('Upgrade Key'),
|
||||
'Recover Key' => _('Recover Key'),
|
||||
'Redeem Activation Code' => _('Redeem Activation Code'),
|
||||
'Replace Key' => _('Replace Key'),
|
||||
'Sign In with Unraid.net Account' => _('Sign In with Unraid.net Account'),
|
||||
'Sign Out of Unraid.net' => _('Sign Out of Unraid.net'),
|
||||
'Extend Trial' => _('Extend Trial'),
|
||||
'Start Free 30 Day Trial' => _('Start Free 30 Day Trial'),
|
||||
'Go to Management Access Now' => _('Go to Management Access Now'),
|
||||
'Contact Support' => _('Contact Support'),
|
||||
'Learn More' => _('Learn More'),
|
||||
'No Keyfile' => _('No Keyfile'),
|
||||
'Let\'s Unleash your Hardware!' => _('Let\'s Unleash your Hardware!'),
|
||||
'<p>Your server will not be usable until you purchase a Registration key or install a free 30 day <em>Trial</em> key. A <em>Trial</em> key provides all the functionality of a Pro Registration key.</p><p>Registration keys are bound to your USB Flash boot device serial number (GUID). Please use a high quality name brand device at least 1GB in size.</p><p>Note: USB memory card readers are generally not supported because most do not present unique serial numbers.</p><p><strong>Important:</strong></p><ul class="list-disc pl-16px"><li>Please make sure your server time is accurate to within 5 minutes</li><li>Please make sure there is a DNS server specified</li></ul>' => '<p>' . _('Your server will not be usable until you purchase a Registration key or install a free 30 day <em>Trial</em> key.') . ' ' . _('A <em>Trial</em> key provides all the functionality of a Pro Registration key.') . '</p><p>' . _('Registration keys are bound to your USB Flash boot device serial number (GUID).') . ' ' . _('Please use a high quality name brand device at least 1GB in size.') . '</p><p>' . _('Note: USB memory card readers are generally not supported because most do not present unique serial numbers.') . '</p><p>' . _('*Important:*') . '</p><ul class="list-disc pl-16px"><li>' . _('Please make sure your server time is accurate to within 5 minutes') . '</li><li>' . _('Please make sure there is a DNS server specified') . '</li>>' . '</ul>',
|
||||
'Trial' => _('Trial'),
|
||||
'Thank you for choosing Unraid OS!' => _('Thank you for choosing Unraid OS!'),
|
||||
'<p>Your <em>Trial</em> key includes all the functionality and device support of a <em>Pro</em> key.</p><p>After your <em>Trial</em> has reached expiration, your server <strong>still functions normally</strong> until the next time you Stop the array or reboot your server.</p><p>At that point you may either purchase a license key or request a <em>Trial</em> extension.</p>' => '<p>' . _('Your **Trial** key includes all the functionality and device support of a **Pro** key') . '</p><p>' . _('After your **Trial** has reached expiration, your server *still functions normally* until the next time you Stop the array or reboot your server') . '</p><p>' . _('At that point you may either purchase a license key or request a *Trial* extension.') . '</p>',
|
||||
'Trial Expired' => _('Trial Expired'),
|
||||
'Your Trial has expired' => _('Your Trial has expired'),
|
||||
'<p>To continue using Unraid OS you may purchase a license key. Alternately, you may request a Trial extension.</p>' => '<p>' . _('To continue using Unraid OS you may purchase a license key.') . ' ' . _('Alternately, you may request a Trial extension.') . '</p>',
|
||||
'<p>You have used all your Trial extensions. To continue using Unraid OS you may purchase a license key.</p>' => '<p>' . _('You have used all your Trial extensions.') . ' ' . _('To continue using Unraid OS you may purchase a license key.') . '</p>',
|
||||
'Basic' => _('Basic'),
|
||||
'<p>Register for Connect by signing in to your Unraid.net account</p>' => '<p>' . _('Register for Connect by signing in to your Unraid.net account') . '</p>',
|
||||
'<p>To support more storage devices as your server grows, click Upgrade Key.</p>' => '<p>' . _('To support more storage devices as your server grows, click Upgrade Key.') . '</p>',
|
||||
'Plus' => _('Plus'),
|
||||
'Pro' => _('Pro'),
|
||||
'Flash GUID Error' => _('Flash GUID Error'),
|
||||
'Registration key / USB Flash GUID mismatch' => _('Registration key / USB Flash GUID mismatch'),
|
||||
'<p>Your Unraid registration key is ineligible for replacement as it has been replaced within the last 12 months.</p>' => '<p>' . _('Your Unraid registration key is ineligible for replacement as it has been replaced within the last 12 months.') . '</p>',
|
||||
'<p>The license key file does not correspond to the USB Flash boot device. Please copy the correct key file to the /config directory on your USB Flash boot device or choose Purchase Key.</p><p>Your Unraid registration key is ineligible for replacement as it is blacklisted.</p>' => '<p>' . _('The license key file does not correspond to the USB Flash boot device.') . ' ' . _('Please copy the correct key file to the /config directory on your USB Flash boot device or choose Purchase Key') . '</p><p>' . _('Your Unraid registration key is ineligible for replacement as it is blacklisted.') . '</p>',
|
||||
'<p>The license key file does not correspond to the USB Flash boot device. Please copy the correct key file to the /config directory on your USB Flash boot device or choose Purchase Key.</p><p>Your Unraid registration key is ineligible for replacement as it has been replaced within the last 12 months.</p>' => '<p>' . _('The license key file does not correspond to the USB Flash boot device.') . ' ' . _('Please copy the correct key file to the /config directory on your USB Flash boot device or choose Purchase Key') . '</p><p>' . _('Your Unraid registration key is ineligible for replacement as it has been replaced within the last 12 months.') . '</p>',
|
||||
'<p>The license key file does not correspond to the USB Flash boot device. Please copy the correct key file to the /config directory on your USB Flash boot device.</p><p>You may also attempt to Purchase or Replace your key.</p>' => '<p>' . _('The license key file does not correspond to the USB Flash boot device.') . ' ' . _('Please copy the correct key file to the /config directory on your USB Flash boot device') . '</p><p>' . _('You may also attempt to Purchase or Replace your key.') . '</p>',
|
||||
'Multiple License Keys Present' => _('Multiple License Keys Present'),
|
||||
'<p>There are multiple license key files present on your USB flash device and none of them correspond to the USB Flash boot device. Please remove all key files, except the one you want to replace, from the /config directory on your USB Flash boot device.</p><p>Alternately you may purchase a license key for this USB flash device.</p><p>If you want to replace one of your license keys with a new key bound to this USB Flash device, please first remove all other key files first.</p>' => '<p>' . _('There are multiple license key files present on your USB flash device and none of them correspond to the USB Flash boot device.') . ' ' . _('Please remove all key files, except the one you want to replace, from the /config directory on your USB Flash boot device') . '</p><p>' . _('Alternately you may purchase a license key for this USB flash device') . '</p><p>' . _('If you want to replace one of your license keys with a new key bound to this USB Flash device, please first remove all other key files first.') . '</p>',
|
||||
'Missing key file' => _('Missing key file'),
|
||||
'<p>Your license key file is corrupted or missing. The key file should be located in the /config directory on your USB Flash boot device.</p><p>You may attempt to recover your key with your Unraid.net account.</p><p>If this was an expired Trial installation, you may purchase a license key.</p>' => '<p>' . _('Your license key file is corrupted or missing.') . ' ' . _('The key file should be located in the /config directory on your USB Flash boot device') . '</p><p>' . _('If you do not have a backup copy of your license key file you may attempt to recover your key with your Unraid.net account') . '</p><p>' . _('If this was an expired Trial installation, you may purchase a license key.') . '</p>',
|
||||
'<p>Your license key file is corrupted or missing. The key file should be located in the /config directory on your USB Flash boot device.</p><p>If you do not have a backup copy of your license key file you may attempt to recover your key.</p><p>If this was an expired Trial installation, you may purchase a license key.</p>' => '<p>' . _('Your license key file is corrupted or missing.') . ' ' . _('The key file should be located in the /config directory on your USB Flash boot device') . '</p><p>' . _('If you do not have a backup copy of your license key file you may attempt to recover your key with your Unraid.net account') . '</p><p>' . _('If this was an expired Trial installation, you may purchase a license key.') . '</p>',
|
||||
'Invalid installation' => _('Invalid installation'),
|
||||
'<p>It is not possible to use a Trial key with an existing Unraid OS installation.</p><p>You may purchase a license key corresponding to this USB Flash device to continue using this installation.</p>' => '<p>' . _('It is not possible to use a Trial key with an existing Unraid OS installation') . '</p><p>' . _('You may purchase a license key corresponding to this USB Flash device to continue using this installation.') . '</p>',
|
||||
'No USB flash configuration data' => _('No USB flash configuration data'),
|
||||
'<p>There is a problem with your USB Flash device</p>' => '<p>' . _('There is a problem with your USB Flash device') . '</p>',
|
||||
'No Flash' => _('No Flash'),
|
||||
'Cannot access your USB Flash boot device' => _('Cannot access your USB Flash boot device'),
|
||||
'<p>There is a physical problem accessing your USB Flash boot device</p>' => '<p>' . _('There is a physical problem accessing your USB Flash boot device') . '</p>',
|
||||
'BLACKLISTED' => _('BLACKLISTED'),
|
||||
'Blacklisted USB Flash GUID' => _('Blacklisted USB Flash GUID'),
|
||||
'<p>This USB Flash boot device has been blacklisted. This can occur as a result of transferring your license key to a replacement USB Flash device, and you are currently booted from your old USB Flash device.</p><p>A USB Flash device may also be blacklisted if we discover the serial number is not unique – this is common with USB card readers.</p>' => '<p>' . _('This USB Flash boot device has been blacklisted.') . ' ' . _('This can occur as a result of transferring your license key to a replacement USB Flash device, and you are currently booted from your old USB Flash device.') . '</p><p>' . _('A USB Flash device may also be blacklisted if we discover the serial number is not unique – this is common with USB card readers.') . '</p>',
|
||||
'USB Flash device error' => _('USB Flash device error'),
|
||||
'<p>This USB Flash device has an invalid GUID. Please try a different USB Flash device</p>' => '<p>' . _('This USB Flash device has an invalid GUID. Please try a different USB Flash device') . '</p>',
|
||||
'USB Flash has no serial number' => _('USB Flash has no serial number'),
|
||||
'Trial Requires Internet Connection' => _('Trial Requires Internet Connection'),
|
||||
'Cannot validate Unraid Trial key' => _('Cannot validate Unraid Trial key'),
|
||||
'<p>Your Trial key requires an internet connection.</p><p><a href="/Settings/NetworkSettings" class="underline">Please check Settings > Network</a></p>' => '<p>' . _('Your Trial key requires an internet connection') . '</p><p><a href="/Settings/NetworkSettings" class="underline">' . _('Please check Settings > Network') . '</a></p>',
|
||||
'Stale' => _('Stale'),
|
||||
'Stale Server' => _('Stale Server'),
|
||||
'<p>Please refresh the page to ensure you load your latest configuration</p>' => '<p>' . _('Please refresh the page to ensure you load your latest configuration') . '</p>',
|
||||
'Invalid API Key' => _('Invalid API Key'),
|
||||
'Please sign out then sign back in to refresh your API key.' => _('Please sign out then sign back in to refresh your API key.'),
|
||||
'Invalid API Key Format' => _('Invalid API Key Format'),
|
||||
'Too Many Devices' => _('Too Many Devices'),
|
||||
'You have exceeded the number of devices allowed for your license. Please remove a device before adding another.' => _('You have exceeded the number of devices allowed for your license. Please remove a device before adding another.'),
|
||||
'Unraid Connect Install Failed' => _('Unraid Connect Install Failed'),
|
||||
'Rebooting will likely solve this.' => _('Rebooting will likely solve this.'),
|
||||
'SSL certificates for unraid.net deprecated' => _('SSL certificates for unraid.net deprecated'),
|
||||
'On January 1st, 2023 SSL certificates for unraid.net were deprecated. You MUST provision a new SSL certificate to use our new myunraid.net domain. You can do this on the Settings > Management Access page.' => _('On January 1st, 2023 SSL certificates for unraid.net were deprecated. You MUST provision a new SSL certificate to use our new myunraid.net domain. You can do this on the Settings > Management Access page.'),
|
||||
'Unraid Connect Error' => _('Unraid Connect Error'),
|
||||
'Trial Key Creation Failed' => _('Trial Key Creation Failed'),
|
||||
'Error creatiing a trial key. Please try again later.' => _('Error creatiing a trial key. Please try again later.'),
|
||||
'Extending your free trial by 15 days' => _('Extending your free trial by 15 days'),
|
||||
'Please keep this window open' => _('Please keep this window open'),
|
||||
'Starting your free 30 day trial' => _('Starting your free 30 day trial'),
|
||||
'Trial Key Created' => _('Trial Key Created'),
|
||||
'Please wait while the page reloads to install your trial key' => _('Please wait while the page reloads to install your trial key'),
|
||||
'A Trial key provides all the functionality of a Pro Registration key' => _('A Trial key provides all the functionality of a Pro Registration key'),
|
||||
'Extension Installed' => _('Extension Installed'),
|
||||
'Recovered' => _('Recovered'),
|
||||
'Replaced' => _('Replaced'),
|
||||
'Installing' => _('Installing'),
|
||||
'Installed' => _('Installed'),
|
||||
'Install' => _('Install'),
|
||||
'Install Extended' => _('Install Extended'),
|
||||
'Install Recovered' => _('Install Recovered'),
|
||||
'Install Replaced' => _('Install Replaced'),
|
||||
'Your free Trial key provides all the functionality of a Pro Registration key' => _('Your free Trial key provides all the functionality of a Pro Registration key'),
|
||||
'Calculating trial expiration…' => _('Calculating trial expiration…'),
|
||||
'Signing In' => _('Signing In'),
|
||||
'Signing Out' => _('Signing Out'),
|
||||
'Sign In requires the local unraid-api to be running' => _('Sign In requires the local unraid-api to be running'),
|
||||
'Sign Out requires the local unraid-api to be running' => _('Sign Out requires the local unraid-api to be running'),
|
||||
'Unraid OS {0} Released' => sprintf(_('Unraid OS %s Released'), '{0}'),
|
||||
'Unraid OS {0} Update Available' => sprintf(_('Unraid OS %s Update Available'), '{0}'),
|
||||
'Unraid {0} Update Available' => sprintf(_('Unraid %s Update Available'), '{0}'),
|
||||
'{0} Update Available' => sprintf(_('%s Update Available'), '{0}'),
|
||||
'Unraid OS Update Available' => _('Unraid OS Update Available'),
|
||||
'Update Unraid OS confirmation required' => _('Update Unraid OS confirmation required'),
|
||||
'Please confirm the update details below' => _('Please confirm the update details below'),
|
||||
'Current Version {0}' => sprintf(_('Current Version %s'), '{0}'),
|
||||
'Current Version: Unraid {0}' => sprintf(_('Current Version: Unraid %s'), '{0}'),
|
||||
'New Version: {0}' => sprintf(_('New Version: %s'), '{0}'),
|
||||
'Version: {0}' => sprintf(_('Version: %s'), '{0}'),
|
||||
'This update will require a reboot' => _('This update will require a reboot'),
|
||||
'Confirm and start update' => _('Confirm and start update'),
|
||||
'Update Unraid OS' => _('Update Unraid OS'),
|
||||
'Last checked: {0}' => sprintf(_('Last checked: %s'), '{0}'),
|
||||
'Downgrade Unraid OS' => _('Downgrade Unraid OS'),
|
||||
'Downgrade Unraid OS to {0}' => sprintf(_('Downgrade Unraid OS to %s'), '{0}'),
|
||||
'No downgrade available' => _('No downgrade available'),
|
||||
'Begin downgrade to {0}' => sprintf(_('Begin downgrade to %s'), '{0}'),
|
||||
'Version available for restore {0}' => sprintf(_('Version available for restore %s'), '{0}'),
|
||||
'check for OS updates' => _('check for OS updates'),
|
||||
'Check for Prereleases' => _('Check for Prereleases'),
|
||||
'Receive the latest and greatest for Unraid OS. Whether it new features, security patches, or bug fixes – keeping your server up-to-date ensures the best experience that Unraid has to offer.' => _('Receive the latest and greatest for Unraid OS.') . ' ' . _('Whether it new features, security patches, or bug fixes – keeping your server up-to-date ensures the best experience that Unraid has to offer.'),
|
||||
'Check for OS Updates' => _('Check for OS Updates'),
|
||||
'Checking...' => _('Checking...'),
|
||||
'View release notes' => _('View release notes'),
|
||||
'View Changelog for {0}' => sprintf(_('View Changelog for %s'), '{0}'),
|
||||
'View Changelog & Update' => _('View Changelog & Update'),
|
||||
'{0} Release Notes' => sprintf(_('%s Release Notes'), '{0}'),
|
||||
'Unable to open release notes' => _('Unable to open release notes'),
|
||||
'Downgrades are only recommended if you\'re unable to solve a critical issue.' => _('Downgrades are only recommended if you\'re unable to solve a critical issue.'),
|
||||
'In the rare event you need to downgrade we ask that you please provide us with Diagnostics so we can investigate your issue.' => _('In the rare event you need to downgrade we ask that you please provide us with Diagnostics so we can investigate your issue.'),
|
||||
'Download the Diagnostics zip then please open a bug report on our forums with a description of the issue along with your diagnostics.' => _('Download the Diagnostics zip then please open a bug report on our forums with a description of the issue along with your diagnostics.'),
|
||||
'Reboot Now to Downgrade' => _('Reboot Now to Downgrade'),
|
||||
'Reboot Now to Update' => _('Reboot Now to Update'),
|
||||
'Reboot Now to Downgrade to {0}' => sprintf(_('Reboot Now to Downgrade to %s'), '{0}'),
|
||||
'Reboot Now to Update to {0}' => sprintf(_('Reboot Now to Update to %s'), '{0}'),
|
||||
'Reboot Required for Downgrade' => _('Reboot Required for Downgrade'),
|
||||
'Reboot Required for Update' => _('Reboot Required for Update'),
|
||||
'Reboot Required for Downgrade to {0}' => sprintf(_('Reboot Required for Downgrade to %s'), '{0}'),
|
||||
'Reboot Required for Update to {0}' => sprintf(_('Reboot Required for Update to %s'), '{0}'),
|
||||
'Updating 3rd party drivers' => _('Updating 3rd party drivers'),
|
||||
'Update Available' => _('Update Available'),
|
||||
'Up-to-date' => _('Up-to-date'),
|
||||
'Open a bug report' => _('Open a bug report'),
|
||||
'Go to Tools > Update' => _('Go to Tools > Update'),
|
||||
'A valid keyfile and USB Flash boot device are required to check for OS updates.' => _('A valid keyfile and USB Flash boot device are required to check for OS updates.'),
|
||||
'Please fix any errors and try again.' => _('Please fix any errors and try again.'),
|
||||
'Go to Tools > Registration to fix' => _('Go to Tools > Registration to fix'),
|
||||
'Original release date {0}' => sprintf(_('Original release date %s'), '{0}'),
|
||||
'Registered to' => _('Registered to'),
|
||||
'Registered on' => _('Registered on'),
|
||||
'Updates Expire' => _('Updates Expire'),
|
||||
'Flash GUID' => _('Flash GUID'),
|
||||
'Flash Vendor' => _('Flash Vendor'),
|
||||
'Flash Product' => _('Flash Product'),
|
||||
'Attached Storage Devices' => _('Attached Storage Devices'),
|
||||
'{0} out of {1} devices' => sprintf(_('%1s out of %2s devices'), '{0}', '{1}'),
|
||||
'{0} out of {1} allowed devices – upgrade your key to support more devices' => sprintf(_('%1s out of %2s allowed devices – upgrade your key to support more devices'), '{0}', '{1}'),
|
||||
'{0} devices' => sprintf(_('%s devices'), '{0}'),
|
||||
'unlimited' => _('unlimited'),
|
||||
'Unable to check for OS updates' => _('Unable to check for OS updates'),
|
||||
'License key actions' => _('License key actions'),
|
||||
'License key type' => _('License key type'),
|
||||
'OS Update Eligibility Expiration' => _('OS Update Eligibility Expiration'),
|
||||
'Ineligible for updates released after {0}' => sprintf(_('Ineligible for updates released after %s'), '{0}'),
|
||||
'Eligible for updates until {0}' => sprintf(_('Eligible for updates until %s'), '{0}'),
|
||||
'Ineligible as of {0}' => sprintf(_('Ineligible as of %s'), '{0}'),
|
||||
'Eligible for updates for {0}' => sprintf(_('Eligible for updates for %s'), '{0}'),
|
||||
'Renew your license key now' => _('Renew your license key now'),
|
||||
'Extend License to Enable OS Updates' => _('Extend License to Enable OS Updates'),
|
||||
'Check Eligibility' => _('Check Eligibility'),
|
||||
'Eligible' => _('Eligible'),
|
||||
'Ineligible' => _('Ineligible'),
|
||||
'Flash GUID required to check replacement status' => _('Flash GUID required to check replacement status'),
|
||||
'Keyfile required to check replacement status' => _('Keyfile required to check replacement status'),
|
||||
'Unraid {0}' => sprintf(_('Unraid %s'), '{0}'),
|
||||
'OS Update Eligibility' => _('OS Update Eligibility'),
|
||||
'Transfer License to New Flash' => _('Transfer License to New Flash'),
|
||||
'Starter' => _('Starter'),
|
||||
'Unleashed' => _('Unleashed'),
|
||||
'Lifetime' => _('Lifetime'),
|
||||
'Pay your annual fee to continue receiving OS updates.' => _('Pay your annual fee to continue receiving OS updates.'),
|
||||
'Renew Key' => _('Renew Key'),
|
||||
'A valid GUID is required to check for OS updates.' => _('A valid GUID is required to check for OS updates.'),
|
||||
'A valid keyfile is required to check for OS updates.' => _('A valid keyfile is required to check for OS updates.'),
|
||||
'A valid OS version is required to check for OS updates.' => _('A valid OS version is required to check for OS updates.'),
|
||||
'Your license key\'s OS update eligibility has expired. Please renew your license key to enable updates released after your expiration date.' => _('Your license key\'s OS update eligibility has expired.') . ' ' . _('Please renew your license key to enable updates released after your expiration date.'),
|
||||
'Key ineligible for new updates' => _('Key ineligible for new updates'),
|
||||
'Ineligible for Unraid OS updates' => _('Ineligible for Unraid OS updates'),
|
||||
'Learn more and fix' => _('Learn more and fix'),
|
||||
'Expires at {0}' => sprintf(_('Expires at %s'), '{0}'),
|
||||
'Expires in {0}' => sprintf(_('Expires in %s'), '{0}'),
|
||||
'Expired' => _('Expired'),
|
||||
'Expired {0}' => sprintf(_('Expired %s'), '{0}'),
|
||||
'Create Flash Backup' => _('Create Flash Backup'),
|
||||
'Get a Lifetime Key' => _('Get a Lifetime Key'),
|
||||
'We recommend backing up your USB Flash Boot Device before starting the update.' => _('We recommend backing up your USB Flash Boot Device before starting the update.'),
|
||||
'You have already activated the Flash Backup feature via the Unraid Connect plugin.' => _('You have already activated the Flash Backup feature via the Unraid Connect plugin.'),
|
||||
'Go to Tools > Management Access to ensure your backup is up-to-date.' => _('Go to Tools > Management Access to ensure your backup is up-to-date.'),
|
||||
'You have not activated the Flash Backup feature via the Unraid Connect plugin.' => _('You have not activated the Flash Backup feature via the Unraid Connect plugin.'),
|
||||
'Go to Tools > Management Access to activate the Flash Backup feature and ensure your backup is up-to-date.' => _('Go to Tools > Management Access to activate the Flash Backup feature and ensure your backup is up-to-date.'),
|
||||
'Flash Backup is not available. Navigate to {0}/Main/Settings/Flash to try again then come back to this page.' => sprintf(_('Flash Backup is not available. Navigate to %s/Main/Settings/Flash to try again then come back to this page.'), '{0}'),
|
||||
'Backing up...this may take a few minutes' => _('Backing up...this may take a few minutes'),
|
||||
'Acklowledge that you have made a Flash Backup to enable this action' => _('Acklowledge that you have made a Flash Backup to enable this action'),
|
||||
'You can also manually create a new backup by clicking the Create Flash Backup button.' => _('You can also manually create a new backup by clicking the Create Flash Backup button.'),
|
||||
'You can manually create a backup by clicking the Create Flash Backup button.' => _('You can manually create a backup by clicking the Create Flash Backup button.'),
|
||||
'I have made a Flash Backup' => _('I have made a Flash Backup'),
|
||||
'You may still update to releases dated prior to your update expiration date.' => _('You may still update to releases dated prior to your update expiration date.'),
|
||||
'View Available Updates' => _('View Available Updates'),
|
||||
'Your license key is not eligible for Unraid OS {0}' => sprintf(_('Your license key is not eligible for Unraid OS %s'), '{0}'),
|
||||
'Unraid {0} Available' => sprintf(_('Unraid %s Available'), '{0}'),
|
||||
'Key ineligible for {0}' => sprintf(_('Key ineligible for %s'), '{0}'),
|
||||
'Up-to-date with eligible releases' => _('Up-to-date with eligible releases'),
|
||||
'Key ineligible for future releases' => _('Key ineligible for future releases'),
|
||||
'View Changelog' => _('View Changelog'),
|
||||
'You are still eligible to access OS updates that were published on or before {0}.' => sprintf(_('You are still eligible to access OS updates that were published on or before %s'), '{0}'),
|
||||
'Your {0} license included one year of free updates at the time of purchase. You are now eligible to extend your license and access the latest OS updates.' => sprintf(_('Your %s license included one year of free updates at the time of purchase.'), '{0}') . ' ' . _('You are now eligible to extend your license and access the latest OS updates.'),
|
||||
'Your {0} license included one year of free updates at the time of purchase. You are now eligible to extend your license and access the latest OS updates. You are still eligible to access OS updates that were published on or before {1}.' => sprintf(_('Your %s license included one year of free updates at the time of purchase.'), '{0}') . ' ' . _('You are now eligible to extend your license and access the latest OS updates.') . ' ' . sprintf(_('You are still eligible to access OS updates that were published on or before %s.'), '{0}'),
|
||||
'Extend License' => _('Extend License'),
|
||||
'Calculating OS Update Eligibility…' => _('Calculating OS Update Eligibility…'),
|
||||
'Cancel' => _('Cancel'),
|
||||
'Unknown error' => _('Unknown error'),
|
||||
'Installing Extended' => _('Installing Extended'),
|
||||
'Please finish the initiated downgrade to enable updates.' => _('Please finish the initiated downgrade to enable updates.'),
|
||||
'Please finish the initiated update to enable a downgrade.' => _('Please finish the initiated update to enable a downgrade.'),
|
||||
];
|
||||
}
|
||||
|
||||
public function getTranslations()
|
||||
{
|
||||
return $this->translations ?? [];
|
||||
}
|
||||
|
||||
public function getTranslationsJson($urlEncode = false)
|
||||
{
|
||||
if ($urlEncode) {
|
||||
return rawurlencode(json_encode($this->getTranslations(), JSON_UNESCAPED_SLASHES, JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
return json_encode($this->getTranslations(), JSON_UNESCAPED_SLASHES, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
span.thanks{padding-left:12px;color:#6FA239;font-weight:bold;}
|
||||
span.thanks.red{color:#F0000C;}
|
||||
div.device{padding:0 12px;font-weight:normal;font-style:italic;}
|
||||
div.remark{padding:0 12px;text-align:justify;}
|
||||
+1
File diff suppressed because one or more lines are too long
-38
File diff suppressed because one or more lines are too long
+37
File diff suppressed because one or more lines are too long
-38
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
@@ -1,13 +1,13 @@
|
||||
{
|
||||
".nuxt/nuxt-custom-elements/entries/unraid-components.client.css": {
|
||||
"file": "_nuxt/unraid-components.client-d0bc5449.css",
|
||||
"file": "_nuxt/unraid-components.client-060d5fb6.css",
|
||||
"src": ".nuxt/nuxt-custom-elements/entries/unraid-components.client.css"
|
||||
},
|
||||
".nuxt/nuxt-custom-elements/entries/unraid-components.client.mjs": {
|
||||
"css": [
|
||||
"_nuxt/unraid-components.client-d0bc5449.css"
|
||||
"_nuxt/unraid-components.client-060d5fb6.css"
|
||||
],
|
||||
"file": "_nuxt/unraid-components.client-3646d7f7.js",
|
||||
"file": "_nuxt/unraid-components.client-bc281878.js",
|
||||
"isEntry": true,
|
||||
"src": ".nuxt/nuxt-custom-elements/entries/unraid-components.client.mjs"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
Menu="About"
|
||||
Title="Downgrade OS"
|
||||
Icon="icon-update"
|
||||
Tag="upload"
|
||||
---
|
||||
<?php
|
||||
require_once "$docroot/plugins/dynamix.my.servers/include/reboot-details.php";
|
||||
// Create an instance of the RebootDetails class
|
||||
$rebootDetails = new RebootDetails();
|
||||
/**
|
||||
* @note icon-update is rotated via CSS in myservers1.php
|
||||
*
|
||||
* If /boot/previous/bzroot exists, then the user has the option to downgrade to the previous version.
|
||||
* Parse the text file /boot/previous/changes.txt to get the version number of the previous version.
|
||||
* Then we move some files around and reboot.
|
||||
*/
|
||||
$restoreVersion = $restoreBranch = $restoreVersionReleaseDate = 'unknown';
|
||||
$restoreExists = file_exists('/boot/previous/bzroot');
|
||||
$restoreChangelogPath = '/boot/previous/changes.txt';
|
||||
|
||||
$serverNameEscaped = htmlspecialchars(str_replace(' ', '_', strtolower($var['NAME'])));
|
||||
|
||||
if (file_exists($restoreChangelogPath)) {
|
||||
exec("head -n4 $restoreChangelogPath", $rows);
|
||||
foreach ($rows as $row) {
|
||||
$i = stripos($row,'version');
|
||||
if ($i !== false) {
|
||||
[$restoreVersion, $restoreVersionReleaseDate] = explode(' ', trim(substr($row, $i+7)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
$restoreBranch = strpos($restoreVersion, 'rc') !== false
|
||||
? _('Next')
|
||||
: (strpos($restoreVersion, 'beta') !== false
|
||||
? _('Beta')
|
||||
: _('Stable'));
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
const nchan_diagnostics = new NchanSubscriber('/sub/diagnostics', { subscriber: 'websocket' });
|
||||
const reportUrl = new URL('https://forums.unraid.net/bug-reports/');
|
||||
let diagnosticsFile = '';
|
||||
|
||||
nchan_diagnostics.on('message', function(data) {
|
||||
if (data == '_DONE_') {
|
||||
nchan_diagnostics.stop();
|
||||
$('.sweet-alert').hide('fast').removeClass('nchan');
|
||||
swal.close();
|
||||
$('div.spinner').show('slow');
|
||||
location = diagnosticsFile;
|
||||
|
||||
setTimeout(() => {
|
||||
cleanupDiagnostics();
|
||||
reportAfterDiagnosticsDownload();
|
||||
}, 2000);
|
||||
} else if (data) {
|
||||
let box = $('pre#swaltext');
|
||||
box.html(box.html() + '<br>' + data).scrollTop(box[0].scrollHeight);
|
||||
}
|
||||
});
|
||||
|
||||
function downloadDiagnostics() {
|
||||
const tzoffset = (new Date()).getTimezoneOffset() * 60000; // offset in milliseconds
|
||||
const localISOTime = (new Date(Date.now() - tzoffset));
|
||||
const year = localISOTime.getFullYear();
|
||||
const month = String(localISOTime.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(localISOTime.getDate()).padStart(2, '0');
|
||||
const hours = String(localISOTime.getHours()).padStart(2, '0');
|
||||
const minutes = String(localISOTime.getMinutes()).padStart(2, '0');
|
||||
const dateOutput = `${year}${month}${day}_${hours}${minutes}`;
|
||||
const zipName = '<?=$serverNameEscaped?>-diagnostics-' + dateOutput + '.zip';
|
||||
|
||||
nchan_diagnostics.start();
|
||||
|
||||
$.post(
|
||||
'/webGui/include/Download.php',
|
||||
{
|
||||
cmd: 'diag',
|
||||
file: zipName,
|
||||
anonymize: '',
|
||||
},
|
||||
function(zip) {
|
||||
if (!zip) {
|
||||
return nchan_diagnostics.stop();
|
||||
}
|
||||
|
||||
diagnosticsFile = zip;
|
||||
swal({
|
||||
title: "_(Downloading)_...",
|
||||
text: "/boot/logs" + zip + "<hr><pre id='swaltext'></pre>",
|
||||
html: true,
|
||||
animation: 'none',
|
||||
showConfirmButton: false,
|
||||
});
|
||||
$('.sweet-alert').addClass('nchan');
|
||||
$('button.confirm').prop('disabled', true);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function reportAfterDiagnosticsDownload() {
|
||||
$('div.spinner').hide('fast');
|
||||
swal({
|
||||
title: "_(Open a bug report)_",
|
||||
text: "_(Create a bug report on our forums with a description of the issue along with your diagsnotics)_",
|
||||
html: true,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "<?= _('Create Bug Report') ?>",
|
||||
cancelButtonText: "<?= _('Close') ?>",
|
||||
}, function(confirm) {
|
||||
if (!confirm) {
|
||||
return false;
|
||||
}
|
||||
window.open(reportUrl, '_blank');
|
||||
});
|
||||
}
|
||||
|
||||
function cleanupDiagnostics() {
|
||||
if (document.hasFocus()) {
|
||||
return $.post('/webGui/include/Download.php', { cmd: 'delete', file: diagnosticsFile });
|
||||
}
|
||||
setTimeout(cleanupDiagnostics, 2000);
|
||||
}
|
||||
|
||||
function startDowngrade() {
|
||||
$('div.spinner').show('slow');
|
||||
|
||||
$.get(
|
||||
'/plugins/dynamix.plugin.manager/include/Downgrade.php',
|
||||
{
|
||||
version: '<?=$restoreVersion?>',
|
||||
},
|
||||
function() {
|
||||
refresh();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function confirmDowngrade() {
|
||||
swal({
|
||||
title: "_(Confirm Downgrade)_",
|
||||
text: "<?= $restoreVersion ?><br>_(A reboot will be required)_",
|
||||
html: true,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "<?= _('Confirm') ?>",
|
||||
cancelButtonText: "<?= _('Cancel') ?>",
|
||||
}, function(confirm) {
|
||||
if (!confirm) {
|
||||
return false;
|
||||
}
|
||||
startDowngrade();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<unraid-i18n-host>
|
||||
<unraid-downgrade-os
|
||||
reboot-version="<?= $rebootDetails->getRebootVersion() ?>"
|
||||
restore-version="<?= $restoreExists && $restoreVersion != 'unknown' ? $restoreVersion : '' ?>"
|
||||
restore-release-date="<?= $restoreExists && $restoreVersionReleaseDate != 'unknown' ? $restoreVersionReleaseDate : '' ?>"></unraid-downgrade-os>
|
||||
</unraid-i18n-host>
|
||||
@@ -3,182 +3,39 @@ Title="Update OS"
|
||||
Icon="icon-update"
|
||||
Tag="upload"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2023, Lime Technology
|
||||
* Copyright 2012-2023, Bergware International.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$version = $branch = $date = _('unknown');
|
||||
$bzroot = file_exists('/boot/previous/bzroot');
|
||||
$check = $notify['unraidos'] ? 0 : 1;
|
||||
$changes = '/boot/previous/changes.txt';
|
||||
$zip = htmlspecialchars(str_replace(' ','_',strtolower($var['NAME'])));
|
||||
|
||||
if (file_exists($changes)) {
|
||||
exec("head -n4 $changes",$rows);
|
||||
foreach ($rows as $row) {
|
||||
$i = stripos($row,'version');
|
||||
if ($i !== false) {
|
||||
[$version,$date] = explode(' ',trim(substr($row,$i+7)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
$branch = strpos($version,'rc')!==false ? _('Next') : (strpos($version,'beta')!==false ? _('Beta') : _('Stable'));
|
||||
}
|
||||
$reboot = preg_match("/^\*\*(REBOOT REQUIRED|DOWNGRADE)/",@file_get_contents("$docroot/plugins/unRAIDServer/README.md",false,null,0,20));
|
||||
<?php
|
||||
require_once "$docroot/plugins/dynamix.my.servers/include/reboot-details.php";
|
||||
$rebootDetails = new RebootDetails();
|
||||
?>
|
||||
<script>
|
||||
var diagnosticsFile = "";
|
||||
var nchan_diagnostics = new NchanSubscriber('/sub/diagnostics',{subscriber:'websocket'});
|
||||
var original = null;
|
||||
const args = {};
|
||||
|
||||
nchan_diagnostics.on('message', function(data) {
|
||||
if (data == '_DONE_') {
|
||||
nchan_diagnostics.stop();
|
||||
$('.sweet-alert').hide('fast').removeClass('nchan');
|
||||
swal.close();
|
||||
location = diagnosticsFile;
|
||||
setTimeout(cleanUp,4000);
|
||||
} else if (data) {
|
||||
let box = $('pre#swaltext');
|
||||
box.html(box.html()+'<br>'+data).scrollTop(box[0].scrollHeight);
|
||||
}
|
||||
});
|
||||
|
||||
function openInstall(cmd,title,plg) {
|
||||
if (cmd == null) {
|
||||
openPlugin(args.cmd,args.title,args.plg);
|
||||
return;
|
||||
}
|
||||
args.cmd = cmd;
|
||||
args.title = title;
|
||||
args.plg = plg;
|
||||
$.get('/plugins/dynamix.plugin.manager/include/ShowPlugins.php',{cmd:'alert'},function(data) {
|
||||
if (data==0) {
|
||||
// no alert message - proceed with update
|
||||
setTimeout(openInstall);
|
||||
} else {
|
||||
// show alert message and ask for confirmation
|
||||
openAlert("showchanges <?=$alerts?>","_(Alert Message)_",'openInstall');
|
||||
}
|
||||
});
|
||||
}
|
||||
function update_table(branch) {
|
||||
if (original) {
|
||||
if (branch != original) branch = '';
|
||||
} else {
|
||||
if (branch) original = branch;
|
||||
}
|
||||
$.get('/plugins/dynamix.plugin.manager/include/ShowPlugins.php',{system:true,branch:branch},function(data) {
|
||||
data = data.split('\0');
|
||||
updateInfo(data[0]);
|
||||
$('#os_table').trigger('update');
|
||||
});
|
||||
}
|
||||
function downgrade() {
|
||||
swal({title:"_(Diagnostics)_",text:"_(Please provide diagnostics when experiencing problems)_<br>_(Post these in the forums)_",html:true,type:'warning',showCancelButton:true,confirmButtonText:"<?=_('Diagnostics')?>",cancelButtonText:"<?=_('Restore')?>"},function(diag){
|
||||
if (diag) {
|
||||
// get diagnostics and then downgrade
|
||||
setTimeout(function(){diagnostics(zipfile());},250);
|
||||
} else {
|
||||
// downgrade immediately
|
||||
$.get('/plugins/dynamix.plugin.manager/include/Downgrade.php',{version:'<?=$version?>'},function(){refresh();});
|
||||
}
|
||||
});
|
||||
}
|
||||
function updateInfo(data) {
|
||||
var updates = data.split('\n');
|
||||
for (var n=0,update; update=updates[n]; n++) {
|
||||
var fields = update.split('\r');
|
||||
for (var i=0,field; field=fields[i]; i++) {
|
||||
var row = field.split('::');
|
||||
$('#'+row[0]).attr('data',row[1]).html(row[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
function initlist() {
|
||||
$.get('/plugins/dynamix.plugin.manager/include/ShowPlugins.php',{init:true,system:true,check:<?=$check?>},function(data) {
|
||||
$('#os_list').html(data);
|
||||
<?if ($bzroot):?>
|
||||
$('#previous').show();
|
||||
<?endif;?>
|
||||
loadlist();
|
||||
});
|
||||
}
|
||||
function warning (data) {
|
||||
$('#change_branch').prop('disabled',true);
|
||||
return data.replace('green','orange').replace("<?=_('up-to-date')?>","<?=_('Reboot')?>").replace('checking','warning');
|
||||
}
|
||||
function loadlist(id,check) {
|
||||
$.get('/plugins/dynamix.plugin.manager/include/ShowPlugins.php',{system:true,audit:id,check:check||<?=$check?>},function(data) {
|
||||
var list = $('#os_list');
|
||||
if (id) {
|
||||
var cmd = id.split(':');
|
||||
var tr = 'tr#'+cmd[0].replace(/[\. _]/g,'');
|
||||
switch (cmd[1]) {
|
||||
case 'update' : data = warning(data);
|
||||
case 'return' : updateInfo(data); break;
|
||||
case 'install': list.find(tr).remove(); list.append(warning(data)); break;
|
||||
}
|
||||
} else {
|
||||
<?if (!$reboot):?>
|
||||
updateInfo(data);
|
||||
<?else:?>
|
||||
updateInfo(warning(data));
|
||||
<?endif;?>
|
||||
}
|
||||
$('#os_table').trigger('update');
|
||||
$('#checkos').prop('disabled',false);
|
||||
<?if ($reboot):?>
|
||||
$('#change_branch').prop('disabled',true);
|
||||
<?endif;?>
|
||||
});
|
||||
}
|
||||
function cleanUp() {
|
||||
function cleanUpFlashBackup(zip) {
|
||||
if (document.hasFocus()) {
|
||||
$.post('/webGui/include/Download.php',{cmd:'delete',file:diagnosticsFile},function(){
|
||||
$.get('/plugins/dynamix.plugin.manager/include/Downgrade.php',{version:'<?=$version?>'},function(){refresh();});
|
||||
});
|
||||
$('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(cleanUp,2000);
|
||||
setTimeout(function(){cleanUpFlashBackup(zip);},2000);
|
||||
}
|
||||
}
|
||||
function zipfile(){
|
||||
var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
|
||||
var localISOTime = (new Date(Date.now() - tzoffset)).toISOString().slice(0,-1);
|
||||
return '<?=$zip?>-diagnostics-'+localISOTime.substr(0,16).replace(/[-:]/g,'').replace('T','-')+'.zip';
|
||||
}
|
||||
function diagnostics(file) {
|
||||
nchan_diagnostics.start();
|
||||
$.post('/webGui/include/Download.php',{cmd:'diag',file:file,anonymize:''},function(zip) {
|
||||
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) {
|
||||
diagnosticsFile = zip;
|
||||
swal({title:"_(Downloading)_...",text:"/boot/logs"+zip+"<hr><pre id='swaltext'></pre>",html:true,animation:'none',showConfirmButton:false});
|
||||
$('.sweet-alert').addClass('nchan');
|
||||
$('button.confirm').prop('disabled',true);
|
||||
location = '/'+zip;
|
||||
setTimeout(function(){cleanUpFlashBackup(zip);},6000);
|
||||
} else {
|
||||
nchan_diagnostics.stop();
|
||||
$('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)_"});
|
||||
}
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
initlist();
|
||||
$('.tabs').append("<span class='status vhshift'><input type='button' id='checkos' value=\"_(Check for Updates)_\" onclick='openPlugin(\"plugin checkos\",\"_(System Update Check)_\",\":return\")' disabled></span>");
|
||||
});
|
||||
</script>
|
||||
<table class='tablesorter plugins shift' id='os_table'>
|
||||
<thead><tr><th></th><th>_(Component)_</th><th>_(Author)_</th><th>_(Version)_</th><th>_(Status)_</th><th>_(Branch)_</th></tr></thead>
|
||||
<tbody id="os_list"><tr><td colspan="6"></td></tr></tbody>
|
||||
<?if ($bzroot):?>
|
||||
<tbody id="previous" style="display:none"><tr><td><img src="/plugins/unRAIDServer/images/unRAIDServer.png" class="list"></td><td><b>_(Unraid OS)_ (_(previous)_)</b></td><td>LimeTech</td><td><?=$version?></td><td><input type="button" value="_(Restore)_" onclick="downgrade()"></td><td><?=$branch?></td></tbody>
|
||||
<?endif;?>
|
||||
</table>
|
||||
|
||||
<unraid-i18n-host>
|
||||
<unraid-update-os reboot-version="<?= $rebootDetails->getRebootVersion() ?>"></unraid-update-os>
|
||||
</unraid-i18n-host>
|
||||
|
||||
@@ -22,7 +22,7 @@ $login_locale = _var($display,'locale');
|
||||
require_once "$docroot/webGui/include/Translations.php";
|
||||
|
||||
$file = realpath($argv[1]??'');
|
||||
$valid = ['/var/tmp/','/tmp/plugins/'];
|
||||
$valid = ['/var/tmp/','/tmp/plugins/','/boot/previous'];
|
||||
$good = false;
|
||||
|
||||
foreach ($valid as $check) if (strncmp($file,$check,strlen($check))===0) $good = true;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Menu="Registration"
|
||||
Title="Install Key"
|
||||
Tag="flag"
|
||||
Cond="($var['regTy']!='Pro')"
|
||||
Cond="($var['regTy']!='Pro' || $var['regTy']!='Lifetime')"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2023, Lime Technology
|
||||
|
||||
@@ -89,9 +89,6 @@ if ($themes2) {
|
||||
echo ".nav-item.LockButton a:before{content:'\\e955'}\n";
|
||||
foreach ($buttons as $button) if (isset($button['Code'])) echo ".nav-item.{$button['name']} a:before{content:'\\{$button['Code']}'}\n";
|
||||
}
|
||||
$notes = '/var/tmp/unRAIDServer.txt';
|
||||
if (!file_exists($notes)) file_put_contents($notes,shell_exec("$docroot/plugins/dynamix.plugin.manager/scripts/plugin changes $docroot/plugins/unRAIDServer/unRAIDServer.plg"));
|
||||
$notes = " <span class='big blue-text fa fa-info-circle fa-fw' title='"._('View Release Notes')."' onclick=\"openChanges('showchanges $notes','"._('Release Notes')."')\"></span>";
|
||||
?>
|
||||
</style>
|
||||
|
||||
@@ -504,15 +501,6 @@ function removeRebootNotice(message="<?=_('You must reboot for changes to take e
|
||||
$.post("/plugins/dynamix.plugin.manager/scripts/PluginAPI.php",{action:'removeRebootNotice',message:message});
|
||||
}
|
||||
|
||||
function showUpgradeChanges() {
|
||||
openChanges("showchanges /tmp/plugins/unRAIDServer.txt","<?=_('Release Notes')?>");
|
||||
}
|
||||
function showUpgrade(text,noDismiss=false) {
|
||||
if ($.cookie('os_upgrade')==null) {
|
||||
if (osUpgradeWarning) removeBannerWarning(osUpgradeWarning);
|
||||
osUpgradeWarning = addBannerWarning(text.replace(/<a>(.+?)<\/a>/,"<a href='#' onclick='openUpgrade()'>$1</a>").replace(/<b>(.*)<\/b>/,"<a href='#' onclick='document.rebootNow.submit()'>$1</a>"),false,noDismiss);
|
||||
}
|
||||
}
|
||||
function hideUpgrade(set) {
|
||||
removeBannerWarning(osUpgradeWarning);
|
||||
if (set)
|
||||
@@ -626,11 +614,11 @@ $.ajaxPrefilter(function(s, orig, xhr){
|
||||
<div id="displaybox">
|
||||
<div class="upgrade_notice" style="display:none"></div>
|
||||
<div id="header" class="<?=$display['banner']?>">
|
||||
<div class="logo">
|
||||
<a href="https://unraid.net" target="_blank"><?readfile("$docroot/webGui/images/UN-logotype-gradient.svg")?></a>
|
||||
<?=_('Version')?>: <?=_var($var,'version','?')?><?=$notes?>
|
||||
</div>
|
||||
<?include "$docroot/plugins/dynamix.my.servers/include/myservers2.php"?>
|
||||
<div class="logo">
|
||||
<a href="https://unraid.net" target="_blank"><?readfile("$docroot/webGui/images/UN-logotype-gradient.svg")?></a>
|
||||
<unraid-i18n-host><unraid-header-os-version></unraid-header-os-version></unraid-i18n-host>
|
||||
</div>
|
||||
<?include "$docroot/plugins/dynamix.my.servers/include/myservers2.php"?>
|
||||
</div>
|
||||
<a href="#" class="back_to_top" title="<?=_('Back To Top')?>"><i class="fa fa-arrow-circle-up"></i></a>
|
||||
<?
|
||||
@@ -1074,14 +1062,6 @@ $(function() {
|
||||
<?if ($safemode):?>
|
||||
showNotice("<?=_('System running in')?> <b><?=('safe mode')?></b>");
|
||||
<?else:?>
|
||||
<?$readme = @file_get_contents("$docroot/plugins/unRAIDServer/README.md",false,null,0,20)?:''?>
|
||||
<?if (strpos($readme,'REBOOT REQUIRED')!==false):?>
|
||||
showUpgrade("<b><?=_('Reboot Now')?></b> <?=_('to upgrade Unraid OS')?>",true);
|
||||
<?elseif (strpos($readme,'DOWNGRADE')!==false):?>
|
||||
showUpgrade("<b><?=_('Reboot Now')?></b> <?=_('to downgrade Unraid OS')?>",true);
|
||||
<?elseif ($version = plugin_update_available('unRAIDServer',true)):?>
|
||||
showUpgrade("Unraid OS v<?=$version?> <?=_('is available')?>. <?if (is_file('/tmp/plugins/unRAIDServer.txt')):?><span class='fa fa-info-circle fa-fw big blue-text' onclick='showUpgradeChanges()' title=\"<?=_('Release Notes')?>\"></span> <?endif;?><a><?=_('Update Now')?></a>");
|
||||
<?endif;?>
|
||||
<?if (!_var($notify,'system')):?>
|
||||
addBannerWarning("<?=_('System notifications are')?> <b><?=_('disabled')?></b>. <?=_('Click')?> <a href='/Settings/Notifications'><?=_('here')?></a> <?=_('to change notification settings')?>.",true,true);
|
||||
<?endif;?>
|
||||
|
||||
@@ -20,7 +20,8 @@ $out = ['prev','previous'];
|
||||
|
||||
$server = isset($var['NAME']) ? str_replace(' ','_',strtolower($var['NAME'])) : 'tower';
|
||||
$mydate = date('Ymd-Hi');
|
||||
$backup = "$server-flash-backup-$mydate.zip";
|
||||
$osVersion = @$var['version'] ?? '_unknown';
|
||||
$backup = "$server-v$osVersion-flash-backup-$mydate.zip";
|
||||
|
||||
$used = exec("df /boot|awk 'END{print $3}'") * 1.5;
|
||||
$free = exec("df /|awk 'END{print $4}'");
|
||||
|
||||
@@ -45,7 +45,7 @@ select.slot{min-width:44rem;max-width:44rem}
|
||||
input.narrow{width:166px}
|
||||
input.trim{width:76px;min-width:76px}
|
||||
textarea{resize:none}
|
||||
#header{position:absolute;top:0;left:0;width:100%;min-width:1260px;height:91px;z-index:102;margin:0;color:#1c1b1b;background-color:#f2f2f2;background-size:100% 90px;background-repeat:no-repeat}
|
||||
#header{position:absolute;top:0;left:0;width:100%;height:91px;z-index:102;margin:0;color:#1c1b1b;background-color:#f2f2f2;background-size:100% 90px;background-repeat:no-repeat}
|
||||
#header .logo{float:left;margin-left:10px;color:#e22828;text-align:center}
|
||||
#header .logo svg{width:160px;display:block;margin:25px 0 8px 0}
|
||||
#header .block{margin:0;float:right;text-align:right;background-color:rgba(242,242,242,0.2);padding:10px 12px}
|
||||
|
||||
@@ -45,7 +45,7 @@ select.slot{min-width:44rem;max-width:44rem}
|
||||
input.narrow{width:166px}
|
||||
input.trim{width:76px;min-width:76px}
|
||||
textarea{resize:none}
|
||||
#header{position:absolute;top:0;left:0;width:100%;min-width:1260px;height:91px;z-index:102;margin:0;color:#f2f2f2;background-color:#1c1b1b;background-size:100% 90px;background-repeat:no-repeat}
|
||||
#header{position:absolute;top:0;left:0;width:100%;height:91px;z-index:102;margin:0;color:#f2f2f2;background-color:#1c1b1b;background-size:100% 90px;background-repeat:no-repeat}
|
||||
#header .logo{float:left;margin-left:10px;color:#e22828;text-align:center}
|
||||
#header .logo svg{width:160px;display:block;margin:25px 0 8px 0}
|
||||
#header .block{margin:0;float:right;text-align:right;background-color:rgba(28,27,27,0.2);padding:10px 12px}
|
||||
|
||||
Reference in New Issue
Block a user