mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 19:29:13 -05:00
Multi-language support
This commit is contained in:
@@ -3,8 +3,8 @@ Title="UPS Details"
|
||||
Tag="battery-3"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, Bergware International.
|
||||
* Copyright 2015, Dan Landon.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -30,6 +30,6 @@ $(getUPSstatus);
|
||||
</script>
|
||||
|
||||
<table class="tablesorter shift">
|
||||
<thead><tr><th style="width:15%">Key</th><th style="width:35%">Value</th><th style="width:15%">Key</th><th style="width:35%">Value</th></tr></thead>
|
||||
<thead><tr><th style="width:15%">_(Key)_</th><th style="width:35%">_(Value)_</th><th style="width:15%">_(Key)_</th><th style="width:35%">_(Value)_</th></tr></thead>
|
||||
<tbody id="ups_status"><tr><td colspan="4"><div class="spinner"></div></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
@@ -45,57 +45,64 @@ $(function() {
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter shift ups" <?if (!file_exists("/var/run/apcupsd.pid")):?>style="display:none"<?endif;?>>
|
||||
<thead><tr><th>UPS Status</th><th>Battery Charge</th><th>Runtime Left</th><th>Nominal Power</th><th>UPS Load</th><th>UPS Load %</th></tr></thead>
|
||||
<thead><tr><th>_(UPS Status)_</th><th>_(Battery Charge)_</th><th>_(Runtime Left)_</th><th>_(Nominal Power)_</th><th>_(UPS Load)_</th><th>_(UPS Load)_ %</th></tr></thead>
|
||||
<tbody id="ups_summary"><tr><td colspan="6"> </td></tr></tbody>
|
||||
</table>
|
||||
|
||||
<form markdown="1" name="apcupsd_settings" method="POST" action="/update.php" target="progressFrame">
|
||||
<input type="hidden" name="#file" value="<?=$sName?>/<?=$sName?>.cfg">
|
||||
<input type="hidden" name="#include" value="/plugins/<?=$sName?>/include/update.apcupsd.php">
|
||||
<span style="float:right;margin-right:10px"><a href="http://apcupsd.org/manual/manual.html" target="_blank" title="APC UPS Daemon user manual"><i class="fa fa-file-text-o"></i> <u>Online Manual</u></a></span>
|
||||
<span style="float:right;margin-right:10px"><a href="http://apcupsd.org/manual/manual.html" target="_blank" title="_(APC UPS Daemon user manual)_"><i class="fa fa-file-text-o"></i> <u>_(Online Manual)_</u></a></span>
|
||||
|
||||
Start APC UPS daemon:
|
||||
: <select name="SERVICE" size="1">
|
||||
<?=mk_option($cfg['SERVICE'], "disable", "No");?>
|
||||
<?=mk_option($cfg['SERVICE'], "enable", "Yes");?>
|
||||
_(Start APC UPS daemon)_:
|
||||
: <select name="SERVICE">
|
||||
<?=mk_option($cfg['SERVICE'], "disable", _("No"))?>
|
||||
<?=mk_option($cfg['SERVICE'], "enable", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help155
|
||||
> Set to 'Yes' to enable apcupsd and start the daemon, set to 'No' to disable apcupsd and stop the daemon.
|
||||
:end
|
||||
|
||||
UPS cable:
|
||||
: <select name="UPSCABLE" size="1" onChange="toggleCustomCable(this.form)">
|
||||
<?=mk_option($cfg['UPSCABLE'], "usb", "USB");?>
|
||||
<?=mk_option($cfg['UPSCABLE'], "simple", "Simple");?>
|
||||
<?=mk_option($cfg['UPSCABLE'], "smart", "Smart");?>
|
||||
<?=mk_option($cfg['UPSCABLE'], "ether", "Ether");?>
|
||||
<?=mk_option($cfg['UPSCABLE'], "custom", "Custom");?>
|
||||
_(UPS cable)_:
|
||||
: <select name="UPSCABLE" onChange="toggleCustomCable(this.form)">
|
||||
<?=mk_option($cfg['UPSCABLE'], "usb", _("USB"))?>
|
||||
<?=mk_option($cfg['UPSCABLE'], "simple", _("Simple"))?>
|
||||
<?=mk_option($cfg['UPSCABLE'], "smart", _("Smart"))?>
|
||||
<?=mk_option($cfg['UPSCABLE'], "ether", _("Ether"))?>
|
||||
<?=mk_option($cfg['UPSCABLE'], "custom", _("Custom"))?>
|
||||
</select>
|
||||
|
||||
:help156
|
||||
> Defines the type of cable connecting the UPS to your computer.Possible generic choices for 'cable' are:
|
||||
>
|
||||
> + USB, Simple, Smart, Ether, or Custom to specify a special cable.
|
||||
:end
|
||||
|
||||
Custom UPS cable:
|
||||
_(Custom UPS cable)_:
|
||||
: <input type="text" name="CUSTOMUPSCABLE" class="narrow" maxlength="40" value="<?=htmlspecialchars($cfg['CUSTOMUPSCABLE']);?>">
|
||||
|
||||
:help157
|
||||
> Specify a special cable by model number, only applicable when *UPS cable* is set to Custom.
|
||||
>
|
||||
> + 940-0119A, 940-0127A, 940-0128A, 940-0020B
|
||||
> + 940-0020C, 940-0023A, 940-0024B, 940-0024C
|
||||
> + 940-1524C, 940-0024G, 940-0095A, 940-0095B
|
||||
> + 940-0095C, 940-0625A, M-04-02-2000
|
||||
:end
|
||||
|
||||
UPS type:
|
||||
: <select name="UPSTYPE" size="1" onChange="toggleDevice(this.form)">
|
||||
<?=mk_option($cfg['UPSTYPE'], "usb", "USB");?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "apcsmart", "APCsmart");?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "net", "Net");?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "snmp", "SNMP");?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "dumb", "Dumb");?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "pcnet", "PCnet");?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "modbus", "ModBus");?>
|
||||
_(UPS type)_:
|
||||
: <select name="UPSTYPE" onChange="toggleDevice(this.form)">
|
||||
<?=mk_option($cfg['UPSTYPE'], "usb", _("USB"))?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "apcsmart", _("APCsmart"))?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "net", _("Net"))?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "snmp", _("SNMP"))?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "dumb", _("Dumb"))?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "pcnet", _("PCnet"))?>
|
||||
<?=mk_option($cfg['UPSTYPE'], "modbus", _("ModBus"))?>
|
||||
</select>
|
||||
|
||||
:help158
|
||||
> Define a *UPS type*, which corresponds to the type of UPS you have (see the Description for more details).
|
||||
>
|
||||
> + **USB** - most new UPSes are USB
|
||||
@@ -105,10 +112,12 @@ UPS type:
|
||||
> + **Dumb** - old serial character device for use with simple-signaling UPSes
|
||||
> + **PCnet** - PowerChute Network Shutdown protocol which can be used as an alternative to SNMP with the AP9617 family of smart slot cards
|
||||
> + **ModBus** - serial device for use with newest SmartUPS models supporting the MODBUS protocol
|
||||
:end
|
||||
|
||||
Device:
|
||||
_(Device)_:
|
||||
: <input type="text" name="DEVICE" maxlength="200" class="narrow" value="<?=htmlspecialchars($cfg['DEVICE']);?>">
|
||||
|
||||
:help159
|
||||
> Enter the *device* which correspondes to your situation, only applicable when *UPS type* is not set to USB.
|
||||
>
|
||||
> + **apcsmart** - /dev/tty**
|
||||
@@ -117,20 +126,26 @@ Device:
|
||||
> + **dumb** - /dev/tty**
|
||||
> + **pcnet** - ipaddr:username:passphrase:port. ipaddr is the IP address of the UPS management card. username and passphrase are the credentials for which the card has been configured. port is the port number on which to listen for messages from the UPS, normally 3052. If this parameter is empty or missing, the default of 3052 will be used
|
||||
> + **modbus** - /dev/tty**
|
||||
:end
|
||||
|
||||
Battery level to initiate shutdown (%):
|
||||
_(Battery level to initiate shutdown)_ (%):
|
||||
: <input type="text" name="BATTERYLEVEL" class="narrow" maxlength="3" value="<?=htmlspecialchars($cfg['BATTERYLEVEL']);?>">
|
||||
|
||||
:help160
|
||||
> If during a power failure, the remaining battery percentage (as reported by the UPS) is below or equal to *Battery level*, apcupsd will initiate a system shutdown.
|
||||
:end
|
||||
|
||||
Runtime left to initiate shutdown (minutes):
|
||||
_(Runtime left to initiate shutdown)_ (_(minutes)_):
|
||||
: <input type="text" name="MINUTES" class="narrow" maxlength="3" value="<?=htmlspecialchars($cfg['MINUTES']);?>">
|
||||
|
||||
:help161
|
||||
> If during a power failure, the remaining runtime in minutes (as calculated internally by the UPS) is below or equal to *minutes*, apcupsd, will initiate a system shutdown.
|
||||
:end
|
||||
|
||||
Time on battery before shutdown (seconds):
|
||||
_(Time on battery before shutdown)_ (_(seconds)_):
|
||||
: <input type="text" name="TIMEOUT" class="narrow" maxlength="4" value="<?=htmlspecialchars($cfg['TIMEOUT']);?>">
|
||||
|
||||
:help162
|
||||
> If during a power failure, the UPS has run on batteries for *time-out* many seconds or longer; apcupsd will initiate a system shutdown. A value of zero disables this timer.
|
||||
>
|
||||
> If you have a Smart UPS, you will most likely want to disable this timer by setting it to zero.
|
||||
@@ -138,17 +153,22 @@ Time on battery before shutdown (seconds):
|
||||
>
|
||||
> Of course - when testing - setting this to 60 causes a quick system shutdown if you pull the power plug.
|
||||
> If you have an older dumb UPS, you will want to set this to less than the time you know you can run on batteries.
|
||||
:end
|
||||
<div></div>
|
||||
:help163
|
||||
> **Note:** *Battery level*, *Runtime left*, and *Time on battery* work in conjunction, so the first that occurs will cause the initiation of a shutdown.
|
||||
:end
|
||||
|
||||
Turn off UPS after shutdown:
|
||||
: <select name="KILLUPS" size="1">
|
||||
<?=mk_option($cfg['KILLUPS'], "no", "No");?>
|
||||
<?=mk_option($cfg['KILLUPS'], "yes", "Yes");?>
|
||||
_(Turn off UPS after shutdown)_:
|
||||
: <select name="KILLUPS">
|
||||
<?=mk_option($cfg['KILLUPS'], "no", _("No"))?>
|
||||
<?=mk_option($cfg['KILLUPS'], "yes", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help164
|
||||
> Set to *Yes* to turn off the power to the UPS after a shutdown.
|
||||
:end
|
||||
|
||||
<input type="submit" name="#default" value="Default">
|
||||
: <input type="submit" name="#apply" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
<input type="submit" name="#default" value="_(Default)_">
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, Bergware International.
|
||||
* Copyright 2015, Dan Landon.
|
||||
* Copyright 2015, 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,
|
||||
@@ -12,6 +12,11 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
// add translations
|
||||
$_SERVER['REQUEST_URI'] = 'settings';
|
||||
require_once "$docroot/webGui/include/Translations.php";
|
||||
|
||||
$state = [
|
||||
'TRIM ONLINE' => 'Online (trim)',
|
||||
'BOOST ONLINE' => 'Online (boost)',
|
||||
@@ -36,7 +41,7 @@ if (file_exists("/var/run/apcupsd.pid")) {
|
||||
$val = strtr($row[1], $state);
|
||||
switch ($key) {
|
||||
case 'STATUS':
|
||||
$status[0] = $val ? (stripos($val,'online')===false ? "<td $red>$val</td>" : "<td $green>$val</td>") : "<td $orange>Refreshing...</td>";
|
||||
$status[0] = $val ? (stripos($val,'online')===false ? "<td $red>$val</td>" : "<td $green>$val</td>") : "<td $orange>"._('Refreshing')."...</td>";
|
||||
break;
|
||||
case 'BCHARGE':
|
||||
$status[1] = strtok($val,' ')<=10 ? "<td $red>$val</td>" : "<td $green>$val</td>";
|
||||
@@ -60,9 +65,9 @@ if (file_exists("/var/run/apcupsd.pid")) {
|
||||
}
|
||||
}
|
||||
if ($all && count($rows)%2==1) $result[] = "<td></td><td></td></tr>";
|
||||
if ($power && $load) $status[4] = ($load>=90 ? "<td $red>" : "<td $green>").intval($power*$load/100)." Watts</td>";
|
||||
if ($power && $load) $status[4] = ($load>=90 ? "<td $red>" : "<td $green>").intval($power*$load/100)." "._('Watts')."</td>";
|
||||
}
|
||||
if ($all && !$rows) $result[] = "<tr><td colspan='4' style='text-align:center'>No information available</td></tr>";
|
||||
if ($all && !$rows) $result[] = "<tr><td colspan='4' style='text-align:center'>"._('No information available')."</td></tr>";
|
||||
|
||||
echo "<tr>".implode('', $status)."</tr>";
|
||||
if ($all) echo "\n".implode('', $result);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2020, Bergware International.
|
||||
* Copyright 2015, Dan Landon.
|
||||
* Copyright 2015, 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,
|
||||
|
||||
@@ -3,8 +3,8 @@ Cond="(pgrep('dockerd')!==false)"
|
||||
Markdown="false"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2014-2018, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2014-2020, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -15,7 +15,7 @@ Markdown="false"
|
||||
*/
|
||||
?>
|
||||
<div style="text-align:right;vertical-align:top;position:relative;top:-44px;height:0;display:none;">
|
||||
<span class="toggleMode" onclick="toggleMode();"><i id="toggleMode" class="fa fa-lg"></i> Advanced View</span>
|
||||
<span class="toggleMode" onclick="toggleMode();"><i id="toggleMode" class="fa fa-lg"></i> _(Advanced View)_</span>
|
||||
</div>
|
||||
<?PHP
|
||||
require_once "$docroot/plugins/dynamix.docker.manager/include/CreateDocker.php";
|
||||
|
||||
@@ -4,8 +4,8 @@ Code="e90b"
|
||||
Cond="exec(\"grep -o '^DOCKER_ENABLED=.yes' /boot/config/docker.cfg 2>/dev/null\")"
|
||||
----
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2014-2018, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2014-2020, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -17,8 +17,8 @@ Cond="exec(\"grep -o '^DOCKER_ENABLED=.yes' /boot/config/docker.cfg 2>/dev/null\
|
||||
?>
|
||||
<?
|
||||
if ($var['fsState'] != 'Started') {
|
||||
echo "<div class='notice shift'>Array must be <span class='strong big'>started</span> to view Docker containers.</div>";
|
||||
echo "<div class='notice shift'>_(Array must be **Started** to view Docker containers)_.</div>";
|
||||
} elseif (!is_file('/var/run/dockerd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/dockerd.pid')))) {
|
||||
echo "<div class='notice shift'>Docker Service failed to start.</div>";
|
||||
echo "<div class='notice shift'>_(Docker Service failed to start)_.</div>";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -20,7 +20,7 @@ Markdown="false"
|
||||
<?
|
||||
$width = strstr('white,black',$display['theme']) ? -58: -44;
|
||||
$top = strstr('white,black',$display['theme']) ? 40 : 20;
|
||||
$busy = "<i class='fa fa-spin fa-circle-o-notch'></i> Please wait... starting up containers";
|
||||
$busy = "<i class='fa fa-spin fa-circle-o-notch'></i> "._('Please wait')."... "._('starting up containers');
|
||||
$cpus = cpu_list();
|
||||
?>
|
||||
<link type="text/css" rel="stylesheet" href="<?autov('/webGui/styles/jquery.ui.css')?>">
|
||||
@@ -40,17 +40,17 @@ table tbody td{line-height:normal}
|
||||
<div id="iframe-popup" style="display:none;-webkit-overflow-scrolling:touch;"></div>
|
||||
<span class="status" style="margin-top:<?=$width?>px"><span><input type="checkbox" class="advancedview"></span></span>
|
||||
<table id="docker_containers" class="tablesorter shift">
|
||||
<thead><tr><th><a href="#" style="cursor:hand;margin-left:12px;display:inline-block;width:32px" onclick="resetSorting()" title="Reset sorting"><i class="fa fa-th-list"></i></a>Application</th><th>Version</th><th>Network</th><th>Port Mappings <small>(App to Host)</small></th><th>Volume Mappings <small>(App to Host)</small></th><th class="load advanced">CPU & Memory load</th><th class="nine">Autostart</th><th class="five">Log</th></tr></thead>
|
||||
<thead><tr><th><a href="#" style="cursor:hand;margin-left:12px;display:inline-block;width:32px" onclick="resetSorting()" title="_(Reset sorting)_"><i class="fa fa-th-list"></i></a>_(Application)_</th><th>_(Version)_</th><th>_(Network)_</th><th>_(Port Mappings)_ <small>(_(App to Host)_)</small></th><th>_(Volume Mappings)_ <small>(_(App to Host)_)</small></th><th class="load advanced">_(CPU & Memory load)_</th><th class="nine">_(Autostart)_</th><th class="five">_(Log)_</th></tr></thead>
|
||||
<tbody id="docker_list"><tr><td colspan='9'></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" onclick="addContainer()" value="Add Container" style="display:none">
|
||||
<input type="button" onclick="startAll()" value="Start All" style="display:none">
|
||||
<input type="button" onclick="stopAll()" value="Stop All" style="display:none">
|
||||
<input type="button" onclick="pauseAll()" value="Pause All" style="display:none">
|
||||
<input type="button" onclick="resumeAll()" value="Resume All" style="display:none">
|
||||
<input type="button" onclick="checkAll()" value="Check for Updates" id="checkAll" style="display:none">
|
||||
<input type="button" onclick="updateAll()" value="Update All" id="updateAll" style="display:none">
|
||||
<input type="button" onclick="sizes()" value="Container Size" style="display:none">
|
||||
<input type="button" onclick="addContainer()" value="_(Add Container)_" style="display:none">
|
||||
<input type="button" onclick="startAll()" value="_(Start All)_" style="display:none">
|
||||
<input type="button" onclick="stopAll()" value="_(Stop All)_" style="display:none">
|
||||
<input type="button" onclick="pauseAll()" value="_(Pause All)_" style="display:none">
|
||||
<input type="button" onclick="resumeAll()" value="_(Resume All)_" style="display:none">
|
||||
<input type="button" onclick="checkAll()" value="_(Check for Updates)_" id="checkAll" style="display:none">
|
||||
<input type="button" onclick="updateAll()" value="_(Update All)_" id="updateAll" style="display:none">
|
||||
<input type="button" onclick="sizes()" value="_(Container Size)_" style="display:none">
|
||||
|
||||
<script src="<?autov('/webGui/javascript/jquery.switchbutton.js')?>"></script>
|
||||
<script src="<?autov('/plugins/dynamix.docker.manager/javascript/docker.js')?>"></script>
|
||||
@@ -118,7 +118,7 @@ function loadlist() {
|
||||
$('.iconstatus').each(function(){
|
||||
if ($(this).hasClass('stopped')) $('div.'+$(this).prop('id')).hide();
|
||||
});
|
||||
$('.autostart').switchButton({labels_placement:'right'});
|
||||
$('.autostart').switchButton({labels_placement:'right', on_label:'_(On)_', off_label:'_(Off)_'});
|
||||
$('.autostart').change(function(){
|
||||
var more = $.cookie('docker_listview_mode')=='advanced';
|
||||
var wait = $('#'+$(this).prop('id').replace('auto','wait'));
|
||||
@@ -145,7 +145,7 @@ function loadlist() {
|
||||
});
|
||||
}
|
||||
function sizes() {
|
||||
openBox('/plugins/dynamix.docker.manager/include/ContainerSize.php','Container Size',600,600);
|
||||
openBox('/plugins/dynamix.docker.manager/include/ContainerSize.php','_(Container Size)_',600,600);
|
||||
}
|
||||
var watchDocker = new NchanSubscriber('/sub/dockerload');
|
||||
watchDocker.on('message', function(data){
|
||||
@@ -159,7 +159,7 @@ watchDocker.on('message', function(data){
|
||||
}
|
||||
});
|
||||
$(function() {
|
||||
$('.advancedview').switchButton({labels_placement:'left', on_label:'Advanced View', off_label:'Basic View', checked:$.cookie('docker_listview_mode')=='advanced'});
|
||||
$('.advancedview').switchButton({labels_placement:'left', on_label:'_(Advanced View)_', off_label:'_(Basic View)_', checked:$.cookie('docker_listview_mode')=='advanced'});
|
||||
$('.advancedview').change(function(){
|
||||
$('.advanced').toggle('slow');
|
||||
$('.basic').toggle('slow');
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="clone"
|
||||
Cond="(pgrep('dockerd')!==false)"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2019, Lime Technology
|
||||
* Copyright 2014-2019, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2014-2020, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -24,14 +24,16 @@ $template_repos = $dockerManPaths['template-repos'];
|
||||
?>
|
||||
<form markdown="1" method="POST" action="/plugins/dynamix.docker.manager/include/UpdateConfig.php" target="progressFrame">
|
||||
<input type="hidden" name="action" value="templates">
|
||||
Template repositories:
|
||||
_(Template repositories)_:
|
||||
: <textarea name="template_repos" rows="5" cols="100" style="width:550px"><?=@file_get_contents($template_repos);?></textarea>
|
||||
|
||||
:help1
|
||||
> Use this field to add template repositories.
|
||||
> Docker templates are used to facilitate the creation and re-creation of Docker containers. Please setup one per line.
|
||||
>
|
||||
> For a list of popular community-supported repositories, visit here: <a href="http://lime-technology.com/forum/index.php?topic=37958.0" target="_blank">http://lime-technology.com/forum/index.php?topic=37958.0</a>
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" value="Save">
|
||||
: <input type="submit" value="_(Save)_">
|
||||
</form>
|
||||
|
||||
@@ -4,9 +4,9 @@ Icon="icon-docker"
|
||||
Tag="icon-docker"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2019, Lime Technology
|
||||
* Copyright 2014-2019, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
* Copyright 2012-2019, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2014-2020, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -29,7 +29,9 @@ if (file_exists($realfile)) {
|
||||
$realfile = transpose_user_path($realfile);
|
||||
if (exec("stat -c %T -f " . escapeshellarg($realfile)) == "btrfs") {
|
||||
if (shell_exec("lsattr " . escapeshellarg($realfile) . " | grep \"\\-C\"") == "") {
|
||||
echo '<p class="notice">Your existing Docker image file needs to be recreated due to an issue from an earlier beta of Unraid 6. Failure to do so may result in your docker image suffering corruption at a later time. Please do this NOW!</p>';
|
||||
echo '<p class="notice">'._('Your existing Docker image file needs to be recreated due to an issue from an earlier beta of Unraid 6').' ';
|
||||
echo _('Failure to do so may result in your docker image suffering corruption at a later time').' ';
|
||||
echo _('Please do this NOW').'!</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -140,55 +142,62 @@ span.disabled{color:#404040}
|
||||
<input type="hidden" name="#arg[1]" value="cmdStatus=Apply">
|
||||
<input type="hidden" name="#cleanup" value="true">
|
||||
<input type="hidden" name="DOCKER_CUSTOM_NETWORKS" value="<?=implode(' ',$unset)?> ">
|
||||
Enable Docker:
|
||||
_(Enable Docker)_:
|
||||
: <select id="DOCKER_ENABLED" name="DOCKER_ENABLED">
|
||||
<?=mk_option($dockercfg['DOCKER_ENABLED'], 'no', 'No')?>
|
||||
<?=mk_option($dockercfg['DOCKER_ENABLED'], 'yes', 'Yes')?>
|
||||
<?=mk_option($dockercfg['DOCKER_ENABLED'], 'no', _('No'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_ENABLED'], 'yes', _('Yes'))?>
|
||||
</select>
|
||||
<?if ($var['fsState'] != "Started"):?>
|
||||
<span id="arraystopped"><i class="fa fa-warning icon warning"></i> <?=($dockercfg['DOCKER_ENABLED']=='yes')?'Docker will be available after Array is Started':'Apply to activate Docker after Array is Started'?></span>
|
||||
<?elseif (!is_dir(dirname($dockercfg['DOCKER_IMAGE_FILE'])) || !is_dir($dockercfg['DOCKER_APP_CONFIG_PATH'])):?>
|
||||
<span class="basic" style="display:inline"><i class="fa fa-warning icon warning"></i> One or more paths do not exist (<a href="#" onclick="$('.advancedview').switchButton('option','checked',true); return false">view</a>)</span>
|
||||
<span class="basic" style="display:inline"><i class="fa fa-warning icon warning"></i> _(One or more paths do not exist)_ (<a href="#" onclick="$('.advancedview').switchButton('option','checked',true); return false">_(view)_</a>)</span>
|
||||
<?endif;?>
|
||||
|
||||
:help33
|
||||
> Before you can start the Docker service for the first time, please specify an image file for Docker to install to.
|
||||
>
|
||||
> Once started, Docker will always automatically start after the array has been started.
|
||||
:end
|
||||
|
||||
<?if ($DockerStopped):?>
|
||||
|
||||
Docker vDisk size:
|
||||
_(Docker vDisk size)_:
|
||||
: <input id="DOCKER_IMAGE_SIZE" type="number" name="DOCKER_IMAGE_SIZE" value="<?=$dockercfg['DOCKER_IMAGE_SIZE']?>" class="narrow" required>GB <span id="SIZE_ERROR" class="errortext"></span>
|
||||
|
||||
:help34
|
||||
> If the system needs to create a new docker image file, this is the default size to use specified in GB.
|
||||
>
|
||||
> To resize an existing image file, specify the new size here. Next time the Docker service is started the file (and file system) will increased to the new size (but never decreased).
|
||||
:end
|
||||
|
||||
Docker vDisk location:
|
||||
_(Docker vDisk location)_:
|
||||
: <input id="DOCKER_IMAGE_FILE" type="text" name="DOCKER_IMAGE_FILE" value="<?=$dockercfg['DOCKER_IMAGE_FILE']?>" placeholder="e.g. /mnt/disk1/docker.img" data-pickcloseonfile="true" data-pickfilter="img" data-pickroot="/mnt/" data-pickfolders="true" required="required" pattern="^[^\\]*\.(img|IMG)$">
|
||||
<?if (file_exists($dockercfg['DOCKER_IMAGE_FILE'])):?>
|
||||
<span id="deletePanel"><label><input type="checkbox" id="deleteCheckbox"> Delete Image File</label></span>
|
||||
<span id="deletePanel"><label><input type="checkbox" id="deleteCheckbox"> _(Delete Image File)_</label></span>
|
||||
<?endif;?>
|
||||
<?if ($var['fsState'] != "Started"):?>
|
||||
<span><i class="fa fa-warning icon warning"></i> Modify with caution: unable to validate path until Array is Started</span>
|
||||
<span><i class="fa fa-warning icon warning"></i> _(Modify with caution: unable to validate path until Array is Started)_</span>
|
||||
<?elseif (!is_dir(dirname($dockercfg['DOCKER_IMAGE_FILE']))):?>
|
||||
<span><i class="fa fa-warning icon warning"></i> Path does not exist</span>
|
||||
<span><i class="fa fa-warning icon warning"></i> _(Path does not exist)_</span>
|
||||
<?endif;?><span id="IMAGE_ERROR" class="errortext"></span>
|
||||
|
||||
:help35
|
||||
> You must specify an image file for Docker. The system will automatically create this file when the Docker service is first started.
|
||||
>
|
||||
> The image file name must have the extension .img, e.g. If not the input is not accepted and marked red.
|
||||
>
|
||||
> It is recommended to create this image file outside the array, e.g. on the Cache pool. For best performance SSD devices are preferred.
|
||||
:end
|
||||
|
||||
Default appdata storage location:
|
||||
_(Default appdata storage location)_:
|
||||
: <input id="DOCKER_APP_CONFIG_PATH" type="text" name="DOCKER_APP_CONFIG_PATH" value="<?=$dockercfg['DOCKER_APP_CONFIG_PATH']?>" placeholder="e.g. /mnt/user/appdata" data-pickfilter="HIDE_FILES_FILTER" data-pickroot="<?=(is_dir('/mnt/user/') ? '/mnt/user/' : '/mnt/')?>" data-pickfolders="true" pattern="^[^\\]*/$">
|
||||
<?if ($var['fsState'] != "Started"):?>
|
||||
<span><i class="fa fa-warning icon warning"></i> Modify with caution: unable to validate path until Array is Started</span>
|
||||
<span><i class="fa fa-warning icon warning"></i> _(Modify with caution: unable to validate path until Array is Started)_</span>
|
||||
<?elseif (!is_dir($dockercfg['DOCKER_APP_CONFIG_PATH'])):?>
|
||||
<span><i class="fa fa-warning icon warning"></i> Path does not exist</span>
|
||||
<span><i class="fa fa-warning icon warning"></i> _(Path does not exist)_</span>
|
||||
<?endif;?>
|
||||
|
||||
:help36
|
||||
> You can specify a folder to automatically generate and store subfolders containing configuration files for each Docker app (via the /config mapped volume).
|
||||
>
|
||||
> The folder's path must end with a trailing slash (/) character. If not the input is not accepted and marked red.
|
||||
@@ -196,68 +205,81 @@ Default appdata storage location:
|
||||
> It is recommended to create this folder outside the array, e.g. on the Cache pool. For best performance SSD devices are preferred.
|
||||
>
|
||||
> Only used when adding new Docker apps. Editing existing Docker apps will not be affected by this setting.
|
||||
:end
|
||||
|
||||
<div markdown="1" class="advanced">
|
||||
Docker LOG rotation:
|
||||
_(Docker LOG rotation)_:
|
||||
: <select name="DOCKER_LOG_ROTATION" onchange="showLogOptions(this.value)">
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_ROTATION'], 'no', 'Disabled')?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_ROTATION'], 'yes', 'Enabled')?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_ROTATION'], 'no', _('Disabled'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_ROTATION'], 'yes', _('Enabled'))?>
|
||||
</select>
|
||||
|
||||
:help37
|
||||
> By default LOG rotation is disabled and will create a single LOG file of unlimited size.
|
||||
>
|
||||
> Enable LOG rotation to limit the size of the LOG file and specify the number of files to keep in the rotation scheme.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="DOCKER_LOG_OPTIONS" style="display:none">
|
||||
Docker LOG maximum file size:
|
||||
_(Docker LOG maximum file size)_:
|
||||
: <select name="DOCKER_LOG_SIZE">
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '10m', '10 MB')?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '20m', '20 MB')?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '50m', '50 MB')?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '100m', '100 MB')?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '500m', '500 MB')?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '1g', '1000 MB')?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '10m', '10 '._('MB'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '20m', '20 '._('MB'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '50m', '50 '._('MB'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '100m', '100 '._('MB'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '500m', '500 '._('MB'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_SIZE'], '1g', '1000 '._('MB'))?>
|
||||
</select>
|
||||
|
||||
:help38
|
||||
> Specifies the maximum LOG size. When exceeded LOG rotation will occur.
|
||||
:end
|
||||
|
||||
Docker LOG number of files:
|
||||
_(Docker LOG number of files)_:
|
||||
: <select name="DOCKER_LOG_FILES">
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_FILES'], '1', '1')?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_FILES'], '2', '2')?>
|
||||
<?=mk_option($dockercfg['DOCKER_LOG_FILES'], '3', '3')?>
|
||||
</select>
|
||||
|
||||
:help39
|
||||
> Specifies the number of LOG files when LOG rotation is done.
|
||||
:end
|
||||
|
||||
</div>
|
||||
Template Authoring Mode:
|
||||
_(Template Authoring Mode)_:
|
||||
: <select id="DOCKER_AUTHORING_MODE" name="DOCKER_AUTHORING_MODE">
|
||||
<?=mk_option($dockercfg['DOCKER_AUTHORING_MODE'], 'no', 'No')?>
|
||||
<?=mk_option($dockercfg['DOCKER_AUTHORING_MODE'], 'yes', 'Yes')?>
|
||||
<?=mk_option($dockercfg['DOCKER_AUTHORING_MODE'], 'no', _('No'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_AUTHORING_MODE'], 'yes', _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help40
|
||||
> If set to **Yes**, when creating/editing containers the interface will be present with some extra fields related to template authoring.
|
||||
:end
|
||||
|
||||
Host access to custom networks:
|
||||
_(Host access to custom networks)_:
|
||||
: <select name="DOCKER_ALLOW_ACCESS">
|
||||
<?=mk_option($dockercfg['DOCKER_ALLOW_ACCESS'], '', 'Disabled')?>
|
||||
<?=mk_option($dockercfg['DOCKER_ALLOW_ACCESS'], 'yes', 'Enabled')?>
|
||||
<?=mk_option($dockercfg['DOCKER_ALLOW_ACCESS'], '', _('Disabled'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_ALLOW_ACCESS'], 'yes', _('Enabled'))?>
|
||||
</select>
|
||||
|
||||
:help41
|
||||
> Allows direct communication between the host and containers using a custom (macvlan) network.<br>
|
||||
> By default this is prohibited.
|
||||
:end
|
||||
|
||||
Preserve user defined networks:
|
||||
_(Preserve user defined networks)_:
|
||||
: <select name="DOCKER_USER_NETWORKS">
|
||||
<?=mk_option($dockercfg['DOCKER_USER_NETWORKS'], 'remove', 'No')?>
|
||||
<?=mk_option($dockercfg['DOCKER_USER_NETWORKS'], 'preserve', 'Yes')?>
|
||||
<?=mk_option($dockercfg['DOCKER_USER_NETWORKS'], 'remove', _('No'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_USER_NETWORKS'], 'preserve', _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help42
|
||||
> User created networks are networks created by the user outside of the GUI.<br>
|
||||
> By default user created networks are removed from Docker. This is done to prevent potential conflicts with the automatic generation of custom networks.
|
||||
>
|
||||
> Change this setting to preserve user defined networks, but it is the responsibility of the user to ensure these entries work correctly and are conflict free.
|
||||
:end
|
||||
|
||||
<?foreach ($include as $network => $route):?>
|
||||
<?
|
||||
@@ -268,7 +290,7 @@ $docker_dhcp = "DOCKER_DHCP_$net";
|
||||
|
||||
<input type="hidden" name="<?=$docker_auto?>" value="<?=$dockercfg[$docker_auto]?>">
|
||||
|
||||
IPv4 custom network on interface <?=$network?> (optional):
|
||||
_(IPv4 custom network on interface)_ <?=$network?> (_(optional)_):
|
||||
<?
|
||||
$auto = $dockercfg[$docker_auto]!='no';
|
||||
$autoDisabled = $auto ? '':'disabled';
|
||||
@@ -288,10 +310,10 @@ IPv4 custom network on interface <?=$network?> (optional):
|
||||
?>
|
||||
: <input type="checkbox" id="<?=$docker_dhcp?>_edit" onchange="changeEdit(this.id,4)"<?=$auto?'checked':''?>>
|
||||
<span id="<?=$docker_dhcp?>_line" class="<?=$autoDisabled?>">
|
||||
<span class="<?=$ip4class?>">**Subnet:** <?=$route?></span>
|
||||
<span class="<?=$gw4class?>">**Gateway:** <?=$gateway[$network]?></span>
|
||||
<span class="<?=$ip4class?>">**_(Subnet)_:** <?=$route?></span>
|
||||
<span class="<?=$gw4class?>">**_(Gateway)_:** <?=$gateway[$network]?></span>
|
||||
<input type="checkbox" id="<?=$docker_dhcp?>_dhcp" onchange="changeDHCP(this.id,4)"<?=$dhcp?'checked':''?><?=$autoDisabled?>>
|
||||
**DHCP pool:**<span id="<?=$docker_dhcp?>_net" class="net <?=$dhcpDisabled?>"><?=$prefix?>.</span>
|
||||
**_(DHCP pool)_:**<span id="<?=$docker_dhcp?>_net" class="net <?=$dhcpDisabled?>"><?=$prefix?>.</span>
|
||||
</span>
|
||||
<?
|
||||
for ($b=$box; $b<=3; $b++) {
|
||||
@@ -308,15 +330,17 @@ IPv4 custom network on interface <?=$network?> (optional):
|
||||
echo "/ ";
|
||||
echo "<select id=\"{$docker_dhcp}_mask\" class=\"mask\" onchange=\"changeMask(this.id,this.value)\" $dhcpDisabled>";
|
||||
for ($m=$mask+1; $m<=30; $m++) echo mk_option($mask_user,$m,$m);
|
||||
echo "</select><span id=\"{$docker_dhcp}_size\" style=\"".($dhcp?'':'display:none')."\">($size hosts)</span>";
|
||||
echo "</select><span id=\"{$docker_dhcp}_size\" style=\"".($dhcp?'':'display:none')."\">($size "._('hosts').")</span>";
|
||||
echo "<input type=\"hidden\" name=\"$docker_dhcp\" value=\"\">";
|
||||
?>
|
||||
|
||||
<?endforeach;?>
|
||||
<?if ($include):?>
|
||||
:help43
|
||||
> Include (default) or exclude the above interfaces or VLANs as custom network for Docker.
|
||||
>
|
||||
> Enter the pool range within each allocated subnet which is used for DHCPv4 assignments by Docker. E.g. 192.168.1.128/25
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
<?foreach ($unset as $network):?>
|
||||
@@ -329,25 +353,27 @@ $dhcpDisabled = $range ? '':'disabled';
|
||||
?>
|
||||
<?if ($protocol[$network] != 'ipv6'):?>
|
||||
|
||||
IPv4 custom network on interface <?=$network?> (optional):
|
||||
_(IPv4 custom network on interface)_ <?=$network?> (_(optional)_):
|
||||
: <input type="checkbox" id="DOCKER_CUSTOM_<?=$port?>_edit" onchange="changeCustom(this.id,4)"<?=$subnet?'checked':''?>><span id="DOCKER_CUSTOM_<?=$port?>_line" class="<?=$subnet?'':'disabled'?>">
|
||||
<span class="<?=$ip4class?>">**Subnet:** <input type="text" id="DOCKER_CUSTOM_<?=$port?>_net" name="DOCKER_SUBNET_<?=$port?>" class="ip4" value="<?=$subnet?>" title="IPv4 address A.B.C.D"<?=$disabled?>>/
|
||||
<span class="<?=$ip4class?>">**_(Subnet)_:** <input type="text" id="DOCKER_CUSTOM_<?=$port?>_net" name="DOCKER_SUBNET_<?=$port?>" class="ip4" value="<?=$subnet?>" title="_(IPv4 address A.B.C.D)_"<?=$disabled?>>/
|
||||
<select id="DOCKER_CUSTOM_<?=$port?>_mask" name="DOCKER_MASK_<?=$port?>" class="mask"<?=$disabled?>>
|
||||
<?for ($m=16; $m<=30; $m++) echo mk_option($mask?:24,$m,$m)?></select>
|
||||
</span>
|
||||
<span class="<?=$gw4class?>">**Gateway:** <input type="text" id="DOCKER_CUSTOM_<?=$port?>_gw" name="DOCKER_GATEWAY_<?=$port?>" class="ip4" value="<?=$dockercfg["DOCKER_GATEWAY_$port"]?>" title="IPv4 address A.B.C.D"<?=$disabled?>></span>
|
||||
<span class="<?=$gw4class?>">**_(Gateway)_:** <input type="text" id="DOCKER_CUSTOM_<?=$port?>_gw" name="DOCKER_GATEWAY_<?=$port?>" class="ip4" value="<?=$dockercfg["DOCKER_GATEWAY_$port"]?>" title="_(IPv4 address A.B.C.D)_"<?=$disabled?>></span>
|
||||
<input type="checkbox" id="DOCKER_CUSTOM_<?=$port?>_dhcp" onchange="customDHCP(this.id,4)"<?=$subnet?'checked':''?><?=$dhcpDisabled?>>
|
||||
**DHCP pool:** <input type="text" id="DOCKER_CUSTOM_<?=$port?>_pool" name="DOCKER_RANGE_<?=$port?>" class="ip4" value="<?=$range?>" title="IPv4 address A.B.C.D"<?=$disabled?>>/
|
||||
**_(DHCP pool)_:** <input type="text" id="DOCKER_CUSTOM_<?=$port?>_pool" name="DOCKER_RANGE_<?=$port?>" class="ip4" value="<?=$range?>" title="_(IPv4 address A.B.C.D)_"<?=$disabled?>>/
|
||||
<select id="DOCKER_CUSTOM_<?=$port?>_size" name="DOCKER_SIZE_<?=$port?>" class="mask" onchange="changeHosts(this.id,this.value)"<?=$disabled?>>
|
||||
<?for ($m=16; $m<=30; $m++) echo mk_option($size?:25,$m,$m)?></select>
|
||||
<span id="DOCKER_CUSTOM_<?=$port?>_hosts" style="<?=$subnet?'':'display:none'?>">(<?=pow(2,32-($size?:25))?> hosts)</span></span>
|
||||
<span id="DOCKER_CUSTOM_<?=$port?>_hosts" style="<?=$subnet?'':'display:none'?>">(<?=pow(2,32-($size?:25))?> _(hosts)_)</span></span>
|
||||
|
||||
<?endif;?>
|
||||
<?endforeach;?>
|
||||
<?if ($unset && $protocol[$network] != 'ipv6'):?>
|
||||
:help44
|
||||
> Include or exclude (default) the above interfaces or VLANs as custom network for Docker.
|
||||
>
|
||||
> Enter the pool range within each allocated subnet which is used for DHCPv4 assignments by Docker. E.g. 192.168.1.128/25
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
<?if ($include6):?>
|
||||
@@ -360,7 +386,7 @@ $docker_auto = "DOCKER_AUTO_$net";
|
||||
$docker_dhcp6 = "DOCKER_DHCP6_$net";
|
||||
?>
|
||||
|
||||
IPv6 custom network on interface <?=$network?> (optional):
|
||||
_(IPv6 custom network on interface)_ <?=$network?> (_(optional)_):
|
||||
<?
|
||||
$auto6 = $dockercfg[$docker_auto]!='no';
|
||||
$auto6Disabled = $auto6 ? '':'disabled';
|
||||
@@ -373,10 +399,10 @@ IPv6 custom network on interface <?=$network?> (optional):
|
||||
?>
|
||||
: <input type="checkbox" id="<?=$docker_dhcp6?>_edit" onchange="changeEdit(this.id,6)"<?=$auto6?'checked':''?>>
|
||||
<span id="<?=$docker_dhcp6?>_line" class="<?=$auto6Disabled?>">
|
||||
<span class="ip6">**Subnet:** <?=$route?></span>
|
||||
<span class="gw6">**Gateway:** <?=$gateway6[$network]?></span>
|
||||
<span class="ip6">**_(Subnet)_:** <?=$route?></span>
|
||||
<span class="gw6">**_(Gateway)_:** <?=$gateway6[$network]?></span>
|
||||
<input type="checkbox" id="<?=$docker_dhcp6?>_dhcp" onchange="changeDHCP(this.id,6)"<?=$dhcp6?'checked':''?><?=$auto6Disabled?>>
|
||||
**DHCP pool:**<span id="<?=$docker_dhcp6?>_net" class="net <?=$dhcp6Disabled?>"><?=$net?>:</span>
|
||||
**_(DHCP pool)_:**<span id="<?=$docker_dhcp6?>_net" class="net <?=$dhcp6Disabled?>"><?=$net?>:</span>
|
||||
<?
|
||||
echo "<input type=\"text\" id=\"{$docker_dhcp6}_text\" value=\"$net_user\" class=\"pool6\" $dhcp6Disabled>/ ";
|
||||
echo "<select id=\"{$docker_dhcp6}_mask\" class=\"mask\" $dhcp6Disabled>";
|
||||
@@ -386,9 +412,11 @@ IPv6 custom network on interface <?=$network?> (optional):
|
||||
|
||||
<?endforeach;?>
|
||||
<?if ($include6):?>
|
||||
:help45
|
||||
> Include (default) or exclude the above interfaces or VLANs as custom network for Docker.
|
||||
>
|
||||
> Enter the pool range within each allocated subnet which is used for DHCPv6 assignments by Docker. E.g. 2a02:abcd:9ef5:100:1::/72
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
<?foreach ($unset as $network):?>
|
||||
@@ -401,59 +429,73 @@ $dhcpDisabled = $range6 ? '':'disabled';
|
||||
?>
|
||||
<?if ($protocol[$network] != 'ipv4'):?>
|
||||
|
||||
IPv6 custom network on interface <?=$network?> (optional):
|
||||
_(IPv6 custom network on interface)_ <?=$network?> (_(optional)_):
|
||||
: <input type="checkbox" id="DOCKER_CUSTOM6_<?=$port?>_edit" onchange="changeCustom(this.id,6)"<?=$subnet6?'checked':''?>><span id="DOCKER_CUSTOM6_<?=$port?>_line" class="<?=$subnet6?'':'disabled'?>">
|
||||
<span class="ip6">**Subnet:**<input type="text" id="DOCKER_CUSTOM6_<?=$port?>_net" name="DOCKER_SUBNET6_<?=$port?>" class="ip6" value="<?=$subnet6?>" title="IPv6 address nnnn:xxxx::yyyy"<?=$disabled?>>/
|
||||
<span class="ip6">**_(Subnet)_:**<input type="text" id="DOCKER_CUSTOM6_<?=$port?>_net" name="DOCKER_SUBNET6_<?=$port?>" class="ip6" value="<?=$subnet6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_"<?=$disabled?>>/
|
||||
<select id="DOCKER_CUSTOM6_<?=$port?>_mask" name="DOCKER_MASK6_<?=$port?>" class="mask"<?=$disabled?>>
|
||||
<?for ($m=64; $m<=120; $m+=8) echo mk_option($mask6?:64,$m,$m)?></select></span>
|
||||
<span class="gw6">**Gateway:**<input type="text" id="DOCKER_CUSTOM6_<?=$port?>_gw" name="DOCKER_GATEWAY6_<?=$port?>" class="gw6" value="<?=$dockercfg["DOCKER_GATEWAY6_$port"]?>" title="IPv6 address nnnn:xxxx::yyyy"<?=$disabled?>></span>
|
||||
<span class="gw6">**_(Gateway)_:**<input type="text" id="DOCKER_CUSTOM6_<?=$port?>_gw" name="DOCKER_GATEWAY6_<?=$port?>" class="gw6" value="<?=$dockercfg["DOCKER_GATEWAY6_$port"]?>" title="_(IPv6 address nnnn:xxxx::yyyy)_"<?=$disabled?>></span>
|
||||
<input type="checkbox" id="DOCKER_CUSTOM6_<?=$port?>_dhcp" onchange="customDHCP(this.id,6)"<?=$subnet6?'checked':''?><?=$dhcpDisabled?>>
|
||||
**DHCP pool:**<input type="text" id="DOCKER_CUSTOM6_<?=$port?>_pool" name="DOCKER_RANGE6_<?=$port?>" class="ip6" value="<?=$range6?>" title="IPv6 address nnnn:xxxx::yyyy"<?=$disabled?>>/
|
||||
**_(DHCP pool)_:**<input type="text" id="DOCKER_CUSTOM6_<?=$port?>_pool" name="DOCKER_RANGE6_<?=$port?>" class="ip6" value="<?=$range6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_"<?=$disabled?>>/
|
||||
<select id="DOCKER_CUSTOM6_<?=$port?>_size" name="DOCKER_SIZE6_<?=$port?>" class="mask"<?=$disabled?>>
|
||||
<?for ($m=64; $m<=120; $m+=8) echo mk_option($size6?:72,$m,$m)?></select></span>
|
||||
|
||||
<?endif;?>
|
||||
<?endforeach;?>
|
||||
<?if ($unset && $protocol[$network] != 'ipv4'):?>
|
||||
:help46
|
||||
> Include or exclude (default) the above interfaces or VLANs as custom network for Docker.
|
||||
>
|
||||
> Enter the pool range within each allocated subnet which is used for DHCPv6 assignments by Docker. E.g. 2a02:abcd:9ef5:100:1::/72
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
</div>
|
||||
<?else: /* DOCKER STARTED */?>
|
||||
|
||||
Docker version:
|
||||
_(Docker version)_:
|
||||
: <?$arrInfo = $DockerClient->getInfo(); echo $arrInfo['Version']?>
|
||||
|
||||
> This is the Docker version.
|
||||
:help47
|
||||
> This is the active Docker version.
|
||||
:end
|
||||
|
||||
Docker vDisk location:
|
||||
_(Docker vDisk location)_:
|
||||
: <?=$dockercfg['DOCKER_IMAGE_FILE']?>
|
||||
|
||||
:help48
|
||||
> This is the location of the Docker image.
|
||||
:end
|
||||
|
||||
Default appdata storage location:
|
||||
_(Default appdata storage location)_:
|
||||
: <?=$dockercfg['DOCKER_APP_CONFIG_PATH']?>
|
||||
|
||||
:help49
|
||||
> This is the storage location for Docker containers.
|
||||
:end
|
||||
|
||||
<div markdown="1" class="advanced">
|
||||
Docker LOG rotation:
|
||||
: <?=$dockercfg['DOCKER_LOG_ROTATION']=='yes'?'Enabled':'Disabled'?>
|
||||
_(Docker LOG rotation)_:
|
||||
: <?=$dockercfg['DOCKER_LOG_ROTATION']=='yes' ? _('Enabled') : _('Disabled')?>
|
||||
|
||||
:help50
|
||||
> By default a single unlimited LOG file is created. Otherwise LOG file size and number of files are limited when LOG rotation is enabled.
|
||||
:end
|
||||
|
||||
Host access to custom networks:
|
||||
: <?=$dockercfg['DOCKER_ALLOW_ACCESS']==''?'Disabled':'Enabled'?>
|
||||
_(Host access to custom networks)_:
|
||||
: <?=$dockercfg['DOCKER_ALLOW_ACCESS']=='' ? _('Disabled') : _('Enabled')?>
|
||||
|
||||
:help51
|
||||
> Allows direct communication between the host and containers using a custom (macvlan) network.<br>
|
||||
> By default this is prohibited.
|
||||
:end
|
||||
|
||||
Preserve user defined networks:
|
||||
: <?=$dockercfg['DOCKER_USER_NETWORKS']=='preserve'?'Yes':'No'?>
|
||||
_(Preserve user defined networks)_:
|
||||
: <?=$dockercfg['DOCKER_USER_NETWORKS']=='preserve' ? _('Yes') : _('No')?>
|
||||
|
||||
:help52
|
||||
> Shows whether networks created outside of the GUI are removed or preserved for Docker. When preserved *user defined networks* become available in the *Network type* dropdown list of containers.
|
||||
:end
|
||||
|
||||
<?foreach ($include as $network => $route):?>
|
||||
<?
|
||||
@@ -461,10 +503,10 @@ $net = normalize($network);
|
||||
$docker_dhcp = "DOCKER_DHCP_$net";
|
||||
?>
|
||||
<?if ($dockercfg[$docker_dhcp] || empty($dockercfg["DOCKER_AUTO_$net"])):?>
|
||||
IPv4 custom network on interface <?=$network?>:
|
||||
: <span class="<?=$gw4class?>">**Subnet:** <?=$route?></span>
|
||||
<span class="<?=$gw4class?>">**Gateway:** <?=$gateway[$network]?></span>
|
||||
**DHCP pool:** <?=$dockercfg[$docker_dhcp] ?? 'not set'?><?if ($dockercfg[$docker_dhcp]):?> (<?=pow(2,32-explode('/',$dockercfg[$docker_dhcp])[1])?> hosts)<?endif;?>
|
||||
_(IPv4 custom network on interface)_ <?=$network?>:
|
||||
: <span class="<?=$gw4class?>">**_(Subnet)_:** <?=$route?></span>
|
||||
<span class="<?=$gw4class?>">**_(Gateway)_:** <?=$gateway[$network]?></span>
|
||||
**_(DHCP pool)_:** <?=$dockercfg[$docker_dhcp] ?? '_ (not set)_'?><?if ($dockercfg[$docker_dhcp]):?> (<?=pow(2,32-explode('/',$dockercfg[$docker_dhcp])[1])?> _(hosts)_)<?endif;?>
|
||||
|
||||
<?endif;?>
|
||||
<?endforeach;?>
|
||||
@@ -484,10 +526,10 @@ list($subnet,$mask) = explode('/',$dockercfg["DOCKER_SUBNET_$port"]);
|
||||
list($range,$size) = explode('/',$dockercfg["DOCKER_RANGE_$port"]);
|
||||
?>
|
||||
<?if ($protocol != 'ipv6' && $subnet):?>
|
||||
IPv4 custom network on interface <?=$network?>:
|
||||
: <span class="<?=$gw4class?>">**Subnet:** <?=$subnet?>/<?=$mask?></span>
|
||||
<span class="<?=$gw4class?>">**Gateway:** <?=$dockercfg["DOCKER_GATEWAY_$port"]?></span>
|
||||
**DHCP pool:** <?=$range?"$range/$size":"not set"?><?if ($range):?> (<?=pow(2,32-($size?:25))?> hosts)<?endif;?>
|
||||
_(IPv4 custom network on interface)_ <?=$network?>:
|
||||
: <span class="<?=$gw4class?>">**_(Subnet)_:** <?=$subnet?>/<?=$mask?></span>
|
||||
<span class="<?=$gw4class?>">**_(Gateway)_:** <?=$dockercfg["DOCKER_GATEWAY_$port"]?></span>
|
||||
**_(DHCP pool)_:** <?=$range ? "$range/$size" : "_(not set)_"?><?if ($range):?> (<?=pow(2,32-($size?:25))?> _(hosts)_)<?endif;?>
|
||||
|
||||
<?endif;?>
|
||||
<?endforeach;?>
|
||||
@@ -497,10 +539,10 @@ $net = normalize($network);
|
||||
$docker_dhcp6 = "DOCKER_DHCP6_$net";
|
||||
if ($dockercfg[$docker_dhcp6] || empty($dockercfg["DOCKER_AUTO_$net"])):?>
|
||||
<?$wide = true;?>
|
||||
IPv6 custom network on interface <?=$network?>:
|
||||
: <span class="gw6">**Subnet:** <?=$route?></span>
|
||||
<span class="gw6">**Gateway:** <?=$gateway6[$network]?></span>
|
||||
**DHCP pool:** <?=$dockercfg[$docker_dhcp6] ?? 'not set'?>
|
||||
_(IPv6 custom network on interface)_ <?=$network?>:
|
||||
: <span class="gw6">**_(Subnet)_:** <?=$route?></span>
|
||||
<span class="gw6">**_(Gateway)_:** <?=$gateway6[$network]?></span>
|
||||
**_(DHCP pool)_:** <?=$dockercfg[$docker_dhcp6] ?? '_(not set)_'?>
|
||||
|
||||
<?endif;?>
|
||||
<?endforeach;?>
|
||||
@@ -520,17 +562,17 @@ list($subnet6,$mask6) = explode('/',$dockercfg["DOCKER_SUBNET6_$port"]);
|
||||
list($range6,$size6) = explode('/',$dockercfg["DOCKER_RANGE6_$port"]);
|
||||
?>
|
||||
<?if ($protocol != 'ipv4' && $subnet6):?>
|
||||
IPv6 custom network on interface <?=$network?>:
|
||||
: <span class="gw6">**Subnet:** <?=$subnet6?>/<?=$mask6?></span>
|
||||
<span class="gw6">**Gateway:** <?=$dockercfg["DOCKER_GATEWAY6_$port"]?></span>
|
||||
**DHCP pool:** <?=$range6?"$range6/$size6":"not set"?>
|
||||
_(IPv6 custom network on interface)_ <?=$network?>:
|
||||
: <span class="gw6">**_(Subnet)_:** <?=$subnet6?>/<?=$mask6?></span>
|
||||
<span class="gw6">**_(Gateway)_:** <?=$dockercfg["DOCKER_GATEWAY6_$port"]?></span>
|
||||
**_(DHCP pool)_:** <?=$range6 ? "$range6/$size6" : "_(not set)_"?>
|
||||
<?endif;?>
|
||||
<?endforeach;?>
|
||||
</div>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
: <input id="applyBtn" type="button" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input id="applyBtn" type="button" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
<form id="removeForm" method="POST" action="/update.php" target="progressFrame">
|
||||
@@ -539,14 +581,14 @@ IPv6 custom network on interface <?=$network?>:
|
||||
|
||||
<?if (!$DockerStopped):?>
|
||||
<div markdown="1" class="advanced">
|
||||
<div id="title"><span class="left"><i class="title fa fa-address-card-o"></i>Docker volume info</span></div>
|
||||
btrfs filesystem show:
|
||||
<div id="title"><span class="left"><i class="title fa fa-address-card-o"></i>_(Docker volume info)_</span></div>
|
||||
_(btrfs filesystem show)_:
|
||||
: <?="<pre>".shell_exec("btrfs filesystem show /var/lib/docker")."</pre>"?>
|
||||
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'btrfs-scrub-docker','/var/lib/docker')">
|
||||
<?exec("$docroot/webGui/scripts/btrfs_scrub status /var/lib/docker", $scrub_status, $retval)?>
|
||||
btrfs scrub status:
|
||||
: <?="<pre>".implode("\n", $scrub_status)."</pre>"?>
|
||||
_(btrfs scrub status)_:
|
||||
: <?="<pre id='btrfs-scrub'>".implode("\n", $scrub_status)."</pre>"?>
|
||||
|
||||
<?if ($retval != 0):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_scrub">
|
||||
@@ -554,20 +596,24 @@ btrfs scrub status:
|
||||
<input type="hidden" name="#arg[2]" value="/var/lib/docker">
|
||||
<input type="hidden" name="#arg[3]" value="-r">
|
||||
|
||||
: <input type="submit" value="Scrub"><label><input type="checkbox" name="#arg[3]" value=""> Correct file system errors</label>
|
||||
: <input type="submit" value="_(Scrub)_"><label><input type="checkbox" name="#arg[3]" value=""> _(Correct file system errors)_</label>
|
||||
|
||||
:help53
|
||||
> **Scrub** runs the *btrfs scrub* program to check file system integrity.
|
||||
>
|
||||
> If repair is needed you should check the *Correct file system errors* and run a second Scrub pass; this will permit *btrfs scrub* to fix the file system.
|
||||
:end
|
||||
|
||||
<?else:?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_scrub">
|
||||
<input type="hidden" name="#arg[1]" value="cancel">
|
||||
<input type="hidden" name="#arg[2]" value="/var/lib/docker">
|
||||
|
||||
: <input type="button" value="Refresh" onclick="refresh()"><input type="submit" value="Cancel"> *Running*
|
||||
: <input type="submit" value="_(Cancel)_">
|
||||
|
||||
:help54
|
||||
> **Cancel** will cancel the Scrub operation in progress.
|
||||
:end
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
@@ -777,15 +823,15 @@ function checkDHCP() {
|
||||
var id = $(this).attr('name');
|
||||
var pool = $(this).val().split('/');
|
||||
var base = $('#'+id).text().split('/');
|
||||
if (good && typeof(pool[1])=='undefined') {good = false; swal('Missing subnet size','Pool subnet size is not defined','error');}
|
||||
if (good && pool[1]<=base[1]) {good = false; swal('Invalid subnet size','Pool subnet size is too large','error');}
|
||||
if (good && typeof(pool[1])=='undefined') {good = false; swal('_(Missing subnet size)_','_(Pool subnet size is not defined)_','error');}
|
||||
if (good && pool[1]<=base[1]) {good = false; swal('_(Invalid subnet size)_','_(Pool subnet size is too large)_','error');}
|
||||
if (typeof(pool[1])=='undefined') pool[1] = 0;
|
||||
if (typeof(base[1])=='undefined') base[1] = 32;
|
||||
var toppool = ip2int(pool[0]);
|
||||
var topbase = ip2int(base[0]);
|
||||
var endpool = toppool+Math.pow(2,32-pool[1]);
|
||||
var endbase = topbase+Math.pow(2,32-base[1]);
|
||||
if (good && (toppool < topbase || endpool > endbase)) {good = false; swal('Invalid pool address','Pool address is out of range','error');}
|
||||
if (good && (toppool < topbase || endpool > endbase)) {good = false; swal('_(Invalid pool address)_','_(Pool address is out of range)_','error');}
|
||||
}
|
||||
});
|
||||
if (good) $('#settingsForm').find('input[name^="DOCKER_DHCP6_"]').each(function(){
|
||||
@@ -793,8 +839,8 @@ function checkDHCP() {
|
||||
var id = $(this).attr('name');
|
||||
var pool = $(this).val().split('/');
|
||||
var base = $('#'+id).text().split('/');
|
||||
if (good && typeof(pool[1])=='undefined') {good = false; swal('Missing subnet size','Pool subnet size is not defined','error');}
|
||||
if (good && pool[1]<=base[1]) {good = false; swal('Invalid subnet size','Pool subnet size is too large','error');}
|
||||
if (good && typeof(pool[1])=='undefined') {good = false; swal('_(Missing subnet size)_','_(Pool subnet size is not defined)_','error');}
|
||||
if (good && pool[1]<=base[1]) {good = false; swal('_(Invalid subnet size)_','_(Pool subnet size is too large)_','error');}
|
||||
}
|
||||
});
|
||||
return good;
|
||||
@@ -806,27 +852,27 @@ function checkIP() {
|
||||
$('#settingsForm').find('input[name^="DOCKER_SUBNET_"]').each(function(){
|
||||
if ($(this).val() && !validIP4.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('Invalid IPv4 subnet','Please enter a valid subnet','error'); return false;}
|
||||
if (error) {swal('_(Invalid IPv4 subnet)_','_(Please enter a valid subnet)_','error'); return false;}
|
||||
$('#settingsForm').find('input[name^="DOCKER_GATEWAY_"]').each(function(){
|
||||
if ($(this).val() && !validIP4.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('Invalid IPv4 gateway','Please enter a valid gateway','error'); return false;}
|
||||
if (error) {swal('_(Invalid IPv4 gateway)_','_(Please enter a valid gateway)_','error'); return false;}
|
||||
$('#settingsForm').find('input[name^="DOCKER_RANGE_"]').each(function(){
|
||||
if ($(this).val() && !validIP4.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('Invalid IPv4 range','Please enter a valid range','error'); return false;}
|
||||
if (error) {swal('_(Invalid IPv4 range)_','_(Please enter a valid range)_','error'); return false;}
|
||||
$('#settingsForm').find('input[name^="DOCKER_SUBNET6_"]').each(function(){
|
||||
if ($(this).val() && !validIP6.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('Invalid IPv6 subnet','Please enter a valid subnet','error'); return false;}
|
||||
if (error) {swal('_(Invalid IPv6 subnet)_','_(Please enter a valid subnet)_','error'); return false;}
|
||||
$('#settingsForm').find('input[name^="DOCKER_GATEWAY6_"]').each(function(){
|
||||
if ($(this).val() && !validIP6.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('Invalid IPv6 gateway','Please enter a valid gateway','error'); return false;}
|
||||
if (error) {swal('_(Invalid IPv6 gateway)_','_(Please enter a valid gateway)_','error'); return false;}
|
||||
$('#settingsForm').find('input[name^="DOCKER_RANGE6_"]').each(function(){
|
||||
if ($(this).val() && !validIP6.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('Invalid IPv6 range','Please enter a valid range','error'); return false;}
|
||||
if (error) {swal('_(Invalid IPv6 range)_','_(Please enter a valid range)_','error'); return false;}
|
||||
return true;
|
||||
}
|
||||
function showLogOptions(log) {
|
||||
@@ -836,6 +882,20 @@ function showLogOptions(log) {
|
||||
$('#DOCKER_LOG_OPTIONS').show('slow');
|
||||
}
|
||||
}
|
||||
function prepareFS(form,cookie,value) {
|
||||
if ($(form).find('input[type="submit"]').val()=='Cancel') $.removeCookie(cookie); else $.cookie(cookie,value);
|
||||
}
|
||||
function btrfsScrub(path) {
|
||||
$.post('/webGui/include/FileSystemStatus.php',{cmd:'scrub',path:path},function(data) {
|
||||
if (data.indexOf('running')>0) {
|
||||
$('#btrfs-scrub').text(data);
|
||||
setTimeout(function(){btrfsScrub(path);},1000);
|
||||
} else {
|
||||
$.removeCookie('btrfs-scrub-docker');
|
||||
refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#applyBtn").click(function(){
|
||||
if (!checkDHCP() || !checkIP()) return;
|
||||
@@ -848,7 +908,7 @@ $(function() {
|
||||
var size = $("#DOCKER_IMAGE_SIZE").val();
|
||||
var target = $("#SIZE_ERROR");
|
||||
if (! $.isNumeric( size )){
|
||||
target.fadeIn().html('Error: value must be a number.');
|
||||
target.fadeIn().html('_(Error)_: _(value must be a number)_.');
|
||||
isError = true;
|
||||
} else {
|
||||
target.fadeOut();
|
||||
@@ -858,7 +918,7 @@ $(function() {
|
||||
target = $("#IMAGE_ERROR");
|
||||
$.getJSON( "/plugins/dynamix.docker.manager/include/UpdateConfig.php?is_dir=" + image).done(function(json) {
|
||||
if (json.is_dir === true){
|
||||
target.fadeIn().html('Error: must be a file; directory provided.');
|
||||
target.fadeIn().html('_(Error)_: _(must be a file; directory provided)_.');
|
||||
isError = true;
|
||||
} else {
|
||||
target.fadeOut();
|
||||
@@ -919,8 +979,8 @@ $(function() {
|
||||
}
|
||||
$('.advancedview').switchButton({
|
||||
labels_placement: "left",
|
||||
on_label: 'Advanced View',
|
||||
off_label: 'Basic View',
|
||||
on_label: '_(Advanced View)_',
|
||||
off_label: '_(Basic View)_',
|
||||
checked: $.cookie('dockersettings_view_mode') == 'advanced'
|
||||
});
|
||||
$('.advancedview').change(function () {
|
||||
@@ -936,5 +996,6 @@ $(function() {
|
||||
<?if ($var['fsState'] == "Started"):?>
|
||||
$("#DOCKER_APP_CONFIG_PATH").fileTreeAttach();
|
||||
<?endif;?>
|
||||
if ($.cookie('btrfs-scrub-docker')) btrfsScrub($.cookie('btrfs-scrub-docker'));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@ Cond="(pgrep('dockerd')!==false)"
|
||||
Markdown="false"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2014-2018, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2014-2020, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -15,7 +15,7 @@ Markdown="false"
|
||||
*/
|
||||
?>
|
||||
<div style="text-align:right;vertical-align:top;position:relative;top:-44px;height:0;display:none;">
|
||||
<span class="toggleMode" onclick="toggleMode();"><i id="toggleMode" class="fa fa-lg"></i> Advanced View</span>
|
||||
<span class="toggleMode" onclick="toggleMode();"><i id="toggleMode" class="fa fa-lg"></i> _(Advanced View)_</span>
|
||||
</div>
|
||||
<?PHP
|
||||
require_once "$docroot/plugins/dynamix.docker.manager/include/CreateDocker.php";
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
?>
|
||||
<?
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
// add translations
|
||||
$_SERVER['REQUEST_URI'] = 'docker';
|
||||
require_once "$docroot/webGui/include/Translations.php";
|
||||
|
||||
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
|
||||
require_once "$docroot/webGui/include/Helpers.php";
|
||||
|
||||
@@ -24,7 +28,7 @@ $user_prefs = $dockerManPaths['user-prefs'];
|
||||
$autostart_file = $dockerManPaths['autostart-file'];
|
||||
|
||||
if (!$containers && !$images) {
|
||||
echo "<tr><td colspan='7' style='text-align:center;padding-top:12px'>No Docker containers installed</td></tr>";
|
||||
echo "<tr><td colspan='7' style='text-align:center;padding-top:12px'>"._('No Docker containers installed')."</td></tr>";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -85,10 +89,10 @@ foreach ($containers as $ct) {
|
||||
} else {
|
||||
$appname = htmlspecialchars($name);
|
||||
}
|
||||
echo "<span class='outer'><span id='$id' class='hand'>$image</span><span class='inner'><span class='appname $update'>$appname</span><br><i id='load-$id' class='fa fa-$shape $status $color'></i><span class='state'>$status</span></span></span>";
|
||||
echo "<span class='advanced'>Container ID: $id<br>";
|
||||
echo "<span class='outer'><span id='$id' class='hand'>$image</span><span class='inner'><span class='appname $update'>$appname</span><br><i id='load-$id' class='fa fa-$shape $status $color'></i><span class='state'>"._($status)."</span></span></span>";
|
||||
echo "<span class='advanced'>"._('Container ID').": $id<br>";
|
||||
if ($ct['BaseImage']) echo "<i class='fa fa-cubes' style='margin-right:5px'></i>".htmlspecialchars(${ct['BaseImage']})."<br>";
|
||||
echo "By: ";
|
||||
echo _('By').": ";
|
||||
$registry = $info['registry'];
|
||||
list($author,$version) = explode(':',$ct['Image']);
|
||||
if ($registry) {
|
||||
@@ -99,20 +103,20 @@ foreach ($containers as $ct) {
|
||||
echo "</span></td><td class='updatecolumn'>";
|
||||
switch ($updateStatus) {
|
||||
case 0:
|
||||
echo "<span class='green-text' style='white-space:nowrap;'><i class='fa fa-check fa-fw'></i> up-to-date</span>";
|
||||
echo "<div class='advanced'><a class='exec' onclick=\"updateContainer('".addslashes(htmlspecialchars($name))."');\"><span style='white-space:nowrap;'><i class='fa fa-cloud-download fa-fw'></i> force update</span></a></div>";
|
||||
echo "<span class='green-text' style='white-space:nowrap;'><i class='fa fa-check fa-fw'></i> "._('up-to-date')."</span>";
|
||||
echo "<div class='advanced'><a class='exec' onclick=\"updateContainer('".addslashes(htmlspecialchars($name))."');\"><span style='white-space:nowrap;'><i class='fa fa-cloud-download fa-fw'></i> "._('force update')."</span></a></div>";
|
||||
break;
|
||||
case 1:
|
||||
echo "<div class='advanced'><span class='orange-text' style='white-space:nowrap;'><i class='fa fa-flash fa-fw'></i> update ready</span></div>";
|
||||
echo "<a class='exec' onclick=\"updateContainer('".addslashes(htmlspecialchars($name))."');\"><span style='white-space:nowrap;'><i class='fa fa-cloud-download fa-fw'></i> apply update</span></a>";
|
||||
echo "<div class='advanced'><span class='orange-text' style='white-space:nowrap;'><i class='fa fa-flash fa-fw'></i> "._('update ready')."</span></div>";
|
||||
echo "<a class='exec' onclick=\"updateContainer('".addslashes(htmlspecialchars($name))."');\"><span style='white-space:nowrap;'><i class='fa fa-cloud-download fa-fw'></i> "._('apply update')."</span></a>";
|
||||
break;
|
||||
case 2:
|
||||
echo "<div class='advanced'><span class='orange-text' style='white-space:nowrap;'><i class='fa fa-flash fa-fw'></i> rebuild ready</span></div>";
|
||||
echo "<a class='exec'><span style='white-space:nowrap;'><i class='fa fa-recycle fa-fw'></i> rebuilding</span></a>";
|
||||
echo "<div class='advanced'><span class='orange-text' style='white-space:nowrap;'><i class='fa fa-flash fa-fw'></i> ".('rebuild ready')."</span></div>";
|
||||
echo "<a class='exec'><span style='white-space:nowrap;'><i class='fa fa-recycle fa-fw'></i> "._('rebuilding')."</span></a>";
|
||||
break;
|
||||
default:
|
||||
echo "<span class='orange-text' style='white-space:nowrap;'><i class='fa fa-unlink'></i> not available</span>";
|
||||
echo "<div class='advanced'><a class='exec' onclick=\"updateContainer('".addslashes(htmlspecialchars($name))."');\"><span style='white-space:nowrap;'><i class='fa fa-cloud-download fa-fw'></i> force update</span></a></div>";
|
||||
echo "<span class='orange-text' style='white-space:nowrap;'><i class='fa fa-unlink'></i> "._('not available')."</span>";
|
||||
echo "<div class='advanced'><a class='exec' onclick=\"updateContainer('".addslashes(htmlspecialchars($name))."');\"><span style='white-space:nowrap;'><i class='fa fa-cloud-download fa-fw'></i> "._('force update')."</span></a></div>";
|
||||
break;
|
||||
}
|
||||
echo "<div class='advanced'><i class='fa fa-info-circle fa-fw'></i> $version</div></td>";
|
||||
@@ -122,7 +126,7 @@ foreach ($containers as $ct) {
|
||||
echo "<td class='advanced'><span class='cpu-$id'>0%</span><div class='usage-disk mm'><span id='cpu-$id' style='width:0'></span><span></span></div>";
|
||||
echo "<br><span class='mem-$id'>0 / 0</span></td>";
|
||||
echo "<td><input type='checkbox' id='$id-auto' class='autostart' container='".htmlspecialchars($name)."'".($info['autostart'] ? ' checked':'').">";
|
||||
echo "<span id='$id-wait' style='float:right;display:none'>wait<input class='wait' container='".htmlspecialchars($name)."' type='number' value='$wait' placeholder='0' title='seconds'></span></td>";
|
||||
echo "<span id='$id-wait' style='float:right;display:none'>wait<input class='wait' container='".htmlspecialchars($name)."' type='number' value='$wait' placeholder='0' title='"._('seconds')."'></span></td>";
|
||||
echo "<td><a class='log' onclick=\"containerLogs('".addslashes(htmlspecialchars($name))."','$id',false,false)\"><img class='basic' src='/plugins/dynamix/icons/log.png'><div class='advanced'>";
|
||||
echo htmlspecialchars(str_replace('Up','Uptime',$ct['Status']))."</div><div class='advanced' style='margin-top:4px'>Created ".htmlspecialchars($ct['Created'])."</div></a></td></tr>";
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2014-2018, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2014-2020, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
* Copyright 2012-2020, 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,
|
||||
|
||||
@@ -2,8 +2,8 @@ Menu='Buttons'
|
||||
Link='nav-user'
|
||||
---
|
||||
<?
|
||||
/* Copyright 2019, Lime Technology
|
||||
* Copyright 2019, Andrew Zawadzki.
|
||||
/* Copyright 2020, Lime Technology
|
||||
* Copyright 2020, Andrew Zawadzki.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -30,7 +30,7 @@ function ca_hidePluginUpdate(plugin,version,element) {
|
||||
}
|
||||
|
||||
function ca_pluginUpdateInstall(plugin) {
|
||||
openBox("/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2="+plugin,"Installing Update",600,900,true,"window.location.reload()");
|
||||
openBox("/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2="+plugin,"_(Installing Update)_",600,900,true,"window.location.reload()");
|
||||
}
|
||||
|
||||
function ca_pluginUpdateShowInfo(cmd,title,height,width,load,func,id) {
|
||||
@@ -55,13 +55,13 @@ function caPluginUpdateCheck(plugin,options=[],callback) {
|
||||
var name = options.name ? options.name : "this plugin ("+plugin+")";
|
||||
if ( ! options.element && ! options.dontShow ) {
|
||||
if ( result.updateAvailable ) {
|
||||
var HTML = "An upgrade to "+name+" is available. Click <a class='ca_PluginUpdateInstall' onclick='ca_pluginUpdateInstall(""+plugin+"");'>here</a> to install version "+result.version+" <a class='bannerInfo fa fa-info-circle' onclick=ca_pluginUpdateShowInfo('/plugins/dynamix.plugin.manager/include/ShowChanges.php?file=%2Ftmp%2Fplugins%2F"+pluginFilename+".txt','Release Notes',600,900); return false;'></a>";
|
||||
var HTML = "An upgrade to "+name+" is available. Click <a class='ca_PluginUpdateInstall' onclick='ca_pluginUpdateInstall(""+plugin+"");'>here</a> to install version "+result.version+" <a class='bannerInfo fa fa-info-circle' onclick=ca_pluginUpdateShowInfo('/plugins/dynamix.plugin.manager/include/ShowChanges.php?file=%2Ftmp%2Fplugins%2F"+pluginFilename+".txt','_(Release Notes)_',600,900); return false;'></a>";
|
||||
addBannerWarning(HTML,false,options.noDismiss);
|
||||
}
|
||||
} else {
|
||||
if ( $.cookie(plugin) != result.version ) {
|
||||
if ( result.updateAvailable ) {
|
||||
var HTML = "An upgrade to "+name+" is available. Click <a class='ca_PluginUpdateInstall' onclick='ca_pluginUpdateInstall(""+plugin+"");'>here</a> to install version "+result.version+" <i class='ca_pluginUpdateInfo fa fa-info-circle' onclick=ca_pluginUpdateShowInfo('/plugins/dynamix.plugin.manager/include/ShowChanges.php?file=%2Ftmp%2Fplugins%2F"+pluginFilename+".txt','Release Notes',600,900); return false;'></i>";
|
||||
var HTML = "An upgrade to "+name+" is available. Click <a class='ca_PluginUpdateInstall' onclick='ca_pluginUpdateInstall(""+plugin+"");'>here</a> to install version "+result.version+" <i class='ca_pluginUpdateInfo fa fa-info-circle' onclick=ca_pluginUpdateShowInfo('/plugins/dynamix.plugin.manager/include/ShowChanges.php?file=%2Ftmp%2Fplugins%2F"+pluginFilename+".txt','_(Release Notes)_',600,900); return false;'></i>";
|
||||
if ( ! options.noDismiss ) {
|
||||
HTML = HTML.concat("<span class='ca_PluginUpdateDismiss'><i class='fa fa-close' onclick='ca_hidePluginUpdate(""+plugin+"",""+result.version+"",""+options.element+"");'></i>");
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ Title="Install Plugin"
|
||||
Tag="download"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -18,19 +18,21 @@ Tag="download"
|
||||
function installPlugin(name) {
|
||||
var file = name.trim();
|
||||
var plugin = file.replace(/^.*(\\|\/|\:)/,'').replace('.plg','')+':install';
|
||||
if (file) openBox('/plugins/dynamix.plugin.manager/scripts/plugin&arg1=install&arg2='+file,'Install Plugin',600,900,true,'loadlist',plugin);
|
||||
if (file) openBox('/plugins/dynamix.plugin.manager/scripts/plugin&arg1=install&arg2='+file,'_(Install Plugin)_',600,900,true,'loadlist',plugin);
|
||||
}
|
||||
</script>
|
||||
**Enter URL of remote plugin file or local plugin file**
|
||||
**_(Enter URL of remote plugin file or local plugin file)_**
|
||||
|
||||
<form name="plugin_install" method="POST" target="progressFrame">
|
||||
<input type="text" name="file" id="plugin_file" maxlength="1024" value="" style="width:33%">
|
||||
<input type="button" value="Install" onclick="installPlugin(this.form.file.value)">
|
||||
<input type="button" value="_(Install)_" onclick="installPlugin(this.form.file.value)">
|
||||
</form>
|
||||
|
||||
:help1
|
||||
> To download and install a plugin, enter the plg file URL and click **Install**. A window will open
|
||||
> that displays install progress. Do not close this window until install has completed. You may also specify
|
||||
> the local file name of an extension.
|
||||
:end
|
||||
|
||||
**Select local plugin file**
|
||||
**_(Select local plugin file)_**
|
||||
<div id="plugin_tree" class="textarea"></div>
|
||||
|
||||
@@ -77,13 +77,13 @@ function loadlist(id) {
|
||||
$(function() {
|
||||
loadlist();
|
||||
$('#plugin_tree').fileTree({root:'/boot/',filter:'plg'}, function(file) {$('#plugin_file').val(file);});
|
||||
$('.tabs').append("<span id='updateall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value='Update All Plugins' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=updateall\",\"Update All Plugins\",600,600,true,\"loadlist\",\":return\")'></span>");
|
||||
$('.tabs').append("<span id='updateall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value='_(Update All Plugins)_' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=updateall\",\"Update All Plugins\",600,600,true,\"loadlist\",\":return\")'></span>");
|
||||
<?if ($check):?>
|
||||
$('.tabs').append("<span id='checkall' class='status vhshift'><input type='button' value='Check For Updates' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=checkall\",\"Plugin Update Check\",600,600,true,\"loadlist\",\":return\")' disabled></span>");
|
||||
$('.tabs').append("<span id='checkall' class='status vhshift'><input type='button' value='_(Check For Updates)_' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=checkall\",\"Plugin Update Check\",600,600,true,\"loadlist\",\":return\")' disabled></span>");
|
||||
<?endif;?>
|
||||
});
|
||||
</script>
|
||||
<table class='tablesorter plugins shift' id='plugin_table'>
|
||||
<thead><tr><th></th><th>Plugin</th><th>Author</th><th>Version</th><th>Status</th><th>Uninstall</th></tr></thead>
|
||||
<thead><tr><th></th><th>_(Plugin)_</th><th>_(Author)_</th><th>_(Version)_</th><th>_(Status)_</th><th>_(Uninstall)_</th></tr></thead>
|
||||
<tbody id="plugin_list"><tr><td colspan="6"></td><tr></tbody>
|
||||
</table>
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="puzzle-piece"
|
||||
Cond="glob('/boot/config/plugins-error/*.plg')"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -20,12 +20,12 @@ Cond="glob('/boot/config/plugins-error/*.plg')"
|
||||
require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php";
|
||||
|
||||
echo "<table class='tablesorter' id='plugin_table'><thead>";
|
||||
echo "<tr><th>Plugin File</th><th>Status</th></tr>";
|
||||
echo "<tr><th>"._('Plugin File')."</th><th>"._('Status')."</th></tr>";
|
||||
echo "</thead><tbody>";
|
||||
|
||||
foreach (glob("/boot/config/plugins-error/*.plg", GLOB_NOSORT) as $plugin_file) {
|
||||
// status info
|
||||
$status_info = "ERROR<br />" . make_link("delete", $plugin_file);
|
||||
$status_info = _('ERROR')."<br>".make_link("delete", $plugin_file);
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>{$plugin_file}</td>";
|
||||
@@ -36,5 +36,7 @@ foreach (glob("/boot/config/plugins-error/*.plg", GLOB_NOSORT) as $plugin_file)
|
||||
echo "</tbody></table>";
|
||||
?>
|
||||
|
||||
:help2
|
||||
> These plugins were not installed because of some kind of installation error. You should delete these
|
||||
> plugins and then **reboot** your server.*
|
||||
> plugins and then **reboot** your server.*
|
||||
:end
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="puzzle-piece"
|
||||
Cond="glob('/boot/config/plugins-stale/*.plg')"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -20,7 +20,7 @@ Cond="glob('/boot/config/plugins-stale/*.plg')"
|
||||
require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php";
|
||||
|
||||
echo "<table class='tablesorter plugins shift' id='plugin_table'><thead>";
|
||||
echo "<tr><th></th><th>Plugin</th><th>Author</th><th>Version</th><th>Status</th><th></th></tr>";
|
||||
echo "<tr><th></th><th>".('Plugin')."</th><th>"._('Author')."</th><th>"._('Version')."</th><th>"._('Status')."</th><th></th></tr>";
|
||||
echo "</thead><tbody>";
|
||||
|
||||
foreach (glob("/boot/config/plugins-stale/*.plg", GLOB_NOSORT) as $plugin_file) {
|
||||
@@ -40,17 +40,17 @@ foreach (glob("/boot/config/plugins-stale/*.plg", GLOB_NOSORT) as $plugin_file)
|
||||
|
||||
// author
|
||||
$author = plugin("author", $plugin_file);
|
||||
if ($author === false) $author = "anonymous";
|
||||
if ($author === false) $author = _("anonymous");
|
||||
|
||||
// version
|
||||
$version = plugin("version", $plugin_file);
|
||||
if ($version === false) $version = "unknown";
|
||||
if ($version === false) $version = _("unknown");
|
||||
|
||||
// version info
|
||||
$version_info = $version;
|
||||
|
||||
// status info
|
||||
$status_info = "STALE";
|
||||
$status_info = _("STALE");
|
||||
|
||||
// action
|
||||
$action = make_link("delete", $plugin_file);
|
||||
@@ -68,4 +68,6 @@ foreach (glob("/boot/config/plugins-stale/*.plg", GLOB_NOSORT) as $plugin_file)
|
||||
|
||||
echo "</tbody></table>";
|
||||
?>
|
||||
> These plugins were not installed because newer code already exists. It is safe to simply delete these.
|
||||
:help3
|
||||
> These plugins were not installed because newer code already exists. It is safe to simply delete these.
|
||||
:end
|
||||
|
||||
@@ -17,7 +17,7 @@ Tag="upload"
|
||||
?>
|
||||
<?
|
||||
$empty = "<tr><td colspan='6'><div class='spinner'></div></td></tr>";
|
||||
$version = $branch = $date = 'unknown';
|
||||
$version = $branch = $date = _('unknown');
|
||||
$bzroot = file_exists('/boot/previous/bzroot');
|
||||
$check = $notify['unraidos'] ? 0 : 1;
|
||||
|
||||
@@ -26,7 +26,7 @@ if (file_exists('/boot/previous/changes.txt')) {
|
||||
foreach ($rows as $row) {
|
||||
$i = stripos($row,'version');
|
||||
if ($i !== false) {
|
||||
list($version,$date) = explode(' ',trim(substr($row,$i+7)));
|
||||
[$version,$date] = explode(' ',trim(substr($row,$i+7)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -34,8 +34,8 @@ if (file_exists('/boot/previous/changes.txt')) {
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
input[value='Install'],input[value='Update'],input[value='Restore']{margin:0}
|
||||
<?if (strstr('white,black',$display['theme'])):?>
|
||||
input[value='_(Install)_'],input[value='_(Update)_'],input[value='_(Restore)_']{margin:0}
|
||||
<?if ($themes1):?>
|
||||
span.vhshift{margin-top:13px!important}
|
||||
<?endif;?>
|
||||
</style>
|
||||
@@ -85,14 +85,14 @@ function loadlist(id) {
|
||||
$(function() {
|
||||
loadlist();
|
||||
<?if ($check):?>
|
||||
$('.tabs').append("<span class='status vhshift'><input type='button' id='checkos' value='Check for Updates' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=checkos\",\"System Update Check\",600,600,true,\"loadlist\",\":return\")' disabled></span>");
|
||||
$('.tabs').append("<span class='status vhshift'><input type='button' id='checkos' value='_(Check for Updates)_' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=checkos\",\"_(System Update Check)_\",600,600,true,\"loadlist\",\":return\")' disabled></span>");
|
||||
<?endif;?>
|
||||
});
|
||||
</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>
|
||||
<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"><?=$empty?></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>
|
||||
<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>
|
||||
|
||||
@@ -38,7 +38,7 @@ function make_link($method, $arg, $extra='') {
|
||||
$cmd = "/plugins/dynamix.plugin.manager/scripts/plugin&arg1=$method&arg2=$arg".($extra?"&arg3=$extra":"");
|
||||
$exec = "loadlist";
|
||||
}
|
||||
return "$check<input type='button' id='$id' value='".ucfirst($method)."' onclick='openBox(\"$cmd\",\"".ucwords($method)." Plugin\",600,900,true,\"$exec\",\"$plg\");'$disabled>";
|
||||
return "$check<input type='button' id='$id' value='".ucfirst(_($method))."' onclick='openBox(\"$cmd\",\"".ucwords(_($method))." Plugin\",600,900,true,\"$exec\",\"$plg\");'$disabled>";
|
||||
}
|
||||
|
||||
// trying our best to find an icon
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -12,6 +12,10 @@
|
||||
?>
|
||||
<?
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
// add translations
|
||||
$_SERVER['REQUEST_URI'] = 'plugins';
|
||||
require_once "$docroot/webGui/include/Translations.php";
|
||||
|
||||
require_once "$docroot/webGui/include/Markdown.php";
|
||||
require_once "$docroot/webGui/include/Helpers.php";
|
||||
?>
|
||||
@@ -29,7 +33,7 @@ require_once "$docroot/webGui/include/Helpers.php";
|
||||
$file = $_GET['file'];
|
||||
$tmp = $_GET['tmp'] ? '/var/tmp' : '/tmp/plugins/';
|
||||
|
||||
if (file_exists($file) && strpos(realpath($file),$tmp)===0 && substr($file,-4)=='.txt') echo Markdown(file_get_contents($file)); else echo Markdown("*No release notes available!*");
|
||||
if (file_exists($file) && strpos(realpath($file),$tmp)===0 && substr($file,-4)=='.txt') echo Markdown(file_get_contents($file)); else echo Markdown("*"._('No release notes available')."!*");
|
||||
?>
|
||||
<br><div style="text-align:center"><input type="button" value="Done" onclick="top.Shadowbox.close()"></div>
|
||||
</body>
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
?>
|
||||
<?
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
// add translations
|
||||
$_SERVER['REQUEST_URI'] = 'plugins';
|
||||
require_once "$docroot/webGui/include/Translations.php";
|
||||
|
||||
require_once "$docroot/webGui/include/Markdown.php";
|
||||
require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php";
|
||||
|
||||
@@ -93,13 +97,13 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
|
||||
else
|
||||
$desc = Markdown("**{$name}**");
|
||||
//author
|
||||
$author = plugin('author',$plugin_file) ?: "anonymous";
|
||||
$author = plugin('author',$plugin_file) ?: _('anonymous');
|
||||
//version
|
||||
$version = plugin('version',$plugin_file) ?: "unknown";
|
||||
$version = plugin('version',$plugin_file) ?: _('unknown');
|
||||
$date = str_replace('.','',$version);
|
||||
//support
|
||||
$support = plugin('support',$plugin_file) ?: "";
|
||||
$support = $support ? "<a href='$support' target='_blank'>Support Thread</a>" : "";
|
||||
$support = $support ? "<a href='$support' target='_blank'>"._('Support Thread')."</a>" : "";
|
||||
//category
|
||||
$category = plugin('category',$plugin_file) ?: (strpos($version,'-')!==false ? 'next' : 'stable');
|
||||
//status
|
||||
@@ -143,7 +147,7 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
|
||||
echo "<td><span class='desc_readmore' style='display:block'>$desc</span> $support</td>";
|
||||
echo "<td>$author</td>";
|
||||
echo "<td data='$date'>$version</td>";
|
||||
echo "<td data='$rank'>$status</td>";
|
||||
echo "<td data='$rank'>"._($status)."</td>";
|
||||
echo "<td>";
|
||||
if ($system) {
|
||||
if ($os) {
|
||||
|
||||
@@ -41,7 +41,7 @@ function showCPUs($uuid) {
|
||||
echo "</div>";
|
||||
}
|
||||
$uuid = $_GET['uuid'];
|
||||
$subaction = $_GET['subaction'] ?? '';
|
||||
$subaction = $_GET['subaction'] ?? false;
|
||||
if ($_GET['refresh']) {
|
||||
$vm = $_GET['name'];
|
||||
if ($lv->domain_is_active($vm)) {
|
||||
@@ -97,7 +97,7 @@ if (empty($vms)) {
|
||||
<style>
|
||||
th.th1{width:25%}
|
||||
th.th2{width:15%}
|
||||
th.th3{width:70px}
|
||||
th.th3{width:80px}
|
||||
div.four{font-size:1.1rem;width:260px}
|
||||
div.four label{float:left;display:table-cell;width:25%}
|
||||
div.four label:nth-child(4n+4){float:none;clear:both}
|
||||
@@ -112,12 +112,12 @@ table.domdisk tbody tr:nth-child(even){background-color:transparent!important}
|
||||
table.domdisk tbody tr:nth-child(4n-1){background-color:transparent!important}
|
||||
</style>
|
||||
<table id="kvm_table" class="tablesorter four shift">
|
||||
<thead><tr><th class="th1"><a href="#" style="cursor:hand;margin-left:12px;display:inline-block;width:32px" onclick="resetSorting()" title="Reset sorting"><i class="fa fa-th-list"></i></a>Name</th><th class="th2">Description</th><th>CPUs</th><th>Memory</th><th>vDisks</th><th>Graphics</th><th class="th3">Autostart</th></tr></thead>
|
||||
<thead><tr><th class="th1"><a href="#" style="cursor:hand;margin-left:12px;display:inline-block;width:32px" onclick="resetSorting()" title="Reset sorting"><i class="fa fa-th-list"></i></a>_(Name)_</th><th class="th2">_(Description)_</th><th>_(CPUs)_</th><th>_(Memory)_</th><th>_(vDisks)_</th><th>_(Graphics)_</th><th class="th3">_(Autostart)_</th></tr></thead>
|
||||
<tbody id="kvm_list"><tr><td colspan='8'></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" onclick="addVM()" id="btnAddVM" value="Add VM" style="display:none">
|
||||
<input type="button" onclick="startAll()" value="Start All" style="display:none">
|
||||
<input type="button" onclick="stopAll()" value="Stop All" style="display:none">
|
||||
<input type="button" onclick="addVM()" id="btnAddVM" value="_(Add VM)_" style="display:none">
|
||||
<input type="button" onclick="startAll()" value="_(Start All)_" style="display:none">
|
||||
<input type="button" onclick="stopAll()" value="_(Stop All)_" style="display:none">
|
||||
|
||||
<script src="<?autov('/webGui/javascript/jquery.switchbutton.js')?>"></script>
|
||||
<script src="<?autov('/plugins/dynamix.vm.manager/javascript/dynamix.vm.manager.js')?>"></script>
|
||||
@@ -182,7 +182,7 @@ function loadlist() {
|
||||
functionBefore:function(instance,helper){instance.content("<?=showCPUs($uuid)?>");}
|
||||
});
|
||||
<?}?>
|
||||
$('.autostart').switchButton({labels_placement:"right"});
|
||||
$('.autostart').switchButton({labels_placement:'right', on_label:'_(On)_', off_label:'_(Off)_'});
|
||||
$('.autostart').change(function() {
|
||||
$.post('/plugins/dynamix.vm.manager/include/VMajax.php',{action:'domain-autostart',uuid:$(this).attr('uuid'),autostart:$(this).prop('checked'),response:'json'},function(data){
|
||||
$(this).prop('checked', data.autostart);
|
||||
@@ -198,7 +198,7 @@ function loadlist() {
|
||||
$(function() {
|
||||
<?if ($msg):?>
|
||||
<?$color = strpos($msg, "rror:")!==false ? 'red-text':'green-text'?>
|
||||
$('#countdown').html("<span class='<?-$color?>'><?=$msg?></span>");
|
||||
$('#countdown').html("<span class='<?-$color?>'><?=_($msg)?></span>");
|
||||
<?endif;?>
|
||||
$('#btnAddVM').click(function AddVMEvent(){$('.tab>input#tab2').click();});
|
||||
loadlist();
|
||||
|
||||
@@ -23,8 +23,8 @@ require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
|
||||
// If either kvm_intel or kvm_amd are loaded then Intel VT-x (vmx) or AMD-V (svm) cpu virtualization support was found
|
||||
$hardware = !empty(shell_exec("/etc/rc.d/rc.libvirt test"));
|
||||
if (!$hardware) {
|
||||
echo "<p class='notice'>Your hardware does not have Intel VT-x or AMD-V capability. This is required to create VMs in KVM. Please disable the VM function. ";
|
||||
echo "<a href='http://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Hardware-Assisted_Virtualization_.28HVM.29' target='_blank'> Click here to see the Unraid Wiki for more information</a></p>";
|
||||
echo "<p class='notice'>".('Your hardware does not have Intel VT-x or AMD-V capability').". "._('This is required to create VMs in KVM').". "._('Please disable the VM function').". ";
|
||||
echo "<a href='http://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Hardware-Assisted_Virtualization_.28HVM.29' target='_blank'> "._('Click here to see the Unraid Wiki for more information')."</a></p>";
|
||||
}
|
||||
|
||||
function scan($area, $text) {
|
||||
@@ -81,62 +81,74 @@ body{-webkit-overflow-scrolling:touch}
|
||||
<input type="hidden" name="#file" value="<?=htmlspecialchars($domain_cfgfile)?>">
|
||||
<input type="hidden" name="#command" value="/plugins/dynamix/scripts/emcmd">
|
||||
<input type="hidden" name="#arg[1]" value="cmdStatus=Apply">
|
||||
Enable VMs:
|
||||
_(Enable VMs)_:
|
||||
: <select id="SERVICE" name="SERVICE">
|
||||
<?= mk_option($libvirt_service, 'disable', 'No'); ?>
|
||||
<?= mk_option($libvirt_service, 'enable', 'Yes'); ?>
|
||||
<?= mk_option($libvirt_service, 'disable', _('No'))?>
|
||||
<?= mk_option($libvirt_service, 'enable', _('Yes'))?>
|
||||
</select>
|
||||
<?if ($hardware):?>
|
||||
<?if ($var['fsState'] != "Started"):?>
|
||||
<span id="arraystopped"><i class="fa fa-warning icon warning"></i> <?=($libvirt_service=='enable')?'VMs will be available after Array is Started':'Apply to activate VMs after Array is Started'?></span>
|
||||
<span id="arraystopped"><i class="fa fa-warning icon warning"></i> <?=($libvirt_service=='enable')?'_(VMs will be available after Array is Started)_':'_(Apply to activate VMs after Array is Started)_'?></span>
|
||||
<?elseif (!is_dir(dirname($domain_cfg['IMAGE_FILE'])) || !is_dir($domain_cfg['DOMAINDIR']) || !is_dir($domain_cfg['MEDIADIR'])):?>
|
||||
<span class="basic" style="display:inline"><i class="fa fa-warning icon warning"></i> One or more paths do not exist (<a href="#" onclick="$('.advancedview').switchButton('option','checked',true); return false">view</a>)</span>
|
||||
<span class="basic" style="display:inline"><i class="fa fa-warning icon warning"></i> _(One or more paths do not exist)_ (<a href="#" onclick="$('.advancedview').switchButton('option','checked',true); return false">_(view)_</a>)</span>
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
|
||||
:help105
|
||||
> Stopping the VM Manager will first attempt to shutdown all running VMs. After 60 seconds, any remaining VM instances will be terminated.
|
||||
:end
|
||||
|
||||
<?if ($hardware):?>
|
||||
<div class="advanced" markdown="1">
|
||||
<?if ($libvirt_running == 'yes'):?>
|
||||
<?$libvirt_info = libvirt_version('libvirt')?>
|
||||
<?$qemu_info = $lv->get_connect_information()?>
|
||||
Libvirt version:
|
||||
_(Libvirt version)_:
|
||||
: <?=$libvirt_info['libvirt.major'].'.'.$libvirt_info['libvirt.minor'].'.'.$libvirt_info['libvirt.release']?>
|
||||
|
||||
QEMU version:
|
||||
_(QEMU version)_:
|
||||
: <?=$qemu_info['hypervisor_major'].'.'.$qemu_info['hypervisor_minor'].'.'.$qemu_info['hypervisor_release']?>
|
||||
|
||||
Libvirt storage location:
|
||||
_(Libvirt storage location)_:
|
||||
: <?=htmlspecialchars($domain_cfg['IMAGE_FILE'])?>
|
||||
|
||||
:help106
|
||||
> This is the libvirt volume.
|
||||
:end
|
||||
|
||||
<?else: /* Libvirt is stopped */ ?>
|
||||
Libvirt vdisk size:
|
||||
: <input id="IMAGE_SIZE" type="number" min="1" name="IMAGE_SIZE" value="<?=htmlspecialchars($domain_cfg['IMAGE_SIZE']);?>" style="width:50px;" required="required" />GB <span id="SIZE_ERROR" class="errortext"></span>
|
||||
_(Libvirt vdisk size)_:
|
||||
: <input id="IMAGE_SIZE" type="number" min="1" name="IMAGE_SIZE" value="<?=htmlspecialchars($domain_cfg['IMAGE_SIZE']);?>" style="width:50px;" required="required" />_(GB)_ <span id="SIZE_ERROR" class="errortext"></span>
|
||||
|
||||
:help107
|
||||
> If the system needs to create a new libvirt image file, this is the default size to use specified in GB.
|
||||
> To resize an existing image file, specify the new size here. Next time the Libvirt service is started the file (and file system) will increased to the new size (but never decreased).
|
||||
:end
|
||||
|
||||
Libvirt storage location:
|
||||
: <input id="IMAGE_FILE" type="text" name="IMAGE_FILE" value="<?=htmlspecialchars($domain_cfg['IMAGE_FILE']);?>" placeholder="e.g. /mnt/user/system/libvirt/libvirt.img" data-pickcloseonfile="true" data-pickfilter="img" data-pickroot="/mnt/" data-pickfolders="true" required pattern="^[^\\]*\.(img|IMG)$"> <?php if (file_exists($domain_cfg['IMAGE_FILE'])) { ?><span id="deletePanel"><label><input type="checkbox" id="deleteCheckbox" /> Delete Image File</label></span><?php } ?> <?if ($var['fsState'] != "Started"):?><span><i class="fa fa-warning icon warning"></i> Modify with caution: unable to validate path until Array is Started</span><?elseif (!is_dir(dirname($domain_cfg['IMAGE_FILE']))):?><span><i class="fa fa-warning icon warning"></i> Path does not exist</span><?endif;?> <span id="IMAGE_ERROR" class="errortext"></span>
|
||||
_(Libvirt storage location)_:
|
||||
: <input id="IMAGE_FILE" type="text" name="IMAGE_FILE" value="<?=htmlspecialchars($domain_cfg['IMAGE_FILE']);?>" placeholder="e.g. /mnt/user/system/libvirt/libvirt.img" data-pickcloseonfile="true" data-pickfilter="img" data-pickroot="/mnt/" data-pickfolders="true" required pattern="^[^\\]*\.(img|IMG)$"> <?php if (file_exists($domain_cfg['IMAGE_FILE'])) { ?><span id="deletePanel"><label><input type="checkbox" id="deleteCheckbox" /> _(Delete Image File)_</label></span><?php } ?> <?if ($var['fsState'] != "Started"):?><span><i class="fa fa-warning icon warning"></i> _(Modify with caution: unable to validate path until Array is Started)_</span><?elseif (!is_dir(dirname($domain_cfg['IMAGE_FILE']))):?><span><i class="fa fa-warning icon warning"></i> _(Path does not exist)_</span><?endif;?> <span id="IMAGE_ERROR" class="errortext"></span>
|
||||
|
||||
:help108
|
||||
> You must specify an image file for Libvirt. The system will automatically create this file when the Libvirt service is first started.
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
Default VM storage path:
|
||||
: <input type="text" id="domaindir" data-pickfolders="true" data-pickfilter="NO_FILES_FILTER" data-pickroot="<?= (is_dir('/mnt/user/') ? '/mnt/user/' : '/mnt/') ?>" name="DOMAINDIR" value="<?=htmlspecialchars($domain_cfg['DOMAINDIR'])?>" placeholder="Click to Select" pattern="^[^\\]*/$"> <?if ($var['fsState'] != "Started"):?><span><i class="fa fa-warning icon warning"></i> Modify with caution: unable to validate path until Array is Started</span><?elseif (!is_dir($domain_cfg['DOMAINDIR'])):?><span><i class="fa fa-warning icon warning"></i> Path does not exist</span><?endif;?>
|
||||
_(Default VM storage path)_:
|
||||
: <input type="text" id="domaindir" data-pickfolders="true" data-pickfilter="NO_FILES_FILTER" data-pickroot="<?= (is_dir('/mnt/user/') ? '/mnt/user/' : '/mnt/') ?>" name="DOMAINDIR" value="<?=htmlspecialchars($domain_cfg['DOMAINDIR'])?>" placeholder="Click to Select" pattern="^[^\\]*/$"> <?if ($var['fsState'] != "Started"):?><span><i class="fa fa-warning icon warning"></i> _(Modify with caution: unable to validate path until Array is Started)_</span><?elseif (!is_dir($domain_cfg['DOMAINDIR'])):?><span><i class="fa fa-warning icon warning"></i> _(Path does not exist)_</span><?endif;?>
|
||||
|
||||
:help109
|
||||
> Specify a user share that contains all your VM subdirectories with vdisks
|
||||
:end
|
||||
|
||||
Default ISO storage path:
|
||||
: <input type="text" id="mediadir" data-pickfolders="true" data-pickfilter="NO_FILES_FILTER" data-pickroot="<?= (is_dir('/mnt/user/') ? '/mnt/user/' : '/mnt/') ?>" name="MEDIADIR" value="<?=htmlspecialchars($domain_cfg['MEDIADIR'])?>" placeholder="Click to Select" pattern="^[^\\]*/$"> <?if ($var['fsState'] != "Started"):?><span><i class="fa fa-warning icon warning"></i> Modify with caution: unable to validate path until Array is Started</span><?elseif (!is_dir($domain_cfg['MEDIADIR'])):?><span><i class="fa fa-warning icon warning"></i> Path does not exist</span><?endif;?>
|
||||
_(Default ISO storage path)_:
|
||||
: <input type="text" id="mediadir" data-pickfolders="true" data-pickfilter="NO_FILES_FILTER" data-pickroot="<?= (is_dir('/mnt/user/') ? '/mnt/user/' : '/mnt/') ?>" name="MEDIADIR" value="<?=htmlspecialchars($domain_cfg['MEDIADIR'])?>" placeholder="Click to Select" pattern="^[^\\]*/$"> <?if ($var['fsState'] != "Started"):?><span><i class="fa fa-warning icon warning"></i> _(Modify with caution: unable to validate path until Array is Started)_</span><?elseif (!is_dir($domain_cfg['MEDIADIR'])):?><span><i class="fa fa-warning icon warning"></i> _(Path does not exist)_</span><?endif;?>
|
||||
|
||||
:help110
|
||||
> Specify a user share that contains all your installation media for operating systems
|
||||
:end
|
||||
|
||||
</div>
|
||||
Default Windows VirtIO driver ISO <span style="font-weight: normal">(optional)</span>:
|
||||
_(Default Windows VirtIO driver ISO)_ (_(optional)_):
|
||||
: <select id="winvirtio_select">
|
||||
<?$iso_dir = $domain_cfg['MEDIADIR'];
|
||||
if (empty($iso_dir) || !is_dir($iso_dir)) {
|
||||
@@ -154,10 +166,11 @@ Default Windows VirtIO driver ISO <span style="font-weight: normal">(optional)</
|
||||
}
|
||||
echo mk_option($strMatch, $value['name'], $value['name']);
|
||||
}
|
||||
echo mk_option($strMatch, 'manual', 'Manual');
|
||||
echo mk_option($strMatch, 'manual', _('Manual'));
|
||||
?>
|
||||
</select><input type="text" id="winvirtio" name="VIRTIOISO" data-pickfilter="iso" data-pickcloseonfile="true" data-pickroot="<?= (is_dir('/mnt/user/') ? '/mnt/user/' : '/mnt/') ?>" value="<?=htmlspecialchars($domain_cfg['VIRTIOISO'])?>"<?if ($var['fsState'] == "Started"):?> placeholder="Click to Select" pattern="^[^\\]*\.(iso|ISO)$"><i class="fa fa-trash" id="remove_button" title="Remove Windows VirtIO driver ISO"> <span>Remove</span></i><i class="fa fa-download" id="download_button" title="Download Windows VirtIO driver ISO"> <span>Download</span></i><span id="download_status"></span<?endif;?>>
|
||||
</select><input type="text" id="winvirtio" name="VIRTIOISO" data-pickfilter="iso" data-pickcloseonfile="true" data-pickroot="<?= (is_dir('/mnt/user/') ? '/mnt/user/' : '/mnt/') ?>" value="<?=htmlspecialchars($domain_cfg['VIRTIOISO'])?>"<?if ($var['fsState'] == "Started"):?> placeholder="_(Click to Select)_" pattern="^[^\\]*\.(iso|ISO)$"><i class="fa fa-trash" id="remove_button" title="_(Remove Windows VirtIO driver ISO)_"> <span>_(Remove)_</span></i><i class="fa fa-download" id="download_button" title="_(Download Windows VirtIO driver ISO)_"> <span>_(Download)_</span></i><span id="download_status"></span<?endif;?>>
|
||||
|
||||
:help111
|
||||
> Specify the virtual CD-ROM (ISO) that contains the VirtIO Windows drivers as provided by the Fedora Project.
|
||||
> Download the latest ISO from here: <a href="https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/index.html#virtio-win-direct-downloads" target="_blank">fedoraproject.org</a>
|
||||
>
|
||||
@@ -165,47 +178,54 @@ Default Windows VirtIO driver ISO <span style="font-weight: normal">(optional)</
|
||||
> Click browse and locate the additional CD-ROM in the menu. Inside there will be various folders for the different versions of Windows.
|
||||
> Open the folder for the version of Windows you are installing and then select the AMD64 subfolder inside (even if you are on an Intel system, select AMD64).
|
||||
> Three drivers will be found. Select them all, click next, and the vDisks you have assigned will appear.
|
||||
:end
|
||||
|
||||
<div class="advanced" markdown="1">
|
||||
Default network bridge:
|
||||
_(Default network bridge)_:
|
||||
: <select id="bridge" name="BRNAME">
|
||||
<?foreach ($arrValidBridges as $strBridge) echo mk_option($domain_cfg['BRNAME'], $strBridge, $strBridge);?>
|
||||
</select>
|
||||
|
||||
:help112
|
||||
> Select the name of the network bridge you wish to use as default for your VMs,
|
||||
> the setting 'virbr0' will let libvirt create a virtual bridge that utilizes NAT (network address translation)
|
||||
> and act as a DHCP server to hand out IP addresses to virtual machines directly.
|
||||
> More optional selections are present when virtual bridges are created under network settings.
|
||||
>
|
||||
> NOTE: You can also specify a network bridge on a per-VM basis.
|
||||
:end
|
||||
|
||||
Upon host shutdown:
|
||||
_(Upon host shutdown)_:
|
||||
: <select id="hostshutdown" name="HOSTSHUTDOWN">
|
||||
<?echo mk_option($domain_cfg['HOSTSHUTDOWN'], 'shutdown', 'Shutdown VMs');
|
||||
echo mk_option($domain_cfg['HOSTSHUTDOWN'], 'hibernate', 'Hibernate VMs');
|
||||
?>
|
||||
<?=mk_option($domain_cfg['HOSTSHUTDOWN'], 'shutdown', _('Shutdown VMs'))?>
|
||||
<?=mk_option($domain_cfg['HOSTSHUTDOWN'], 'hibernate', _('Hibernate VMs'))?>
|
||||
</select>
|
||||
|
||||
:help113
|
||||
> When shutting down the server, this defines the action to take upon running VMs. If *Hibernate VMs* is chosen,
|
||||
> the VM will be instructed to hibernate (if supported) otherwise it will attempt a VM shutdown.
|
||||
:end
|
||||
|
||||
VM shutdown time-out:
|
||||
_(VM shutdown time-out)_:
|
||||
: <input type="number" id="vm_shutdown_timeout" name="TIMEOUT" value="<?=htmlspecialchars($domain_cfg['TIMEOUT'])?>" class="narrow">
|
||||
<?if (!empty($var['shutdownTimeout']) && !empty($domain_cfg['TIMEOUT']) && (int)$domain_cfg['TIMEOUT'] > (int)$var['shutdownTimeout']):?>
|
||||
<span id="arraystopped"><i class="fa fa-warning icon warning"></i> exceeds Disk Shutdown <?=htmlspecialchars($var['shutdownTimeout'])?>s time-out (<a href="/Settings/DiskSettings">edit</a>)</span>
|
||||
<span id="arraystopped"><i class="fa fa-warning icon warning"></i> _(exceeds Disk Shutdown)_ <?=htmlspecialchars($var['shutdownTimeout'])?>s _(time-out)_ (<a href="/Settings/DiskSettings">_(edit)_</a>)</span>
|
||||
<?endif;?>
|
||||
|
||||
:help114
|
||||
> When shutting down the server, this defines how long to wait in seconds for *graceful* VM shutdown before forcing shutdown to continue.
|
||||
> NOTE: It's recommended to shut down guest VMs from within the VM.
|
||||
:end
|
||||
|
||||
PCIe ACS override:
|
||||
_(PCIe ACS override)_:
|
||||
: <select id="pcie_acs_override"<?=$safemode?' disabled':''?>>
|
||||
<?= mk_option($pcie_acs_override, '', 'Disabled'); ?>
|
||||
<?= mk_option($pcie_acs_override, 'downstream', 'Downstream'); ?>
|
||||
<?= mk_option($pcie_acs_override, 'multifunction', 'Multi-function'); ?>
|
||||
<?= mk_option($pcie_acs_override, 'downstream,multifunction', 'Both'); ?>
|
||||
</select><?if($safemode):?><span>*Setting disabled in **safe mode***</span><?endif;?>
|
||||
<?= mk_option($pcie_acs_override, '', _('Disabled'))?>
|
||||
<?= mk_option($pcie_acs_override, 'downstream', _('Downstream'))?>
|
||||
<?= mk_option($pcie_acs_override, 'multifunction', _('Multi-function'))?>
|
||||
<?= mk_option($pcie_acs_override, 'downstream,multifunction', _('Both'))?>
|
||||
</select><?if($safemode):?><span>*_(Setting disabled in **safe mode**)_*</span><?endif;?>
|
||||
|
||||
:help115
|
||||
> *PCIe ACS override* allows various hardware components to expose themselves as isolated devices.
|
||||
> Typically it is sufficient to isolate *Downstream* ports.
|
||||
> A hardware component may need the setting *Multi-function* or *Both* to further isolate different hardware functions.<br>
|
||||
@@ -213,43 +233,48 @@ PCIe ACS override:
|
||||
>
|
||||
> **Warning: use of this setting could cause possible data corruption with certain hardware configurations.**
|
||||
> Please visit the [Lime Technology forums](https://forums.unraid.net/forum/51-vm-engine-kvm) for more information.
|
||||
:end
|
||||
|
||||
VFIO allow unsafe interrupts:
|
||||
_(VFIO allow unsafe interrupts)_:
|
||||
: <select id="vfio_allow_unsafe"<?=$safemode?' disabled':''?>>
|
||||
<?= mk_option($vfio_allow_unsafe, '', 'No'); ?>
|
||||
<?= mk_option($vfio_allow_unsafe, '1', 'Yes'); ?>
|
||||
</select><?if($safemode):?><span>*Setting disabled in **safe mode***</span><?endif;?>
|
||||
<?= mk_option($vfio_allow_unsafe, '', _('No'))?>
|
||||
<?= mk_option($vfio_allow_unsafe, '1', _('Yes'))?>
|
||||
</select><?if($safemode):?><span>*_(Setting disabled in **safe mode**)_*</span><?endif;?>
|
||||
|
||||
:help116
|
||||
> If your system doesn't support interrupt remapping, these can be enabled by allowing unsafe interrupts.<br>
|
||||
> A reboot will be required for changes to this setting to take affect.
|
||||
>
|
||||
> **Warning: use of this setting could cause possible data corruption with certain hardware configurations.**
|
||||
> Please visit the [Lime Technology forums](https://forums.unraid.net/forum/51-vm-engine-kvm) for more information.
|
||||
:end
|
||||
|
||||
</div>
|
||||
<?if (file_exists("/var/log/libvirt/libvirtd.log")):?>
|
||||
<input type="button" onclick="openWindow('/webGui/scripts/tail_log&arg1=libvirt/libvirtd.log','Libvirt Log',600,900);" value="View libvirt log"/>
|
||||
<input type="button" onclick="openWindow('/webGui/scripts/tail_log&arg1=libvirt/libvirtd.log','_(Libvirt Log)_',600,900);" value="_(View libvirt log)_"/>
|
||||
<?else:?>
|
||||
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
: <input type="button" id="applyBtn" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="button" id="applyBtn" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
<?if (file_exists("/var/log/libvirt/libvirtd.log")):?>
|
||||
|
||||
> View the log for libvirt: <a id="openlog" title="/var/log/libvirt/libvirtd.log" href="#" onclick="openWindow('/webGui/scripts/tail_log&arg1=libvirt/libvirtd.log','Libvirt Log',600,900);">/var/log/libvirt/libvirtd.log</a>
|
||||
:help117
|
||||
> View the log for libvirt: <a id="openlog" title="/var/log/libvirt/libvirtd.log" href="#" onclick="openWindow('/webGui/scripts/tail_log&arg1=libvirt/libvirtd.log','_(Libvirt Log)_',600,900);">/var/log/libvirt/libvirtd.log</a>
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
|
||||
<?if ($libvirt_running == 'yes' && trim(shell_exec('stat -c %T -f /etc/libvirt'))=='btrfs'):?>
|
||||
<div class="advanced" markdown="1">
|
||||
<div id="title"><span class="left"><i class="title fa fa-list"></i>Libvirt volume info</span></div>
|
||||
btrfs filesystem show:
|
||||
: <?="<pre>".shell_exec("btrfs filesystem show /etc/libvirt")."</pre>"?>
|
||||
<div id="title"><span class="left"><i class="title fa fa-list"></i>_(Libvirt volume info)_</span></div>
|
||||
_(btrfs filesystem show)_:
|
||||
: <?="<pre id='btrfs-scrub'>".shell_exec("btrfs filesystem show /etc/libvirt")."</pre>"?>
|
||||
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'btrfs-scrub-vm','/etc/libvirt'>
|
||||
<?exec("$docroot/webGui/scripts/btrfs_scrub status /etc/libvirt", $scrub_status, $retval);?>
|
||||
btrfs scrub status:
|
||||
_(btrfs scrub status)_:
|
||||
: <?="<pre>".implode("\n", $scrub_status)."</pre>"?>
|
||||
|
||||
<?if ($retval != 0):?>
|
||||
@@ -258,19 +283,23 @@ btrfs scrub status:
|
||||
<input type="hidden" name="#arg[2]" value="/etc/libvirt">
|
||||
<input type="hidden" name="#arg[3]" value="-r">
|
||||
|
||||
: <input type="submit" value="Scrub"><label><input type="checkbox" name="#arg[3]" value="">Correct file system errors</label>
|
||||
: <input type="submit" value="_(Scrub)_"><label><input type="checkbox" name="#arg[3]" value="">_(Correct file system errors)_</label>
|
||||
|
||||
:help118
|
||||
> **Scrub** runs the *btrfs scrub* program to check file system integrity.
|
||||
> If repair is needed you should check the *Correct file system errors* and run a second Scrub pass; this will permit *btrfs scrub* to fix the file system.
|
||||
:end
|
||||
|
||||
<?else:?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_scrub">
|
||||
<input type="hidden" name="#arg[1]" value="cancel">
|
||||
<input type="hidden" name="#arg[2]" value="/etc/libvirt">
|
||||
|
||||
: <input type="button" value="Refresh" onclick="refresh()"><input type="submit" value="Cancel">*Running*
|
||||
: <input type="submit" value="_(Cancel)_">
|
||||
|
||||
:help119
|
||||
> **Cancel* will cancel the Scrub operation in progress.
|
||||
:end
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
@@ -286,6 +315,20 @@ btrfs scrub status:
|
||||
<script src="<?autov('/webGui/javascript/jquery.switchbutton.js')?>"></script>
|
||||
<script src="<?autov('/plugins/dynamix.vm.manager/javascript/dynamix.vm.manager.js')?>"></script>
|
||||
<script>
|
||||
function prepareFS(form,cookie,value) {
|
||||
if ($(form).find('input[type="submit"]').val()=='Cancel') $.removeCookie(cookie); else $.cookie(cookie,value);
|
||||
}
|
||||
function btrfsScrub(path) {
|
||||
$.post('/webGui/include/FileSystemStatus.php',{cmd:'scrub',path:path},function(data) {
|
||||
if (data.indexOf('running')>0) {
|
||||
$('#btrfs-scrub').text(data);
|
||||
setTimeout(function(){btrfsScrub(path);},1000);
|
||||
} else {
|
||||
$.removeCookie('btrfs-scrub-vm');
|
||||
refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
$(function(){
|
||||
$("#applyBtn").click(function(){
|
||||
if ($("#deleteCheckbox").length && $("#deleteCheckbox").is(":checked")) {
|
||||
@@ -404,8 +447,8 @@ $(function(){
|
||||
<?if ($hardware):?>
|
||||
$('.advancedview').switchButton({
|
||||
labels_placement: "left",
|
||||
on_label: 'Advanced View',
|
||||
off_label: 'Basic View',
|
||||
on_label: '_(Advanced View)_',
|
||||
off_label: '_(Basic View)_',
|
||||
checked: $.cookie('vmsettings_view_mode') == 'advanced'
|
||||
});
|
||||
$('.advancedview').change(function(){
|
||||
@@ -452,5 +495,6 @@ $(function(){
|
||||
var rebootMessage = "VM Settings: A reboot is required to apply changes";
|
||||
if (data.modified) addRebootNotice(rebootMessage); else removeRebootNotice(rebootMessage);
|
||||
});
|
||||
if ($.cookie('btrfs-scrub-vm')) btrfsScrub($.cookie('btrfs-scrub-vm'));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -4,7 +4,7 @@ Cond="(pgrep('libvirtd')!==false)"
|
||||
Markdown="false"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2015-2017, Derek Macias, Eric Schultz, Jon Panozzo.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -16,30 +16,10 @@ Markdown="false"
|
||||
*/
|
||||
?>
|
||||
<style type="text/css">
|
||||
.vmheader {
|
||||
padding: 10px;
|
||||
font-size: 1.4rem;
|
||||
text-align: left;
|
||||
color: #888;
|
||||
}
|
||||
.vmtemplate {
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
height: 90px;
|
||||
margin-bottom: 15px;
|
||||
margin-left: 10px;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
}
|
||||
.vmtemplate img {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
.vmtemplate p {
|
||||
text-align: center;
|
||||
margin-top: 8px;
|
||||
line-height: 12px;
|
||||
}
|
||||
.vmheader{padding:10px;font-size:1.4rem;text-align:left;color:#888}
|
||||
.vmtemplate{display:inline-block;width:80px;height:90px;margin-bottom:15px;margin-left:10px;text-align:center;vertical-align:top}
|
||||
.vmtemplate img{width:48px;height:48px}
|
||||
.vmtemplate p{text-align:center;margin-top:8px;line-height:12px}
|
||||
</style>
|
||||
<?
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
@@ -60,5 +40,5 @@ Markdown="false"
|
||||
</div>
|
||||
<? endforeach; ?>
|
||||
<br>
|
||||
<center><button type='button' onclick='done()'>Cancel</button></center>
|
||||
<center><button type='button' onclick='done()'>_(Cancel)_</button></center>
|
||||
<br>
|
||||
@@ -4,8 +4,8 @@ Code="e918"
|
||||
Cond="exec(\"grep -o '^SERVICE=.enable' /boot/config/domain.cfg 2>/dev/null\")"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2015-2018, Derek Macias, Eric Schultz, Jon Panozzo.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2015-2020, Derek Macias, Eric Schultz, Jon Panozzo.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -17,9 +17,9 @@ Cond="exec(\"grep -o '^SERVICE=.enable' /boot/config/domain.cfg 2>/dev/null\")"
|
||||
?>
|
||||
<?
|
||||
if ($var['fsState'] != "Started") {
|
||||
echo "<div class='notice shift'>Array must be <span class='strong big'>started</span> to view Virtual Machines.</div>";
|
||||
echo "<div class='notice shift'>"._('Array must be **started** to view Virtual Machines').".</div>";
|
||||
} elseif (!is_file('/var/run/libvirt/libvirtd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/libvirt/libvirtd.pid')))) {
|
||||
echo "<div class='notice shift'>Libvirt Service failed to start.</div>";
|
||||
echo "<div class='notice shift'>"._('Libvirt Service failed to start').".</div>";
|
||||
}
|
||||
if (count($pages)==2) $tabbed = false;
|
||||
?>
|
||||
@@ -13,13 +13,18 @@
|
||||
?>
|
||||
<?
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
// add translations
|
||||
$_SERVER['REQUEST_URI'] = 'vms';
|
||||
require_once "$docroot/webGui/include/Translations.php";
|
||||
|
||||
require_once "$docroot/webGui/include/Helpers.php";
|
||||
require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
|
||||
|
||||
|
||||
$user_prefs = '/boot/config/plugins/dynamix.vm.manager/userprefs.cfg';
|
||||
$vms = $lv->get_domains();
|
||||
if (empty($vms)) {
|
||||
echo '<tr><td colspan="8" style="text-align:center;padding-top:12px">No Virtual Machines installed</td></tr>';
|
||||
echo '<tr><td colspan="8" style="text-align:center;padding-top:12px">'._('No Virtual Machines installed').'</td></tr>';
|
||||
return;
|
||||
}
|
||||
if (file_exists($user_prefs)) {
|
||||
@@ -103,7 +108,7 @@ foreach ($vms as $vm) {
|
||||
|
||||
/* VM information */
|
||||
echo "<tr parent-id='$i' class='sortable'><td class='vm-name' style='width:220px;padding:8px'>";
|
||||
echo "<span class='outer'><span id='vm-$uuid' class='hand'>$image</span><span class='inner'><a href='#' onclick='return toggle_id(\"name-$i\")' title='click for more VM info'>$vm</a><br><i class='fa fa-$shape $status $color'></i><span class='state'>$status</span></span></span></td>";
|
||||
echo "<span class='outer'><span id='vm-$uuid' class='hand'>$image</span><span class='inner'><a href='#' onclick='return toggle_id(\"name-$i\")' title='click for more VM info'>$vm</a><br><i class='fa fa-$shape $status $color'></i><span class='state'>"._($status)."</span></span></span></td>";
|
||||
echo "<td>$desc</td>";
|
||||
echo "<td><a class='vcpu-$uuid' style='cursor:pointer'>$vcpu</a></td>";
|
||||
echo "<td>$mem</td>";
|
||||
@@ -115,7 +120,7 @@ foreach ($vms as $vm) {
|
||||
echo "<tr child-id='$i' id='name-$i".(in_array('name-'.$i++,$show) ? "'>" : "' style='display:none'>");
|
||||
echo "<td colspan='8' style='margin:0;padding:0'>";
|
||||
echo "<table class='tablesorter domdisk' id='domdisk_table'>";
|
||||
echo "<thead><tr><th><i class='fa fa-hdd-o'></i> <b>Disk devices</b></th><th>Bus</th><th>Capacity</th><th>Allocation</th></tr></thead>";
|
||||
echo "<thead><tr><th><i class='fa fa-hdd-o'></i> <b>"._('Disk devices')."</b></th><th>"._('Bus')."</th><th>"._('Capacity')."</th><th>"._('Allocation')."</th></tr></thead>";
|
||||
echo "<tbody id='domdisk_list'>";
|
||||
|
||||
/* Display VM disks */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2015-2018, Derek Macias, Eric Schultz, Jon Panozzo.
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2015-2020, Derek Macias, Eric Schultz, Jon Panozzo.
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -13,6 +13,10 @@
|
||||
?>
|
||||
<?
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
// add translations
|
||||
$_SERVER['REQUEST_URI'] = 'settings';
|
||||
require_once "$docroot/webGui/include/Translations.php";
|
||||
|
||||
require_once "$docroot/webGui/include/Helpers.php";
|
||||
require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
|
||||
|
||||
@@ -523,19 +527,19 @@ case 'virtio-win-iso-cancel':
|
||||
$arrDownloadVirtIO = $virtio_isos[$strKeyName];
|
||||
}
|
||||
if (empty($arrDownloadVirtIO)) {
|
||||
$arrResponse = ['error' => 'Unknown version: '.$_REQUEST['download_version']];
|
||||
$arrResponse = ['error' => _('Unknown version').': '.$_REQUEST['download_version']];
|
||||
} elseif (empty($_REQUEST['download_path'])) {
|
||||
$arrResponse = ['error' => 'ISO storage path was empty'];
|
||||
$arrResponse = ['error' => _('ISO storage path was empty')];
|
||||
} elseif (!is_dir($_REQUEST['download_path'])) {
|
||||
$arrResponse = ['error' => 'ISO storage path doesn\'t exist'];
|
||||
$arrResponse = ['error' => _("ISO storage path doesn't exist")_];
|
||||
} else {
|
||||
$strInstallScriptPgrep = '-f "VirtIOWin_'.$strKeyName.'_install.sh"';
|
||||
$pid = pgrep($strInstallScriptPgrep, false);
|
||||
if (!$pid) {
|
||||
$arrResponse = ['error' => 'Not running'];
|
||||
$arrResponse = ['error' => _('Not running')];
|
||||
} else {
|
||||
if (!posix_kill($pid, SIGTERM)) {
|
||||
$arrResponse = ['error' => 'Wasn\'t able to stop the process'];
|
||||
$arrResponse = ['error' => _("Wasn't able to stop the process")];
|
||||
} else {
|
||||
$strTargetFile = $_REQUEST['download_path'].$arrDownloadVirtIO['name'];
|
||||
$strLogFile = $strTargetFile.'.log';
|
||||
@@ -581,7 +585,7 @@ case 'virtio-win-iso-remove':
|
||||
break;
|
||||
|
||||
default:
|
||||
$arrResponse = ['error' => 'Unknown action \''.$action.'\''];
|
||||
$arrResponse = ['error' => _('Unknown action')." '$action'"];
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-apple"
|
||||
Tag="apple"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2019, Lime Technology
|
||||
* Copyright 2012-2019, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -15,32 +15,35 @@ Tag="apple"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<div class='notice' style='margin-bottom:24px'>Please note that AFP is <strong>deprecated</strong>, please use SMB instead.</div>
|
||||
<div class='notice' style='margin-bottom:24px'>_(Please note that AFP is **deprecated**, please use SMB instead)_.</div>
|
||||
|
||||
<form markdown="1" method="POST" action="/update.htm" target="progressFrame">
|
||||
Enable AFP:
|
||||
_(Enable AFP)_:
|
||||
: <select name="shareAFPEnabled" size="1">
|
||||
<?=mk_option($var['shareAFPEnabled'], "no", "No");?>
|
||||
<?=mk_option($var['shareAFPEnabled'], "yes", "Yes");?>
|
||||
<?=mk_option($var['shareAFPEnabled'], "no", _('No'))?>
|
||||
<?=mk_option($var['shareAFPEnabled'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help81
|
||||
> Select 'Yes' enable [AFP](/Help) protocol support.
|
||||
>
|
||||
> Note: changing this value with array Started may cause a brief interruption in network services.
|
||||
:end
|
||||
|
||||
Connected users:
|
||||
_(Connected users)_:
|
||||
: <?if ($var['shareAFPEnabled']=="yes"):
|
||||
$AFPUsers = exec("ps anucx|grep -c 'afpd'");
|
||||
if ($AFPUsers>0) $AFPUsers--;
|
||||
echo $AFPUsers;
|
||||
else:
|
||||
echo "<i>not available</i>";
|
||||
echo "<i>"._('not available')."</i>";
|
||||
endif;?>
|
||||
|
||||
|
||||
: <input type="submit" name="changeShare" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
:help82
|
||||
> ### Overview
|
||||
> AFP for Unraid includes both `netatalk` to implement Apple Filing Protocol, and `avahi`
|
||||
> to implement Zeroconf, aka, Bonjour.
|
||||
@@ -74,3 +77,4 @@ Connected users:
|
||||
>
|
||||
> It may be necessary to log out and back in, or even to restart the computer for the change to take effect
|
||||
> (this is what the article states).
|
||||
:end
|
||||
@@ -3,8 +3,8 @@ Title="Array Devices"
|
||||
Tag="database"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2019, Lime Technology
|
||||
* Copyright 2012-2019, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -66,7 +66,7 @@ array_status();
|
||||
</script>
|
||||
|
||||
<table class="disk_status wide">
|
||||
<thead><tr><td>Device</td><td>Identification</td><td>Temp.</td><td>Reads</td><td>Writes</td><td>Errors</td><td>FS</td><td>Size</td><td>Used</td><td>Free</td><td>View</td></tr></thead>
|
||||
<thead><tr><td>_(Device)_</td><td>_(Identification)_</td><td>_(Temp)_.</td><td>_(Reads)_</td><td>_(Writes)_</td><td>_(Errors)_</td><td>_(FS)_</td><td>_(Size)_</td><td>_(Used)_</td><td>_(Free)_</td><td>_(View)_</td></tr></thead>
|
||||
<tbody id="array_devices">
|
||||
<?
|
||||
foreach ($disks as $disk):
|
||||
@@ -78,6 +78,7 @@ if ($display['total']) echo "<tr class='tr_last'><td colspan='11'> </td></t
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
:help1
|
||||
> **Colored Status Indicator** the significance of the color indicator at the beginning of each line in *Array Devices* is as follows:
|
||||
>
|
||||
> <i class='fa fa-circle orb green-orb'></i>Normal operation, device is active.
|
||||
@@ -137,9 +138,12 @@ if ($display['total']) echo "<tr class='tr_last'><td colspan='11'> </td></t
|
||||
> separate share.
|
||||
>
|
||||
> Click on the Device name to configure individual device settings and launch certain utilities.
|
||||
:end
|
||||
|
||||
<?if ($var['fsState'] == "Stopped"):?>
|
||||
<div></div>
|
||||
:help2
|
||||
> **Slots** select the number of device slots in your server designated for Array devices.
|
||||
> The minimum number of Array slots is 2, and you must have at least one device assigned to the array.
|
||||
:end
|
||||
<?endif;?>
|
||||
|
||||
+172
-160
@@ -33,34 +33,34 @@ if ($forced && ($present || $missing || $wrong)) $forced = false;
|
||||
|
||||
function check_encryption() {
|
||||
global $forced, $missing, $wrong;
|
||||
if ($forced) $status = "Enter new key";
|
||||
elseif ($missing) $status = "Missing key";
|
||||
elseif ($wrong) $status = "Wrong key";
|
||||
if ($forced) $status = _('Enter new key');
|
||||
elseif ($missing) $status = _('Missing key');
|
||||
elseif ($wrong) $status = _('Wrong key');
|
||||
else return;
|
||||
echo "<tr><td></td><td class='gap'>Encryption status:</td><td><span class='red-text'>$status</span><span id='pass'><input name='luksReformat' type='checkbox' onchange='selectInput(this.form)'>permit reformat</span></td></tr>";
|
||||
echo "<tr><td></td><td class='gap'>Encryption input:</td><td>";
|
||||
echo "<tr><td></td><td class='gap'>"._('Encryption status').":</td><td><span class='red-text'>$status</span><span id='pass'><input name='luksReformat' type='checkbox' onchange='selectInput(this.form)'>permit reformat</span></td></tr>";
|
||||
echo "<tr><td></td><td class='gap'>"._('Encryption input').":</td><td>";
|
||||
echo "<select name='input' size='1' onchange='selectInput(this.form)'>";
|
||||
echo mk_option(1,'text','Passphrase');
|
||||
echo mk_option(1,'file','Keyfile');
|
||||
echo mk_option(1,'text',_('Passphrase'));
|
||||
echo mk_option(1,'file',_('Keyfile'));
|
||||
echo "</select></td></tr>";
|
||||
echo "<tr id='text'><td></td><td class='gap'>Passphrase:</td><td><input type='password' name='text' maxlength='512' value='' onkeyup='selectInput(this.form)' placeholder='use printable characters only'><input name='showPass' type='checkbox' onchange='selectInput(this.form)'>show passphrase</td></tr>";
|
||||
echo "<tr id='copy'><td></td><td class='gap'>Retype passphrase:</td><td><input type='password' name='copy' maxlength='512' value='' onkeyup='selectInput(this.form)'></td></tr>";
|
||||
echo "<tr id='file'><td></td><td class='gap'>Keyfile:</td><td><input type='file' name='local' onchange='getFileContent(event,this.form)'></td></tr>";
|
||||
echo "<tr id='text'><td></td><td class='gap'>"._('Passphrase').":</td><td><input type='password' name='text' maxlength='512' value='' onkeyup='selectInput(this.form)' placeholder='"._('use printable characters only')."'><input name='showPass' type='checkbox' onchange='selectInput(this.form)'>"._('show passphrase')."</td></tr>";
|
||||
echo "<tr id='copy'><td></td><td class='gap'>"._('Retype passphrase').":</td><td><input type='password' name='copy' maxlength='512' value='' onkeyup='selectInput(this.form)'></td></tr>";
|
||||
echo "<tr id='file'><td></td><td class='gap'>"._('Keyfile').":</td><td><input type='file' name='local' onchange='getFileContent(event,this.form)'></td></tr>";
|
||||
}
|
||||
function maintenance_mode() {
|
||||
echo "<tr>";
|
||||
echo "<td></td>";
|
||||
echo "<td><input type='checkbox' name='startMode' value='Maintenance'>Maintenance mode</td>";
|
||||
echo "<td><strong>Maintenance mode</strong> - if checked, Start array but do not mount disks.</td>";
|
||||
echo "<td><input type='checkbox' name='startMode' value='Maintenance'>_(Maintenance mode)_</td>";
|
||||
echo "<td><b>"._('Maintenance mode')."</b> - "._('if checked, Start array but do not mount disks')."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
function status_indicator() {
|
||||
global $var;
|
||||
switch ($var['mdColor']) {
|
||||
case 'green-on': $orb = 'circle'; $color = 'green'; $help = 'Started, array protected'; break;
|
||||
case 'green-blink': $orb = 'circle'; $color = 'grey'; $help = 'Stopped'; break;
|
||||
case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = 'Started, array unprotected'; break;
|
||||
case 'yellow-blink': $orb = 'warning'; $color = 'grey'; $help = 'Stopped'; break;
|
||||
case 'green-on': $orb = 'circle'; $color = 'green'; $help =_('Started, array protected'); break;
|
||||
case 'green-blink': $orb = 'circle'; $color = 'grey'; $help = _('Stopped'); break;
|
||||
case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = _('Started, array unprotected'); break;
|
||||
case 'yellow-blink': $orb = 'warning'; $color = 'grey'; $help = _('Stopped'); break;
|
||||
}
|
||||
echo "<a class='info'><i class='fa fa-$orb orb $color-orb'></i><span>$help</span></a>";
|
||||
}
|
||||
@@ -74,11 +74,12 @@ function missing_cache() {
|
||||
<style>
|
||||
tr#copy,tr#file{display:none}
|
||||
td.gap{padding-left:26px!important}
|
||||
td.wrap{white-space:normal!important}
|
||||
span#pass{display:none;margin-left:20px}
|
||||
</style>
|
||||
<script src="<?autov('/webGui/javascript/jquery.base64.js')?>"></script>
|
||||
<script>
|
||||
var ctrl = "<span class='status <?=$tabbed?'':'vhshift'?>'><a style='cursor:pointer' class='tooltip_diskio' title='Toggle reads/writes display' onclick='toggle_diskio();return false'><i class='toggle fa'></i></a></span>";
|
||||
var ctrl = "<span class='status <?=$tabbed?'':'vhshift'?>'><a style='cursor:pointer' class='tooltip_diskio' title='_(Toggle reads/writes display)_' onclick='toggle_diskio();return false'><i class='toggle fa'></i></a></span>";
|
||||
|
||||
function selectInput(form) {
|
||||
<?if ($wrong && $keyfile):?>
|
||||
@@ -146,7 +147,7 @@ function prepareInput(form) {
|
||||
form.file.disabled = false;
|
||||
form.text.disabled = false;
|
||||
form.copy.disabled = false;
|
||||
swal({title:'Printable Characters Only',text:'Use <b>ASCII</b> characters from space " " to tilde "~"<br>Otherwise use the <b>keyfile</b> method for UTF8 input',html:true,type:'error'});
|
||||
swal({title:'_(Printable Characters Only)_',text:'_(Use <b>ASCII</b> characters from space " " to tilde "~")_<br>_(Otherwise use the <b>keyfile</b> method for UTF8 input)_',html:true,type:'error'});
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -159,14 +160,14 @@ function prepareInput(form) {
|
||||
function parityWarning(form) {
|
||||
if (form.md_invalidslot.checked) {
|
||||
<?if (strpos($disks['parity2']['status'],'_NP')===false):?>
|
||||
var text = '<i>Dual parity valid</i> requires <b>ALL</b> disks in their original slots';
|
||||
var text = '_(<i>Dual parity valid</i> requires <b>ALL</b> disks in their original slots)_';
|
||||
<?else:?>
|
||||
var text = '<i>Parity valid</i> requires <b>ALL</b> disks to have their original content';
|
||||
var text = '_(<i>Parity valid</i> requires <b>ALL</b> disks to have their original content)_';
|
||||
<?endif;?>
|
||||
} else {
|
||||
var text = '<i>Parity</i> disk(s) content will be overwritten';
|
||||
var text = '_(<i>Parity</i> disk(s) content will be overwritten)_';
|
||||
}
|
||||
swal({title:'Proceed to start',text:text,html:true,type:'warning',confirmButtonText:'Proceed',showCancelButton:true},function(){prepareInput(form);});
|
||||
swal({title:'_(Proceed to start)_',text:text,html:true,type:'warning',confirmButtonText:'_(Proceed)_',showCancelButton:true},function(){prepareInput(form);});
|
||||
}
|
||||
function tab0() {
|
||||
$.removeCookie('one',{path:'/'});
|
||||
@@ -176,17 +177,17 @@ function parityStatus() {
|
||||
$.post('/webGui/include/DeviceList.php',{path:'<?=$path?>',device:'parity'},function(data) {
|
||||
if (data) {$.each(data.split(';'),function(k,v) {if ($('#line'+k).length>0) $('#line'+k).html(v);});}
|
||||
timers.parityStatus = setTimeout(parityStatus,3000);
|
||||
if (!data && $('#cancelButton').length>0 && $('#cancelButton').val()=='Cancel') {
|
||||
if (!data && $('#cancelButton').length>0 && $('#cancelButton').val()=='_(Cancel)_') {
|
||||
$('#cancelButton').val('Done').prop('onclick',null).off('click').click(function(){refresh();});
|
||||
$('#cancelText').html('');
|
||||
$('#line4').html('completed');
|
||||
$('#line4').html('_(completed)_');
|
||||
}
|
||||
});
|
||||
}
|
||||
function stopArray(form) {
|
||||
$(form).append('<input type="hidden" name="cmdStop" value="Stop">');
|
||||
<?if ($confirm['stop']):?>
|
||||
swal({title:'Proceed?',text:'This will stop the array',type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmdStop"]').remove();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will stop the array)_',type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmdStop"]').remove();});
|
||||
<?else:?>
|
||||
form.submit();
|
||||
<?endif;?>
|
||||
@@ -194,25 +195,29 @@ function stopArray(form) {
|
||||
function stopParity(form,text) {
|
||||
$(form).append('<input type="hidden" name="cmdNoCheck" value="Cancel">');
|
||||
<?if ($confirm['stop']):?>
|
||||
swal({title:'Proceed?',text:'This will stop the running '+text+' operation',type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmdNoCheck"]').remove();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will stop the running operation)_: '+text,type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmdNoCheck"]').remove();});
|
||||
<?else:?>
|
||||
form.submit();
|
||||
<?endif;?>
|
||||
}
|
||||
function pauseParity(form) {
|
||||
$(form).append('<input type="hidden" name="cmdNoCheck" value="Pause">');
|
||||
$('#pauseButton').val('Resume').prop('onclick',null).off('click').click(function(){resumeParity(form);});
|
||||
$('#pauseButton').val('_(Resume)_').prop('onclick',null).off('click').click(function(){resumeParity(form);});
|
||||
form.submit();
|
||||
}
|
||||
function resumeParity(form) {
|
||||
$(form).append('<input type="hidden" name="cmdCheck" value="Resume">');
|
||||
$('#pauseButton').val('Pause').prop('onclick',null).off('click').click(function(){pauseParity(form);});
|
||||
$('#pauseButton').val('_(Pause)_').prop('onclick',null).off('click').click(function(){pauseParity(form);});
|
||||
form.submit();
|
||||
}
|
||||
function shutdown_now(form,cmd) {
|
||||
$(form).append('<input type="hidden" name="cmd" value="'+cmd+'">');
|
||||
<?if ($confirm['down']):?>
|
||||
swal({title:'Proceed?',text:'This will '+cmd+' the system',type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmd"]').remove();});
|
||||
switch (cmd) {
|
||||
case 'reboot': var text = '_(This will reboot the system)_'; break;
|
||||
case 'shutdown': var text = '_(This will shutdown the system)_'; break;
|
||||
}
|
||||
swal({title:'_(Proceed)_?',text:text,type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmd"]').remove();});
|
||||
<?else:?>
|
||||
form.submit();
|
||||
<?endif;?>
|
||||
@@ -250,9 +255,9 @@ reload_page();
|
||||
$('.tooltip_diskio').tooltipster({delay:100,trigger:'custom',triggerOpen:{mouseenter:true},triggerClose:{click:false,scroll:true,mouseleave:true}});
|
||||
toggle_diskio(true);
|
||||
<?
|
||||
$parity = $var['mdResync'] ? '<br><small>Disabled -- Parity operation is running</small>' : '';
|
||||
$mover = file_exists('/var/run/mover.pid') ? '<br><small>Disabled -- Mover is running</small>' : '';
|
||||
$btrfs = exec('pgrep -cf /sbin/btrfs') ? '<br><small>Disabled -- BTRFS operation is running</small>' : '';
|
||||
$parity = $var['mdResync'] ? '<br><small>_(Disabled)_ -- _(Parity operation is running)_</small>' : '';
|
||||
$mover = file_exists('/var/run/mover.pid') ? '<br><small>_(Disabled)_ -- _(Mover is running)_</small>' : '';
|
||||
$btrfs = exec('pgrep -cf /sbin/btrfs') ? '<br><small>_(Disabled)_ -- _(BTRFS operation is running)_</small>' : '';
|
||||
?>
|
||||
$(function(){
|
||||
var form = document.arrayOps;
|
||||
@@ -261,11 +266,11 @@ $(function(){
|
||||
function formatWarning(val) {
|
||||
if (val==true)
|
||||
swal({
|
||||
title: 'Format Unmountable disks',
|
||||
text: 'Create an empty file system on the disks shown as <b>Unmountable</b> discarding all data currently on the disks and update parity to reflect this. '
|
||||
+ 'This is typically done when a new disk is added to the array to get it ready for files to be written to it.<br/>'
|
||||
+ '<p><br/><b>WARNING</b>'
|
||||
+ '<p>A format is <b>NEVER</b> part of a data recovery or disk rebuild process and if done in such circumstances will normally lead to loss of all data on the disks being formatted.',
|
||||
title: '_(Format Unmountable disks)_',
|
||||
text: '_(Create an empty file system on the disks shown as <b>Unmountable</b> discarding all data currently on the disks and update parity to reflect this)_. '
|
||||
+ '_(This is typically done when a new disk is added to the array to get it ready for files to be written to it)_.<br>'
|
||||
+ '<p><br><b>_(WARNING)_</b>'
|
||||
+ '<p>_(A format is <b>NEVER</b> part of a data recovery or disk rebuild process and if done in such circumstances will normally lead to loss of all data on the disks being formatted)_.',
|
||||
type: "warning",
|
||||
html: true
|
||||
});
|
||||
@@ -274,212 +279,213 @@ function formatWarning(val) {
|
||||
<form name="arrayOps" method="POST" action="/update.htm" target="progressFrame">
|
||||
<input type="hidden" name="startState" value="<?=htmlspecialchars($var['mdState'])?>">
|
||||
<input type="hidden" name="file" value="">
|
||||
<table class="array_status">
|
||||
<table markdown="1" class="array_status">
|
||||
<?switch ($var['fsState']):
|
||||
case "Started":?>
|
||||
<tr><td><?status_indicator()?><span class="strong">Started<?=(($var['startMode']=='Maintenance')?' - Maintenance Mode':'')?></span></td>
|
||||
<td><input type="button" value="Stop" onclick="stopArray(this.form)"<?if ($parity||$mover||$btrfs):?> disabled<?endif;?>></td>
|
||||
<td id="stop"><strong>Stop</strong> will take the array off-line.<?=$parity?:$mover?:$btrfs?:''?></td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Started)_<?=(($var['startMode']=='Maintenance')?' - _(Maintenance Mode)_':'')?>**</td>
|
||||
<td><input type="button" value="_(Stop)_" onclick="stopArray(this.form)"<?if ($parity||$mover||$btrfs):?> disabled<?endif;?>></td>
|
||||
<td id="stop">**_(Stop)_** _(will take the array off-line)_.<?=$parity?:$mover?:$btrfs?:''?></td></tr>
|
||||
<? if ($var['fsNumUnmountable']>0):?>
|
||||
<tr><td><strong>Unmountable disk<?=$var['fsNumUnmountable']==1?'':'s'?> present:</strong><br>
|
||||
<tr><td>**<?=_('Unmountable disk'.($var['fsNumUnmountable']==1?'':'s').' present')?>:**<br>
|
||||
<? foreach ($disks as $disk) if (strpos($disk['fsStatus'],'Unmountable')!==false)
|
||||
echo "<span class='blue-text'>".my_disk($disk['name'])."</span> • ".my_id($disk['id'])." (".$disk['device'].")<br>";?>
|
||||
</td><td><input type="submit" id="btnFormat" name="cmdFormat" value="Format" disabled><input type="hidden" name="unmountable_mask" value="<?=$var['fsUnmountableMask']?>"></td>
|
||||
<td><strong>Format</strong> will create a file system in all <strong>Unmountable</strong> disks.<br>
|
||||
</td><td><input type="submit" id="btnFormat" name="cmdFormat" value="_(Format)_" disabled><input type="hidden" name="unmountable_mask" value="<?=$var['fsUnmountableMask']?>"></td>
|
||||
<td>**_(Format)_** _(will create a file system in all **Unmountable** disks)_.<br>
|
||||
<a class="info none img nohand"><input type="checkbox" name="confirmFormat" value="OFF" onclick="formatWarning(this.checked),$('#btnFormat').prop('disabled',!arrayOps.confirmFormat.checked)">
|
||||
<small>Yes I want to do this</small></a>
|
||||
<small>_(Yes, I want to do this)_</small></a>
|
||||
</td></tr>
|
||||
<? endif;
|
||||
if (!$var['mdResyncPos']):
|
||||
if (strstr($var['mdResyncAction'],"recon")):?>
|
||||
<tr><td></td><td><input type="submit" name="cmdCheck" value="Sync"></td><td><strong>Sync</strong> will start <strong>Parity-Sync</strong> and/or <strong>Data-Rebuild</strong>.</td></tr>
|
||||
<tr><td></td><td><input type="submit" name="cmdCheck" value="_(Sync)_"></td><td>**_(Sync)_** _(will start **Parity-Sync** and/or **Data-Rebuild**)_.</td></tr>
|
||||
<? elseif (strstr($var['mdResyncAction'],"clear")):?>
|
||||
<tr><td></td><td><input type="submit" name="cmdCheck" value="Clear"></td><td><strong>Clear</strong> will start <strong>Clearing</strong> new data disk(s).</td></tr>
|
||||
<tr><td></td><td><input type="submit" name="cmdCheck" value="_(Clear)_"></td><td>**_(Clear)_** _(will start **Clearing** new data disk(s))_.</td></tr>
|
||||
<? else:
|
||||
if ($var['mdResyncAction']=="check"):?>
|
||||
<tr><td></td><td><input type="submit" name="cmdCheck" value="Check"></td><td><strong>Check</strong> will start <strong>Read-Check</strong> of all array disks.</td></tr>
|
||||
<tr><td></td><td><input type="submit" name="cmdCheck" value="_(Check)_"></td><td>**_(Check)_** _ (will start **Read-Check** of all array disks)_.</td></tr>
|
||||
<? elseif (strstr($var['mdResyncAction'],"check")):?>
|
||||
<tr><td>Parity is valid.</td><td><input type="submit" name="cmdCheck" value="Check"></td><td><strong>Check</strong> will start <strong>Parity-Check</strong>. <a href="/Main/Scheduler"<?if ($tabbed):?> onclick="$.cookie('one','tab1',{path:'/'})"<?endif;?>>(Schedule)</a>
|
||||
<br><input type="checkbox" name="optionCorrect" value="correct" checked><small>Write corrections to parity</small></td></tr>
|
||||
<tr><td>_(Parity is valid)_.</td><td><input type="submit" name="cmdCheck" value="_(Check)_"></td><td>**_(Check)_** _(will start **Parity-Check**)_. <a href="/Main/Scheduler"<?if ($tabbed):?> onclick="$.cookie('one','tab1',{path:'/'})"<?endif;?>>(_(Schedule)_)</a>
|
||||
<br><input type="checkbox" name="optionCorrect" value="correct" checked><small>_(Write corrections to parity)_</small></td></tr>
|
||||
<? endif;?>
|
||||
<tr><td></td><td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,900,false)"></td>
|
||||
<tr><td></td><td><input type="button" value="_(History)_" onclick="openBox('/webGui/include/ParityHistory.php','_(Parity/Read-Check History)_',600,900,false)"></td>
|
||||
<? if ($var['sbSyncExit']!=0):?>
|
||||
<td>Last check incomplete on <strong><?=my_time($var['sbSynced2']).day_count($var['sbSynced2'])?></strong><?if ($var['sbSynced2']):?>, finding <strong><?=$var['sbSyncErrs']?></strong> error<?=$var['sbSyncErrs']==1?'':'s'?>.<?endif;?>
|
||||
<br><i class="fa fa-dot-circle-o icon"></i><small>Error code: <?=my_error($var['sbSyncExit'])?></small></td></tr>
|
||||
<td class="wrap"><?=sprintf(_('Last check incomplete on **%s**'),my_lang(my_time($var['sbSynced2']).my_lang(day_count($var['sbSynced2']),1)))?><?if ($var['sbSynced2']):?><br><?=sprintf(_('Finding **%s** error'.($var['sbSyncErrs']==1?'':'s')),$var['sbSyncErrs']?:'0')?><?endif;?>
|
||||
<i class="fa fa-fw fa-dot-circle-o"></i>_(Error code)_: <?=my_error($var['sbSyncExit'])?></td></tr>
|
||||
<? elseif ($var['sbSynced']==0):
|
||||
list($date,$duration,$speed,$status,$error) = last_parity_log();?>
|
||||
[$date,$duration,$speed,$status,$error] = last_parity_log();?>
|
||||
<? if ($status==0):?>
|
||||
<td>Last checked on <strong><?=my_time($date).day_count($date)?></strong>, finding <strong><?=$error?></strong> error<?=$error==1?'':'s'?>.
|
||||
<br><i class="fa fa-clock-o icon"></i><small>Duration: <?=my_check($duration,$speed)?></small></td></tr>
|
||||
<td class="wrap"><?=sprintf(_('Last checked on **%s**'),my_lang(my_time($date).my_lang(day_count($date),1)))?><br><?=sprintf(_('Finding **%s** error'.($error==1?'':'s')),$error?:'0')?>
|
||||
<i class="fa fa-fw fa-clock-o"></i>_(Duration)_: <?=my_lang(my_check($duration,$speed),2)?></td></tr>
|
||||
<? else:?>
|
||||
<td>Last check incomplete on <strong><?=my_time($date).day_count($date)?></strong>, finding <strong><?=$error?></strong> error<?=$error==1?'':'s'?>.
|
||||
<br><i class="fa fa-dot-circle-o icon"></i><small>Error code: <?=my_error($status)?></small></td></tr>
|
||||
<td class="wrap"><?=sprintf(_('Last check incomplete on **%s**'),my_lang(my_time($date).my_lang(day_count($date),1)))?><br><?=sprintf(_('Finding **%s** error'.($error==1?'':'s')),$error?:'0')?>
|
||||
<i class="fa fa-fw fa-dot-circle-o"></i>_(Error code)_: <?=my_error($status)?></td></tr>
|
||||
<? endif;
|
||||
elseif ($var['sbSynced2']==0):
|
||||
list($date,$duration,$speed,$status,$error) = explode('|', read_parity_log($var['sbSynced']));
|
||||
[$date,$duration,$speed,$status,$error] = explode('|', read_parity_log($var['sbSynced']));
|
||||
if ($status==0):?>
|
||||
<td>Last checked on <strong><?=my_time($var['sbSynced']).day_count($var['sbSynced'])?></strong>, finding <strong><?=$error?></strong> error<?=$error==1?'':'s'?>.
|
||||
<br><i class="fa fa-clock-o icon"></i><small>Duration: <?=my_check($duration,$speed)?></small></td></tr>
|
||||
<td class="wrap"><?=sprintf(_('Last checked on **%s**'),my_lang(my_time($var['sbSynced']).my_lang(day_count($var['sbSynced']),1)))?><br><?=sprintf(_('Finding **%s** error'.($error==1?'':'s')),$error?:'0')?>
|
||||
<i class="fa fa-fw fa-clock-o"></i>_(Duration)_: <?=my_lang(my_check($duration,$speed),2)?></td></tr>
|
||||
<? else:?>
|
||||
<td>Last check incomplete on <strong><?=my_time($var['sbSynced']).day_count($var['sbSynced'])?></strong>, finding <strong><?=$error?></strong> error<?=$error==1?'':'s'?>.
|
||||
<br><i class="fa fa-dot-circle-o icon"></i><small>Error code: <?=my_error($status)?></small></td></tr>
|
||||
<td class="wrap"><?=sprintf(_('Last check incomplete on **%s**'),my_lang(my_time($var['sbSynced']).my_lang(day_count($var['sbSynced']),1)))?><br><?=sprintf(_('Finding **%s** error'.($error==1?'':'s')),$error?:'0')?>
|
||||
<i class="fa fa-fw fa-dot-circle-o"></i>_(Error code)_: <?=my_error($status)?></td></tr>
|
||||
<? endif;
|
||||
else:
|
||||
$duration = $var['sbSynced2']-$var['sbSynced'];
|
||||
$speed = $duration?my_scale($var['mdResyncSize']*1024/$duration,$unit,1)." $unit/sec":'';?>
|
||||
<td>Last check completed on <strong><?=my_time($var['sbSynced2']).day_count($var['sbSynced2'])?></strong>, finding <strong><?=$var['sbSyncErrs']?></strong> error<?=$var['sbSyncErrs']==1?'':'s'?>.
|
||||
<br><i class="fa fa-clock-o icon"></i><small>Duration: <?=my_check($duration,$speed)?></small></td></tr>
|
||||
<td class="wrap"><?=sprintf(_('Last check completed on **%s**'),my_lang(my_time($var['sbSynced2']).my_lang(day_count($var['sbSynced2']),1)))?><br><?=sprintf(_('Finding **%s** error'.($var['sbSyncErrs']==1?'':'s')),$var['sbSyncErrs']?:'0')?>
|
||||
<i class="fa fa-fw fa-clock-o"></i>_(Duration)_: <?=my_lang(my_check($duration,$speed),2)?></td></tr>
|
||||
<? endif;
|
||||
endif;
|
||||
else:
|
||||
if ($var['mdResyncAction']=="check"):?>
|
||||
<tr><td>Read-Check in progress.</td><td>
|
||||
<input type="button" id="pauseButton"<?if ($var['mdResync']):?> value="Pause" onclick="pauseParity(this.form)"<?else:?> value="Resume" onclick="resumeParity(this.form)"<?endif;?>>
|
||||
<input type="button" id="cancelButton" value="Cancel" onclick="stopParity(this.form,'Read-Check')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop the Read-Check.</td></tr>
|
||||
<tr><td>_(Read-Check in progress)_.</td><td>
|
||||
<input type="button" id="pauseButton"<?if ($var['mdResync']):?> value="_(Pause)_" onclick="pauseParity(this.form)"<?else:?> value="_(Resume)_" onclick="resumeParity(this.form)"<?endif;?>>
|
||||
<input type="button" id="cancelButton" value="_(Cancel)_" onclick="stopParity(this.form,'Read-Check')"></td>
|
||||
<td id="cancelText"><?if ($var['mdResync']):?>**_(Pause)_** _(will pause the Read-Check)_.<?else:?>**_(Resume)_** _(will resume the paused Read-Check)_.<?endif;?><br>**_(Cancel)_** _(will stop the Read-Check)_.</td></tr>
|
||||
<? elseif (strstr($var['mdResyncAction'],"check")):?>
|
||||
<tr><td>Parity-Check in progress.</td><td>
|
||||
<input type="button" id="pauseButton"<?if ($var['mdResync']):?> value="Pause" onclick="pauseParity(this.form)"<?else:?> value="Resume" onclick="resumeParity(this.form)"<?endif;?>>
|
||||
<input type="button" id="cancelButton" value="Cancel" onclick="stopParity(this.form,'Parity-Check')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop the Parity-Check.</td></tr>
|
||||
<tr><td>_(Parity-Check in progress)_.</td><td>
|
||||
<input type="button" id="pauseButton"<?if ($var['mdResync']):?> value="_(Pause)_" onclick="pauseParity(this.form)"<?else:?> value="_(Resume)_" onclick="resumeParity(this.form)"<?endif;?>>
|
||||
<input type="button" id="cancelButton" value="_(Cancel)_" onclick="stopParity(this.form,'Parity-Check')"></td>
|
||||
<td id="cancelText"><?if ($var['mdResync']):?>**_(Pause)_** _(will pause the Parity-Check)_.<?else:?>**_(Resume)_** _(will resume the paused Parity-Check)_.<?endif;?><br>**_(Cancel)_** _(will stop the Parity-Check)_.</td></tr>
|
||||
<? elseif (strstr($var['mdResyncAction'],"recon")):?>
|
||||
<tr><td>Parity-Sync/Data-Rebuild in progress.</td><td>
|
||||
<input type="button" id="pauseButton"<?if ($var['mdResync']):?> value="Pause" onclick="pauseParity(this.form)"<?else:?> value="Resume" onclick="resumeParity(this.form)"<?endif;?>>
|
||||
<input type="button" id="cancelButton" value="Cancel" onclick="stopParity(this.form,'Parity-Sync/Data-Rebuild')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop Parity-Sync/Data-Rebuild.
|
||||
<br>WARNING: canceling may leave the array unprotected!</td></tr>
|
||||
<tr><td>_(Parity-Sync/Data-Rebuild in progress)_.</td><td>
|
||||
<input type="button" id="pauseButton"<?if ($var['mdResync']):?> value="_(Pause)_" onclick="pauseParity(this.form)"<?else:?> value="_(Resume)_" onclick="resumeParity(this.form)"<?endif;?>>
|
||||
<input type="button" id="cancelButton" value="_(Cancel)_" onclick="stopParity(this.form,'Parity-Sync/Data-Rebuild')"></td>
|
||||
<td id="cancelText"><?if ($var['mdResync']):?>**_(Pause)_** _(will pause the Parity-Sync/Data-Rebuild)_.<?else:?>**_(Resume)_** _(will resume the paused Parity-Sync/Data-Rebuild)_.<?endif;?><br>**_(Cancel)_** _(will stop Parity-Sync/Data-Rebuild)_.
|
||||
<br>_(WARNING: canceling may leave the array unprotected)_!</td></tr>
|
||||
<? elseif (strstr($var['mdResyncAction'],"clear")):?>
|
||||
<tr><td>Clearing in progress.</td><td>
|
||||
<input type="button" id="pauseButton"<?if ($var['mdResync']):?> value="Pause" onclick="pauseParity(this.form)"<?else:?> value="Resume" onclick="resumeParity(this.form)"<?endif;?>>
|
||||
<input type="button" id="cancelButton" value="Cancel" onclick="stopParity(this.form,'Clearing')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop Clearing.</td></tr>
|
||||
<tr><td>_(Clearing in progress)_.</td><td>
|
||||
<input type="button" id="pauseButton"<?if ($var['mdResync']):?> value="_(Pause)_" onclick="pauseParity(this.form)"<?else:?> value="_(Resume)_" onclick="resumeParity(this.form)"<?endif;?>>
|
||||
<input type="button" id="cancelButton" value="_(Cancel)_" onclick="stopParity(this.form,'Clearing')"></td>
|
||||
<td id="cancelText"><?if ($var['mdResync']):?>**_(Pause)_** _(will pause the Clearing)_.<?else:?>**_(Resume)_** _(will resume the paused Clearing)_.<?endif;?><br>**_(Cancel)_** _(will stop Clearing)_.</td></tr>
|
||||
<? endif;?>
|
||||
<tr><td></td><td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,900,false)"></td><td>Current operation <?if ($var['mdResync']):?>started<?else:?>paused<?endif;?> on <strong><?=my_time($var['sbUpdated'])?></strong></td></tr>
|
||||
<tr><td>Total size:</td><td id="line0"></td><td></td></tr>
|
||||
<tr><td>Elapsed time:</td><td id="line1"></td><td></td></tr>
|
||||
<tr><td>Current position:</td><td id="line2"></td><td></td></tr>
|
||||
<tr><td>Estimated speed:</td><td id="line3"></td><td></td></tr>
|
||||
<tr><td>Estimated finish:</td><td id="line4"></td><td></td></tr>
|
||||
<tr><td></td><td><input type="button" value="_(History)_" onclick="openBox('/webGui/include/ParityHistory.php','_(Parity/Read-Check History)_',600,900,false)"></td>
|
||||
<td><?=sprintf(_('Current operation %s on **%s**'),($var['mdResync']?_('started'):_('paused')),my_lang(my_time($var['sbUpdated']).my_lang(day_count($var['sbSynced']),1)))?></td></tr>
|
||||
<tr><td>_(Total size)_:</td><td id="line0"></td><td></td></tr>
|
||||
<tr><td>_(Elapsed time)_:</td><td id="line1"></td><td></td></tr>
|
||||
<tr><td>_(Current position)_:</td><td id="line2"></td><td></td></tr>
|
||||
<tr><td>_(Estimated speed)_:</td><td id="line3"></td><td></td></tr>
|
||||
<tr><td>_(Estimated finish)_:</td><td id="line4"></td><td></td></tr>
|
||||
<? if (strstr($var['mdResyncAction'],"check ")):?>
|
||||
<tr><td>Sync errors <?if ($var['mdResyncCorr']==0):?>detected:<?else:?>corrected:<?endif;?></td><td id="line5"></td><td></td></tr>
|
||||
<tr><td>_(Sync errors)_ <?if ($var['mdResyncCorr']==0):?>_(detected)_:<?else:?>_(corrected)_:<?endif;?></td><td id="line5"></td><td></td></tr>
|
||||
<? endif;
|
||||
endif;
|
||||
break;
|
||||
case "Starting":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Starting...</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td><td></td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Starting)_...**</td><td><input type="submit" name="cmdStart" value="_(Start)_" disabled></td><td></td></tr>
|
||||
<? break;
|
||||
case "Formatting":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Started, formatting...</span></td><td><input type="submit" name="cmdStop" value="Stop" disabled></td><td></td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Started, formatting)_...**</td><td><input type="submit" name="cmdStop" value="_(Stop)_" disabled></td><td></td></tr>
|
||||
<? break;
|
||||
case "Copying":?>
|
||||
<tr><td><?status_indicator()?><span id="fsState" class="strong big">Copying, <?=$var['fsCopyPrcnt']?>% complete...</span></td><td><input type="submit" name="cmdNoCopy" value="Cancel"></td><td></td></tr>
|
||||
<tr><td><?status_indicator()?><span id="fsState">**_(Copying)_, <?=$var['fsCopyPrcnt']?>% _(complete)_...**</span></td><td><input type="submit" name="cmdNoCopy" value="_(Cancel)_"></td><td></td></tr>
|
||||
<? break;
|
||||
case "Clearing":?>
|
||||
<tr><td><?status_indicator()?><span id="fsState" class="strong big">Clearing, <?=$var['fsClearPrcnt']?>% complete...</span></td><td><input type="submit" name="cmdNoClear" value="Cancel"></td><td></td></tr>
|
||||
<tr><td><?status_indicator()?><span id="fsState">**_(Clearing)_, <?=$var['fsClearPrcnt']?>% _(complete)_...**</span></td><td><input type="submit" name="cmdNoClear" value="_(Cancel)_"></td><td></td></tr>
|
||||
<? break;
|
||||
case "Stopping":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopping...</span></td><td><input type="submit" name="cmdStop" value="Stop" disabled></td><td></td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopping)_...**</td><td><input type="submit" name="cmdStop" value="_(Stop)_" disabled></td><td></td></tr>
|
||||
<? break;
|
||||
case "Stopped":
|
||||
if ($var['configValid']=="error"):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped.</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Invalid, missing or expired <a href="/Tools/Registration">registration key</a>.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_.**</td><td><input type="submit" name="cmdStart" value="_(Start)_" disabled></td>
|
||||
<td>_(Invalid, missing or expired)_ <a href="/Tools/Registration">_(registration key)_</a>.</td></tr>
|
||||
<? elseif ($var['configValid']=="invalid"):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped.</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Too many attached devices. Please consider upgrading your <a href="/Tools/Registration">registration key</a>.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_.**</td><td><input type="submit" name="cmdStart" value="_(Start)_" disabled></td>
|
||||
<td>_(Too many attached devices. Please consider upgrading your)_ <a href="/Tools/Registration">_(registration key)_</a>.</td></tr>
|
||||
<? elseif ($var['configValid']=="nokeyserver"):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped.</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Cannot contact key-server. Please check your <a href="/Settings/NetworkSettings">network settings</a>.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_.**</td><td><input type="submit" name="cmdStart" value="_(Start)_" disabled></td>
|
||||
<td>_(Cannot contact key-server. Please check your)_ <a href="/Settings/NetworkSettings">_(network settings)_</a>.</td></tr>
|
||||
<? elseif ($var['configValid']=="withdrawn"):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped.</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>This Unraid OS release has been withdrawn and may no longer be used. Please <a href="/Plugins">update</a> your server.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_.**</td><td><input type="submit" name="cmdStart" value="_(Start)_" disabled></td>
|
||||
<td>_(This Unraid OS release has been withdrawn and may no longer be used. Please)_ <a href="/Plugins">_(update)_</a> _(your server)_.</td></tr>
|
||||
<? else:
|
||||
switch ($var['mdState']):
|
||||
case "STOPPED":
|
||||
if (strstr($var['mdResyncAction'],"recon")):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"></td>
|
||||
<td><strong>Start</strong> will bring the array on-line and start <strong>Parity-Sync</strong> and/or <strong>Data-Rebuild</strong>.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Configuration valid)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="prepareInput(this.form)"></td>
|
||||
<td>**_(Start)_** _(will bring the array on-line and start **Parity-Sync** and/or **Data-Rebuild**)_.</td></tr>
|
||||
<? elseif ($var['mdResyncAction']=="clear"):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. New data disk(s) detected.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"></td>
|
||||
<td><strong>Start</strong> will bring the array on-line and start <strong>Clearing</strong> new data disk(s).</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(New data disk(s) detected)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="prepareInput(this.form)"></td>
|
||||
<td>**_(Start)_** _(will bring the array on-line and start **Clearing** new data disk(s))_.</td></tr>
|
||||
<? elseif ($var['sbClean']!="yes" && $var['mdResyncAction']=="check"):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Unclean shutdown detected.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"></td>
|
||||
<td><strong>Start</strong> will bring the array on-line.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Unclean shutdown detected)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="prepareInput(this.form)"></td>
|
||||
<td>**_(Start)_** _(will bring the array on-line)_.</td></tr>
|
||||
<? elseif ($var['sbClean']!="yes" && strstr($var['mdResyncAction'],"check")):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Unclean shutdown detected.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"></td>
|
||||
<td><strong>Start</strong> will bring the array on-line and start <strong>Parity-Check</strong>.
|
||||
<br><input type="checkbox" name="optionCorrect" value="correct" checked><small>Write corrections to parity</small></td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Unclean shutdown detected)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="prepareInput(this.form)"></td>
|
||||
<td>**_(Start)_** _(will bring the array on-line and start **Parity-Check**)_.
|
||||
<br><input type="checkbox" name="optionCorrect" value="correct" checked><small>_(Write corrections to parity)_</small></td></tr>
|
||||
<? elseif (missing_cache()):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Missing Cache disk.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)" disabled></td>
|
||||
<td><strong>Start</strong> will remove the missing cache disk and then bring the array on-line.
|
||||
<br><input type="checkbox" name="confirmStart" value="OFF" onclick="$('#cmdStart').prop('disabled',!arrayOps.confirmStart.checked)"><small>Yes I want to do this</small></td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Missing Cache disk)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="prepareInput(this.form)" disabled></td>
|
||||
<td>**_(Start)_** _(will remove the missing cache disk and then bring the array on-line)_.
|
||||
<br><input type="checkbox" name="confirmStart" value="OFF" onclick="$('#cmdStart').prop('disabled',!arrayOps.confirmStart.checked)"><small>_(Yes, I want to do this)_</small></td></tr>
|
||||
<? else:?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"></td>
|
||||
<td><strong>Start</strong> will bring the array on-line.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Configuration valid)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="prepareInput(this.form)"></td>
|
||||
<td>**_(Start)_** _(will bring the array on-line)_.</td></tr>
|
||||
<? endif;
|
||||
maintenance_mode();
|
||||
check_encryption();
|
||||
break;
|
||||
case "NEW_ARRAY":
|
||||
if (strpos($disks['parity']['status'],"DISK_NP")===0 && strpos($disks['parity2']['status'],"DISK_NP")===0):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"></td>
|
||||
<td><strong>Start</strong> will record all disk information and bring the array on-line.
|
||||
<br>The array will be immediately available, but <strong>unprotected</strong> since <em>parity</em> has not been assigned.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Configuration valid)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="prepareInput(this.form)"></td>
|
||||
<td>**_(Start)_** _(will record all disk information and bring the array on-line)_.
|
||||
<br>_(The array will be immediately available, but **unprotected** since *parity* has not been assigned)_.</td></tr>
|
||||
<? else:?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td><td><input type="button" id="cmdStart" value="Start" onclick="parityWarning(this.form)"></td>
|
||||
<td><strong>Start</strong> will record all disk information, bring the array on-line, and start Parity-Sync.
|
||||
<br>The array will be immediately available, but <strong>unprotected</strong> until Parity-Sync completes.
|
||||
<br><input type="checkbox" name="md_invalidslot" value="99">Parity is already valid.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Configuration valid)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="parityWarning(this.form)"></td>
|
||||
<td>**_(Start)_** _(will record all disk information, bring the array on-line, and start Parity-Sync)_.
|
||||
<br>_(The array will be immediately available, but **unprotected** until Parity-Sync completes)_.
|
||||
<br><input type="checkbox" name="md_invalidslot" value="99">_(Parity is already valid)_.</td></tr>
|
||||
<? endif;
|
||||
maintenance_mode();
|
||||
check_encryption();
|
||||
break;
|
||||
case "DISABLE_DISK":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Missing disk.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)" disabled></td>
|
||||
<td><strong>Start</strong> will disable the missing disk and then bring the array on-line. Install a replacement disk as soon as possible.
|
||||
<br><input type="checkbox" name="confirmStart" value="OFF" onclick="$('#cmdStart').prop('disabled',!arrayOps.confirmStart.checked)"><small>Yes I want to do this</small></td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Missing disk)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="prepareInput(this.form)" disabled></td>
|
||||
<td>**_(Start)_** _(will disable the missing disk and then bring the array on-line. Install a replacement disk as soon as possible)_.
|
||||
<br><input type="checkbox" name="confirmStart" value="OFF" onclick="$('#cmdStart').prop('disabled',!arrayOps.confirmStart.checked)"><small>_(Yes, I want to do this)_</small></td></tr>
|
||||
<? maintenance_mode();
|
||||
check_encryption();
|
||||
break;
|
||||
case "RECON_DISK":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Replacement disk installed.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"></td>
|
||||
<td><strong>Start</strong> will start <strong>Parity-Sync</strong> and/or <strong>Data-Rebuild</strong>.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Replacement disk installed)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="prepareInput(this.form)"></td>
|
||||
<td>**_(Start)_** _(will start **Parity-Sync** and/or **Data-Rebuild**)_.</td></tr>
|
||||
<? maintenance_mode();
|
||||
check_encryption();
|
||||
break;
|
||||
case "SWAP_DSBL":
|
||||
if ($var['fsCopyPrcnt']=="100"):?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Upgrading disk/swapping parity.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"></td>
|
||||
<td><strong>Start</strong> will expand the file system of the data disk (if possible); then bring the array on-line and start Data-Rebuild.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Upgrading disk/swapping parity)_.</td><td><input type="button" id="cmdStart" value="_(Start)_" onclick="prepareInput(this.form)"></td>
|
||||
<td>**_(Start)_** _(will expand the file system of the data disk (if possible); then bring the array on-line and start Data-Rebuild)_.</td></tr>
|
||||
<? maintenance_mode();
|
||||
check_encryption();
|
||||
else:?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Upgrading disk/swapping parity.</td><td><input type="submit" name="cmdCopy" value="Copy" disabled></td>
|
||||
<td><strong>Copy</strong> will copy the parity information to the new <em>parity</em> disk.
|
||||
<br>Once copy completes, the array may be Started, to initiate Data-Rebuild of the disabled disk.
|
||||
<br><input type="checkbox" name="confirmStart" value="OFF" onclick="arrayOps.cmdCopy.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Upgrading disk/swapping parity)_.</td><td><input type="submit" name="cmdCopy" value="_(Copy)_" disabled></td>
|
||||
<td>**_(Copy)_** _(will copy the parity information to the new *parity* disk)_.
|
||||
<br>_(Once copy completes, the array may be Started, to initiate Data-Rebuild of the disabled disk)_.
|
||||
<br><input type="checkbox" name="confirmStart" value="OFF" onclick="arrayOps.cmdCopy.disabled=!arrayOps.confirmStart.checked"><small>_(Yes, I want to do this)_</small></td></tr>
|
||||
<? endif;
|
||||
break;
|
||||
case "ERROR:INVALID_EXPANSION":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Invalid expansion.</td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>You may not add new disk(s) and also remove existing disk(s).</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Invalid expansion)_.</td><td><input type="submit" name="cmdStart" value="_(Start)_" disabled></td>
|
||||
<td>_(You may not add new disk(s) and also remove existing disk(s))_.</td></tr>
|
||||
<? break;
|
||||
case "ERROR:NEW_DISK_TOO_SMALL":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Replacement disk is too small.</td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>The replacement disk must be as big or bigger than the original.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Replacement disk is too small)_.</td><td><input type="submit" name="cmdStart" value="_(Start)_" disabled></td>
|
||||
<td>_(The replacement disk must be as big or bigger than the original)_.</td></tr>
|
||||
<? break;
|
||||
case "ERROR:PARITY_NOT_BIGGEST":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Disk in parity slot is not biggest.</td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>If this is a new array, move the largest disk into the <em>parity</em> slot.
|
||||
<br>If you are adding a new disk or replacing a disabled disk, try Parity-Swap.</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Disk in parity slot is not biggest)_.</td><td><input type="submit" name="cmdStart" value="_(Start)_" disabled></td>
|
||||
<td>_(If this is a new array, move the largest disk into the *parity* slot)_.
|
||||
<br>_(If you are adding a new disk or replacing a disabled disk, try Parity-Swap)_.</td></tr>
|
||||
<? break;
|
||||
case "ERROR:TOO_MANY_MISSING_DISKS":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. Invalid configuration.</td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Too many wrong and/or missing disks!</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _(Invalid configuration)_.</td><td><input type="submit" name="cmdStart" value="_(Start)_" disabled></td>
|
||||
<td>_(Too many wrong and/or missing disks)_!</td></tr>
|
||||
<? break;
|
||||
case "ERROR:NO_DATA_DISKS":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Stopped</span>. No data disks.</td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>No array data disks have been assigned!</td></tr>
|
||||
<tr><td><?status_indicator()?>**_(Stopped)_**. _ (No data disks)_.</td><td><input type="submit" name="cmdStart" value="_(Start)_" disabled></td>
|
||||
<td>_(No array data disks have been assigned)_!</td></tr>
|
||||
<? break;
|
||||
endswitch;
|
||||
endif;
|
||||
@@ -492,27 +498,27 @@ function formatWarning(val) {
|
||||
<form name="delete_keyfile" method="POST" action="/update.php" target="progressFrame">
|
||||
<input type="hidden" name="#file" value="unused">
|
||||
<input type="hidden" name="#include" value="webGui/include/KeyUpload.php">
|
||||
<table class="array_status noshift">
|
||||
<tr><td></td><td><input type="submit" name="#apply" value="Delete" disabled></td><td><strong>Delete</strong> will delete the encryption keyfile.
|
||||
<br><input type="checkbox" onchange="toggleApply(this.checked)"><small>Yes I want to do this</small></td></tr>
|
||||
<table markdown="1" class="array_status noshift">
|
||||
<tr><td></td><td><input type="submit" name="#apply" value="_(Delete)_" disabled></td><td>**_(Delete)_** _(will delete the encryption keyfile)_.
|
||||
<br><input type="checkbox" onchange="toggleApply(this.checked)"><small>_(Yes, I want to do this)_</small></td></tr>
|
||||
<tr><td></td><td class="line" colspan="2"></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?endif;?><!-- markdown fix -->
|
||||
<table class="array_status noshift">
|
||||
<tr><td></td><td><input type="button" id="button-up" onclick="$('[id^=button-]').prop('disabled',true);toggle_state('up')" value="Spin Up"<?=$parity?' disabled':''?>><input type="button" id="button-down" onclick="$('[id^=button-]').prop('disabled',true);toggle_state('down')" value="Spin Down"<?=$parity?' disabled':''?>></td>
|
||||
<td><strong>Spin Up</strong> will immediately spin up all disks.<br><strong>Spin Down</strong> will immediately spin down all disks.</td></tr>
|
||||
<tr><td></td><td><input type="button" value="Clear Stats" onclick="toggle_state('Clear')"></td><td><strong>Clear Stats</strong> will immediately clear all disk statistics.</td></tr>
|
||||
<table markdown="1" class="array_status noshift">
|
||||
<tr><td></td><td><input type="button" id="button-up" onclick="$('[id^=button-]').prop('disabled',true);toggle_state('up')" value="_(Spin Up)_"<?=$parity?' disabled':''?>><input type="button" id="button-down" onclick="$('[id^=button-]').prop('disabled',true);toggle_state('down')" value="_(Spin Down)_"<?=$parity?' disabled':''?>></td>
|
||||
<td>**_(Spin Up)_** _(will immediately spin up all disks)_.<br>**_(Spin Down)_** _(will immediately spin down all disks)_.</td></tr>
|
||||
<tr><td></td><td><input type="button" value="_(Clear Stats)_" onclick="toggle_state('Clear')"></td><td>**_(Clear Stats)_** _(will immediately clear all disk statistics)_.</td></tr>
|
||||
<tr><td></td><td class="line" colspan="2"></td></tr>
|
||||
</table>
|
||||
<?if ($var['shareCacheEnabled']=="yes" && is_dir("/mnt/cache")):?>
|
||||
<form name="mover_schedule" method="POST" action="/update.htm" target="progressFrame">
|
||||
<table class="array_status noshift">
|
||||
<table markdown="1" class="array_status noshift">
|
||||
<tr><td></td>
|
||||
<?if ($mover):?>
|
||||
<td><input type="submit" name="cmdStartMover" value="Move" disabled></td><td>Disabled - Mover is running.</td>
|
||||
<td><input type="submit" name="cmdStartMover" value="_(Move)_" disabled></td><td>_(Disabled)_ - _(Mover is running)_.</td>
|
||||
<?else:?>
|
||||
<td><input type="submit" name="cmdStartMover" value="Move"></td><td><strong>Move</strong> will immediately invoke the Mover. <a href="/Main/Scheduler"<?if ($tabbed):?> onclick="$.cookie('one','tab2',{path:'/'})"<?endif;?>>(Schedule)</a></td>
|
||||
<td><input type="submit" name="cmdStartMover" value="_(Move)_"></td><td>**_(Move)_** _(will immediately invoke the Mover)_. <a href="/Main/Scheduler"<?if ($tabbed):?> onclick="$.cookie('one','tab2',{path:'/'})"<?endif;?>>(_(Schedule)_)</a></td>
|
||||
<?endif;?>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -522,16 +528,16 @@ function formatWarning(val) {
|
||||
<form name="delete_keyfile" method="POST" action="/update.php" target="progressFrame">
|
||||
<input type="hidden" name="#file" value="unused">
|
||||
<input type="hidden" name="#include" value="webGui/include/KeyUpload.php">
|
||||
<table class="array_status noshift">
|
||||
<tr><td></td><td><input type="submit" name="#apply" value="Delete"></td><td><strong>Delete</strong> will delete the encryption keyfile.</td></tr>
|
||||
<table markdown="1" class="array_status noshift">
|
||||
<tr><td></td><td><input type="submit" name="#apply" value="_(Delete)_"></td><td>**_(Delete)_** _(will delete the encryption keyfile)_.</td></tr>
|
||||
<tr><td></td><td class="line" colspan="2"></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?endif;?><!-- markdown fix -->
|
||||
<form name="shutdownOps" method="POST" action="/webGui/include/Boot.php">
|
||||
<table class="array_status noshift">
|
||||
<tr><td></td><td><input type="button" name="reboot" value="Reboot" onclick="shutdown_now(this.form,'reboot')"><input type="button" name="shutdown" value="Shutdown" onclick="shutdown_now(this.form,'shutdown')"></td>
|
||||
<td><strong>Reboot</strong> will activate a <em>clean</em> system reset.<br><strong>Shutdown</strong> will activate a <em>clean</em> system power down.</td></tr>
|
||||
<table markdown="1" class="array_status noshift">
|
||||
<tr><td></td><td><input type="button" name="reboot" value="_(Reboot)_" onclick="shutdown_now(this.form,'reboot')"><input type="button" name="shutdown" value="_(Shutdown)_" onclick="shutdown_now(this.form,'shutdown')"></td>
|
||||
<td>**_(Reboot)_** _(will activate a *clean* system reset)_.<br>**_(Shutdown)_** _(will activate a *clean* system power down)_.</td></tr>
|
||||
<tr><td></td><td class="line" colspan="2"></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
@@ -555,6 +561,7 @@ enable_stop();
|
||||
</script>
|
||||
<?endif;?>
|
||||
|
||||
:help6
|
||||
> **Colored Status Indicator** the significance of the color indicator of the *Array* is as follows:
|
||||
>
|
||||
> <i class='fa fa-circle orb green-orb'></i>Array is Started and Parity is valid.
|
||||
@@ -565,7 +572,9 @@ enable_stop();
|
||||
>
|
||||
> <i class='fa fa-warning orb grey-orb'></i>Array is Stopped, Parity is invalid.
|
||||
>
|
||||
:end
|
||||
<?if ($var['fsState'] == "Stopped"):?>
|
||||
:help7
|
||||
> #### Assigning Devices
|
||||
>
|
||||
> An Unraid disk array consists of a single parity disk and a number of data disks. The data
|
||||
@@ -621,9 +630,11 @@ enable_stop();
|
||||
>
|
||||
> Once you have assigned all of your hard drives, refer to the Array Status section below
|
||||
> and Start the array.
|
||||
:end
|
||||
|
||||
<?if ($encrypt):?>
|
||||
<div></div>
|
||||
:help8
|
||||
> #### Encryption input
|
||||
>
|
||||
> With array Stopped, the user can specify a new encryption key. Note that once a device
|
||||
@@ -647,5 +658,6 @@ enable_stop();
|
||||
> Select a local keyfile with a stored encryption key or a binary file. The maximum size of the keyfile is 8M (8388608 byte).
|
||||
>
|
||||
> **Backup** your local keyfile. **IF LOST, ENCRYPTED CONTENT CANNOT BE RECOVERED!**
|
||||
:end
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
|
||||
@@ -3,8 +3,8 @@ Title="Boot Device"
|
||||
Tag="paw"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -31,13 +31,15 @@ boot_status();
|
||||
</script>
|
||||
|
||||
<table class="disk_status wide">
|
||||
<thead><tr><td>Device</td><td>Identification</td><td>Temp.</td><td>Reads</td><td>Writes</td><td>Errors</td><td>FS</td><td>Size</td><td>Used</td><td>Free</td><td>View</td></tr></thead>
|
||||
<thead><tr><td>_(Device)_</td><td>_(Identification)_</td><td>_(Temp)_.</td><td>_(Reads)_</td><td>_(Writes)_</td><td>_(Errors)_</td><td>_(FS)_</td><td>_(Size)_</td><td>_(Used)_</td><td>_(Free)_</td><td>_(View)_</td></tr></thead>
|
||||
<tbody id="boot_device">
|
||||
<?if (isset($disks['flash'])) echo "<tr><td colspan='11'> </td></tr>";?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
:help5
|
||||
> Vital array configuration is maintained on the USB Flash device; for this reason, it must remain
|
||||
> plugged in to your server. Click on [Flash](/Main/Flash?name=flash) to see the GUID and registration
|
||||
> information, and to configure export settings. Since the USB Flash device is formatted using FAT file system,
|
||||
> it may only be exported using SMB protocol.
|
||||
:end
|
||||
|
||||
@@ -38,7 +38,7 @@ $(function(){
|
||||
});
|
||||
</script>
|
||||
<table class="indexer tablesorter shift">
|
||||
<thead><tr><th>Type</th><th class='sorter-text'>Name</th><th>Size</th><th>Last Modified</th><th>Location</th></tr></thead>
|
||||
<thead><tr><th>_(Type)_</th><th class='sorter-text'>_(Name)_</th><th>_(Size)_</th><th>_(Last Modified)_</th><th>_(Location)_</th></tr></thead>
|
||||
<tbody><tr><td colspan="5"></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" value="Done" onclick="done('Browse')">
|
||||
<input type="button" value="_(Done)_" onclick="done('Browse')">
|
||||
|
||||
@@ -17,17 +17,19 @@ Tag="icon-cpu"
|
||||
<form name="is">
|
||||
<input type="hidden" name="names" value="isolcpus">
|
||||
<table class='tablesorter shift' style='width:auto'>
|
||||
<thead><tr><th><i class="fa fa-list"></i> Isolation</th><?create()?></tr></thead>
|
||||
<thead><tr><th><i class="fa fa-list"></i> _(Isolation)_</th><?create()?></tr></thead>
|
||||
<tbody id="table-is"><?=$spinner?></tbody>
|
||||
</table>
|
||||
<input type="button" value="Apply" onclick="apply(this.form)" disabled><input type="button" value="Done" onclick="done()"><span id="wait-is" class="red-text" style="display:none"><i class="fa fa-spinner fa-spin"></i> Please wait...</span>
|
||||
<input type="button" value="_(Apply)_" onclick="apply(this.form)" disabled><input type="button" value="_(Done)_" onclick="done()"><span id="wait-is" class="red-text" style="display:none"><i class="fa fa-spinner fa-spin"></i> _(Please wait)_...</span>
|
||||
</form>
|
||||
<?if (!$safemode):?>
|
||||
<?else:?>
|
||||
<div class="notice">CPU isolation is prohibited while system is running in SAFE MODE!</div>
|
||||
<div class="notice">_(CPU isolation is prohibited while system is running in SAFE MODE)_!</div>
|
||||
<?endif;?>
|
||||
|
||||
:help3
|
||||
> CPU isolation allows the user to specify CPU cores that are to be explicitly reserved for assignment (to VMs or Docker containers).
|
||||
>
|
||||
> This is incredibly important for gaming VMs to run smoothly because even if you manually pin your Docker containers to not overlap with your gaming VM,
|
||||
> the host OS can still utilize those same cores as the guest VM needs for things like returning responses for the webGui, running a parity check, btrfs operations, etc.
|
||||
:end
|
||||
|
||||
@@ -3,8 +3,8 @@ Title="CPU Pinning Docker"
|
||||
Tag="icon-cpu"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -18,15 +18,16 @@ Tag="icon-cpu"
|
||||
<form name="ct">
|
||||
<input type="hidden" name="names" id="names-ct" value="">
|
||||
<table class='tablesorter shift' style='width:auto'>
|
||||
<thead><tr><th><i class="fa fa-list"></i> Container</th><?create()?></tr></thead>
|
||||
<thead><tr><th><i class="fa fa-list"></i> _(Container)_</th><?create()?></tr></thead>
|
||||
<tbody id="table-ct"><?=$spinner?></tbody>
|
||||
</table>
|
||||
<input type="button" value="Apply" onclick="apply(this.form)" disabled><input type="button" value="Done" onclick="done()"><span id="wait-ct" class="red-text" style="display:none"><i class="fa fa-spinner fa-spin"></i> Please wait...</span>
|
||||
<input type="button" value="_(Apply)_" onclick="apply(this.form)" disabled><input type="button" value="_(Done)_" onclick="done()"><span id="wait-ct" class="red-text" style="display:none"><i class="fa fa-spinner fa-spin"></i> _(Please wait)_...</span>
|
||||
</form>
|
||||
<?else:?>
|
||||
<div class="notice">No CPU pinning available. Docker service must be started</div>
|
||||
<div class="notice">_(No CPU pinning available. Docker service must be started)_</div>
|
||||
<?endif;?>
|
||||
|
||||
:help2
|
||||
> This page gives a total view of the current CPU pinning assignments for Docker containers.<br>
|
||||
> It also allows to modify these assignments.
|
||||
>
|
||||
@@ -43,3 +44,4 @@ Tag="icon-cpu"
|
||||
> Do not select cores for containers which are *isolated*.
|
||||
> By design a container will only use a single core (the lowest numbered core) when multiple isolated cores are selected.<br>
|
||||
> Usually this is not what a user wants when selecting multiple cores.
|
||||
:end
|
||||
|
||||
+23
-21
@@ -3,8 +3,8 @@ Title="CPU Pinning VM"
|
||||
Tag="icon-cpu"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -55,9 +55,9 @@ String.prototype.encode = function(){return this.replace(/\./g,'%2e');}
|
||||
|
||||
function apply(form) {
|
||||
// disable buttons
|
||||
$(form).find('input[value="Apply"]').prop('disabled',true);
|
||||
$(form).find('input[value="Reset"]').val('Done').prop('onclick',null).off('click').click(function(){done();});
|
||||
$('input[value="Done"]').prop('disabled',true);
|
||||
$(form).find('input[value="_(Apply)_"]').prop('disabled',true);
|
||||
$(form).find('input[value="_(Reset)_"]').val('_(Done)_').prop('onclick',null).off('click').click(function(){done();});
|
||||
$('input[value="_(Done)_"]').prop('disabled',true);
|
||||
var wait = 0;
|
||||
var id = $(form).prop('name');
|
||||
var args = {};
|
||||
@@ -72,9 +72,9 @@ function apply(form) {
|
||||
// step 1: prepare the update and report back the changes
|
||||
$.post('/webGui/include/UpdateOne.php',args,function(reply){
|
||||
if (reply.error) {
|
||||
swal({type:'error', title:'Assignment error', text:reply.error},function(){
|
||||
swal({type:'error', title:'_(Assignment error)_', text:reply.error},function(){
|
||||
$('#wait-'+id).hide();
|
||||
$(form).find('input[value="Done"]').val('Reset').prop('disabled',false).prop('onclick',null).off('click').click(function(){reset($('form[name="'+id+'"]'));});
|
||||
$(form).find('input[value="_(Done)_"]').val('_(Reset)_').prop('disabled',false).prop('onclick',null).off('click').click(function(){reset($('form[name="'+id+'"]'));});
|
||||
});
|
||||
} else if (reply.success) {
|
||||
var data = reply.success.split(';');
|
||||
@@ -86,9 +86,9 @@ function apply(form) {
|
||||
$.post('/webGui/include/UpdateTwo.php',{id:id,name:encodeURI(name)},function(reply){
|
||||
if (reply.error) {
|
||||
// report error and reload table
|
||||
swal({type:'error', title:'Execution error', text:reply.error},function(){
|
||||
swal({type:'error', title:'_(Execution error)_', text:reply.error},function(){
|
||||
$('#wait-'+id).hide();
|
||||
$('input[value="Done"]').prop('disabled',false);
|
||||
$('input[value="_(Done)_"]').prop('disabled',false);
|
||||
reset($('form[name="'+id+'"]'));
|
||||
});
|
||||
} else {
|
||||
@@ -96,7 +96,7 @@ function apply(form) {
|
||||
// cleanup when all is done
|
||||
if (!--wait) {
|
||||
setTimeout(function(){$('#wait-'+id).hide();},500);
|
||||
$('input[value="Done"]').prop('disabled',false);
|
||||
$('input[value="_(Done)_"]').prop('disabled',false);
|
||||
// isolated cpus, need reboot notice?
|
||||
if (id == 'is') notice();
|
||||
}
|
||||
@@ -105,7 +105,7 @@ function apply(form) {
|
||||
}
|
||||
} else {
|
||||
$('#wait-'+id).hide();
|
||||
$('input[value="Done"]').prop('disabled',false);
|
||||
$('input[value="_(Done)_"]').prop('disabled',false);
|
||||
if (id == 'is') notice();
|
||||
}
|
||||
});
|
||||
@@ -135,7 +135,7 @@ function ct() {
|
||||
// inject thread to containers toggles
|
||||
if($('a[onclick^="thread2containers"]').length === 0) {
|
||||
$('form[name=ct]').find('thead tr th:gt(1)').each((i, elem) => {
|
||||
elem.innerHTML = elem.innerHTML.replace(/(\d+)/g, `<a href="#" onclick="thread2containers(this.innerText);return false;" title="Toggle thread to containers">$1</a>`);
|
||||
elem.innerHTML = elem.innerHTML.replace(/(\d+)/g, `<a href="#" onclick="thread2containers(this.innerText);return false;" title="_(Toggle thread to containers)_">$1</a>`);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -152,16 +152,16 @@ function is() {
|
||||
}
|
||||
function notice() {
|
||||
// notice to reboot system after changes
|
||||
var message = "CPU Isolation: A reboot is required to apply changes";
|
||||
|
||||
var message = "_(CPU Isolation: A reboot is required to apply changes)_";
|
||||
|
||||
$.post('/webGui/include/CPUset.php',{id:'cmd'},function(d){
|
||||
if (d==1) addRebootNotice(message); else removeRebootNotice(message);
|
||||
});
|
||||
}
|
||||
function reset(form) {
|
||||
// undo changes without a complete refresh of the page
|
||||
$(form).find('input[value="Apply"]').prop('disabled',true);
|
||||
$(form).find('input[value="Reset"]').val('Done').prop('onclick',null).off('click').click(function(){done();});
|
||||
$(form).find('input[value="_(Apply)_"]').prop('disabled',true);
|
||||
$(form).find('input[value="_(Reset)_"]').val('_(Done)_').prop('onclick',null).off('click').click(function(){done();});
|
||||
switch ($(form).prop('name')) {
|
||||
case 'vm': $('#table-vm').html("<?=$spinner?>"); $('div.spinner').html(unraid_logo); vm(); break;
|
||||
case 'ct': $('#table-ct').html("<?=$spinner?>"); $('div.spinner').html(unraid_logo); ct(); break;
|
||||
@@ -178,8 +178,8 @@ function buttons(form) {
|
||||
// isolation may not have all cores selected
|
||||
if ($(form).prop('name')=='is' && $(this).prop('checked')) $(this).prop('checked',cores<total);
|
||||
// we need the Apply and Done buttons react on checkbox changes
|
||||
$(form).find('input[value="Apply"]').prop('disabled',false);
|
||||
$(form).find('input[value="Done"]').val('Reset').prop('onclick',null).off('click').click(function(){reset(form);});
|
||||
$(form).find('input[value="_(Apply)_"]').prop('disabled',false);
|
||||
$(form).find('input[value="_(Done)_"]').val('_(Reset)_').prop('onclick',null).off('click').click(function(){reset(form);});
|
||||
});});
|
||||
}
|
||||
$(function(){
|
||||
@@ -197,15 +197,16 @@ $(function(){
|
||||
<form name="vm">
|
||||
<input type="hidden" name="names" id="names-vm" value="">
|
||||
<table class='tablesorter shift' style='width:auto'>
|
||||
<thead><tr><th><i class="fa fa-list"></i> VM</th><?create()?></tr></thead>
|
||||
<thead><tr><th><i class="fa fa-list"></i> _(VM)_</th><?create()?></tr></thead>
|
||||
<tbody id="table-vm"><?=$spinner?></tbody>
|
||||
</table>
|
||||
<input type="button" value="Apply" onclick="apply(this.form)" disabled><input type="button" value="Done" onclick="done()"><span id="wait-vm" class="red-text" style="display:none"><i class="fa fa-spinner fa-spin"></i> Please wait...</span>
|
||||
<input type="button" value="_(Apply)_" onclick="apply(this.form)" disabled><input type="button" value="_(Done)_" onclick="done()"><span id="wait-vm" class="red-text" style="display:none"><i class="fa fa-spinner fa-spin"></i> _(Please wait)_...</span>
|
||||
</form>
|
||||
<?else:?>
|
||||
<div class="notice">No CPU pinning available. VM service must be started</div>
|
||||
<div class="notice">_(No CPU pinning available. VM service must be started)_</div>
|
||||
<?endif;?>
|
||||
|
||||
:help1
|
||||
> This page gives a total view of the current CPU pinning assignments for VMs.<br>
|
||||
> It also allows to modify these assignments.
|
||||
>
|
||||
@@ -215,3 +216,4 @@ $(function(){
|
||||
> When ***Apply*** is pressed a scan is performed to find the changes, subsequently only VMs which have changes are modified in parallel.
|
||||
>
|
||||
> *Important: Please wait until all updates are finished before leaving this page*.
|
||||
:end
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="bullseye"
|
||||
Cond="($var['fsState']=='Stopped' || $var['cacheSbNumDisks'])"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -32,7 +32,7 @@ cache_status();
|
||||
</script>
|
||||
|
||||
<table class="disk_status wide">
|
||||
<thead><tr><td>Device</td><td>Identification</td><td>Temp.</td><td>Reads</td><td>Writes</td><td>Errors</td><td>FS</td><td>Size</td><td>Used</td><td>Free</td><td>View</td></tr></thead>
|
||||
<thead><tr><td>_(Device)_</td><td>_(Identification)_</td><td>_(Temp)_.</td><td>_(Reads)_</td><td>_(Writes)_</td><td>_(Errors)_</td><td>_(FS)_</td><td>_(Size)_</td><td>_(Used)_</td><td>_(Free)_</td><td>_(View)_</td></tr></thead>
|
||||
<tbody id="cache_device">
|
||||
<?
|
||||
foreach ($disks as $disk):
|
||||
@@ -42,6 +42,7 @@ endforeach;
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
:help3
|
||||
> **Colored Status Indicator** the significance of the color indicator at the beginning of each line in *Cache Devices* is as follows:
|
||||
>
|
||||
> <i class='fa fa-circle orb green-orb'></i>Normal operation, device is active.
|
||||
@@ -72,8 +73,11 @@ endforeach;
|
||||
> automatically make use of the Cache in order to
|
||||
> speed up writes. A special background process called the *mover* can be scheduled to run
|
||||
> periodically to move user share files off the Cache and onto the Array.
|
||||
:end
|
||||
|
||||
<?if ($var['fsState'] == "Stopped"):?>
|
||||
<div></div>
|
||||
:help4
|
||||
> **Slots** select the number of device slots in your server designated for Cache devices.
|
||||
:end
|
||||
<?endif;?>
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="upload"
|
||||
Cond="((isset($disks['cache']))&&($disks['cache']['status']!='DISK_NP'))"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -29,18 +29,21 @@ $(check_cache_settings);
|
||||
</script>
|
||||
|
||||
<form markdown="1" name="cache_settings" method="POST" action="/update.htm" target="progressFrame">
|
||||
Use cache disk:
|
||||
: <select name="shareCacheEnabled" size="1" onchange="check_cache_settings()" <?=$disabled?>>
|
||||
<?=mk_option($var['shareCacheEnabled'], "yes", "Yes")?>
|
||||
<?=mk_option($var['shareCacheEnabled'], "no", "No")?>
|
||||
_(Use cache disk)_:
|
||||
: <select name="shareCacheEnabled" onchange="check_cache_settings()" <?=$disabled?>>
|
||||
<?=mk_option($var['shareCacheEnabled'], "yes", _('Yes'))?>
|
||||
<?=mk_option($var['shareCacheEnabled'], "no", _('No'))?>
|
||||
</select>
|
||||
|
||||
:help
|
||||
> If set to 'Yes' then User Shares can possibly make use of the Cache Disk. You still need to enable
|
||||
> use of the Cache Disk on individual user shares.
|
||||
:end
|
||||
|
||||
Min. free space:
|
||||
_(Min. free space)_:
|
||||
: <input type="text" name="shareCacheFloor" maxlength="16" value="<?=$var['shareCacheFloor']?>" class="narrow" disabled>
|
||||
|
||||
:help
|
||||
> This represents a "floor" of the amount of free space remaining on the cache disk. If the free
|
||||
> space becomes less than this value, then new files written to user shares with cache enabled will go to
|
||||
> the array and not the cache disk.
|
||||
@@ -58,7 +61,8 @@ Min. free space:
|
||||
>
|
||||
> **2GB** => 2,000,000,000 bytes<br>
|
||||
> **2000000** => 2,048,000,000 bytes
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeShare" value="Apply" disabled><input type="button" value="Done" onclick="done()"><?if ($disabled):?>Array must be <span class="strong big">Stopped</span> to change<?endif;?>
|
||||
: <input type="submit" name="changeShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"><?if ($disabled):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
</form>
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-confirmations"
|
||||
Tag="check-square"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -19,30 +19,34 @@ Tag="check-square"
|
||||
<form markdown="1" name="confirm_settings" method="POST" action="/update.php" target="progressFrame">
|
||||
<input type="hidden" name="#file" value="dynamix/dynamix.cfg"/>
|
||||
<input type="hidden" name="#section" value="confirm"/>
|
||||
Confirm reboot & powerdown commands:
|
||||
: <select name="down" size="1">
|
||||
<?=mk_option($confirm['down'], "0", "No")?>
|
||||
<?=mk_option($confirm['down'], "1", "Yes")?>
|
||||
_(Confirm reboot & powerdown commands)_:
|
||||
: <select name="down">
|
||||
<?=mk_option($confirm['down'], "0", _('No'))?>
|
||||
<?=mk_option($confirm['down'], "1", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help98
|
||||
> Choose if rebooting or powering down the server needs a confirmation checkbox.
|
||||
:end
|
||||
|
||||
Confirm array stop command:
|
||||
: <select name="stop" size="1">
|
||||
<?=mk_option($confirm['stop'], "0", "No")?>
|
||||
<?=mk_option($confirm['stop'], "1", "Yes")?>
|
||||
_(Confirm array stop command)_:
|
||||
: <select name="stop">
|
||||
<?=mk_option($confirm['stop'], "0", _('No'))?>
|
||||
<?=mk_option($confirm['stop'], "1", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help99
|
||||
> Choose if stopping the array needs a confirmation checkbox.
|
||||
:end
|
||||
|
||||
<?if (isset($confirm['sleep'])):?>
|
||||
Confirm sleep command:
|
||||
: <select name="sleep" size="1">
|
||||
<?=mk_option($confirm['sleep'], "0", "No")?>
|
||||
<?=mk_option($confirm['sleep'], "1", "Yes")?>
|
||||
_(Confirm sleep command)_:
|
||||
: <select name="sleep">
|
||||
<?=mk_option($confirm['sleep'], "0", _('No'))?>
|
||||
<?=mk_option($confirm['sleep'], "1", _('Yes'))?>
|
||||
</select>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
@@ -27,4 +27,4 @@ and may not be used in any other project without written permission from Lime Te
|
||||
|
||||
This file shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
+106
-107
@@ -1,8 +1,8 @@
|
||||
Menu="Dashboard"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2019, Lime Technology
|
||||
* Copyright 2012-2019, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -31,8 +31,8 @@ function truncate($string,$len) {
|
||||
}
|
||||
function export_settings($protocol,$share) {
|
||||
if ($protocol!='yes' || $share['export']=='-') return "-";
|
||||
if ($share['export']=='e') return ucfirst($share['security']);
|
||||
return '<em>'.ucfirst($share['security']).'</em>';
|
||||
if ($share['export']=='e') return _(ucfirst($share['security']));
|
||||
return '<em>'._(ucfirst($share['security'])).'</em>';
|
||||
}
|
||||
function data_devices($disk) {
|
||||
return $disk['type']=='Data';
|
||||
@@ -176,7 +176,7 @@ span.inner{width:<?=$theme1?153:140?>px}
|
||||
span.ups{width:124px;display:inline-block}
|
||||
span.busy,i.inactive{opacity:0.5}
|
||||
span#inbound{width:75px;display:inline-block}
|
||||
span#load{width:80px;display:inline-block}
|
||||
span#load{width:90px;display:inline-block}
|
||||
span#util{margin-left:20px}
|
||||
span[id^=cpu],span[id^=sys]{width:0}
|
||||
i.heat{margin-left:8px}
|
||||
@@ -189,6 +189,7 @@ input[value=Edit]{margin:12px 0 0 0;padding:5px 10px}
|
||||
#shares_view_on,#users_view_on,#array_view_on,#cache_view_on,#extra_view_on{display:none}
|
||||
form[name=boot]{display:none}
|
||||
.flat{height:0;lineheight:0}
|
||||
.wrap{white-space:normal}
|
||||
<?if ($themes2):?>
|
||||
.switch-button-background{top:16px}
|
||||
.switch-button-label{margin-top:0}
|
||||
@@ -205,25 +206,25 @@ form[name=boot]{display:none}
|
||||
<table id='db-box1' class='share_status dashboard box1'>
|
||||
<thead sort='<?=$N?>' class='sortable'><tr><td></td><td colspan='3' class='next'><?=$var['NAME']?>
|
||||
<i class='fa fa-fw chevron mt0' id='sys_view' onclick='toggleChevron("sys_view",0)'></i>
|
||||
<a href='/Dashboard/Identification' title='Go to identification settings'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<a href='/Dashboard/Identification' title='_(Go to identification settings)_'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<span class='ctrl'>
|
||||
<?if ($parity||$mover||$btrfs):?>
|
||||
<span class='fa fa-fw fa-<?=$started?'stop':'play'?>-circle busy' title='<?=$started?'Stop':'Start'?> the array'></span>
|
||||
<span class='fa fa-fw fa-<?=$started?'stop':'play'?>-circle busy' title='<?=$started?_('Stop the array'):_('Start the array')?>'></span>
|
||||
<?else:?>
|
||||
<span class='fa fa-fw fa-<?=$started?'stop':'play'?>-circle hand' title='<?=$started?'Stop':'Start'?> the array' onclick='<?=$started?'Stop':'Start'?>Array()'></span>
|
||||
<span class='fa fa-fw fa-<?=$started?'stop':'play'?>-circle hand' title='<?=$started?_('Stop the array'):_('Start the array')?>' onclick='<?=$started?'Stop':'Start'?>Array()'></span>
|
||||
<?endif;?>
|
||||
<?if($sleep):?><span class='fa fa-fw fa-moon-o hand' title='Put system to sleep' onclick='Sleep()'></span><?endif;?>
|
||||
<span class='fa fa-fw fa-refresh hand' title='Reboot the system' onclick='Reboot()'></span>
|
||||
<span class='fa fa-fw fa-power-off hand' title='Shutdown the system' onclick='Shutdown()'></span></span>
|
||||
<?if($sleep):?><span class='fa fa-fw fa-moon-o hand' title='_(Put system to sleep)_' onclick='Sleep()'></span><?endif;?>
|
||||
<span class='fa fa-fw fa-refresh hand' title='_(Reboot the system)_' onclick='Reboot()'></span>
|
||||
<span class='fa fa-fw fa-power-off hand' title='_(Shutdown the system)_' onclick='Shutdown()'></span></span>
|
||||
</td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='sys_view sortable'>
|
||||
<tr><td></td><td colspan='3'>
|
||||
<div class='left'>
|
||||
<span class='header'>Description</span><span class='text'><br>
|
||||
<span class='header'>_(Description)_</span><span class='text'><br>
|
||||
<?=$var['COMMENT']?><br>
|
||||
<?=$var['SYS_MODEL']?><br><br></span>
|
||||
<span class='header'>Registration</span><br>Unraid OS <b><em><?=$var['regTy']?></em></b><br><br>
|
||||
<span class='header'>Uptime</span><br><span class='uptime'></span>
|
||||
<span class='header'>_(Registration)_</span><br>Unraid OS <b><em><?=$var['regTy']?></em></b><br><br>
|
||||
<span class='header'>_(Uptime)_</span><br><span class='uptime'></span>
|
||||
</div>
|
||||
<div class='right'>
|
||||
<span id='casing'>
|
||||
@@ -237,28 +238,28 @@ form[name=boot]{display:none}
|
||||
<i id='mycase' class='fa fa-hdd-o'></i><br>
|
||||
<?endif;?>
|
||||
</span>
|
||||
<input type='button' value='Edit' onclick='openBox("/webGui/include/SelectCase.php?file=<?=$myfile?>&csrf=<?=$var['csrf_token']?>","Select Case Model",700,980,true,"setCase");return false'>
|
||||
<input type='button' value='_(Edit)_' onclick='openBox("/webGui/include/SelectCase.php?file=<?=$myfile?>&csrf=<?=$var['csrf_token']?>","_(Select Case Model)_",700,980,true,"setCase");return false'>
|
||||
</div>
|
||||
</td><td></td></tr>
|
||||
</tbody>
|
||||
<thead sort='<?=++$N?>'><tr class='hidden'><td></td><td colspan='3'></td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='sortable'>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-motherboard'></i><div class='section'>Motherboard<br><span id='mb-temp'></span><br><br></div>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-motherboard'></i><div class='section'>_(Motherboard)_<br><span id='mb-temp'></span><br><br></div>
|
||||
<i class='fa fa-fw chevron' id='mb_view' onclick='toggleChevron("mb_view",0)'></i>
|
||||
<a href='#' onclick='InfoButton();' title='Show Information'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
<a href='#' onclick='InfoButton();' title='_(Show Information)_'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
</td><td></td></tr>
|
||||
<tr class='mb_view'><td></td><td colspan='3'><?=$board?><br><?=$bios?><br><?=$biosdate?></td><td></td></tr>
|
||||
</tbody>
|
||||
<thead sort='<?=++$N?>'><tr class='hidden'><td></td><td colspan='3'></td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='sortable'>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-cpu'></i><div class='section'>Processor<br>
|
||||
<span id='load'>Load: <span class='cpu'>0%</span></span><span id='cpu-temp'></span><br><br></div>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-cpu'></i><div class='section'>_(Processor)_<br>
|
||||
<span id='load'>_(Load)_: <span class='cpu'>0%</span></span><span id='cpu-temp'></span><br><br></div>
|
||||
<i class='fa fa-fw chevron' id='cpu_view' onclick='toggleChevron("cpu_view",1)'></i>
|
||||
<a href='/Dashboard/CPUset' title='Go to CPU pinning settings'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
<a href='/Dashboard/CPUset' title='_(Go to CPU pinning settings)_'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
</td><td></td></tr>
|
||||
<tr class='cpu_view'><td></td><td colspan='3'><?=$cpumodel?><br>
|
||||
<a onclick='toggleCPU()' title='Click to toggle details' class='cpu_close'>Show details</a></td><td></td></tr>
|
||||
<tr class='cpu_open'><td></td><td>Overall Load:</td>
|
||||
<a onclick='toggleCPU()' title='_(Click to toggle details)_' class='cpu_close'>_(Show details)_</a></td><td></td></tr>
|
||||
<tr class='cpu_open'><td></td><td>_(Overall Load)_:</td>
|
||||
<td colspan='2'><span class='cpu load'>0%</span><div class='usage-disk sys'><span id='cpu'></span><span></span></div></td><td></td></tr>
|
||||
<?
|
||||
foreach ($cpus as $pair) {
|
||||
@@ -274,35 +275,35 @@ foreach ($cpus as $pair) {
|
||||
</tbody>
|
||||
<thead sort='<?=++$N?>'><tr class='hidden'><td></td><td colspan='3'></td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='sortable'>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-ram'></i><div class='section'>Memory<br><span><?="$memory_installed $unit $memory_type $ecc"?><span id='util'>Utilization: <span class='sys0'>0%</span></span><br><br></div>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-ram'></i><div class='section'>_(Memory)_<br><span><?="$memory_installed $unit $memory_type $ecc"?><span id='util'>_(Utilization)_: <span class='sys0'>0%</span></span><br><br></div>
|
||||
<i class='fa fa-fw chevron' id='mem_view' onclick='toggleChevron("mem_view",0)'></i>
|
||||
<a href='/Dashboard/Processes' title='View Running Processes'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
<a href='/Dashboard/Processes' title='_(View Running Processes)_'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
</td><td></td></tr>
|
||||
<tr class='mem_view'><td></td><td>Maximum size: <?="$memory_maximum $unit"?><?=$low?'*':''?></td><td><i class='mm'>RAM</i><span class='sys0 load'>0%</span><div class='usage-disk sys'><span id='sys0'></span><span></span></div></td>
|
||||
<td><i class='mm'>Flash</i><span class='sys1 load'>0%</span><div class='usage-disk sys'><span id='sys1'></span><span></span></div></td><td></td></tr>
|
||||
<tr class='mem_view'><td></td><td>Usable size: <?=my_scale($total,$unit,1,null,1024)." $unit"?></td><td><i class='mm'>Log</i><span class='sys2 load'>0%</span><div class='usage-disk sys'><span id='sys2'></span><span></span></div></td>
|
||||
<td><?if (exec("df /var/lib/docker|grep -om1 '^/'")):?><i class='mm'>Docker</i><span class='sys3 load'>0%</span><div class='usage-disk sys'><span id='sys3'></span><span></span></div><?endif;?></td><td></td></tr>
|
||||
<tr class='mem_view'><td></td><td>_(Maximum size)_: <?="$memory_maximum $unit"?><?=$low?'*':''?></td><td><i class='mm'>_(RAM)_</i><span class='sys0 load'>0%</span><div class='usage-disk sys'><span id='sys0'></span><span></span></div></td>
|
||||
<td><i class='mm'>_(Flash)_</i><span class='sys1 load'>0%</span><div class='usage-disk sys'><span id='sys1'></span><span></span></div></td><td></td></tr>
|
||||
<tr class='mem_view'><td></td><td>_(Usable size)_: <?=my_scale($total,$unit,1,null,1024)." $unit"?></td><td><i class='mm'>_(Log)_</i><span class='sys2 load'>0%</span><div class='usage-disk sys'><span id='sys2'></span><span></span></div></td>
|
||||
<td><?if (exec("df /var/lib/docker|grep -om1 '^/'")):?><i class='mm'>_(Docker)_</i><span class='sys3 load'>0%</span><div class='usage-disk sys'><span id='sys3'></span><span></span></div><?endif;?></td><td></td></tr>
|
||||
</tbody>
|
||||
<thead sort='<?=++$N?>'><tr class='hidden'><td></td><td colspan='3'></td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='sortable'>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-ethernet'></i><div class='section'>Interface<br>
|
||||
<select name="port_select" size="1" onchange="portSelect(this.value)">
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-ethernet'></i><div class='section'>_(Interface)_<br>
|
||||
<select name="port_select" onchange="portSelect(this.value)">
|
||||
<?foreach ($ports as $port):?>
|
||||
<?=mk_option("",$port,$port)?>
|
||||
<?=mk_option("",$port,_($port))?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
<span>Inbound: <span id='inbound'>---</span>Outbound: <span id='outbound'>---</span></span><br><br></div>
|
||||
<span>_(Inbound)_: <span id='inbound'>---</span>_(Outbound)_: <span id='outbound'>---</span></span><br><br></div>
|
||||
<i class='fa fa-fw chevron' id='port_view' onclick='toggleChevron("port_view",2)'></i>
|
||||
<a href='/Dashboard/NetworkSettings' title='Go to network settings'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
<a href='/Dashboard/NetworkSettings' title='_(Go to network settings)_'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
</td><td></td></tr>
|
||||
<tr class='port_view'><td></td>
|
||||
<td><select class='port_view' name="enter_view" size="1" onchange="changeView(this.value)">
|
||||
<?=mk_option("", "0", "General info")?>
|
||||
<?=mk_option("", "1", "Counters info")?>
|
||||
<?=mk_option("", "2", "Errors info")?>
|
||||
<td><select class='port_view' name="enter_view" onchange="changeView(this.value)">
|
||||
<?=mk_option("", "0", _('General info'))?>
|
||||
<?=mk_option("", "1", _('Counters info'))?>
|
||||
<?=mk_option("", "2", _('Errors info'))?>
|
||||
</select></td>
|
||||
<td><i class='view1'>Mode of operation</i><i class='view2'>Received packets</i><i class='view3'>Receive counters</i></td>
|
||||
<td><i class='view1'></i><i class='view2'>Transmitted packets</i><i class='view3'>Transmit counters</i></td><td></td></tr>
|
||||
<td><i class='view1'>_(Mode of operation)_</i><i class='view2'>_(Received packets)_</i><i class='view3'>_(Receive counters)_</i></td>
|
||||
<td><i class='view1'></i><i class='view2'>_(Transmitted packets)_</i><i class='view3'>_(Transmit counters)_</i></td><td></td></tr>
|
||||
<?
|
||||
$c = 0;
|
||||
foreach ($ports as $port) {
|
||||
@@ -325,15 +326,15 @@ foreach ($ports as $port) {
|
||||
<?if ($wireguard):?>
|
||||
<thead sort='<?=++$N?>'><tr class='hidden'><td></td><td colspan='3'></td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='sortable'>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-vpn'></i><div class='section'>VPN<br><span class='ups'>Active tunnels: <span id='vpn-active'><?=$up?></span></span><span class='ups'>Inactive tunnels: <span id='vpn-inactive'><?=$down?></span></span><br><br></div>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-vpn'></i><div class='section'>_(VPN)_<br><span class='ups'>_(Active tunnels)_: <span id='vpn-active'><?=$up?></span></span><span class='ups'>_(Inactive tunnels)_: <span id='vpn-inactive'><?=$down?></span></span><br><br></div>
|
||||
<i class='fa fa-fw chevron' id='vpn_view' onclick='toggleChevron("vpn_view",0)'></i>
|
||||
<a href='/Settings/VPNmanager' title='Go to VPN settings'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
<a href='/Settings/VPNmanager' title='_(Go to VPN settings)_'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
</td><td></td></tr>
|
||||
<?foreach ($conf as $wg):?>
|
||||
<?$vpn = basename($wg,'.conf'); $peers = vpn_peers($wg);?>
|
||||
<tr class='vpn_view'><td></td><td class='vpn'><i class='icon-vpn vpn<?=in_array($vpn,$wg_up)?'':' inactive'?>' onclick="toggleVPN($(this),'<?=$vpn?>')" title="Toggle tunnel state"></i><?="Tunnel $vpn"?></td><td class='vpn right'>Activity</td><td class='vpn right'>Handshake</td><td></td></tr>
|
||||
<tr class='vpn_view'><td></td><td class='vpn'><i class='icon-vpn vpn<?=in_array($vpn,$wg_up)?'':' inactive'?>' onclick="toggleVPN($(this),'<?=$vpn?>')" title="Toggle tunnel state"></i><?="Tunnel $vpn"?></td><td class='vpn right'>_(Activity)_</td><td class='vpn right'>_(Handshake)_</td><td></td></tr>
|
||||
<?foreach ($peers as $i => $peer):?>
|
||||
<tr class='vpn_view'><td></td><td class='left'><?=$peer?></td><td class='right' id='<?="$vpn-rx-".($i-1)?>'>---</td><td class='right' id='<?="$vpn-hs-".($i-1)?>'>inactive</td><td></td></tr>
|
||||
<tr class='vpn_view'><td></td><td class='left'><?=$peer?></td><td class='right' id='<?="$vpn-rx-".($i-1)?>'>_(---)_</td><td class='right' id='<?="$vpn-hs-".($i-1)?>'>_(inactive)_</td><td></td></tr>
|
||||
<?endforeach;?>
|
||||
<?endforeach;?>
|
||||
</tbody>
|
||||
@@ -341,29 +342,29 @@ foreach ($ports as $port) {
|
||||
<?if ($apcupsd):?>
|
||||
<thead sort='<?=++$N?>'><tr class='hidden'><td></td><td colspan='3'></td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='sortable'>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-ups'></i><div class='section'>Power<br>
|
||||
<span>UPS Load: <span id='ups_loadpct'></span></span><br><br></div>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-ups'></i><div class='section'>_(Power)_<br>
|
||||
<span>_(UPS Load)_: <span id='ups_loadpct'></span></span><br><br></div>
|
||||
<i class='fa fa-fw chevron' id='ups_view' onclick='toggleChevron("ups_view",0)'></i>
|
||||
<a href='/Dashboard/UPSsettings' title='Go to UPS settings'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
<a href='/Dashboard/UPSsettings' title='_(Go to UPS settings)_'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
</td><td></td></tr>
|
||||
<tr class='ups_view'><td></td><td colspan='3'>
|
||||
<span class='ups'>UPS status:</span><span id='ups_status'></span><br>
|
||||
<span class='ups'>Battery charge:</span><span id='ups_bcharge'></span><br>
|
||||
<span class='ups'>Runtime left:</span><span id='ups_timeleft'></span><br>
|
||||
<span class='ups'>Nominal power:</span><span id='ups_nompower'></span><br>
|
||||
<span class='ups'>_(UPS status)_:</span><span id='ups_status'></span><br>
|
||||
<span class='ups'>_(Battery charge)_:</span><span id='ups_bcharge'></span><br>
|
||||
<span class='ups'>_(Runtime left)_:</span><span id='ups_timeleft'></span><br>
|
||||
<span class='ups'>_(Nominal power)_:</span><span id='ups_nompower'></span><br>
|
||||
</td><td></td></tr>
|
||||
</tbody>
|
||||
<?endif;?>
|
||||
<?if ($fans):?>
|
||||
<thead sort='<?=++$N?>'><tr class='hidden'><td></td><td colspan='3'></td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='sortable'>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-fan'></i><div class='section'>Airflow<br><span>Fan count: <?=$fans?></span><br><br></div>
|
||||
<tr><td></td><td colspan='3' class='next'><i class='icon-fan'></i><div class='section'>_(Airflow)_<br><span>_(Fan count)_: <?=$fans?></span><br><br></div>
|
||||
<i class='fa fa-fw chevron' id='fan_view' onclick='toggleChevron("fan_view",0)'></i>
|
||||
<a href='/Dashboard/FanSettings' title='Go to fan settings'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
<a href='/Dashboard/FanSettings' title='_(Go to fan settings)_'><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
</td><td></td></tr>
|
||||
<?for ($f=0; $f<$fans; $f+=2) {
|
||||
if ($f+1<$fans) echo "<tr class='fan_view'><td></td><td>FAN ".($f)." - FAN ".($f+1)."</td><td id='fan{$f}'>"."</td><td id='fan".($f+1)."'></td><td></td></tr>";
|
||||
else echo "<tr class='fan_view'><td></td><td>FAN ".($f)."</td><td colspan='2' id='fan{$f}'></td><td></td></tr>";
|
||||
if ($f+1<$fans) echo "<tr class='fan_view'><td></td><td>"._('FAN')." ".($f)." - "._('FAN')." ".($f+1)."</td><td id='fan{$f}'>"."</td><td id='fan".($f+1)."'></td><td></td></tr>";
|
||||
else echo "<tr class='fan_view'><td></td><td>"._('FAN')." ".($f)."</td><td colspan='2' id='fan{$f}'></td><td></td></tr>";
|
||||
}?>
|
||||
</tbody>
|
||||
<?endif;?>
|
||||
@@ -373,23 +374,22 @@ foreach ($ports as $port) {
|
||||
<table id='db-box3' class='share_status dashboard box3'>
|
||||
<?if ($display['dashapps']!='none'):?>
|
||||
<?if ($dockerd && ($display['dashapps']=='icons' || $display['dashapps']=='docker')):?>
|
||||
<thead sort='<?=$N?>' class='sortable'><tr><td></td><td colspan='4' class='next'>Docker Containers<i class='fa fa-fw chevron mt0' id='docker_view' onclick='toggleChevron("docker_view",0)'></i>
|
||||
<a href='/Dashboard/DockerSettings' title='Go to Docker settings'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<thead sort='<?=$N?>' class='sortable'><tr><td></td><td colspan='4' class='next'>_(Docker Containers)_<i class='fa fa-fw chevron mt0' id='docker_view' onclick='toggleChevron("docker_view",0)'></i>
|
||||
<a href='/Dashboard/DockerSettings' title='_(Go to Docker settings)_'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<span class='info apps'><input type='checkbox' id='apps'></span></td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='docker_view sortable'></tbody>
|
||||
<?endif;?>
|
||||
<?if ($libvirtd && ($display['dashapps']=='icons' || $display['dashapps']=='vms')):?>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='4' class='next'>Virtual Machines<i class='fa fa-fw chevron mt0' id='vm_view' onclick='toggleChevron("vm_view",0)'></i>
|
||||
<a href='/Dashboard/VMSettings' title='Go to VM settings'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='4' class='next'>_(Virtual Machines)_<i class='fa fa-fw chevron mt0' id='vm_view' onclick='toggleChevron("vm_view",0)'></i>
|
||||
<a href='/Dashboard/VMSettings' title='_(Go to VM settings)_'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<span class='info vms'><input type='checkbox' id='vms'></span></td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='vm_view sortable'></tbody>
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='4' class='next'>Shares<i class='fa fa-fw chevron mt0' id='shares_view' onclick='toggleChevron("shares_view",4)'></i>
|
||||
<a href='/Shares' title='Go to Share settings'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<span class='info'>Share count: <?=count($shares)?> with <?=$cache_only?> cache only and <?=$encrypted?> encrypted</span>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='4' class='next'>_(Shares)_<i class='fa fa-fw chevron mt0' id='shares_view' onclick='toggleChevron("shares_view",4)'></i>
|
||||
<a href='/Shares' title='_(Go to Share settings)_'><i class='fa fa-fw fa-cog chevron mt0'></i></a><span class='info'><?=sprintf(_('Share count: %s with %s cache only and %s encrypted'),count($shares),$cache_only,$encrypted)?></span>
|
||||
<?if ($group):?>
|
||||
<select name="enter_share" size="1" onchange="changeMode(this.value)">
|
||||
<select name="enter_share" onchange="changeMode(this.value)">
|
||||
<?if ($var['shareSMBEnabled']=='yes'):?>
|
||||
<?=mk_option("", "0", "SMB")?>
|
||||
<?endif;?>
|
||||
@@ -402,7 +402,7 @@ foreach ($ports as $port) {
|
||||
</select>
|
||||
<?endif;?>
|
||||
</td><td></td></tr>
|
||||
<tr id='shares_view_on'><td></td><td>Name</td><td>Description</td><td>Security</td><td>Streams</td><td></td></tr>
|
||||
<tr id='shares_view_on'><td></td><td>_(Name)_</td><td>_(Description)_</td><td>_(Security)_</td><td>_(Streams)_</td><td></td></tr>
|
||||
</thead>
|
||||
<?if ($var['shareSMBEnabled']=='yes'):?>
|
||||
<tbody sort='<?=$N?>' class='smb share share1 sortable'><?
|
||||
@@ -416,7 +416,7 @@ foreach ($shares as $name => $share) {
|
||||
$security = export_settings($var['shareSMBEnabled'], $sec[$name]);
|
||||
echo "<tr><td></td><td><i class='icon-folder'></i>$list</td><td>$comment</td><td>$security</td><td id='share{$i}'>0</td><td></td></tr>";
|
||||
}
|
||||
if (!count($shares)) echo "<tr><td></td><td colspan='4' class='none'>No shares present</td><td></td></tr>";
|
||||
if (!count($shares)) echo "<tr><td></td><td colspan='4' class='none'>"._('No shares present')."</td><td></td></tr>";
|
||||
?></tbody>
|
||||
<?endif;?>
|
||||
<?if ($var['shareAFPEnabled']=='yes'):?>
|
||||
@@ -429,7 +429,7 @@ foreach ($shares as $name => $share) {
|
||||
$security = export_settings($var['shareAFPEnabled'], $sec_afp[$name]);
|
||||
echo "<tr><td></td><td><i class='icon-folder'></i>$list</td><td>$comment</td><td>$security</td><td>-</td><td></td></tr>";
|
||||
}
|
||||
if (!count($shares)) echo "<tr><td></td><td colspan='4' class='none'>No shares present</td><td></td></tr>";
|
||||
if (!count($shares)) echo "<tr><td></td><td colspan='4' class='none'>"._('No shares present')."</td><td></td></tr>";
|
||||
?></tbody>
|
||||
<?endif;?>
|
||||
<?if ($var['shareNFSEnabled']=='yes'):?>
|
||||
@@ -442,7 +442,7 @@ foreach ($shares as $name => $share) {
|
||||
$security = export_settings($var['shareNFSEnabled'], $sec_nfs[$name]);
|
||||
echo "<tr><td></td><td><i class='icon-folder'></i>$list</td><td>$comment</td><td>$security</td><td>-</td><td></td></tr>";
|
||||
}
|
||||
if (!count($shares)) echo "<tr><td></td><td colspan='4' class='none'>No shares present</td><td></td></tr>";
|
||||
if (!count($shares)) echo "<tr><td></td><td colspan='4' class='none'>"._('No shares present')."</td><td></td></tr>";
|
||||
?></tbody>
|
||||
<?endif;?>
|
||||
<?if (!$group):?>
|
||||
@@ -454,13 +454,12 @@ foreach ($shares as $name => $share) {
|
||||
$comment = truncate($share['comment'],40);
|
||||
echo "<tr><td></td><td><i class='icon-folder'></i>$list</td><td>$comment</td><td>-</td><td>-</td><td></td></tr>";
|
||||
}
|
||||
if (!count($shares)) echo "<tr><td></td><td colspan='4' class='none'>No shares present</td><td></td></tr>";
|
||||
if (!count($shares)) echo "<tr><td></td><td colspan='4' class='none'>"._('No shares present')."</td><td></td></tr>";
|
||||
?></tbody>
|
||||
<?endif;?>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='4' class='next'>Users<i class='fa fa-fw chevron mt0' id='users_view' onclick='toggleChevron("users_view",3)'></i>
|
||||
<a href='/Users' title='Go to User settings'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<span class='info'>User count: <?=count($users)?> with <?=$nopass?> unprotected</span>
|
||||
</td><td></td></tr><tr id='users_view_on'><td></td><td>Name</td><td>Description</td><td>Write</td><td>Read</td><td></td></tr></thead>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='4' class='next'>_(Users)_<i class='fa fa-fw chevron mt0' id='users_view' onclick='toggleChevron("users_view",3)'></i>
|
||||
<a href='/Users' title='_(Go to User settings)_'><i class='fa fa-fw fa-cog chevron mt0'></i></a><span class='info'><?=sprintf(_('User count: %s with %s unprotected'),count($users),$nopass)?></span>
|
||||
</td><td></td></tr><tr id='users_view_on'><td></td><td>_(Name)_</td><td>_(Description)_</td><td>_(Write)_</td><td>_(Read)_</td><td></td></tr></thead>
|
||||
<?if ($var['shareSMBEnabled']=='yes'):?>
|
||||
<tbody sort='<?=$N?>' class='smb user user1 sortable'><?
|
||||
foreach ($users as $user) {
|
||||
@@ -552,35 +551,35 @@ foreach ($users as $user) {
|
||||
|
||||
<?$N=0?>
|
||||
<table id='db-box2' class='share_status dashboard box2'>
|
||||
<thead sort='<?=$N?>' class='sortable'><tr><td></td><td colspan='5' class='next'>Parity<i class='fa fa-fw chevron mt0' id='parity_view' onclick='toggleChevron("parity_view",0)'></i>
|
||||
<a href='/Dashboard/Scheduler' title='Go to scheduler settings'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<thead sort='<?=$N?>' class='sortable'><tr><td></td><td colspan='5' class='next'>_(Parity)_<i class='fa fa-fw chevron mt0' id='parity_view' onclick='toggleChevron("parity_view",0)'></i>
|
||||
<a href='/Dashboard/Scheduler' title='_(Go to scheduler settings)_'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<span class='info title'></span></td><td></td></tr></thead>
|
||||
<tbody sort='<?=$N?>' class='parity_view sortable'>
|
||||
<tr><td></td><td colspan='5' id='parity'></td><td></td></tr>
|
||||
<tr><td></td><td colspan='5' id='program'></td><td></td></tr>
|
||||
<tr><td></td><td colspan='5' id='parity' class="wrap"></td><td></td></tr>
|
||||
<tr><td></td><td colspan='5' id='program' class="wrap"></td><td></td></tr>
|
||||
</tbody>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='5' class='next'>Array<?if (!$started):?> (stopped)<?endif;?><i class='fa fa-fw chevron mt0' id='array_view' onclick='toggleChevron("array_view",0)'></i>
|
||||
<a href='/Dashboard/Device?name=disk1' title='Go to disk settings'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<?if ($started):?><span class='info'><?=my_scale($array_used*1024,$unit)." $unit"?> used of <?=my_scale($array_size*1024,$unit,-1,-1)." $unit"?> (<?=$array_percent?> %)</span><?endif;?>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='5' class='next'>_(Array)_<?if (!$started):?> (_(stopped)_)<?endif;?><i class='fa fa-fw chevron mt0' id='array_view' onclick='toggleChevron("array_view",0)'></i>
|
||||
<a href='/Dashboard/Device?name=disk1' title='_(Go to disk settings)_'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<?if ($started):?><span class='info'><?=sprintf(_('%s used of %s (%s %%)'),my_scale($array_used*1024,$unit)." $unit",my_scale($array_size*1024,$unit,-1,-1)." $unit",$array_percent)?></span><?endif;?>
|
||||
</td><td></td></tr>
|
||||
<tr class='my_view'><td></td><td id='array_info' colspan='5'></td><td></td></tr>
|
||||
<tr id='array_view_on'><td></td><td>Device</td><td>Status</td><td>Temp</td><td>SMART</td><td>Utilization</td><td></td></tr>
|
||||
<tr id='array_view_on'><td></td><td>_(Device)_</td><td>_(Status)_</td><td>_(Temp)_</td><td>_(SMART)_</td><td>_(Utilization)_</td><td></td></tr>
|
||||
</thead>
|
||||
<tbody sort='<?=$N?>' class='array_view sortable' id='array_list'></tbody>
|
||||
<?if ($cache_pool):?>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='5' class='next'>Cache<?if (!$started):?> (stopped)<?endif;?><i class='fa fa-fw chevron mt0' id='cache_view' onclick='toggleChevron("cache_view",0)'></i>
|
||||
<a href='/Dashboard/Device?name=cache' title='Go to cache settings'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<?if ($started):?><span class='info'><?=my_scale($cache_used*1024,$unit)." $unit"?> used of <?=my_scale($cache_size*1024,$unit,-1,-1)." $unit"?> (<?=$cache_percent?> %)</span><?endif;?>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='5' class='next'>_(Cache)_<?if (!$started):?> (_(stopped)_)<?endif;?><i class='fa fa-fw chevron mt0' id='cache_view' onclick='toggleChevron("cache_view",0)'></i>
|
||||
<a href='/Dashboard/Device?name=cache' title='_(Go to cache settings)_'><i class='fa fa-fw fa-cog chevron mt0'></i></a>
|
||||
<?if ($started):?><span class='info'><?=sprintf(_('%s used of %s (%s %%)'),my_scale($cache_used*1024,$unit)." $unit",my_scale($cache_size*1024,$unit,-1,-1)." $unit",$cache_percent)?></span><?endif;?>
|
||||
</td><td></td></tr>
|
||||
<tr class='my_view'><td></td><td id='cache_info' colspan='5'></td><td></td></tr>
|
||||
<tr id='cache_view_on'><td></td><td>Device</td><td>Status</td><td>Temp</td><td>SMART</td><td>Utilization</td><td></td></tr>
|
||||
<tr id='cache_view_on'><td></td><td>_(Device)_</td><td>_(Status)_</td><td>_(Temp)_</td><td>_(SMART)_</td><td>_(Utilization)_</td><td></td></tr>
|
||||
</thead>
|
||||
<tbody sort='<?=$N?>' class='cache_view sortable' id='cache_list'></tbody>
|
||||
<?endif;?>
|
||||
<?if ($devs):?>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='5' class='next'>Unassigned<i class='fa fa-fw chevron mt0' id='extra_view' onclick='toggleChevron("extra_view",0)'></i><span class='info'></span></td><td></td></tr>
|
||||
<thead sort='<?=++$N?>' class='sortable'><tr><td></td><td colspan='5' class='next'>_(Unassigned)_<i class='fa fa-fw chevron mt0' id='extra_view' onclick='toggleChevron("extra_view",0)'></i><span class='info'></span></td><td></td></tr>
|
||||
<tr class='my_view'><td></td><td id='extra_info' colspan='5'></td><td></td></tr>
|
||||
<tr id='extra_view_on'><td></td><td>Device</td><td>Status</td><td>Temp</td><td>SMART</td><td>Utilization</td><td></td></tr>
|
||||
<tr id='extra_view_on'><td></td><td>_(Device)_</td><td>_(Status)_</td><td>_(Temp)_</td><td>_(SMART)_</td><td>_(Utilization)_</td><td></td></tr>
|
||||
</thead>
|
||||
<tbody sort='<?=$N?>' class='extra_view sortable' id='extra_list'></tbody>
|
||||
<?endif;?>
|
||||
@@ -629,8 +628,8 @@ function noVMs() {
|
||||
}
|
||||
function loadlist(init) {
|
||||
if (init) {
|
||||
$('#apps').switchButton({labels_placement:'left', off_label:'All Apps', on_label:'Started only', checked:$.cookie('my_apps')=='startedOnly'});
|
||||
$('#vms').switchButton({labels_placement:'left', off_label:'All VMs', on_label:'Started only', checked:$.cookie('my_vms')=='startedOnly'});
|
||||
$('#apps').switchButton({labels_placement:'left', off_label:'_(All Apps)_', on_label:'_(Started only)_', checked:$.cookie('my_apps')=='startedOnly'});
|
||||
$('#vms').switchButton({labels_placement:'left', off_label:'_(All VMs)_', on_label:'_(Started only)_', checked:$.cookie('my_vms')=='startedOnly'});
|
||||
$('#apps').change(function(){
|
||||
$('span.outer.apps.stopped').finish().toggle('fast',function(){noApps();})
|
||||
$('#apps').is(':checked') ? $.cookie('my_apps','startedOnly',{expires:3650}) : $.removeCookie('my_apps');
|
||||
@@ -724,11 +723,11 @@ function portSelect(name) {
|
||||
}
|
||||
function moreInfo(data,table) {
|
||||
var info = [];
|
||||
if (data[1]>0) info.push(data[1]+" failed device"+(data[1]==1?'':'s'));
|
||||
if (data[2]>0) info.push(data[2]+" heat warning"+(data[2]==1?'':'s'));
|
||||
if (data[3]>0) info.push(data[3]+" SMART error"+(data[3]==1?'':'s'));
|
||||
if (data[4]>0) info.push(data[4]+" utilization warning"+(data[4]==1?'':'s'));
|
||||
return info.length ? "<div class='last'><i class='icon-u-triangle failed'></i><span class='failed'>"+table+" has "+info.join('. ')+".</span></div>" : "";
|
||||
if (data[1]>0) info.push(data[1]+" _(failed device)_"+(data[1]==1?'':'s'));
|
||||
if (data[2]>0) info.push(data[2]+" _(heat warning)_"+(data[2]==1?'':'s'));
|
||||
if (data[3]>0) info.push(data[3]+" _(SMART error)_"+(data[3]==1?'':'s'));
|
||||
if (data[4]>0) info.push(data[4]+" _(utilization warning)_"+(data[4]==1?'':'s'));
|
||||
return info.length ? "<div class='last'><i class='icon-u-triangle failed'></i><span class='failed'>"+table+" _(has)_ "+info.join('. ')+".</span></div>" : "";
|
||||
}
|
||||
<?if ($wireguard):?>
|
||||
function update1() {
|
||||
@@ -740,16 +739,16 @@ function update1() {
|
||||
vtun = info[0];
|
||||
if (typeof n[vtun]=='undefined') n[vtun] = 0; else n[vtun]++;
|
||||
if (info[1] == 0) {
|
||||
$('td#'+vtun+'-hs-'+n[vtun]).text('not received');
|
||||
$('td#'+vtun+'-hs-'+n[vtun]).text('_(not received)_');
|
||||
} else if (info[1] > 86400) {
|
||||
var d = parseInt(info[1]/86400);
|
||||
var s = d==1 ? '' : 's';
|
||||
$('td#'+vtun+'-hs-'+n[vtun]).text(d+' day'+s+' ago');
|
||||
var s = d==1 ? '_(day)_' : '_(days)_';
|
||||
$('td#'+vtun+'-hs-'+n[vtun]).text(d+s+' _(ago)_');
|
||||
} else {
|
||||
var h = parseInt(info[1]/3600).pad();
|
||||
var m = parseInt(info[1]/60%60).pad();
|
||||
var s = parseInt(info[1]%60).pad();
|
||||
$('td#'+vtun+'-hs-'+n[vtun]).text(h+':'+m+':'+s+' ago');
|
||||
$('td#'+vtun+'-hs-'+n[vtun]).text(h+':'+m+':'+s+' _(ago)_');
|
||||
}
|
||||
$('td#'+vtun+'-rx-'+n[vtun]).html(info[2]+' <i class="fa fa-fw fa-arrow-up"></i> '+info[3]+' <i class="fa fa-fw fa-arrow-down"></i>');
|
||||
}
|
||||
@@ -763,7 +762,7 @@ function update5() {
|
||||
$.each(data.split('\0'),function(k,v) {$('#fan'+k).html(v);});
|
||||
});
|
||||
<?endif;?>
|
||||
$.post('<?=$url?>',{cmd:'speed',port:port_select,timestamp:timestamp,rx_bytes:rx_bytes,tx_bytes:tx_bytes},function(d) {
|
||||
$.post('<?=$url?>',{cmd:'speed',port:port_select,timestamp:timestamp,rx_bytes:rx_bytes,tx_bytes:tx_bytes,},function(d) {
|
||||
var data = d.split('\0');
|
||||
$('#inbound').text(data[0]);
|
||||
$('#outbound').text(data[1]);
|
||||
@@ -805,14 +804,14 @@ function update30() {
|
||||
});
|
||||
$.post('<?=$url?>',{cmd:'array',path:'<?=$path?>',hot:'<?=$display['hot']?>',max:'<?=$display['max']?>',unit:'<?=$display['unit']?>',text:<?=$display['text']?>,critical:'<?=$display['critical']?>',warning:'<?=$display['warning']?>'},function(d) {
|
||||
var data = d.split('\0');
|
||||
var info = moreInfo(data,'Array');
|
||||
var info = moreInfo(data,'_(Array)_');
|
||||
$('#array_list').html(data[0]);
|
||||
$('#array_info').parent().css('display',info?'':'none');
|
||||
$('#array_info').html(info);
|
||||
smartMenu('#array_list');
|
||||
$.post('<?=$url?>',{cmd:'cache',path:'<?=$path?>',hot:'<?=$display['hot']?>',max:'<?=$display['max']?>',unit:'<?=$display['unit']?>',text:<?=$display['text']?>,critical:'<?=$display['critical']?>',warning:'<?=$display['warning']?>'},function(d) {
|
||||
var data = d.split('\0');
|
||||
var info = moreInfo(data,'Cache');
|
||||
var info = moreInfo(data,'_(Cache)_');
|
||||
$('#cache_list').html(data[0]);
|
||||
$('#cache_info').parent().css('display',info?'':'none');
|
||||
$('#cache_info').html(info);
|
||||
@@ -820,7 +819,7 @@ function update30() {
|
||||
<?if ($devs):?>
|
||||
$.post('<?=$url?>',{cmd:'extra',path:'<?=$path?>',hot:'<?=$display['hot']?>',max:'<?=$display['max']?>',unit:'<?=$display['unit']?>',text:<?=$display['text']?>,critical:'<?=$display['critical']?>',warning:'<?=$display['warning']?>'},function(d) {
|
||||
var data = d.split('\0');
|
||||
var info = moreInfo(data,'Unassigned');
|
||||
var info = moreInfo(data,'_(Unassigned)_');
|
||||
$('#extra_list').html(data[0]);
|
||||
$('#extra_info').parent().css('display',info?'':'none');
|
||||
$('#extra_info').html(info);
|
||||
@@ -894,11 +893,11 @@ function toggleCPU(init) {
|
||||
if ($.cookie('cpu_view')===undefined) {
|
||||
if ($.cookie('cpu')===undefined) {
|
||||
$('.cpu_open').show();
|
||||
$('.cpu_close').text('Hide details');
|
||||
$('.cpu_close').text('_(Hide details)_');
|
||||
$('.cpu_view').find('td').css('padding-bottom','0');
|
||||
} else {
|
||||
$('.cpu_open').hide();
|
||||
$('.cpu_close').text('Show details');
|
||||
$('.cpu_close').text('_(Show details)_');
|
||||
$('.cpu_view').find('td').css('padding-bottom','20px');
|
||||
}
|
||||
} else {
|
||||
@@ -940,7 +939,7 @@ function toggleView(field,init,view) {
|
||||
}
|
||||
function StopArray() {
|
||||
<?if ($confirm['stop']):?>
|
||||
swal({title:'Proceed?',text:'This will stop the array',type:'warning',showCancelButton:true},function(){StopArrayNow();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will stop the array)_',type:'warning',showCancelButton:true},function(){StopArrayNow();});
|
||||
<?else:?>
|
||||
StopArrayNow();
|
||||
<?endif;?>
|
||||
@@ -951,7 +950,7 @@ function StopArrayNow() {
|
||||
}
|
||||
function StartArray() {
|
||||
<?if ($confirm['stop']):?>
|
||||
swal({title:'Proceed?',text:'This will start the array',type:'warning',showCancelButton:true},function(){StartArrayNow();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will start the array)_',type:'warning',showCancelButton:true},function(){StartArrayNow();});
|
||||
<?else:?>
|
||||
StartArrayNow();
|
||||
<?endif;?>
|
||||
@@ -962,7 +961,7 @@ function StartArrayNow() {
|
||||
}
|
||||
function Reboot() {
|
||||
<?if ($confirm['down']):?>
|
||||
swal({title:'Proceed?',text:'This will reboot the system',type:'warning',showCancelButton:true},function(){RebootNow();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will reboot the system)_',type:'warning',showCancelButton:true},function(){RebootNow();});
|
||||
<?else:?>
|
||||
RebootNow();
|
||||
<?endif;?>
|
||||
@@ -973,7 +972,7 @@ function RebootNow() {
|
||||
}
|
||||
function Shutdown() {
|
||||
<?if ($confirm['down']):?>
|
||||
swal({title:'Proceed?',text:'This will shutdown the system',type:'warning',showCancelButton:true},function(){ShutdownNow();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will shutdown the system)_',type:'warning',showCancelButton:true},function(){ShutdownNow();});
|
||||
<?else:?>
|
||||
ShutdownNow();
|
||||
<?endif;?>
|
||||
@@ -986,7 +985,7 @@ function ShutdownNow() {
|
||||
<?if ($sleep):?>
|
||||
function Sleep() {
|
||||
<?if ($confirm['sleep']):?>
|
||||
swal({title:'Proceed?',text:'This will put the system to sleep',type:'warning',showCancelButton:true},function(){SleepNow();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will put the system to sleep)_',type:'warning',showCancelButton:true},function(){SleepNow();});
|
||||
<?else:?>
|
||||
SleepNow();
|
||||
<?endif;?>
|
||||
|
||||
@@ -18,10 +18,10 @@ Tag="clock-o"
|
||||
<?$keys = explode("\n", file_get_contents('webGui/include/timezones.key'));?>
|
||||
|
||||
<form markdown="1" name="datetime_settings" method="POST" action="/update.htm" target="progressFrame">
|
||||
Current date and time:
|
||||
: <?=my_time(time())?>
|
||||
_(Current date and time)_:
|
||||
: <?=my_lang(my_time(time()))?>
|
||||
|
||||
Time zone:
|
||||
_(Time zone)_:
|
||||
: <select name="timeZone" size="1"><?
|
||||
foreach ($keys as $key) {
|
||||
list($timezone, $city) = explode('|', $key);
|
||||
@@ -29,46 +29,60 @@ Time zone:
|
||||
}
|
||||
?></select>
|
||||
|
||||
:help4
|
||||
> Select your applicable time zone from the drop-down list.
|
||||
:end
|
||||
|
||||
Use NTP:
|
||||
_(Use NTP)_:
|
||||
: <select name="USE_NTP" size="1" onchange="checkDateTimeSettings(this.form)">
|
||||
<?=mk_option($var['USE_NTP'], "yes", "Yes")?>
|
||||
<?=mk_option($var['USE_NTP'], "no", "No")?>
|
||||
<?=mk_option($var['USE_NTP'], "yes", _('Yes'))?>
|
||||
<?=mk_option($var['USE_NTP'], "no", _('No'))?>
|
||||
</select>
|
||||
|
||||
:help5
|
||||
> Select 'Yes' to use Network Time Protocol to keep your server time accurate.
|
||||
> We **highly** recommend the use of a network time server, especially if you plan on using Active Directory.
|
||||
>
|
||||
> Note: if using `pool.ntp.org` time servers, please also refer to [their documentation](http://www.pool.ntp.org/en/use.html).
|
||||
:end
|
||||
|
||||
NTP server 1:
|
||||
_(NTP server)_ 1:
|
||||
: <input type="text" name="NTP_SERVER1" maxlength="40" class="narrow" value="<?=htmlspecialchars($var['NTP_SERVER1'])?>">
|
||||
|
||||
:help6
|
||||
> This is the primary NTP server to use. Enter a FQDN or an IP address.
|
||||
:end
|
||||
|
||||
NTP server 2:
|
||||
_(NTP server)_ 2:
|
||||
: <input type="text" name="NTP_SERVER2" maxlength="40" class="narrow" value="<?=htmlspecialchars($var['NTP_SERVER2'])?>">
|
||||
|
||||
:help7
|
||||
> This is the alternate NTP server to use if NTP Server 1 is down.
|
||||
:end
|
||||
|
||||
NTP server 3:
|
||||
_(NTP server)_ 3:
|
||||
: <input type="text" name="NTP_SERVER3" maxlength="40" class="narrow" value="<?=htmlspecialchars($var['NTP_SERVER3'])?>">
|
||||
|
||||
:help8
|
||||
> This is the alternate NTP Server to use if NTP Servers 1 and 2 are both down.
|
||||
:end
|
||||
|
||||
NTP server 4:
|
||||
_(NTP server)_ 4:
|
||||
: <input type="text" name="NTP_SERVER4" maxlength="40" class="narrow" value="<?=htmlspecialchars($var['NTP_SERVER4'])?>">
|
||||
|
||||
:help9
|
||||
> This is the alternate NTP Server to use if NTP Servers 1, 2, and 3 are all down.
|
||||
:end
|
||||
|
||||
New date and time:
|
||||
_(New date and time)_:
|
||||
: <input type="text" name="newDateTime" maxlength="20" class="narrow" value="<?=my_time(time(), "%F %T")?>">
|
||||
|
||||
:help10
|
||||
> Enter the current time-of-day. Use format YYYY-MM-DD HH:MM:SS. Greyed out when using NTP.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="setDateTime" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="setDateTime" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="address-card-o"
|
||||
Cond="strpos($disks[$name]['status'],'_NP')===false"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -23,13 +23,15 @@ $(function() {
|
||||
});
|
||||
</script>
|
||||
<table class='share_status small'>
|
||||
<thead><td style="width:40px">#</td><td>Attribute Name</td><td>Flag</td><td>Value</td><td>Worst</td><td>Threshold</td><td>Type</td><td>Updated</td><td>Failed</td><td style="width:145px">Raw Value</td></thead>
|
||||
<thead><td style="width:40px">#</td><td>_(Attribute Name)_</td><td>_(Flag)_</td><td>_(Value)_</td><td>_(Worst)_</td><td>_(Threshold)_</td><td>_(Type)_</td><td>_(Updated)_</td><td>_(Failed)_</td><td style="width:145px">_(Raw Value)_</td></thead>
|
||||
<tbody id="disk_attributes"><tr><td colspan='10'><div class="spinner"></div></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
:help34
|
||||
> This list shows the SMART attributes supported by this disk. For more information about each SMART attribute, it is recommended to search online.
|
||||
>
|
||||
> Attributes in *orange* may require your attention. They have a **raw value** greater than zero and may indicate a pending disk failure.
|
||||
>
|
||||
> Special attention is required when the particular attribute raw value starts to increase over time. When in doubt, consult the Limetech forum for advice.
|
||||
:end
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="building"
|
||||
Cond="strpos($disks[$name]['status'],'_NP')===false"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -23,11 +23,13 @@ $(function() {
|
||||
});
|
||||
</script>
|
||||
<table class='share_status small'>
|
||||
<thead><td style="width:33%">Feature</td><td>Value</td><td>Information</td></thead>
|
||||
<thead><td style="width:33%">_(Feature)_</td><td>_(Value)_</td><td>_(Information)_</td></thead>
|
||||
<tbody id="disk_capabilities"><tr><td colspan='3'><div class="spinner"></div></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
:help35
|
||||
> This list shows the SMART capabilities supported by this disk.
|
||||
>
|
||||
> Observe here the estimated duration of the SMART short and extended self-tests.
|
||||
:end
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="user"
|
||||
Cond="strpos($disks[$name]['status'],'_NP')===false"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -17,7 +17,7 @@ Cond="strpos($disks[$name]['status'],'_NP')===false"
|
||||
?>
|
||||
<style>
|
||||
input[type=date]{border:none;margin-left:-2px;padding-left:0;background:transparent;box-shadow:none}
|
||||
select.noframe{border:none;margin-left:-5px;padding-left:0;background:transparent;box-shadow:none}
|
||||
select.noframe{border:none;margin-left:0;padding-left:0;background:transparent;box-shadow:none}
|
||||
</style>
|
||||
<script>
|
||||
function disklog(disk,key,value) {
|
||||
@@ -31,9 +31,11 @@ $(function() {
|
||||
</script>
|
||||
|
||||
<table class='share_status small'>
|
||||
<thead><td style="width:33%">Title</td><td>Information</td></thead>
|
||||
<thead><td style="width:33%">_(Title)_</td><td>_(Information)_</td></thead>
|
||||
<tbody id="disk_identify"><tr><td colspan='2'><div class="spinner"></div></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
:help36
|
||||
> This list shows the SMART identity information of this disk
|
||||
:end
|
||||
|
||||
+150
-110
@@ -234,125 +234,137 @@ $(function() {
|
||||
</script>
|
||||
|
||||
<form markdown="1" method="POST" action="/update.htm" target="progressFrame" onsubmit="doDispatch(this)">
|
||||
Name:
|
||||
: <span class='big'><?=htmlspecialchars(my_disk($name))?></span>
|
||||
_(Name)_:
|
||||
: <?=my_lang(my_disk($name),3)?>
|
||||
|
||||
Partition size:
|
||||
_(Partition size)_:
|
||||
: <?=my_number($disk['sizeSb'])?> KB (K=1024)
|
||||
|
||||
Partition format:
|
||||
: <?=$disk['format']?>
|
||||
_(Partition format)_:
|
||||
: <?=_($disk['format'])?>
|
||||
|
||||
<?if ($var['spinupGroups']=="yes" && ($disk['type']=="Data" || $disk['type']=="Parity")):?>
|
||||
Spinup group(s):
|
||||
: <input type="text" name="diskSpinupGroup.<?=$disk['idx'];?>" maxlength="256" value="<?=$disk['spinupGroup']?>">
|
||||
_(Spinup group(s))_:
|
||||
: <input type="text" name="diskSpinupGroup.<?=$disk['idx']?>" maxlength="256" value="<?=$disk['spinupGroup']?>">
|
||||
|
||||
<?endif;?>
|
||||
Spin down delay:
|
||||
_(Spin down delay)_:
|
||||
: <select name="diskSpindownDelay.<?=$disk['idx']?>">
|
||||
<?=mk_option($disk['spindownDelay'], "-1", "Use default")?>
|
||||
<?=mk_option($disk['spindownDelay'], "0", "Never")?>
|
||||
<?=mk_option($disk['spindownDelay'], "15", "15 minutes")?>
|
||||
<?=mk_option($disk['spindownDelay'], "30", "30 minutes")?>
|
||||
<?=mk_option($disk['spindownDelay'], "45", "45 minutes")?>
|
||||
<?=mk_option($disk['spindownDelay'], "1", "1 hour")?>
|
||||
<?=mk_option($disk['spindownDelay'], "2", "2 hours")?>
|
||||
<?=mk_option($disk['spindownDelay'], "3", "3 hours")?>
|
||||
<?=mk_option($disk['spindownDelay'], "4", "4 hours")?>
|
||||
<?=mk_option($disk['spindownDelay'], "5", "5 hours")?>
|
||||
<?=mk_option($disk['spindownDelay'], "6", "6 hours")?>
|
||||
<?=mk_option($disk['spindownDelay'], "7", "7 hours")?>
|
||||
<?=mk_option($disk['spindownDelay'], "8", "8 hours")?>
|
||||
<?=mk_option($disk['spindownDelay'], "9", "9 hours")?>
|
||||
<?=mk_option($disk['spindownDelay'], "-1", _('Use default'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "0", _('Never'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "15", "15 "._('minutes'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "30", "30 "._('minutes'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "45", "45 "._('minutes'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "1", "1 "._('hour'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "2", "2 "._('hours'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "3", "3 "._('hours'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "4", "4 "._('hours'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "5", "5 "._('hours'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "6", "6 "._('hours'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "7", "7 "._('hours'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "8", "8 "._('hours'))?>
|
||||
<?=mk_option($disk['spindownDelay'], "9", "9 "._('hours'))?>
|
||||
</select><span id="smart_selftest" class='orange-text'></span>
|
||||
|
||||
Warning disk temperature threshold (°<?=$display['unit']?>):
|
||||
_(Warning disk temperature threshold)_ (°<?=$display['unit']?>):
|
||||
: <input type="number" min="0" max="300" name="<?=htmlspecialchars($name)?>_hotTemp" class="narrow" value="<?=strlen($disk['hotTemp'])?displayTemp($disk['hotTemp']):''?>" placeholder="<?=displayTemp($display['hot'])?>">
|
||||
|
||||
:help9
|
||||
> *Warning disk temperature* sets the warning threshold for this hard disk temperature. Exceeding this threshold will result in a warning notification.
|
||||
>
|
||||
> A value of zero will disable the warning threshold (including notifications).
|
||||
:end
|
||||
|
||||
Critical disk temperature threshold (°<?=$display['unit']?>):
|
||||
_(Critical disk temperature threshold)_ (°<?=$display['unit']?>):
|
||||
: <input type="number" min="0" max="300" name="<?=htmlspecialchars($name)?>_maxTemp" class="narrow" value="<?=strlen($disk['maxTemp'])?displayTemp($disk['maxTemp']):''?>" placeholder="<?=displayTemp($display['max'])?>">
|
||||
|
||||
:help10
|
||||
> *Critical disk temperature* sets the critical threshold for this hard disk temperature. Exceeding this threshold will result in an alert notification.
|
||||
>
|
||||
> A value of zero will disable the critical threshold (including notifications).
|
||||
:end
|
||||
|
||||
<?if ($disk['type']=="Data" || $disk['name']=="cache"):?>
|
||||
File system status:
|
||||
: <?=$disk['fsStatus']?>
|
||||
_(File system status)_:
|
||||
: <?=_($disk['fsStatus'])?>
|
||||
|
||||
<?if ($var['fsState']=="Stopped"):?>
|
||||
<?$disabled = $var['mdState']=="SWAP_DSBL" ? "disabled" : "";?>
|
||||
<?$disabled = $var['mdState']=="SWAP_DSBL" ? "disabled" : ""?>
|
||||
<?if ($disk['type']=="Data" || $var['SYS_CACHE_SLOTS']==1):?>
|
||||
File system type:
|
||||
: <select id="diskFsType" name="diskFsType.<?=$disk['idx'];?>" <?=$disabled?>>
|
||||
<?=mk_option($disk['fsType'], "auto", "auto")?>
|
||||
<?=mk_option($disk['fsType'], "xfs", "xfs")?>
|
||||
<?=mk_option($disk['fsType'], "btrfs", "btrfs")?>
|
||||
<?=mk_option($disk['fsType'], "reiserfs", "reiserfs")?>
|
||||
<?=mk_option($disk['fsType'], "luks:xfs", "xfs - encrypted")?>
|
||||
<?=mk_option($disk['fsType'], "luks:btrfs", "btrfs - encrypted")?>
|
||||
<?=mk_option($disk['fsType'], "luks:reiserfs", "reiserfs - encrypted")?>
|
||||
_(File system type)_:
|
||||
: <select id="diskFsType" name="diskFsType.<?=$disk['idx']?>" <?=$disabled?>>
|
||||
<?=mk_option($disk['fsType'], "auto", _('auto'))?>
|
||||
<?=mk_option($disk['fsType'], "xfs", _('xfs'))?>
|
||||
<?=mk_option($disk['fsType'], "btrfs", _('btrfs'))?>
|
||||
<?=mk_option($disk['fsType'], "reiserfs", _('reiserfs'))?>
|
||||
<?=mk_option($disk['fsType'], "luks:xfs", _('xfs')." - "._('encrypted'))?>
|
||||
<?=mk_option($disk['fsType'], "luks:btrfs", _('btrfs')." - "._('encrypted'))?>
|
||||
<?=mk_option($disk['fsType'], "luks:reiserfs", _('reiserfs')." - "._('encrypted'))?>
|
||||
</select>
|
||||
|
||||
:help11
|
||||
> Enter the desired file system type. Changing the file system type of a device will permit you to reformat
|
||||
> that device using the new file system. Be aware that **all existing data on the device will be lost**.
|
||||
:end
|
||||
|
||||
<?elseif ($var['SYS_CACHE_SLOTS']>1):?>
|
||||
File system type:
|
||||
: <select id="diskFsType" name="diskFsType.<?=$disk['idx'];?>" <?=$disabled?>>
|
||||
<?=mk_option($disk['fsType'], "auto", "auto")?>
|
||||
<?=mk_option($disk['fsType'], "btrfs", "btrfs")?>
|
||||
<?=mk_option($disk['fsType'], "luks:btrfs", "btrfs - encrypted")?>
|
||||
_(File system type)_:
|
||||
: <select id="diskFsType" name="diskFsType.<?=$disk['idx']?>" <?=$disabled?>>
|
||||
<?=mk_option($disk['fsType'], "auto", _('auto'))?>
|
||||
<?=mk_option($disk['fsType'], "btrfs", _('btrfs'))?>
|
||||
<?=mk_option($disk['fsType'], "luks:btrfs", _('btrfs')." - "._('encrypted'))?>
|
||||
</select>
|
||||
|
||||
<?endif;?>
|
||||
<?else:?>
|
||||
File system type:
|
||||
: <?=str_replace('luks:','',$disk['fsType']).(strpos($disk['fsType'],'luks:')!==false ? ' - encrypted' : '')?>
|
||||
_(File system type)_:
|
||||
: <?=_(str_replace('luks:','',$disk['fsType'])).(strpos($disk['fsType'],'luks:')!==false ? ' - '._('encrypted') : '')?>
|
||||
|
||||
<?endif;?>
|
||||
Comments:
|
||||
: <input type="text" name="diskComment.<?=$disk['idx'];?>" maxlength="256" value="<?=htmlspecialchars($disk['comment'])?>">
|
||||
_(Comments)_:
|
||||
: <input type="text" name="diskComment.<?=$disk['idx']?>" maxlength="256" value="<?=htmlspecialchars($disk['comment'])?>">
|
||||
|
||||
:help12
|
||||
> This text will appear under the *Comments* column for the share in Windows Explorer.
|
||||
> Enter anything you like, up to 256 characters.
|
||||
:end
|
||||
|
||||
Warning disk utilization threshold (%):
|
||||
_(Warning disk utilization threshold)_ (%):
|
||||
: <input type="number" min="0" max="100" name="<?=htmlspecialchars($name)?>_warning" class="narrow" value="<?=strlen($disk['warning'])?$disk['warning']:''?>" placeholder="<?=$display['warning']?>">
|
||||
|
||||
:help13
|
||||
> *Warning disk utilization* sets the warning threshold for this hard disk utilization. Exceeding this threshold will result in a warning notification.
|
||||
>
|
||||
> When the warning threshold is set equal or greater than the critical threshold, there will be only critical notifications (warnings are not existing).
|
||||
>
|
||||
> A value of zero will disable the warning threshold (including notifications).
|
||||
:end
|
||||
|
||||
Critical disk utilization threshold (%):
|
||||
_(Critical disk utilization threshold)_ (%):
|
||||
: <input type="number" min="0" max="100" name="<?=htmlspecialchars($name)?>_critical" class="narrow" value="<?=strlen($disk['critical'])?$disk['critical']:''?>" placeholder="<?=$display['critical']?>")>
|
||||
|
||||
:help14
|
||||
> *Critical disk utilization* sets the critical threshold for this hard disk utilization. Exceeding this threshold will result in an alert notification.
|
||||
>
|
||||
> A value of zero will disable the critical threshold (including notifications).
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
|
||||
: <input type="submit" name="changeDisk" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeDisk" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
<?if (strpos($disk['fsType'],"btrfs")!==false):?>
|
||||
<div id="title" class="nocontrol"><span class="left"><i class="title fa fa-balance-scale"></i>Balance Status</span></div>
|
||||
<div id="title" class="nocontrol"><span class="left"><i class="title fa fa-balance-scale"></i>_(Balance Status)_</span></div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'btrfs-balance-<?=$disk['name']?>','/mnt/<?=$disk['name']?>')">
|
||||
<?if ($disk['fsStatus']=="Mounted"):?>
|
||||
<?exec("$docroot/webGui/scripts/btrfs_balance status /mnt/{$disk['name']}", $balance_status, $retval);?>
|
||||
<?exec("$docroot/webGui/scripts/btrfs_balance status /mnt/{$disk['name']}", $balance_status, $retval)?>
|
||||
|
||||
btrfs filesystem df:
|
||||
: <?echo "<pre>".shell_exec("/sbin/btrfs filesystem df /mnt/{$disk['name']}")."</pre>";?>
|
||||
_(btrfs filesystem df)_:
|
||||
: <?echo "<pre>".shell_exec("/sbin/btrfs filesystem df /mnt/{$disk['name']}")."</pre>"?>
|
||||
|
||||
btrfs balance status:
|
||||
: <?echo "<pre id='btrfs-balance'>".implode("\n", $balance_status)."</pre>";?>
|
||||
_(btrfs balance status)_:
|
||||
: <?echo "<pre id='btrfs-balance'>".implode("\n", $balance_status)."</pre>"?>
|
||||
|
||||
<?if ($retval != 0):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_balance">
|
||||
@@ -361,21 +373,22 @@ btrfs balance status:
|
||||
<input type="hidden" name="#arg[3]" value="">
|
||||
|
||||
|
||||
: <input type="submit" value="Balance">
|
||||
: <input type="submit" value="_(Balance)_">
|
||||
<?if ($var['SYS_CACHE_SLOTS']>1):?>
|
||||
<select onchange="updateMode(this.form,this.value)">
|
||||
<?=mk_option(1,'','Perform full balance');?>
|
||||
<?=mk_option(1,'-dconvert=single -mconvert=raid1','Convert to single mode');?>
|
||||
<?=mk_option(1,'-dconvert=raid0 -mconvert=raid1','Convert to raid0 mode');?>
|
||||
<?=mk_option(1,'-dconvert=raid1 -mconvert=raid1','Convert to raid1 mode');?>
|
||||
<?if ($var['SYS_CACHE_SLOTS']>=4) echo mk_option(1,'-dconvert=raid10 -mconvert=raid10','Convert to raid10 mode');?>
|
||||
<?if ($var['SYS_CACHE_SLOTS']>=3) echo mk_option(1,'-dconvert=raid5 -mconvert=raid1','Convert to raid5 mode *see help');?>
|
||||
<?if ($var['SYS_CACHE_SLOTS']>=4) echo mk_option(1,'-dconvert=raid6 -mconvert=raid1','Convert to raid6 mode *see help');?>
|
||||
<?=mk_option(1,'',_('Perform full balance'))?>
|
||||
<?=mk_option(1,'-dconvert=single -mconvert=raid1',_('Convert to single mode'))?>
|
||||
<?=mk_option(1,'-dconvert=raid0 -mconvert=raid1',_('Convert to raid0 mode'))?>
|
||||
<?=mk_option(1,'-dconvert=raid1 -mconvert=raid1',_('Convert to raid1 mode'))?>
|
||||
<?if ($var['SYS_CACHE_SLOTS']>=4) echo mk_option(1,'-dconvert=raid10 -mconvert=raid10',_('Convert to raid10 mode'))?>
|
||||
<?if ($var['SYS_CACHE_SLOTS']>=3) echo mk_option(1,'-dconvert=raid5 -mconvert=raid1',_('Convert to raid5 mode *see help'))?>
|
||||
<?if ($var['SYS_CACHE_SLOTS']>=4) echo mk_option(1,'-dconvert=raid6 -mconvert=raid1',_('Convert to raid6 mode *see help'))?>
|
||||
</select>
|
||||
<?else:?>
|
||||
*Perform full balance*
|
||||
*_(Perform full balance)_*
|
||||
<?endif;?>
|
||||
|
||||
:help15
|
||||
> **Balance** will run the *btrfs balance* program to restripe the extents across all pool devices, for example,
|
||||
> to convert the pool from raid1 to raid0 or vice-versa.
|
||||
>
|
||||
@@ -392,6 +405,7 @@ btrfs balance status:
|
||||
> For more complete documentation, please refer to the btrfs-balance [Manpage](https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-balance)
|
||||
>
|
||||
> *Note: raid5 and raid6 are generally still considered **experimental** by the Linux community*
|
||||
:end
|
||||
|
||||
<?else:?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_balance">
|
||||
@@ -399,27 +413,29 @@ btrfs balance status:
|
||||
<input type="hidden" name="#arg[2]" value="/mnt/<?=$disk['name']?>">
|
||||
|
||||
|
||||
: <input type="submit" value="Cancel">
|
||||
: <input type="submit" value="_(Cancel)_">
|
||||
|
||||
:help16
|
||||
> **Cancel** will cancel the balance operation in progress.
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
<?else:?>
|
||||
|
||||
|
||||
: <input type="submit" value="Balance" disabled><?=!preg_match('/^cache\d+$/',$disk['name']) ? "<b>Balance</b> is only available when array is Started." : "See Cache Settings."?>
|
||||
: <input type="submit" value="_(Balance)_" disabled><?=!preg_match('/^cache\d+$/',$disk['name']) ? "<b>"._('Balance')."</b> "._('is only available when array is Started') : _('See Cache Settings')?>
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
<?endif;?>
|
||||
<?if (strpos($disk['fsType'],"btrfs")!==false):?>
|
||||
<div id="title" class="nocontrol"><span class="left"><i class="title fa fa-paint-brush"></i>Scrub Status</span></div>
|
||||
<div id="title" class="nocontrol"><span class="left"><i class="title fa fa-paint-brush"></i>_(Scrub Status)_</span></div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'btrfs-scrub-<?=$disk['name']?>','/mnt/<?=$disk['name']?>')">
|
||||
<?if ($disk['fsStatus']=="Mounted"):?>
|
||||
<?exec("$docroot/webGui/scripts/btrfs_scrub status /mnt/{$disk['name']}", $scrub_status, $retval);?>
|
||||
<?exec("$docroot/webGui/scripts/btrfs_scrub status /mnt/{$disk['name']}", $scrub_status, $retval)?>
|
||||
|
||||
btrfs scrub status:
|
||||
: <?echo "<pre id='btrfs-scrub'>".implode("\n", $scrub_status)."</pre>";?>
|
||||
_(btrfs scrub status)_:
|
||||
: <?echo "<pre id='btrfs-scrub'>".implode("\n", $scrub_status)."</pre>"?>
|
||||
|
||||
<?if ($retval != 0):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_scrub">
|
||||
@@ -428,12 +444,14 @@ btrfs scrub status:
|
||||
<input type="hidden" name="#arg[3]" value="-r">
|
||||
|
||||
|
||||
: <input type="submit" value="Scrub"><label><input type="checkbox" name="#arg[3]" value=""> Repair corrupted blocks</label>
|
||||
: <input type="submit" value="_(Scrub)_"><label><input type="checkbox" name="#arg[3]" value=""> _(Repair corrupted blocks)_</label>
|
||||
|
||||
:help17
|
||||
> **Scrub** runs the *btrfs scrub* program which will read all data and metadata blocks from all
|
||||
> devices and verify checksums.
|
||||
>
|
||||
> If *Repair corrupted blocks* is checked, *btrfs scrub* will repair corrupted blocks if there’s a correct copy available.
|
||||
:end
|
||||
|
||||
<?else:?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_scrub">
|
||||
@@ -441,27 +459,29 @@ btrfs scrub status:
|
||||
<input type="hidden" name="#arg[2]" value="/mnt/<?=$disk['name']?>">
|
||||
|
||||
|
||||
: <input type="submit" value="Cancel">
|
||||
: <input type="submit" value="_(Cancel)_">
|
||||
|
||||
:help18
|
||||
> **Cancel** will cancel the Scrub operation in progress.
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
<?else:?>
|
||||
|
||||
|
||||
: <input type="submit" value="Scrub" disabled><?=!preg_match('/^cache\d+$/',$disk['name']) ? "<b>Scrub</b> is only available when array is Started." : "See Cache Settings."?>
|
||||
: <input type="submit" value="_(Scrub)_" disabled><?=!preg_match('/^cache\d+$/',$disk['name']) ? "<b>"._('Scrub')."</b> "._('is only available when array is Started') : _('See Cache Settings')?>
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
<?endif?>
|
||||
<?if (strpos($disk['fsType'],"btrfs")!==false):?>
|
||||
<div id="title" class="nocontrol"><span class="left"><i class="title fa fa-shield"></i>Check Filesystem Status</span></div>
|
||||
<div id="title" class="nocontrol"><span class="left"><i class="title fa fa-shield"></i>_(Check Filesystem Status)_</span></div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'btrfs-check-<?=$disk['name']?>','/dev/<?=$disk['deviceSb']?> <?=$disk['id']?>')">
|
||||
<?if (maintenance_mode()):?>
|
||||
<?exec("$docroot/webGui/scripts/btrfs_check status /dev/{$disk['deviceSb']} {$disk['id']}", $check_status, $retval);?>
|
||||
<?exec("$docroot/webGui/scripts/btrfs_check status /dev/{$disk['deviceSb']} {$disk['id']}", $check_status, $retval)?>
|
||||
|
||||
btrfs check status:
|
||||
: <?echo "<pre id='btrfs-check'>".implode("\n", $check_status)."</pre>";?>
|
||||
_(btrfs check status)_:
|
||||
: <?echo "<pre id='btrfs-check'>".implode("\n", $check_status)."</pre>"?>
|
||||
|
||||
<?if ($retval != 0):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_check">
|
||||
@@ -470,8 +490,9 @@ btrfs check status:
|
||||
<input type="hidden" name="#arg[3]" value="<?=$disk['id']?>">
|
||||
|
||||
|
||||
: <input type="submit" value="Check"><input type="text" name="#arg[4]" class="narrow" maxlength="256" value="--readonly"> Options (see Help)
|
||||
: <input type="submit" value="_(Check)_"><input type="text" name="#arg[4]" class="narrow" maxlength="256" value="--readonly"> _(Options (see Help))_
|
||||
|
||||
:help19
|
||||
> **Check** will run the *btrfs check* program to check file system integrity on the device.
|
||||
>
|
||||
> The *Options* field is initialized with *--readonly* which specifies check-only. If repair is needed, you should run
|
||||
@@ -481,6 +502,7 @@ btrfs check status:
|
||||
> how large the file system is, and what errors might be present, the operation can take **a long time** to finish (hours).
|
||||
> Not much info is printed in the window, but you can verify the operation is running by observing the read/write counters
|
||||
> increasing for the device on the Main page.
|
||||
:end
|
||||
|
||||
<?else:?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_check">
|
||||
@@ -489,33 +511,35 @@ btrfs check status:
|
||||
<input type="hidden" name="#arg[3]" value="<?=$disk['id']?>">
|
||||
|
||||
|
||||
: <input type="submit" value="Cancel"> *Running*
|
||||
: <input type="submit" value="_(Cancel)_"> *_(Running)_*
|
||||
|
||||
:help20
|
||||
> **Cancel** will cancel the Check operation in progress.
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
<?else:?>
|
||||
|
||||
<?if (!preg_match('/^cache\d+$/',$disk['name'])):?>
|
||||
|
||||
: <input type="submit" value="Check" disabled> **Check** is only available when array is Started in **Maintenance** mode.
|
||||
: <input type="submit" value="_(Check)_" disabled> **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
|
||||
<?else:?>
|
||||
|
||||
: <input type="submit" value="Check" disabled> See Cache Settings.
|
||||
: <input type="submit" value="_(Check)_" disabled> _(See Cache Settings)_.
|
||||
<?endif;?>
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
<?endif;?>
|
||||
<?if (strpos($disk['fsType'],"reiserfs")!==false):?>
|
||||
<div id="title" class="nocontrol"><span class="left"><i class="title fa fa-shield"></i>Check Filesystem Status</span></div>
|
||||
<div id="title" class="nocontrol"><span class="left"><i class="title fa fa-shield"></i>_(Check Filesystem Status)_</span></div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'rfs-check-<?=$disk['name']?>','/dev/<?=$disk['deviceSb']?> <?=$disk['id']?>')">
|
||||
<?if (maintenance_mode()):?>
|
||||
<?exec("$docroot/webGui/scripts/reiserfs_check status /dev/{$disk['deviceSb']} {$disk['id']}", $check_status, $retval);?>
|
||||
<?exec("$docroot/webGui/scripts/reiserfs_check status /dev/{$disk['deviceSb']} {$disk['id']}", $check_status, $retval)?>
|
||||
|
||||
reiserfsck status:
|
||||
: <?echo "<pre id='rfs-check'>".implode("\n", $check_status)."</pre>";?>
|
||||
_(reiserfsck status)_:
|
||||
: <?echo "<pre id='rfs-check'>".implode("\n", $check_status)."</pre>"?>
|
||||
|
||||
<?if ($retval != 0):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/reiserfs_check">
|
||||
@@ -524,8 +548,9 @@ reiserfsck status:
|
||||
<input type="hidden" name="#arg[3]" value="<?=$disk['id']?>">
|
||||
|
||||
|
||||
: <input type="submit" value="Check"><input type="text" name="#arg[4]" class="narrow" maxlength="256" value=""> Options (see Help)
|
||||
: <input type="submit" value="_(Check)_"><input type="text" name="#arg[4]" class="narrow" maxlength="256" value=""> _(Options (see Help))_
|
||||
|
||||
:help21
|
||||
> **Check** will run the *reiserfsck* program to check file system integrity on the device.
|
||||
>
|
||||
> The *Options* field may be filled in with specific options used to fix problems in the file system. Typically, you
|
||||
@@ -536,6 +561,7 @@ reiserfsck status:
|
||||
> how large the file system is, and what errors might be present, the operation can take **a long time** to finish (hours).
|
||||
> Not much info is printed in the window, but you can verify the operation is running by observing the read/write counters
|
||||
> increasing for the device on the Main page.
|
||||
:end
|
||||
|
||||
<?else:?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/reiserfs_check">
|
||||
@@ -544,27 +570,29 @@ reiserfsck status:
|
||||
<input type="hidden" name="#arg[3]" value="<?=$disk['id']?>">
|
||||
|
||||
|
||||
: <input type="submit" value="Cancel"> *Running*
|
||||
: <input type="submit" value="_(Cancel)_"> *_(Running)_*
|
||||
|
||||
:help22
|
||||
> **Cancel** will cancel the Check operation in progress.
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
<?else:?>
|
||||
|
||||
|
||||
: <input type="submit" value="Check" disabled> **Check** is only available when array is Started in **Maintenance** mode.
|
||||
: <input type="submit" value="_(Check)_" disabled> **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
<?endif;?>
|
||||
<?if (strpos($disk['fsType'],"xfs")!==false):?>
|
||||
<div id="title" class="nocontrol"><span class="left"><i class="title fa fa-shield"></i>Check Filesystem Status</span></div>
|
||||
<div id="title" class="nocontrol"><span class="left"><i class="title fa fa-shield"></i>_(Check Filesystem Status)_</span></div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'xfs-check-<?=$disk['name']?>','/dev/<?=$disk['deviceSb']?> <?=$disk['id']?>')">
|
||||
<?if (maintenance_mode()):?>
|
||||
<?exec("$docroot/webGui/scripts/xfs_check status /dev/{$disk['deviceSb']} {$disk['id']}", $check_status, $retval);?>
|
||||
<?exec("$docroot/webGui/scripts/xfs_check status /dev/{$disk['deviceSb']} {$disk['id']}", $check_status, $retval)?>
|
||||
|
||||
xfs_repair status:
|
||||
: <?echo "<pre id='xfs-check'>".implode("\n", $check_status)."</pre>";?>
|
||||
_(xfs_repair status)_:
|
||||
: <?echo "<pre id='xfs-check'>".implode("\n", $check_status)."</pre>"?>
|
||||
|
||||
<?if ($retval != 0):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/xfs_check">
|
||||
@@ -573,8 +601,9 @@ xfs_repair status:
|
||||
<input type="hidden" name="#arg[3]" value="<?=$disk['id']?>">
|
||||
|
||||
|
||||
: <input type="submit" value="Check"><input type="text" name="#arg[4]" class="narrow" maxlength="256" value="-n"> Options (see Help)
|
||||
: <input type="submit" value="_(Check)_"><input type="text" name="#arg[4]" class="narrow" maxlength="256" value="-n"> _(Options (see Help))_
|
||||
|
||||
:help23
|
||||
> **Check** will run the *xfs_repair* program to check file system integrity on the device.
|
||||
>
|
||||
> The *Options* field is initialized with *-n* which specifies check-only. If repair is needed, you should run
|
||||
@@ -584,6 +613,7 @@ xfs_repair status:
|
||||
> how large the file system is, and what errors might be present, the operation can take **a long time** to finish (hours).
|
||||
> Not much info is printed in the window, but you can verify the operation is running by observing the read/write counters
|
||||
> increasing for the device on the Main page.
|
||||
:end
|
||||
|
||||
<?else:?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/xfs_check">
|
||||
@@ -591,21 +621,23 @@ xfs_repair status:
|
||||
<input type="hidden" name="#arg[2]" value="/dev/<?=$disk['deviceSb']?>">
|
||||
|
||||
|
||||
: <input type="submit" value="Cancel"> *Running*
|
||||
: <input type="submit" value="_(Cancel)_"> *_(Running)_*
|
||||
|
||||
:help24
|
||||
> **Cancel** will cancel the Check operation in progress.
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
<?else:?>
|
||||
|
||||
|
||||
: <input type="submit" value="Check" disabled> **Check** is only available when array is Started in **Maintenance** mode.
|
||||
: <input type="submit" value="_(Check)_" disabled> **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
<div id="title"><span class="left"><i class="title fa fa-plus-square"></i>SMART Settings</span></div>
|
||||
<div id="title"><span class="left"><i class="title fa fa-plus-square"></i>_(SMART Settings)_</span></div>
|
||||
|
||||
<form markdown="1" name="smart_settings" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareDeviceInfo(this)">
|
||||
<input type="hidden" name="#file" value="/boot/config/smart-one.cfg">
|
||||
@@ -614,21 +646,23 @@ xfs_repair status:
|
||||
<input type="hidden" name="#cleanup" value="true">
|
||||
<input type="hidden" name="smEvents" value="">
|
||||
<input type="hidden" name="smGlue" value="<?=htmlspecialchars($var['smGlue'])?>">
|
||||
SMART notification value:
|
||||
_(SMART notification value)_:
|
||||
: <select name="smSelect">
|
||||
<?=mk_option($disk['smSelect'], "-1", "Use default")?>
|
||||
<?=mk_option($disk['smSelect'], "0", "Raw")?>
|
||||
<?=mk_option($disk['smSelect'], "1", "Normalized")?>
|
||||
<?=mk_option($disk['smSelect'], "-1", _('Use default'))?>
|
||||
<?=mk_option($disk['smSelect'], "0", _('Raw'))?>
|
||||
<?=mk_option($disk['smSelect'], "1", _('Normalized'))?>
|
||||
</select>
|
||||
|
||||
:help25
|
||||
> SMART notifications are generated on either an increasing RAW value of the attribute, or a decreasing NORMALIZED value which reaches a predefined threshold set by the manufacturer.
|
||||
>
|
||||
> Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings).
|
||||
:end
|
||||
|
||||
SMART notification tolerance level:
|
||||
_(SMART notification tolerance level)_:
|
||||
: <select name="smLevel">
|
||||
<?=mk_option($disk['smLevel'], "-1", "Use default")?>
|
||||
<?=mk_option($disk['smLevel'], "1.00", "Absolute")?>
|
||||
<?=mk_option($disk['smLevel'], "-1", _('Use default'))?>
|
||||
<?=mk_option($disk['smLevel'], "1.00", _('Absolute'))?>
|
||||
<?=mk_option($disk['smLevel'], "1.05", "5%")?>
|
||||
<?=mk_option($disk['smLevel'], "1.10", "10%")?>
|
||||
<?=mk_option($disk['smLevel'], "1.15", "15%")?>
|
||||
@@ -637,14 +671,16 @@ SMART notification tolerance level:
|
||||
<?=mk_option($disk['smLevel'], "1.50", "50%")?>
|
||||
</select>
|
||||
|
||||
:help26
|
||||
> A tolerance level may be given to prevent that small changes result in a notification. Setting a too high tolerance level may result in critical changes without a notification.
|
||||
>
|
||||
> Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings).
|
||||
:end
|
||||
|
||||
SMART controller type:
|
||||
_(SMART controller type)_:
|
||||
: <select name="smType" onchange="setGlue(this.form,true)">
|
||||
<?=mk_option($disk['smType'], "-1", "Use default")?>
|
||||
<?=mk_option($disk['smType'], " ", "Automatic")?>
|
||||
<?=mk_option($disk['smType'], "-1", _('Use default'))?>
|
||||
<?=mk_option($disk['smType'], " ", _('Automatic'))?>
|
||||
<?=mk_option($disk['smType'], "-d ata", "ATA")?>
|
||||
<?=mk_option($disk['smType'], "-d nvme", "NVMe")?>
|
||||
<?=mk_option($disk['smType'], "-d sat", "SAT")?>
|
||||
@@ -662,26 +698,30 @@ SMART controller type:
|
||||
<input type="text" name="smPort3" value="<?=$disk['smPort3']?>" class="option"><select name="smPort3" class="narrow" style="display:none" disabled></select><span id="devtext" class="devtext">/dev/</span>
|
||||
<input type="text" name="smDevice" value="<?=$disk['smDevice']??''?>" class="option" placeholder="<?=htmlspecialchars($disk['device'])?>"><span id="helptext" class="helptext">enter disk index and device name as applicable to your controller</span>
|
||||
|
||||
:help27
|
||||
> By default automatic controller selection is done by smartctl to read the SMART information. Certain controllers however need specific settings for smartctl to work.
|
||||
> Use this setting to select your controller type and fill-in the specific disk index and device name for your situation. Use the manufacturer's documentation to find the relevant information.
|
||||
>
|
||||
> Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings).
|
||||
:end
|
||||
|
||||
SMART attribute notifications:
|
||||
: <input type="text" name="smCustom" value="<?=$disk['smCustom']??$var['smCustom']?>" class="narrow">Custom attributes (use comma to separate numbers)
|
||||
_(SMART attribute notifications)_:
|
||||
: <input type="text" name="smCustom" value="<?=$disk['smCustom']??$var['smCustom']?>" class="narrow">_(Custom attributes (use comma to separate numbers))_
|
||||
|
||||
<?for ($x=0; $x < count($preselect); $x++):?>
|
||||
|
||||
: <input type="checkbox" name="at<?=$x?>" value="<?=$preselect[$x]['code']?>"<?=in_array($preselect[$x]['code'],$events)?' checked':''?>><span class="code">Attribute = <?=$preselect[$x]['code']?></span><?=$preselect[$x]['text']?>
|
||||
: <input type="checkbox" name="at<?=$x?>" value="<?=$preselect[$x]['code']?>"<?=in_array($preselect[$x]['code'],$events)?' checked':''?>><span class="code">_(Attribute)_ = <?=$preselect[$x]['code']?></span><?=$preselect[$x]['text']?>
|
||||
<?endfor;?>
|
||||
|
||||
:help28
|
||||
> The user can enable or disable notifications for the given SMART attributes. It is recommended to keep the default, which is ALL selected attributes,
|
||||
> when certain attributes are not present on your hard disk or do not provide the correct information, these may be excluded.
|
||||
> In addition custom SMART attributes can be entered to generate notifications. Be careful in this selection,
|
||||
> it may cause an avalance of notifcations if inappropriate SMART attributes are chosen.
|
||||
>
|
||||
> Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings).
|
||||
:end
|
||||
|
||||
<input type="submit" name="#default" value="Default">
|
||||
: <input type="submit" name="#apply" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
<input type="submit" name="#default" value="_(Default)_">
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
@@ -18,7 +18,11 @@ Tag="tv"
|
||||
<?
|
||||
$zip = htmlspecialchars(str_replace(' ','_',strtolower($var['NAME'])));
|
||||
?>
|
||||
<style>ul,li{margin:0;padding-top:0;padding-bottom:0;}</style>
|
||||
<style>
|
||||
ul,li{margin:0;padding-top:0;padding-bottom:0}
|
||||
pre.pre{margin:30px 0}
|
||||
pre>p{margin:0;padding:0}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function zipfile(){
|
||||
@@ -47,14 +51,17 @@ function diagnostics(file) {
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<div id="pleaseWait" style="display:none;font-weight:bold;color:red;text-align:center;margin:0">Please wait... collecting diagnostic information (this may take several minutes)</div>
|
||||
<div id="pleaseWait" style="display:none;font-weight:bold;color:red;text-align:center;margin:0">_(Please wait)_... _(collecting diagnostic information (this may take several minutes))_</div>
|
||||
:plug1
|
||||
This utility is used for troubleshooting purposes. It will collect all of the system information and configuration files, and package these files in a single ZIP file which can be saved locally.
|
||||
Subsequently, this file can be included in your correspondence with Limetech or the Unraid forum.
|
||||
|
||||
This will help others to quickly get the inside information of your system and provide better support to your problem. The following information
|
||||
and configuration files are collected:
|
||||
:end
|
||||
|
||||
<pre markdown="1">
|
||||
<pre class="pre" markdown="1">
|
||||
:plug2
|
||||
+ */config*
|
||||
<br>copy all *\*.cfg files*, *go* file and the *super.dat* file. These are configuration files.
|
||||
+ */config/shares*
|
||||
@@ -71,8 +78,10 @@ and configuration files are collected:
|
||||
<br>save a SMART report of each individual disk present in your system.
|
||||
+ *Docker*
|
||||
<br>save files *docker.log*, *libvirtd.log* and *libvirt/qemu/\*.log*.
|
||||
:end
|
||||
</pre>
|
||||
|
||||
:plug3
|
||||
Clicking **Download** will start the collection process and then instruct your browser to save the zip file locally.
|
||||
|
||||
*No personal information such as user names, passwords, or any other file contents not specified above is included
|
||||
@@ -82,5 +91,6 @@ by Unraid OS; however, your server name, IP address, and user share names* **wil
|
||||
to the system log.*
|
||||
|
||||
*Use* **Anonymize diagnostics** *when publishing the diagnostics file in the public forum. In private communication with Limetech it is recommended to uncheck this setting and capture all information unaltered.*
|
||||
:end
|
||||
|
||||
<input type="button" value="Download" onclick="diagnostics(zipfile())"><input type="button" value="Done" onclick="done()"><input type="checkbox" id="anonymize" checked>Anonymize diagnostics
|
||||
<input type="button" value="_(Download)_" onclick="diagnostics(zipfile())"><input type="button" value="_(Done)_" onclick="done()"><input type="checkbox" id="anonymize" checked>_(Anonymize diagnostics)_
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="user-circle-o"
|
||||
Cond="$var['fsState']!='Stopped' && $var['shareDisk']!='no'"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2019, Lime Technology
|
||||
* Copyright 2012-2019, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -34,11 +34,12 @@ $(function() {
|
||||
</script>
|
||||
|
||||
<table class="share_status share">
|
||||
<thead><tr><td style="width:15%">Name</td><td style="width:33%">Comment</td><td>SMB</td><td>NFS</td><td>AFP</td><td style="width:8%">Type</td><td style="width:8%">Size</td><td style="width:8%">Free</td><td style="width:4%">View</td></tr></thead>
|
||||
<thead><tr><td style="width:15%">_(Name)_</td><td style="width:33%">_(Comment)_</td><td>_(SMB)_</td><td>_(NFS)_</td><td>_(AFP)_</td><td style="width:8%">_(Type)_</td><td style="width:8%">_(Size)_</td><td style="width:8%">_(Free)_</td><td style="width:4%">_(View)_</td></tr></thead>
|
||||
<tbody id="disk_list"></tbody>
|
||||
</table>
|
||||
<p><input id="compute-disks" type="button" value="Compute All" onclick="$(this).prop('disabled',true);displayDisks('yes')"></p>
|
||||
<p><input id="compute-disks" type="button" value="_(Compute All)_" onclick="$(this).prop('disabled',true);displayDisks('yes')"></p>
|
||||
|
||||
:help2
|
||||
> **Colored Status Indicator** -- the significance of the color indicator at the beginning of each line in *Disk Shares* is as follows:
|
||||
>
|
||||
> <i class='fa fa-circle orb green-orb'></i>Mounted, underlying device has redundancy/protection.
|
||||
@@ -57,3 +58,4 @@ $(function() {
|
||||
> + SMB security mode displayed in *italics* indicates exported hidden disk shares.
|
||||
> + AFP security mode displayed in *italics* indicates exported time-machine disk shares.
|
||||
> + NFS does not have special modes for disk shares.
|
||||
:end
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-disks"
|
||||
Tag="icon-disk"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -58,51 +58,58 @@ function setIndex(form) {
|
||||
</script>
|
||||
|
||||
<form markdown="1" method="POST" action="/update.htm" target="progressFrame" onsubmit="doDispatch(this)">
|
||||
Enable auto start:
|
||||
_(Enable auto start)_:
|
||||
: <select name="startArray" size="1">
|
||||
<?=mk_option($var['startArray'], "no", "No")?>
|
||||
<?=mk_option($var['startArray'], "yes", "Yes")?>
|
||||
<?=mk_option($var['startArray'], "no", _('No'))?>
|
||||
<?=mk_option($var['startArray'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help11
|
||||
> If set to 'Yes' then if the device configuration is correct upon server start-up,
|
||||
> the array will be automatically Started and shares exported.<br>
|
||||
> If set to 'No' then you must Start the array yourself.
|
||||
:end
|
||||
|
||||
Default spin down delay:
|
||||
_(Default spin down delay)_:
|
||||
: <select name="spindownDelay" size="1">
|
||||
<?=mk_option($var['spindownDelay'], "0", "Never")?>
|
||||
<?=mk_option($var['spindownDelay'], "15", "15 minutes")?>
|
||||
<?=mk_option($var['spindownDelay'], "30", "30 minutes")?>
|
||||
<?=mk_option($var['spindownDelay'], "45", "45 minutes")?>
|
||||
<?=mk_option($var['spindownDelay'], "1", "1 hour")?>
|
||||
<?=mk_option($var['spindownDelay'], "2", "2 hours")?>
|
||||
<?=mk_option($var['spindownDelay'], "3", "3 hours")?>
|
||||
<?=mk_option($var['spindownDelay'], "4", "4 hours")?>
|
||||
<?=mk_option($var['spindownDelay'], "5", "5 hours")?>
|
||||
<?=mk_option($var['spindownDelay'], "6", "6 hours")?>
|
||||
<?=mk_option($var['spindownDelay'], "7", "7 hours")?>
|
||||
<?=mk_option($var['spindownDelay'], "8", "8 hours")?>
|
||||
<?=mk_option($var['spindownDelay'], "9", "9 hours")?>
|
||||
<?=mk_option($var['spindownDelay'], "0", _('Never'))?>
|
||||
<?=mk_option($var['spindownDelay'], "15", "15 "._('minutes'))?>
|
||||
<?=mk_option($var['spindownDelay'], "30", "30 "._('minutes'))?>
|
||||
<?=mk_option($var['spindownDelay'], "45", "45 "._('minutes'))?>
|
||||
<?=mk_option($var['spindownDelay'], "1", "1 "._('hour'))?>
|
||||
<?=mk_option($var['spindownDelay'], "2", "2 "._('hours'))?>
|
||||
<?=mk_option($var['spindownDelay'], "3", "3 "._('hours'))?>
|
||||
<?=mk_option($var['spindownDelay'], "4", "4 "._('hours'))?>
|
||||
<?=mk_option($var['spindownDelay'], "5", "5 "._('hours'))?>
|
||||
<?=mk_option($var['spindownDelay'], "6", "6 "._('hours'))?>
|
||||
<?=mk_option($var['spindownDelay'], "7", "7 "._('hours'))?>
|
||||
<?=mk_option($var['spindownDelay'], "8", "8 "._('hours'))?>
|
||||
<?=mk_option($var['spindownDelay'], "9", "9 "._('hours'))?>
|
||||
</select>
|
||||
|
||||
:help12
|
||||
> This setting defines the 'default' time-out for spinning hard drives down after a period
|
||||
> of no I/O activity. You may override the default value for an individual disk on the Disk Settings
|
||||
> page for that disk.
|
||||
:end
|
||||
|
||||
Enable spinup groups:
|
||||
_(Enable spinup groups)_:
|
||||
: <select name="spinupGroups" size="1">
|
||||
<?=mk_option($var['spinupGroups'], "no", "No")?>
|
||||
<?=mk_option($var['spinupGroups'], "yes", "Yes")?>
|
||||
<?=mk_option($var['spinupGroups'], "no", _('No'))?>
|
||||
<?=mk_option($var['spinupGroups'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help13
|
||||
> If set to 'Yes' then the [Spinup Groups](/Help) feature is enabled.
|
||||
:end
|
||||
|
||||
Default partition format:
|
||||
_(Default partition format)_:
|
||||
: <select name="defaultFormat" size="1">
|
||||
<?=mk_option($var['defaultFormat'], "1", "MBR: unaligned")?>
|
||||
<?=mk_option($var['defaultFormat'], "2", "MBR: 4K-aligned")?>
|
||||
<?=mk_option($var['defaultFormat'], "1", _('MBR: unaligned'))?>
|
||||
<?=mk_option($var['defaultFormat'], "2", _('MBR: 4K-aligned'))?>
|
||||
</select>
|
||||
|
||||
:help14
|
||||
> Defines the type of partition layout to create when formatting hard drives 2TB in size and
|
||||
> smaller **only**. (All devices larger then 2TB are always set up with GPT partition tables.)
|
||||
>
|
||||
@@ -116,136 +123,165 @@ Default partition format:
|
||||
> support of so-called *Advanced Format* drives.
|
||||
>
|
||||
> Unless you have a specific requirement do not change this setting from the default **MBR: 4K-aligned**.
|
||||
:end
|
||||
|
||||
Default file system:
|
||||
_(Default file system)_:
|
||||
: <select name="defaultFsType" size="1">
|
||||
<?=mk_option($var['defaultFsType'], "xfs", "xfs");?>
|
||||
<?=mk_option($var['defaultFsType'], "btrfs", "btrfs");?>
|
||||
<?=mk_option($var['defaultFsType'], "reiserfs", "reiserfs");?>
|
||||
<?=mk_option($var['defaultFsType'], "luks:xfs", "xfs - encrypted");?>
|
||||
<?=mk_option($var['defaultFsType'], "luks:btrfs", "btrfs - encrypted");?>
|
||||
<?=mk_option($var['defaultFsType'], "luks:reiserfs", "reiserfs - encrypted");?>
|
||||
<?=mk_option($var['defaultFsType'], "xfs", _('xfs'));?>
|
||||
<?=mk_option($var['defaultFsType'], "btrfs", _('btrfs'));?>
|
||||
<?=mk_option($var['defaultFsType'], "reiserfs", _('reiserfs'));?>
|
||||
<?=mk_option($var['defaultFsType'], "luks:xfs", _('xfs')." - "._('encrypted'));?>
|
||||
<?=mk_option($var['defaultFsType'], "luks:btrfs", _('btrfs')." - "._('encrypted'));?>
|
||||
<?=mk_option($var['defaultFsType'], "luks:reiserfs", _('reiserfs')." - "._('encrypted'));?>
|
||||
</select>
|
||||
|
||||
:help15
|
||||
> Defines the default file system type to create when an *unmountable* array device is formatted.
|
||||
>
|
||||
> The default file system type for a single or multi-device cache is always Btrfs.
|
||||
:end
|
||||
|
||||
Shutdown time-out:
|
||||
_(Shutdown time-out)_:
|
||||
: <input type="text" name="shutdownTimeout" maxlength="10" value="<?=$var['shutdownTimeout']?>" class="narrow">
|
||||
|
||||
:help16
|
||||
> When shutting down the server, this defines how long to wait in seconds for *graceful* shutdown before forcing
|
||||
> shutdown to continue.
|
||||
:end
|
||||
|
||||
Tunable (poll_attributes):
|
||||
: <input type="text" name="poll_attributes" maxlength="10" value="<?=$var['poll_attributes']?>" class="narrow"><?=$var['poll_attributes_status']?>
|
||||
_(Tunable (poll_attributes))_:
|
||||
: <input type="text" name="poll_attributes" maxlength="10" value="<?=$var['poll_attributes']?>" class="narrow"><?=_($var['poll_attributes_status'])?>
|
||||
|
||||
:help17
|
||||
> This defines the disk SMART polling interval, in seconds. A value of 0 disables SMART polling (not recommended).
|
||||
:end
|
||||
|
||||
Tunable (enable NCQ):
|
||||
_(Tunable (enable NCQ))_:
|
||||
: <select name="queueDepth" size="1">
|
||||
<?=mk_option($var['queueDepth'], "auto", "Auto")?>
|
||||
<?=mk_option($var['queueDepth'], "1", "No")?>
|
||||
<?=mk_option($var['queueDepth'], "auto", _('Auto'))?>
|
||||
<?=mk_option($var['queueDepth'], "1", _('No'))?>
|
||||
</select>
|
||||
|
||||
:help18
|
||||
> If set to **No** then *Native Command Queuing* is disabled for all array devices that support NCQ.
|
||||
>
|
||||
> **Auto** leaves the setting for each device as-is.
|
||||
>
|
||||
> Note: You must reboot after selecting Auto for setting to take effect.
|
||||
:end
|
||||
|
||||
Tunable (nr_requests):
|
||||
: <input type="text" name="nr_requests" maxlength="10" value="<?=$var['nr_requests']?>" class="narrow"><?=$var['nr_requests_status']?>
|
||||
_(Tunable (nr_requests))_:
|
||||
: <input type="text" name="nr_requests" maxlength="10" value="<?=$var['nr_requests']?>" class="narrow"><?=_($var['nr_requests_status'])?>
|
||||
|
||||
:help19
|
||||
> This defines the `nr_requests` device driver setting for all array devices.
|
||||
>
|
||||
> **Auto** leaves the setting for each device as-is.
|
||||
>
|
||||
> Note: if you set to blank and click Apply, the setting is restored to its default, and you must reboot for setting to take effect.
|
||||
:end
|
||||
|
||||
Tunable (scheduler):
|
||||
_(Tunable (scheduler))_:
|
||||
: <select name="md_scheduler" size="1">
|
||||
<?=mk_option($var['md_scheduler'], "auto", "Auto")?>
|
||||
<?=mk_option($var['md_scheduler'], "mq-deadline", "mq-deadline")?>
|
||||
<?=mk_option($var['md_scheduler'], "kyber", "kyber")?>
|
||||
<?=mk_option($var['md_scheduler'], "bfq", "bfq")?>
|
||||
<?=mk_option($var['md_scheduler'], "none", "none")?>
|
||||
<?=mk_option($var['md_scheduler'], "auto", _('Auto'))?>
|
||||
<?=mk_option($var['md_scheduler'], "mq-deadline", _('mq-deadline'))?>
|
||||
<?=mk_option($var['md_scheduler'], "kyber", _('kyber'))?>
|
||||
<?=mk_option($var['md_scheduler'], "bfq", _('bfq'))?>
|
||||
<?=mk_option($var['md_scheduler'], "none", _('none'))?>
|
||||
</select>
|
||||
|
||||
:help20
|
||||
> Selects which kernel I/O scheduler to use for all array devices.
|
||||
>
|
||||
> **Auto** leaves the setting for each device as-is (mq-deadline).
|
||||
>
|
||||
> Note: You must reboot after selecting Auto for setting to take effect.
|
||||
:end
|
||||
|
||||
Tunable (md_num_stripes):
|
||||
: <input type="text" name="md_num_stripes" maxlength="10" value="<?=$var['md_num_stripes']?>" class="narrow"><?=$var['md_num_stripes_status']?>
|
||||
_(Tunable (md_num_stripes))_:
|
||||
: <input type="text" name="md_num_stripes" maxlength="10" value="<?=$var['md_num_stripes']?>" class="narrow"><?=_($var['md_num_stripes_status'])?>
|
||||
|
||||
:help21
|
||||
> This is the size of the *stripe pool* in number of *stripes*. A *stripe* refers to a data structure that faclitiates parallel 4K read/write
|
||||
> operations necessary for a parity-protected array.
|
||||
>
|
||||
> Note: if you set to blank and click Apply, the setting is restored to its default, and will take effect after reboot.
|
||||
:end
|
||||
|
||||
Tunable (md_queue_limit):
|
||||
: <input type="text" name="md_queue_limit" maxlength="10" value="<?=$var['md_queue_limit']?>" class="narrow"><?=$var['md_queue_limit_status']?>
|
||||
_(Tunable (md_queue_limit))_:
|
||||
: <input type="text" name="md_queue_limit" maxlength="10" value="<?=$var['md_queue_limit']?>" class="narrow"><?=_($var['md_queue_limit_status'])?>
|
||||
|
||||
:help22
|
||||
> This is a number in [1..100] which is the maximum steady-load percentage of the stripe pool permitted to be in use.
|
||||
>
|
||||
> Note: if you set to blank and click Apply, the setting is restored to its default.
|
||||
:end
|
||||
|
||||
Tunable (md_sync_limit):
|
||||
: <input type="text" name="md_sync_limit" maxlength="10" value="<?=$var['md_sync_limit']?>" class="narrow"><?=$var['md_sync_limit_status']?>
|
||||
_(Tunable (md_sync_limit))_:
|
||||
: <input type="text" name="md_sync_limit" maxlength="10" value="<?=$var['md_sync_limit']?>" class="narrow"><?=_($var['md_sync_limit_status'])?>
|
||||
|
||||
:help23
|
||||
> This is a number in [0..100] which is the maximum percentage of the stripe pool allocated for parity sync/check in the presence of other I/O.
|
||||
>
|
||||
> Note: if you set to blank and click Apply, the setting is restored to its default.
|
||||
:end
|
||||
|
||||
Tunable (md_write_method):
|
||||
_(Tunable (md_write_method))_:
|
||||
: <select name="md_write_method" size="1">
|
||||
<?=mk_option($var['md_write_method'], "auto", "Auto")?>
|
||||
<?=mk_option($var['md_write_method'], "0", "read/modify/write")?>
|
||||
<?=mk_option($var['md_write_method'], "1", "reconstruct write")?>
|
||||
<?=mk_option($var['md_write_method'], "auto", _('Auto'))?>
|
||||
<?=mk_option($var['md_write_method'], "0", _('read/modify/write'))?>
|
||||
<?=mk_option($var['md_write_method'], "1", _('reconstruct write'))?>
|
||||
</select>
|
||||
|
||||
:help24
|
||||
> Selects the method to employ when writing to enabled disk in parity protected array.
|
||||
>
|
||||
> *Auto* selects `read/modify/write`.
|
||||
:end
|
||||
|
||||
Default warning disk utilization threshold (%):
|
||||
_(Default warning disk utilization threshold)_ (%):
|
||||
: <input type="number" min="0" max="100" name="display_warning" class="narrow" value="<?=$display['warning']?>">
|
||||
|
||||
:help25
|
||||
> *Warning disk utilization* sets the default warning threshold for all hard disks utilization. Exceeding this threshold will result in a warning notification.
|
||||
>
|
||||
> When the warning threshold is set equal or greater than the critical threshold, there will be only critical notifications (warnings are not existing).
|
||||
>
|
||||
> A value of zero will disable the warning threshold (including notifications).
|
||||
:end
|
||||
|
||||
Default critical disk utilization threshold (%):
|
||||
_(Default critical disk utilization threshold)_ (%):
|
||||
: <input type="number" min="0" max="100" name="display_critical" class="narrow" value="<?=$display['critical']?>">
|
||||
|
||||
:help26
|
||||
> *Critical disk utilization* sets the default critical threshold for all hard disks utilization. Exceeding this threshold will result in an alert notification.
|
||||
>
|
||||
> A value of zero will disable the critical threshold (including notifications).
|
||||
:end
|
||||
|
||||
Default warning disk temperature threshold (°<?=$display['unit']?>):
|
||||
_(Default warning disk temperature threshold)_ (°<?=$display['unit']?>):
|
||||
: <input type="number" min="0" max="300" name="display_hot" class="narrow" value="<?=displayTemp($display['hot'])?>">
|
||||
|
||||
:help27
|
||||
> *Warning disk temperature* sets the default warning threshold for all hard disks temperature. Exceeding this threshold will result in a warning notification.
|
||||
>
|
||||
> A value of zero will disable the warning threshold (including notifications).
|
||||
:end
|
||||
|
||||
Default critical disk temperature threshold (°<?=$display['unit']?>):
|
||||
_(Default critical disk temperature threshold)_ (°<?=$display['unit']?>):
|
||||
: <input type="number" min="0" max="300" name="display_max" class="narrow" value="<?=displayTemp($display['max'])?>">
|
||||
|
||||
:help28
|
||||
> *Critical disk temperature* sets the default critical threshold for all hard disks temperature. Exceeding this threshold will result in an alert notification.
|
||||
>
|
||||
> A value of zero will disable the critical threshold (including notifications).
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeDisk" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeDisk" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
<div id="title"><span class="left"><i class="title fa fa-plus-square"></i>Global SMART Settings</span></div>
|
||||
<div id="title"><span class="left"><i class="title fa fa-plus-square"></i>_(Global SMART Settings)_</span></div>
|
||||
|
||||
<form markdown="1" name="smart_settings" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareDiskSettings(this)">
|
||||
<input type="hidden" name="#file" value="/boot/config/smart-all.cfg">
|
||||
@@ -254,19 +290,21 @@ Default critical disk temperature threshold (°<?=$display['unit']?>):
|
||||
<input type="hidden" name="#top" value="1">
|
||||
<input type="hidden" name="smEvents" value="">
|
||||
<input type="hidden" name="smIndex" value="0">
|
||||
Default SMART notification value:
|
||||
_(Default SMART notification value)_:
|
||||
: <select name="smSelect" size="1">
|
||||
<?=mk_option($var['smSelect'], "0", "Raw")?>
|
||||
<?=mk_option($var['smSelect'], "1", "Normalized")?>
|
||||
<?=mk_option($var['smSelect'], "0", _('Raw'))?>
|
||||
<?=mk_option($var['smSelect'], "1", _('Normalized'))?>
|
||||
</select>
|
||||
|
||||
:help29
|
||||
> SMART notifications are generated on either an increasing RAW value of the attribute, or a decreasing NORMALIZED value which reaches a predefined threshold set by the manufacturer.
|
||||
>
|
||||
> This section is used to set the global settings for all disks. It is possible to adjust settings for individual disks.
|
||||
:end
|
||||
|
||||
Default SMART notification tolerance level:
|
||||
_(Default SMART notification tolerance level)_:
|
||||
: <select name="smLevel" size="1">
|
||||
<?=mk_option($var['smLevel'], "1.00", "Absolute")?>
|
||||
<?=mk_option($var['smLevel'], "1.00", _('Absolute'))?>
|
||||
<?=mk_option($var['smLevel'], "1.05", "5%")?>
|
||||
<?=mk_option($var['smLevel'], "1.10", "10%")?>
|
||||
<?=mk_option($var['smLevel'], "1.15", "15%")?>
|
||||
@@ -275,13 +313,15 @@ Default SMART notification tolerance level:
|
||||
<?=mk_option($var['smLevel'], "1.50", "50%")?>
|
||||
</select>
|
||||
|
||||
:help30
|
||||
> A tolerance level may be given to prevent that small changes result in a notification. Setting a too high tolerance level may result in critical changes without a notification.
|
||||
>
|
||||
> This section is used to set the global settings for all disks. It is possible to adjust settings for individual disks.
|
||||
:end
|
||||
|
||||
Default SMART controller type:
|
||||
_(Default SMART controller type)_:
|
||||
: <select name="smType" size="1" onchange="setIndex(this.form)">
|
||||
<?=mk_option($var['smType'], "", "Automatic")?>
|
||||
<?=mk_option($var['smType'], "", _('Automatic'))?>
|
||||
<?=mk_option($var['smType'], "-d ata", "ATA")?>
|
||||
<?=mk_option($var['smType'], "-d nvme", "NVMe")?>
|
||||
<?=mk_option($var['smType'], "-d sat", "SAT")?>
|
||||
@@ -295,26 +335,30 @@ Default SMART controller type:
|
||||
<?=mk_option($var['smType'], "-d megaraid", "MegaRAID")?>
|
||||
</select>
|
||||
|
||||
:help31
|
||||
> By default automatic controller selection is done by smartctl to read the SMART information. Certain controllers however need specific settings for smartctl to work.
|
||||
> Use this setting to select your controller type and fill-in the specific disk index and device name for your situation. Use the manufacturer's documentation to find the relevant information.
|
||||
>
|
||||
> This section is used to set the global settings for all disks. It is possible to adjust settings for individual disks.
|
||||
:end
|
||||
|
||||
Default SMART attribute notifications:
|
||||
: <input type="text" name="smCustom" value="<?=$var['smCustom']?>" class="narrow">Custom attributes (use comma to separate numbers)
|
||||
_(Default SMART attribute notifications)_:
|
||||
: <input type="text" name="smCustom" value="<?=$var['smCustom']?>" class="narrow">_(Custom attributes (use comma to separate numbers))_
|
||||
|
||||
<?for ($x = 0; $x < count($preselect); $x++):?>
|
||||
|
||||
: <input type="checkbox" name="at<?=$x?>" value="<?=$preselect[$x]['code']?>"<?=in_array($preselect[$x]['code'],$events)?' checked':''?>><span class="code">Attribute = <?=$preselect[$x]['code']?></span><?=$preselect[$x]['text']?>
|
||||
: <input type="checkbox" name="at<?=$x?>" value="<?=$preselect[$x]['code']?>"<?=in_array($preselect[$x]['code'],$events)?' checked':''?>><span class="code">_(Attribute)_ = <?=$preselect[$x]['code']?></span><?=$preselect[$x]['text']?>
|
||||
<?endfor;?>
|
||||
|
||||
:help32
|
||||
> The user can enable or disable notifications for the given SMART attributes. It is recommended to keep the default, which is ALL selected attributes,
|
||||
> when certain attributes are not present on your hard disk or do not provide the correct information, these may be excluded.
|
||||
> In addition custom SMART attributes can be entered to generate notifications. Be careful in this selection,
|
||||
> it may cause an avalance of notifcations if inappropriate SMART attributes are chosen.
|
||||
>
|
||||
> This section is used to set the global settings for all disks. It is possible to adjust settings for individual disks.
|
||||
:end
|
||||
|
||||
<input type="submit" name="#default" value="Default">
|
||||
: <input type="submit" name="#apply" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
<input type="submit" name="#default" value="_(Default)_">
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-display"
|
||||
Tag="desktop"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -15,12 +15,11 @@ Tag="desktop"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
|
||||
<?
|
||||
$void = "<img src='/webGui/images/banner.png' id='image' width='330' height='30' onclick='$("#drop").click()' style='cursor:pointer' title='Click to select PNG file'>";
|
||||
$icon = "<i class='fa fa-trash top' title='Restore default image' onclick='restore()'></i>";
|
||||
$keys = parse_ini_file('webGui/include/languages.key');
|
||||
?>
|
||||
|
||||
<style>
|
||||
span#dropbox{margin-right:20px;}
|
||||
i.top{position:relative;padding-left:4px;cursor:pointer;}
|
||||
@@ -74,20 +73,20 @@ $(function() {
|
||||
url:'/webGui/include/FileUpload.php',
|
||||
beforeEach:function(file) {
|
||||
if (!file.type.match(/^image\/png/)) {
|
||||
swal({title:"Warning",text:"Only PNG images are allowed!",type:"warning"});
|
||||
swal({title:"_(Warning)_",text:"_(Only PNG images are allowed)_!",type:"warning"});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(err, file, i) {
|
||||
switch (err) {
|
||||
case 'BrowserNotSupported':
|
||||
swal({title:"Browser error",text:"Your browser does not support HTML5 file uploads!",type:"error"});
|
||||
swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error"});
|
||||
break;
|
||||
case 'TooManyFiles':
|
||||
swal({title:"Too many files",text:"Please select one file only!",type:"error"});
|
||||
swal({title:"_(Too many files)_",text:"_(Please select one file only)_!",type:"error"});
|
||||
break;
|
||||
case 'FileTooLarge':
|
||||
swal({title:"File too large",text:"Maximum file upload size is 512 kB (524,288 bytes)",type:"error"});
|
||||
swal({title:"_(File too large)_",text:"_(Maximum file upload size is 512 kB)_ (524,288 _(bytes)_)",type:"error"});
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -105,7 +104,7 @@ $(function() {
|
||||
$('select[name="banner"]').trigger('change');
|
||||
filename = file.name;
|
||||
} else {
|
||||
swal({title:"Upload error",text:response,type:"error"});
|
||||
swal({title:"_(Upload error)_",text:response,type:"error"});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -119,173 +118,193 @@ $(function() {
|
||||
});
|
||||
</script>
|
||||
|
||||
:help100
|
||||
> The display settings below determine how items are displayed on screen. Use these settings to tweak the visual effects to your likings.
|
||||
>
|
||||
> You can experiment with these settings as desired, they only affect visual properties.
|
||||
:end
|
||||
|
||||
<form markdown="1" name="display_settings" method="POST" action="/update.php" target="progressFrame" onsubmit="saveFontSize();upload();">
|
||||
<input type="hidden" name="#file" value="dynamix/dynamix.cfg">
|
||||
<input type="hidden" name="#section" value="display">
|
||||
Font size:
|
||||
: <select name="font" id='font' size="1">
|
||||
<?=mk_option($display['font'], "50%", "Very small")?>
|
||||
<?=mk_option($display['font'], "56.25%", "Small")?>
|
||||
<?=mk_option($display['font'], "", "Normal")?>
|
||||
<?=mk_option($display['font'], "68.75%", "Large")?>
|
||||
<?=mk_option($display['font'], "75%", "Very large")?>
|
||||
<?=mk_option($display['font'],"80%","Huge")?>
|
||||
_(Language)_:
|
||||
: <select name="locale">
|
||||
<?=mk_option($display['locale'], "","English")?>
|
||||
<?foreach (glob("$docroot/languages/*",GLOB_ONLYDIR) as $dir) echo mk_option($display['locale'],basename($dir),$keys[basename($dir)])?>
|
||||
</select>
|
||||
|
||||
_(Font size)_:
|
||||
: <select name="font" id='font'>
|
||||
<?=mk_option($display['font'], "50%",_('Very small'))?>
|
||||
<?=mk_option($display['font'], "56.25%",_('Small'))?>
|
||||
<?=mk_option($display['font'], "",_('Normal'))?>
|
||||
<?=mk_option($display['font'], "68.75%",_('Large'))?>
|
||||
<?=mk_option($display['font'], "75%",_('Very large'))?>
|
||||
<?=mk_option($display['font'],"80%",_('Huge'))?>
|
||||
</select>
|
||||
|
||||
:help101
|
||||
> This is a per device setting
|
||||
|
||||
Date format:
|
||||
: <select name="date" size="1" onchange="presetTime(this.form)">
|
||||
<?=mk_option($display['date'], "%c", "System Setting")?>
|
||||
<?=mk_option($display['date'], "%A, %Y %B %e", "Day, YYYY Month D")?>
|
||||
<?=mk_option($display['date'], "%A, %e %B %Y", "Day, D Month YYYY")?>
|
||||
<?=mk_option($display['date'], "%A, %B %e, %Y", "Day, Month D, YYYY")?>
|
||||
<?=mk_option($display['date'], "%A, %m/%d/%Y", "Day, MM/DD/YYYY")?>
|
||||
<?=mk_option($display['date'], "%A, %d-%m-%Y", "Day, DD-MM-YYYY")?>
|
||||
<?=mk_option($display['date'], "%A, %d.%m.%Y", "Day, DD.MM.YYYY")?>
|
||||
<?=mk_option($display['date'], "%A, %Y-%m-%d", "Day, YYYY-MM-DD")?>
|
||||
:end
|
||||
|
||||
_(Date format)_:
|
||||
: <select name="date" onchange="presetTime(this.form)">
|
||||
<?=mk_option($display['date'], "%c","_(System Setting)_")?>
|
||||
<?=mk_option($display['date'], "%A, %Y %B %e",_('Day, YYYY Month D'))?>
|
||||
<?=mk_option($display['date'], "%A, %e %B %Y",_('Day, D Month YYYY'))?>
|
||||
<?=mk_option($display['date'], "%A, %B %e, %Y",_('Day, Month D, YYYY'))?>
|
||||
<?=mk_option($display['date'], "%A, %m/%d/%Y",_('Day, MM/DD/YYYY'))?>
|
||||
<?=mk_option($display['date'], "%A, %d-%m-%Y",_('Day, DD-MM-YYYY'))?>
|
||||
<?=mk_option($display['date'], "%A, %d.%m.%Y",_('Day, DD.MM.YYYY'))?>
|
||||
<?=mk_option($display['date'], "%A, %Y-%m-%d",_('Day, YYYY-MM-DD'))?>
|
||||
</select>
|
||||
|
||||
Time format:
|
||||
: <select name="time" size="1">
|
||||
<?=mk_option($display['time'], "%I:%M %p", "12 hours")?>
|
||||
<?=mk_option($display['time'], "%R", "24 hours")?>
|
||||
_(Time format)_:
|
||||
: <select name="time">
|
||||
<?=mk_option($display['time'], "%I:%M %p",_('12 hours'))?>
|
||||
<?=mk_option($display['time'], "%R",_('24 hours'))?>
|
||||
</select>
|
||||
|
||||
Number format:
|
||||
: <select name="number" size="1">
|
||||
<?=mk_option($display['number'], ".,", "[D] dot : [G] comma")?>
|
||||
<?=mk_option($display['number'], ". ", "[D] dot : [G] space")?>
|
||||
<?=mk_option($display['number'], ".", "[D] dot : [G] none")?>
|
||||
<?=mk_option($display['number'], ",.", "[D] comma : [G] dot")?>
|
||||
<?=mk_option($display['number'], ", ", "[D] comma : [G] space")?>
|
||||
<?=mk_option($display['number'], ",", "[D] comma : [G] none")?>
|
||||
_(Number format)_:
|
||||
: <select name="number">
|
||||
<?=mk_option($display['number'], ".,",_('[D] dot : [G] comma'))?>
|
||||
<?=mk_option($display['number'], ". ",_('[D] dot : [G] space'))?>
|
||||
<?=mk_option($display['number'], ".",_('[D] dot : [G] none'))?>
|
||||
<?=mk_option($display['number'], ",.",_('[D] comma : [G] dot'))?>
|
||||
<?=mk_option($display['number'], ", ",_('[D] comma : [G] space'))?>
|
||||
<?=mk_option($display['number'], ",",_('[D] comma : [G] none'))?>
|
||||
</select>
|
||||
|
||||
Number scaling:
|
||||
: <select name="scale" size="1">
|
||||
<?=mk_option($display['scale'], "-1", "Automatic")?>
|
||||
<?=mk_option($display['scale'], "0", "Disabled")?>
|
||||
<?=mk_option($display['scale'], "1", "KB")?>
|
||||
<?=mk_option($display['scale'], "2", "MB")?>
|
||||
<?=mk_option($display['scale'], "3", "GB")?>
|
||||
<?=mk_option($display['scale'], "4", "TB")?>
|
||||
<?=mk_option($display['scale'], "5", "PB")?>
|
||||
_(Number scaling)_:
|
||||
: <select name="scale">
|
||||
<?=mk_option($display['scale'], "-1",_('Automatic'))?>
|
||||
<?=mk_option($display['scale'], "0",_('Disabled'))?>
|
||||
<?=mk_option($display['scale'], "1",_('KB'))?>
|
||||
<?=mk_option($display['scale'], "2",_('MB'))?>
|
||||
<?=mk_option($display['scale'], "3",_('GB'))?>
|
||||
<?=mk_option($display['scale'], "4",_('TB'))?>
|
||||
<?=mk_option($display['scale'], "5",_('PB'))?>
|
||||
</select>
|
||||
|
||||
Page view:
|
||||
: <select name="tabs" size="1">
|
||||
<?=mk_option($display['tabs'], "0", "Tabbed")?>
|
||||
<?=mk_option($display['tabs'], "1", "Non-tabbed")?>
|
||||
_(Page view)_:
|
||||
: <select name="tabs">
|
||||
<?=mk_option($display['tabs'], "0",_('Tabbed'))?>
|
||||
<?=mk_option($display['tabs'], "1",_('Non-tabbed'))?>
|
||||
</select>
|
||||
|
||||
Placement of Users menu:
|
||||
: <select name="users" size="1">
|
||||
<?=mk_option($display['users'], "Tasks:3", "Header menu")?>
|
||||
<?=mk_option($display['users'], "UserPreferences", "Settings menu")?>
|
||||
_(Placement of Users menu)_:
|
||||
: <select name="users">
|
||||
<?=mk_option($display['users'], "Tasks:3",_('Header menu'))?>
|
||||
<?=mk_option($display['users'], "UserPreferences",_('Settings menu'))?>
|
||||
</select>
|
||||
|
||||
Listing height:
|
||||
: <select name="resize" size="1">
|
||||
<?=mk_option($display['resize'], "0", "Automatic")?>
|
||||
<?=mk_option($display['resize'], "1", "Fixed")?>
|
||||
_(Listing height)_:
|
||||
: <select name="resize">
|
||||
<?=mk_option($display['resize'], "0",_('Automatic'))?>
|
||||
<?=mk_option($display['resize'], "1",_('Fixed'))?>
|
||||
</select>
|
||||
|
||||
Display world-wide-name in device ID:
|
||||
: <select name="wwn" size="1">
|
||||
<?=mk_option($display['wwn'], "0", "Disabled")?>
|
||||
<?=mk_option($display['wwn'], "1", "Automatic")?>
|
||||
_(Display world-wide-name in device ID)_:
|
||||
: <select name="wwn">
|
||||
<?=mk_option($display['wwn'], "0",_('Disabled'))?>
|
||||
<?=mk_option($display['wwn'], "1",_('Automatic'))?>
|
||||
</select>
|
||||
|
||||
:help102
|
||||
> World Wide Name (WWN) is a unique identifier used for SAS attached devices.
|
||||
>
|
||||
> Select *Disabled* to suppress the appending of WWN to the device identification
|
||||
>
|
||||
> Select "Automatic" to append WWN to the device identification in case of SAS devices
|
||||
:end
|
||||
|
||||
Display array totals:
|
||||
: <select name="total" size="1">
|
||||
<?=mk_option($display['total'], "0", "No")?>
|
||||
<?=mk_option($display['total'], "1", "Yes")?>
|
||||
_(Display array totals)_:
|
||||
: <select name="total">
|
||||
<?=mk_option($display['total'], "0",_('No'))?>
|
||||
<?=mk_option($display['total'], "1",_('Yes'))?>
|
||||
</select>
|
||||
|
||||
Show array utilization indicator:
|
||||
: <select name="usage" size="1">
|
||||
<?=mk_option($display['usage'], "0", "No")?>
|
||||
<?=mk_option($display['usage'], "1", "Yes")?>
|
||||
_(Show array utilization indicator)_:
|
||||
: <select name="usage">
|
||||
<?=mk_option($display['usage'], "0",_('No'))?>
|
||||
<?=mk_option($display['usage'], "1",_('Yes'))?>
|
||||
</select>
|
||||
|
||||
Header custom text color:
|
||||
: <input type="text" class="narrow" name="header" value="<?=$display['header']?>" maxlength="6" pattern="[0-9a-fA-F]{3,6}" title="HTML color code of 3 or 6 hexadecimal digits">
|
||||
_(Header custom text color)_:
|
||||
: <input type="text" class="narrow" name="header" value="<?=$display['header']?>" maxlength="6" pattern="[0-9a-fA-F]{3,6}" title="_(HTML color code of 3 or 6 hexadecimal digits)_">
|
||||
|
||||
:help103
|
||||
> Overrule the default text color in the header. This can be used to match the text color with a background image.
|
||||
:end
|
||||
|
||||
Header custom background color:
|
||||
: <input type="text" class="narrow" name="background" value="<?=$display['background']?>" maxlength="6" pattern="[0-9a-fA-F]{3,6}" title="HTML color code of 3 or 6 hexadecimal digits">
|
||||
_(Header custom background color)_:
|
||||
: <input type="text" class="narrow" name="background" value="<?=$display['background']?>" maxlength="6" pattern="[0-9a-fA-F]{3,6}" title="_(HTML color code of 3 or 6 hexadecimal digits)_">
|
||||
|
||||
:help104
|
||||
> Overrule the default background color in the header. This can be used to match the background color with a custom text color.
|
||||
:end
|
||||
|
||||
Show banner:
|
||||
: <select name="banner" size="1" onchange="presetBanner(this.form)">
|
||||
<?=mk_option($display['banner'], "", "No")?>
|
||||
<?=mk_option($display['banner'], "image", "Yes")?>
|
||||
_(Show banner)_:
|
||||
: <select name="banner" onchange="presetBanner(this.form)">
|
||||
<?=mk_option($display['banner'], "",_('No'))?>
|
||||
<?=mk_option($display['banner'], "image",_('Yes'))?>
|
||||
</select>
|
||||
|
||||
<div id="custom" markdown="1" style="display:none">
|
||||
Custom banner:
|
||||
_(Custom banner)_:
|
||||
<input type="hidden" name="#custom" value="">
|
||||
: <span id="dropbox">
|
||||
<?if (file_exists($banner)):?>
|
||||
<img src="<?=autov($banner)?>" width="330" height="30" onclick="$('#drop').click()" style="cursor:pointer" title="Click to select PNG file"><?=$icon?>
|
||||
<img src="<?=autov($banner)?>" width="330" height="30" onclick="$('#drop').click()" style="cursor:pointer" title="_(Click to select PNG file)_"><?=$icon?>
|
||||
<?else:?>
|
||||
<?=$void?>
|
||||
<?endif;?>
|
||||
</span><em>Drag-n-drop a PNG file or click the image at the left.</em><input type="file" id="drop" accept=".png" style="display:none">
|
||||
</span><em>_(Drag-n-drop a PNG file or click the image at the left)_.</em><input type="file" id="drop" accept=".png" style="display:none">
|
||||
</div>
|
||||
|
||||
:help6
|
||||
> Image will be scaled to 1920x90 pixels. The maximum image file upload size is 512 kB (524,288 bytes).
|
||||
:end
|
||||
|
||||
Show Dashboard apps:
|
||||
: <select name="dashapps" size="1">
|
||||
<?=mk_option($display['dashapps'], "icons", "Docker + VMs")?>
|
||||
<?=mk_option($display['dashapps'], "docker", "Docker only")?>
|
||||
<?=mk_option($display['dashapps'], "vms", "VMs only")?>
|
||||
<?=mk_option($display['dashapps'], "none", "None")?>
|
||||
_(Show Dashboard apps)_:
|
||||
: <select name="dashapps">
|
||||
<?=mk_option($display['dashapps'], "icons",_('Docker + VMs'))?>
|
||||
<?=mk_option($display['dashapps'], "docker",_('Docker only'))?>
|
||||
<?=mk_option($display['dashapps'], "vms",_('VMs only'))?>
|
||||
<?=mk_option($display['dashapps'], "none",_('None'))?>
|
||||
</select>
|
||||
|
||||
Dynamix color theme:
|
||||
: <select name="theme" size="1">
|
||||
_(Dynamix color theme)_:
|
||||
: <select name="theme">
|
||||
<?foreach (glob("$docroot/webGui/styles/dynamix-*.css") as $themes):?>
|
||||
<?$theme = substr(basename($themes,'.css'),8);?>
|
||||
<?=mk_option($display['theme'], $theme, ucfirst($theme))?>
|
||||
<?=mk_option($display['theme'], $theme, _(ucfirst($theme)))?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
|
||||
Used / Free columns:
|
||||
: <select name="text" size="1">
|
||||
<?=mk_option($display['text'], "0", "Text")?>
|
||||
<?=mk_option($display['text'], "1", "Bar (gray)")?>
|
||||
<?=mk_option($display['text'], "2", "Bar (color)")?>
|
||||
<?=mk_option($display['text'], "10", "Text - Bar (gray)")?>
|
||||
<?=mk_option($display['text'], "20", "Text - Bar (color)")?>
|
||||
<?=mk_option($display['text'], "11", "Bar (gray) - Text")?>
|
||||
<?=mk_option($display['text'], "21", "Bar (color) - Text")?>
|
||||
_(Used / Free columns)_:
|
||||
: <select name="text">
|
||||
<?=mk_option($display['text'], "0",_('Text'))?>
|
||||
<?=mk_option($display['text'], "1",_('Bar (gray)'))?>
|
||||
<?=mk_option($display['text'], "2",_('Bar (color)'))?>
|
||||
<?=mk_option($display['text'], "10",_('Text - Bar (gray)'))?>
|
||||
<?=mk_option($display['text'], "20",_('Text - Bar (color)'))?>
|
||||
<?=mk_option($display['text'], "11",_('Bar (gray) - Text)'))?>
|
||||
<?=mk_option($display['text'], "21",_('Bar (color) - Text)'))?>
|
||||
</select>
|
||||
|
||||
Temperature unit:
|
||||
: <select name="unit" size="1">
|
||||
<?=mk_option($display['unit'], "C", "Celsius")?>
|
||||
<?=mk_option($display['unit'], "F", "Fahrenheit")?>
|
||||
_(Temperature unit)_:
|
||||
: <select name="unit">
|
||||
<?=mk_option($display['unit'], "C",_('Celsius'))?>
|
||||
<?=mk_option($display['unit'], "F",_('Fahrenheit'))?>
|
||||
</select>
|
||||
|
||||
:help7
|
||||
> Selects the temperature unit for the disk temperature thresholds. Changing the unit will adjust the existing value in the disk temperature thresholds as appropriate.
|
||||
>
|
||||
> Make sure any newly entered values represent the selected temperature unit.
|
||||
:end
|
||||
|
||||
<input type="submit" name="#default" value="Default" onclick="filename='reset'">
|
||||
: <input type="submit" name="#apply" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
<input type="submit" name="#default" value="_(Default)_" onclick="filename='reset'">
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
+277
-212
@@ -55,18 +55,13 @@ foreach ($ports as $ethX) {
|
||||
$file = "$docroot/webGui/".ucfirst($ethX).".page";
|
||||
if (!file_exists($file)) {
|
||||
$X = filter_var($ethX,FILTER_SANITIZE_NUMBER_INT);
|
||||
$nnn = 100 + $X;
|
||||
$tabX = 'tab'.($X+1);
|
||||
$bondX = 'bond'.$X;
|
||||
$brX = 'br'.$X;
|
||||
copy($template, $file);
|
||||
exec("sed -i 's/parentname:nnn/NetworkSettings:$nnn/;s/tabX/$tabX/;s/bondX/$bondX/g;s/brX/$brX/g;s/ethX/$ethX/g' $file");
|
||||
file_put_contents($file,str_replace(['parentname:nnn','tabX','bondX','brX','ethX'],['NetworkSettings:'.($X+100),'tab'.($X+1),'bond'.$X,'br'.$X,$ethX],file_get_contents($template)));
|
||||
$build = true;
|
||||
}
|
||||
}
|
||||
// enable interface only when VMs and Docker are stopped
|
||||
$service = exec("pgrep libvirt") ? 'VM manager' : '';
|
||||
$service .= exec("pgrep docker") ? ($service ? ' and ' : '').'Docker service' : '';
|
||||
$service = exec("pgrep libvirt") ? _('VM manager') : '';
|
||||
$service .= exec("pgrep docker") ? ($service ? ' '._('and').' ' : '')._('Docker service') : '';
|
||||
|
||||
// eth0 port status
|
||||
$no_eth0 = exec("ip link show eth0|grep -Pom1 '(NO-CARRIER|state DOWN)'");
|
||||
@@ -123,7 +118,7 @@ function prepareSettings(form) {
|
||||
var vlans = [];
|
||||
$(form).find('input[name^="VLANID:"]').each(function(){vlans.push($(this).val());});
|
||||
if (vlans.same()) {
|
||||
swal('VLAN assignment mismatch','List of VLANs contains duplicate VLAN numbers','error');
|
||||
swal('_(VLAN assignment mismatch)_','_(List of VLANs contains duplicate VLAN numbers)_','error');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -176,8 +171,8 @@ function prepareSettings(form) {
|
||||
var protocol = $(form).find('select[name="PROTOCOL:'+i+'"]').val() || 'ipv4';
|
||||
if ($(this).prop('disabled')==false && $(this).val()=='yes') {
|
||||
if (protocol != 'ipv6') {
|
||||
$(form).find('input[name="IPADDR:'+i+'"]').val('Obtaining IPv4 address...');
|
||||
$(form).find('input[name="GATEWAY:'+i+'"]').val('Obtaining IPv4 gateway...');
|
||||
$(form).find('input[name="IPADDR:'+i+'"]').val('_(Obtaining IPv4 address)_...');
|
||||
$(form).find('input[name="GATEWAY:'+i+'"]').val('_(Obtaining IPv4 gateway)_...');
|
||||
}
|
||||
} else if (protocol != 'ipv6' && $(this).val()=='yes') {
|
||||
$(form).find('input[name="IPADDR:'+i+'"]').prop('disabled',false).val('');
|
||||
@@ -189,8 +184,8 @@ function prepareSettings(form) {
|
||||
var protocol = $(form).find('select[name="PROTOCOL:'+i+'"]').val() || 'ipv4';
|
||||
if ($(this).prop('disabled')==false && $(this).val()=='yes') {
|
||||
if (protocol != 'ipv4') {
|
||||
$(form).find('input[name="IPADDR6:'+i+'"]').val('Obtaining IPv6 address...');
|
||||
$(form).find('input[name="GATEWAY6:'+i+'"]').val('Obtaining IPv6 gateway...');
|
||||
$(form).find('input[name="IPADDR6:'+i+'"]').val('_(Obtaining IPv6 address)_...');
|
||||
$(form).find('input[name="GATEWAY6:'+i+'"]').val('_(Obtaining IPv6 gateway)_...');
|
||||
}
|
||||
} else if (protocol != 'ipv4' && $(this).val()=='yes') {
|
||||
$(form).find('input[name="IPADDR6:'+i+'"]').prop('disabled',false).val('');
|
||||
@@ -201,12 +196,12 @@ function prepareSettings(form) {
|
||||
if (form.DHCP_KEEPRESOLV !== undefined && form.DHCP_KEEPRESOLV.value=='no') {
|
||||
form.DHCP_KEEPRESOLV.disabled = false;
|
||||
var protocol = $(form).find('select[name="PROTOCOL:0"]').val() || 'ipv4';
|
||||
if (protocol != 'ipv6') $(form).find('input[name^="DNS_SERVER"]').val('Obtaining DNSv4 server...');
|
||||
if (protocol != 'ipv6') $(form).find('input[name^="DNS_SERVER"]').val('_(Obtaining DNSv4 server)_...');
|
||||
}
|
||||
if (form.DHCP6_KEEPRESOLV !== undefined && form.DHCP6_KEEPRESOLV.value=='no') {
|
||||
form.DHCP6_KEEPRESOLV.disabled = false;
|
||||
var protocol = $(form).find('select[name="PROTOCOL:0"]').val() || 'ipv4';
|
||||
if (protocol != 'ipv4') $(form).find('input[name^="DNS6_SERVER"]').val('Obtaining DNSv6 server...');
|
||||
if (protocol != 'ipv4') $(form).find('input[name^="DNS6_SERVER"]').val('_(Obtaining DNSv6 server)_...');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -349,7 +344,7 @@ function removeVLAN(element) {
|
||||
$('#view-'+id[1]).find('select').first().trigger('change');
|
||||
}
|
||||
function disableForm(form) {
|
||||
$(form).find('input,select').not('input[value="Done"]').prop('disabled',true);
|
||||
$(form).find('input,select').not('input[value="_(Done)_"]').prop('disabled',true);
|
||||
$(form).find('input[name^="DESCRIPTION"],input[name^="#"]').prop('disabled',false);
|
||||
}
|
||||
var stopEvent = false;
|
||||
@@ -399,20 +394,20 @@ watchDHCP.on('message', function(data) {
|
||||
}
|
||||
});
|
||||
$(function() {
|
||||
var ctrl = "<span id='wait_eth0' class='status vshift red-text' style='display:none;font-size:1.2rem;font-style:italic'><i class='fa fa-spinner fa-spin'></i> Please wait... configuring interface</span>";
|
||||
var ctrl = "<span id='wait_eth0' class='status vshift red-text' style='display:none;font-size:1.2rem;font-style:italic'><i class='fa fa-spinner fa-spin'></i> _(Please wait)_... _(configuring interface)_</span>";
|
||||
var form = document.eth0_settings;
|
||||
<?if ($tabbed && !$service):?>
|
||||
$('#tab1').bind({click:function(){
|
||||
$('#bond-eth0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
||||
$('#bridge-eth0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
||||
$('#bond-eth0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>});
|
||||
$('#bridge-eth0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>});
|
||||
}});
|
||||
<?endif;?>
|
||||
if (!$.cookie('#view-eth0')) {$('#view-eth0').show(); $('#tag-eth0').removeClass('fa-chevron-down').addClass('fa-chevron-up');}
|
||||
<?foreach ($vlan_eth0 as $i):?>
|
||||
if (!$.cookie('#view-eth0-<?=$i?>')) {$('#view-eth0-<?=$i?>').show(); $('#tag-eth0-<?=$i?>').removeClass('fa-chevron-down').addClass('fa-chevron-up');}
|
||||
<?endforeach;?>
|
||||
$('#bond-eth0').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
||||
$('#bridge-eth0').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
||||
$('#bond-eth0').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>});
|
||||
$('#bridge-eth0').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>});
|
||||
checkBondingSettings(form,0,'eth0');
|
||||
checkBridgingSettings(form,0,'eth0');
|
||||
checkNetworkAccess(form,'eth0');
|
||||
@@ -450,42 +445,49 @@ $(function() {
|
||||
<input type="hidden" name="BRNAME" value="br0">
|
||||
<input type="hidden" name="BRSTP" value="no">
|
||||
<input type="hidden" name="BRFD" value="0">
|
||||
Interface description:
|
||||
_(Interface description)_:
|
||||
: <span class="status vshift"><i id="tag-eth0" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="viewToggle('eth0')"></i></span>
|
||||
<input type="text" name="DESCRIPTION:0" maxlength="80" value="<?=htmlspecialchars($eth0["DESCRIPTION:0"])?>" onchange="exitCode(this.form,true)">
|
||||
|
||||
:help120
|
||||
> Use this optional field to provide addditional information about the purpose of the connection.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="view-eth0" style="display:none">
|
||||
MAC address:
|
||||
_(MAC address)_:
|
||||
: <?=strtoupper(exec("ip link show eth0|grep -Pom1 'ether \K\S+'"))?>
|
||||
|
||||
:help121
|
||||
> This is the hardware address of the interface.
|
||||
> When tagging is enabled all VLANs on this interface will share the same hardware address.
|
||||
:end
|
||||
|
||||
Enable bonding:
|
||||
: <select name="BONDING" size="1" onchange="checkBondingSettings(this.form,1,'eth0')">
|
||||
<?=mk_option($eth0['BONDING'], "no", "No");?>
|
||||
<?=mk_option($eth0['BONDING'], "yes", "Yes");?>
|
||||
_(Enable bonding)_:
|
||||
: <select name="BONDING" onchange="checkBondingSettings(this.form,1,'eth0')">
|
||||
<?=mk_option($eth0['BONDING'], "no", _("No"))?>
|
||||
<?=mk_option($eth0['BONDING'], "yes", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help122
|
||||
> Bonding is a feature that combines multiple physical Ethernet interfaces into a single *bonded* interface named **bond0**.
|
||||
> This can be used to improve the connection redundancy and/or throughput of the system.
|
||||
> Different bonding modes are supported (see below), but some modes require proper switch support.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="bond-members-eth0" style="display:none">
|
||||
Bonding mode:
|
||||
: <select name="BONDING_MODE" size="1" onchange="checkBondingSettings(this.form,-1,'eth0')">
|
||||
<?=mk_option($eth0['BONDING_MODE'], "0", "balance-rr (0)");?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "1", "active-backup (1)",isset($eth0['BONDING_MODE'])?'':'selected');?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "2", "balance-xor (2)");?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "3", "broadcast (3)");?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "4", "802.3ad (4)");?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "5", "balance-tlb (5)");?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "6", "balance-alb (6)");?>
|
||||
_(Bonding mode)_:
|
||||
: <select name="BONDING_MODE" onchange="checkBondingSettings(this.form,-1,'eth0')">
|
||||
<?=mk_option($eth0['BONDING_MODE'], "0", _("balance-rr")." (0)")?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "1", _("active-backup")." (1)",isset($eth0['BONDING_MODE'])?'':'selected')?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "2", _("balance-xor")." (2)")?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "3", _("broadcast")." (3)")?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "4", _("802.3ad")." (4)")?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "5", _("balance-tlb")." (5)")?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "6", _("balance-alb")." (6)")?>
|
||||
</select>
|
||||
<span id="attention0" style="display:none"><b>Attention:</b> this mode requires a network switch with proper setup and support...</span>
|
||||
<span id="attention0" style="display:none">**_(Attention)_:** _(this mode requires a network switch with proper setup and support)_...</span>
|
||||
|
||||
:help123
|
||||
> **Mode 0 (balance-rr)**<br>
|
||||
> This mode transmits packets in a sequential order from the first available slave through the last.
|
||||
> If two real interfaces are slaves in the bond and two packets arrive destined out of the bonded interface the first will be transmitted on the first slave and the second frame will be transmitted on the second slave.
|
||||
@@ -522,316 +524,379 @@ Bonding mode:
|
||||
>
|
||||
> *Mode 1 (active-backup) is the recommended setting. Other modes allow you to set up a specific environment, but may require proper switch support.
|
||||
> Choosing a unsupported mode can result in a disrupted communication.*
|
||||
:end
|
||||
|
||||
Bonding members of bond0:
|
||||
: <select id="bond-eth0" name="BONDNICS" size="1" multiple="multiple" style="display:none">
|
||||
_(Bonding members of)_ bond0:
|
||||
: <select id="bond-eth0" name="BONDNICS" multiple="multiple" style="display:none">
|
||||
<?=mk_option($eth0['BONDNICS'],'eth0','eth0','selected disabled')?>
|
||||
<?foreach ($ports as $port):?>
|
||||
<?if (!locked('eth0',$port)) echo mk_option_check($eth0['BONDNICS'],$port,$port)?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
|
||||
:help124
|
||||
> Select which interfaces are member of the *bonded* interface. By default eth0 is a member, while other interfaces are optional.
|
||||
:end
|
||||
|
||||
</div>
|
||||
Enable bridging:
|
||||
: <select name="BRIDGING" size="1" onchange="checkBridgingSettings(this.form,1,'eth0')">
|
||||
<?=mk_option($eth0['BRIDGING'], "no", "No");?>
|
||||
<?=mk_option($eth0['BRIDGING'], "yes", "Yes");?>
|
||||
_(Enable bridging)_:
|
||||
: <select name="BRIDGING" onchange="checkBridgingSettings(this.form,1,'eth0')">
|
||||
<?=mk_option($eth0['BRIDGING'], "no", _("No"))?>
|
||||
<?=mk_option($eth0['BRIDGING'], "yes", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help125
|
||||
> Bridging is a feature which creates a virtual bridge and allows VMs and Docker containers to communicate directly with the physical Ethernet port.
|
||||
> Both bonding and bridging can be combined to let VMs or containers communicate over a *bonded* interface.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="bridge-members-eth0" style="display:none">
|
||||
Bridging members of br0:
|
||||
: <select id="bridge-eth0" name="BRNICS" size="1" multiple="multiple" style="display:none">
|
||||
_(Bridging members of)_ br0:
|
||||
: <select id="bridge-eth0" name="BRNICS" multiple="multiple" style="display:none">
|
||||
<?=mk_option($eth0['BRNICS'],'eth0','eth0','selected disabled')?>
|
||||
<?foreach ($ports as $port):?>
|
||||
<?if (!locked('eth0',$port)) echo mk_option_check($eth0['BRNICS'],$port,$port)?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
|
||||
:help126
|
||||
> Select which interfaces are member of the *bridged* interface. By default eth0 is a member, while other interfaces are optional.
|
||||
:end
|
||||
|
||||
</div>
|
||||
Network protocol:
|
||||
: <select name="PROTOCOL:0" size="1" onchange="selectProtocol(this.form,'eth0',0)">
|
||||
<?=mk_option($eth0["PROTOCOL:0"], 'ipv4', 'IPv4 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:0"], 'ipv6', 'IPv6 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:0"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
||||
_(Network protocol)_:
|
||||
: <select name="PROTOCOL:0" onchange="selectProtocol(this.form,'eth0',0)">
|
||||
<?=mk_option($eth0["PROTOCOL:0"], 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option($eth0["PROTOCOL:0"], 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option($eth0["PROTOCOL:0"], 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
</select>
|
||||
|
||||
:help127
|
||||
> Select which protocol(s) are used. By default IPv4 only is used.<br>
|
||||
> When both IPv4 and IPv6 is selected, each protocol can be configured independently.
|
||||
:end
|
||||
|
||||
<div markdown="1" class="ipv4-eth0-0" style="display:none">
|
||||
IPv4 address assignment:
|
||||
: <select name="USE_DHCP:0" size="1" onchange="selectProtocol(this.form,'eth0',0)">
|
||||
<?=mk_option($eth0["USE_DHCP:0"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($eth0["USE_DHCP:0"], 'no', 'Static');?>
|
||||
_(IPv4 address assignment)_:
|
||||
: <select name="USE_DHCP:0" onchange="selectProtocol(this.form,'eth0',0)">
|
||||
<?=mk_option($eth0["USE_DHCP:0"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($eth0["USE_DHCP:0"], 'no', _('Static'))?>
|
||||
</select>
|
||||
|
||||
:help128
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain a IPv4 address from the local DHCP server<br>
|
||||
> *Static* - the IPv4 address is manually set for this interface<br>
|
||||
> *None* - no IPv4 address is assigned to the interface (only available for VLANs)
|
||||
:end
|
||||
|
||||
<div markdown="1" class="more-ipv4-eth0-0" style="display:none">
|
||||
IPv4 address:
|
||||
: <input type="text" name="IPADDR:0" maxlength="15" value="<?=$eth0["IPADDR:0"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">/<select name="NETMASK:0" size="1" class="slim">
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.0.0.0", "8");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.0.0", "16");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.128.0", "17");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.192.0", "18");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.224.0", "19");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.240.0", "20");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.248.0", "21");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.252.0", "22");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.254.0", "23");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.0", "24", $eth0["IPADDR:0"]?"":"selected");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.128", "25");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.192", "26");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.224", "27");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.240", "28");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.248", "29");?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.252", "30");?>
|
||||
_(IPv4 address)_:
|
||||
: <input type="text" name="IPADDR:0" maxlength="15" value="<?=$eth0["IPADDR:0"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:0" class="slim">
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.0.0.0", "8")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.0.0", "16")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.128.0", "17")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.192.0", "18")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.224.0", "19")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.240.0", "20")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.248.0", "21")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.252.0", "22")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.254.0", "23")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.0", "24", $eth0["IPADDR:0"]?"":"selected")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.128", "25")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.192", "26")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.224", "27")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.240", "28")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.248", "29")?>
|
||||
<?=mk_option($eth0["NETMASK:0"], "255.255.255.252", "30")?>
|
||||
</select>
|
||||
|
||||
:help129
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address and mask of the system.
|
||||
:end
|
||||
|
||||
IPv4 default gateway:
|
||||
: <input type="text" name="GATEWAY:0" maxlength="15" value="<?=$eth0["GATEWAY:0"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
<input type="text" name="METRIC:0" min="1" max="9999" value="<?=$eth0["METRIC:0"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv4 default gateway)_:
|
||||
: <input type="text" name="GATEWAY:0" maxlength="15" value="<?=$eth0["GATEWAY:0"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
<input type="text" name="METRIC:0" min="1" max="9999" value="<?=$eth0["METRIC:0"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
:help130
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of your router.
|
||||
:end
|
||||
|
||||
</div>
|
||||
IPv4 DNS server assignment:
|
||||
: <select name="DHCP_KEEPRESOLV" size="1" onchange="checkDNSSettings(this.form)">
|
||||
<?=mk_option($eth0['DHCP_KEEPRESOLV'], "no", "Automatic");?>
|
||||
<?=mk_option($eth0['DHCP_KEEPRESOLV'], "yes", "Static");?>
|
||||
_(IPv4 DNS server assignment)_:
|
||||
: <select name="DHCP_KEEPRESOLV" onchange="checkDNSSettings(this.form)">
|
||||
<?=mk_option($eth0['DHCP_KEEPRESOLV'], "no", _("Automatic"))?>
|
||||
<?=mk_option($eth0['DHCP_KEEPRESOLV'], "yes", _("Static"))?>
|
||||
</select>
|
||||
|
||||
:help131
|
||||
> If set to *Automatic* the server will use IPv4 DNS server(s) returned by the local automatic assignment.<br>
|
||||
> If set to *Static* you may enter your own list.
|
||||
>
|
||||
> This is useful in Active Directory configurations where you need to set the first DNS Server entry to the IP address of your AD Domain server.
|
||||
:end
|
||||
|
||||
IPv4 DNS server:
|
||||
: <input type="text" name="DNS_SERVER1" maxlength="15" value="<?=$eth0['DNS_SERVER1'];?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
_(IPv4 DNS server)_:
|
||||
: <input type="text" name="DNS_SERVER1" maxlength="15" value="<?=$eth0['DNS_SERVER1']?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
|
||||
:help132
|
||||
> This is the primary IPv4 DNS server to use. Enter a IPv4 address.
|
||||
>
|
||||
> Note: for *Active Directory* you **must** ensure this is set to the IP address of your AD Domain server.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="dnsserver2" style="display:none">
|
||||
IPv4 DNS server 2:
|
||||
: <input type="text" name="DNS_SERVER2" maxlength="15" value="<?=$eth0['DNS_SERVER2'];?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
_(IPv4 DNS server)_ 2:
|
||||
: <input type="text" name="DNS_SERVER2" maxlength="15" value="<?=$eth0['DNS_SERVER2']?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
|
||||
:help133
|
||||
> This is the IPv4 DNS server to use when IPv4 DNS server 1 is down.
|
||||
:end
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="dnsserver3" style="display:none">
|
||||
IPv4 DNS server 3:
|
||||
: <input type="text" name="DNS_SERVER3" maxlength="15" value="<?=$eth0['DNS_SERVER3'];?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
_(IPv4 DNS server)_ 3:
|
||||
: <input type="text" name="DNS_SERVER3" maxlength="15" value="<?=$eth0['DNS_SERVER3']?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
|
||||
:help134
|
||||
> This is the IPv4 DNS server to use when IPv4 DNS servers 1 and 2 are both down.
|
||||
:end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div markdown="1" class="ipv6-eth0-0" style="display:none">
|
||||
IPv6 address assignment:
|
||||
: <select name="USE_DHCP6:0" size="1" onchange="selectProtocol(this.form,'eth0',0)">
|
||||
<?=mk_option($eth0["USE_DHCP6:0"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($eth0["USE_DHCP6:0"], 'no', 'Static');?>
|
||||
_(IPv6 address assignment)_:
|
||||
: <select name="USE_DHCP6:0" onchange="selectProtocol(this.form,'eth0',0)">
|
||||
<?=mk_option($eth0["USE_DHCP6:0"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($eth0["USE_DHCP6:0"], 'no', _('Static'))?>
|
||||
</select>
|
||||
|
||||
:help135
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain a IPv6 address from the local DHCP server or Router Advertisement (RA)<br>
|
||||
> *Static* - the IPv6 address is manually set for this interface<br>
|
||||
> *None* - no IPv6 address is assigned to the interface (only available for VLANs)
|
||||
:end
|
||||
|
||||
<div markdown="1" class="more-ipv6-eth0-0" style="display:none">
|
||||
IPv6 address:
|
||||
: <input type="text" name="IPADDR6:0" maxlength="39" value="<?=$eth0["IPADDR6:0"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">/<input type="number" name="NETMASK6:0" min="1" max="128" value="<?=$eth0["NETMASK6:0"]?>" class="slim">
|
||||
_(IPv6 address)_:
|
||||
: <input type="text" name="IPADDR6:0" maxlength="39" value="<?=$eth0["IPADDR6:0"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:0" min="1" max="128" value="<?=$eth0["NETMASK6:0"]?>" class="slim">
|
||||
|
||||
:help136
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of the system.
|
||||
:end
|
||||
|
||||
IPv6 default gateway:
|
||||
: <input type="text" name="GATEWAY6:0" maxlength="39" value="<?=$eth0["GATEWAY6:0"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
<input type="text" name="METRIC6:0" min="1" max="9999" value="<?=$eth0["METRIC6:0"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv6 default gateway)_:
|
||||
: <input type="text" name="GATEWAY6:0" maxlength="39" value="<?=$eth0["GATEWAY6:0"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
<input type="text" name="METRIC6:0" min="1" max="9999" value="<?=$eth0["METRIC6:0"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
:help137
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of your router.
|
||||
:end
|
||||
|
||||
IPv6 privacy extensions:
|
||||
: <select name="PRIVACY6:0" size="1">
|
||||
<?=mk_option($eth0["PRIVACY6:0"], "0", "Disabled");?>
|
||||
<?=mk_option($eth0["PRIVACY6:0"], "2", "Enabled");?>
|
||||
_(IPv6 privacy extensions)_:
|
||||
: <select name="PRIVACY6:0">
|
||||
<?=mk_option($eth0["PRIVACY6:0"], "0", _("Disabled"))?>
|
||||
<?=mk_option($eth0["PRIVACY6:0"], "2", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
:help138
|
||||
> Enable or disable the generation of a random IPv6 interface identifier according to RFC4941. This is similar to the temporary IPv6 address generation on Windows machines.
|
||||
:end
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="dns6server1" style="display:none">
|
||||
IPv6 DNS server assignment:
|
||||
: <select name="DHCP6_KEEPRESOLV" size="1" onchange="checkDNSSettings6(this.form)">
|
||||
<?=mk_option($eth0['DHCP6_KEEPRESOLV'], "no", "Automatic");?>
|
||||
<?=mk_option($eth0['DHCP6_KEEPRESOLV'], "yes", "Static");?>
|
||||
_(IPv6 DNS server assignment)_:
|
||||
: <select name="DHCP6_KEEPRESOLV" onchange="checkDNSSettings6(this.form)">
|
||||
<?=mk_option($eth0['DHCP6_KEEPRESOLV'], "no", _("Automatic"))?>
|
||||
<?=mk_option($eth0['DHCP6_KEEPRESOLV'], "yes", _("Static"))?>
|
||||
</select>
|
||||
|
||||
:help139
|
||||
> If set to *Automatic* the server will use IPv6 DNS server(s) returned by the local automatic assignment.<br>
|
||||
> If set to *Static* you may enter your own list.
|
||||
:end
|
||||
|
||||
IPv6 DNS server:
|
||||
: <input type="text" name="DNS6_SERVER1" maxlength="39" value="<?=$eth0['DNS6_SERVER1'];?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
_(IPv6 DNS server)_:
|
||||
: <input type="text" name="DNS6_SERVER1" maxlength="39" value="<?=$eth0['DNS6_SERVER1']?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
|
||||
:help140
|
||||
> This is the primary IPv6 DNS server to use. Enter a IPv6 address.
|
||||
:end
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="dns6server2" style="display:none">
|
||||
IPv6 DNS server 2:
|
||||
: <input type="text" name="DNS6_SERVER2" maxlength="39" value="<?=$eth0['DNS6_SERVER2'];?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
_(IPv6 DNS server)_ 2:
|
||||
: <input type="text" name="DNS6_SERVER2" maxlength="39" value="<?=$eth0['DNS6_SERVER2']?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
|
||||
:help141
|
||||
> This is the IPv6 DNS server to use when IPv6 DNS server 1 is down.
|
||||
:end
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="dns6server3" style="display:none">
|
||||
IPv6 DNS server 3:
|
||||
: <input type="text" name="DNS6_SERVER3" maxlength="39" value="<?=$eth0['DNS6_SERVER3'];?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
_(IPv6 DNS server)_ 3:
|
||||
: <input type="text" name="DNS6_SERVER3" maxlength="39" value="<?=$eth0['DNS6_SERVER3']?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
|
||||
:help142
|
||||
> This is the IPv6 DNS server to use when IPv6 DNS servers 1 and 2 are both down.
|
||||
:end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Desired MTU:
|
||||
_(Desired MTU)_:
|
||||
: <input type="number" name="MTU" min="68" max="9198" value="<?=$eth0['MTU']?>" class="narrow" placeholder="1500">
|
||||
|
||||
:help143
|
||||
> This is the MTU size to use on the physical Ethernet interface.
|
||||
> If left blank, the MTU will automatically be determined (by default 1500 bytes).
|
||||
:end
|
||||
|
||||
Enable VLANs:
|
||||
: <select name="TYPE" size="1" onchange="checkNetworkAccess(this.form,'eth0')">
|
||||
<?=mk_option($eth0['TYPE'], 'access', 'No');?>
|
||||
<?=mk_option($eth0['TYPE'], 'trunk', 'Yes');?>
|
||||
_(Enable VLANs)_:
|
||||
: <select name="TYPE" onchange="checkNetworkAccess(this.form,'eth0')">
|
||||
<?=mk_option($eth0['TYPE'], 'access', _('No'))?>
|
||||
<?=mk_option($eth0['TYPE'], 'trunk', _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help144
|
||||
> By default no VLANs are configured.<br>
|
||||
> Enabling VLANs extends the number of logical connections over the same physical connection.
|
||||
>
|
||||
> Note: your router and switch must support VLANs too when this feature is used.
|
||||
:end
|
||||
|
||||
</div>
|
||||
<div id='index-eth0-0'></div>
|
||||
<?foreach ($vlan_eth0 as $i):?>
|
||||
<div markdown="1" id="index-eth0-<?=$i?>" class="access-eth0 shade-<?=$display['theme']?>" style="display:none">
|
||||
Interface description:
|
||||
_(Interface description)_:
|
||||
: <span class="status vshift"><i id="tag-eth0-<?=$i?>" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="viewToggle('eth0','<?=$i?>')"></i></span>
|
||||
<input type="text" name="DESCRIPTION:<?=$i?>" maxlength="80" value="<?=htmlspecialchars($eth0["DESCRIPTION:$i"])?>" onchange="exitCode(this.form,true)">
|
||||
|
||||
:help145
|
||||
> Use this optional field to provide addditional information about the purpose of the connection.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="view-eth0-<?=$i?>" style="display:none">
|
||||
VLAN number:
|
||||
_(VLAN number)_:
|
||||
: <input type="number" name="VLANID:<?=$i?>" min="1" max="4095" value="<?=$eth0["VLANID:$i"]?>" class="narrow gap" required>
|
||||
<?if (!$service):?><input type="button" class="form" value="Delete VLAN" onclick="removeVLAN($('#index-eth0-<?=$i?>'))"><?endif;?>
|
||||
<?if (!$service):?><input type="button" class="form" value="_(Delete VLAN)_" onclick="removeVLAN($('#index-eth0-<?=$i?>'))"><?endif;?>
|
||||
|
||||
:help146
|
||||
> Give each VLAN a unique identifier. Numbers range from 1 to 4095.
|
||||
:end
|
||||
|
||||
Network protocol:
|
||||
: <select name="PROTOCOL:<?=$i?>" size="1" onchange="selectProtocol(this.form,'eth0',<?=$i?>)">
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv4', 'IPv4 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv6', 'IPv6 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
||||
_(Network protocol)_:
|
||||
: <select name="PROTOCOL:<?=$i?>" onchange="selectProtocol(this.form,'eth0',<?=$i?>)">
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option($eth0["PROTOCOL:$i"], 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
</select>
|
||||
|
||||
:help147
|
||||
> Select which protocol(s) are used. By default IPv4 only is used.<br>
|
||||
> When both IPv4 and IPv6 is selected, each protocol can be configured independently.
|
||||
:end
|
||||
|
||||
<div markdown="1" class="ipv4-eth0-<?=$i?>" style="display:none">
|
||||
IPv4 address assignment:
|
||||
: <select name="USE_DHCP:<?=$i?>" size="1" onchange="selectProtocol(this.form,'eth0',<?=$i?>)">
|
||||
<?=mk_option($eth0["USE_DHCP:$i"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($eth0["USE_DHCP:$i"], 'no', 'Static');?>
|
||||
_(IPv4 address assignment)_:
|
||||
: <select name="USE_DHCP:<?=$i?>" onchange="selectProtocol(this.form,'eth0',<?=$i?>)">
|
||||
<?=mk_option($eth0["USE_DHCP:$i"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($eth0["USE_DHCP:$i"], 'no', _('Static'))?>
|
||||
<?if ($i>0):?>
|
||||
<?=mk_option($eth0["USE_DHCP:$i"], '', 'None');?>
|
||||
<?=mk_option($eth0["USE_DHCP:$i"], '', _('None'))?>
|
||||
<?endif;?>
|
||||
</select>
|
||||
|
||||
:help148
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain a IPv4 address from the local DHCP server<br>
|
||||
> *Static* - the IPv4 address is manually set for this interface<br>
|
||||
> *None* - no IPv4 address is assigned to the interface (only available for VLANs)
|
||||
:end
|
||||
|
||||
<div markdown="1" class="more-ipv4-eth0-<?=$i?>" style="display:none">
|
||||
IPv4 address:
|
||||
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" value="<?=$eth0["IPADDR:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">/<select name="NETMASK:<?=$i?>" size="1" class="slim">
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.0.0.0", "8");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.0.0", "16");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.128.0", "17");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.192.0", "18");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.224.0", "19");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.240.0", "20");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.248.0", "21");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.252.0", "22");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.254.0", "23");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.0", "24", $eth0["IPADDR:$i"]?"":"selected");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.128", "25");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.192", "26");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.224", "27");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.240", "28");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.248", "29");?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.252", "30");?>
|
||||
_(IPv4 address)_:
|
||||
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" value="<?=$eth0["IPADDR:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:<?=$i?>" class="slim">
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.0.0.0", "8")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.0.0", "16")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.128.0", "17")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.192.0", "18")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.224.0", "19")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.240.0", "20")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.248.0", "21")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.252.0", "22")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.254.0", "23")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.0", "24", $eth0["IPADDR:$i"]?"":"selected")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.128", "25")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.192", "26")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.224", "27")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.240", "28")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.248", "29")?>
|
||||
<?=mk_option($eth0["NETMASK:$i"], "255.255.255.252", "30")?>
|
||||
</select>
|
||||
|
||||
:help149
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address and mask of the system.
|
||||
:end
|
||||
|
||||
IPv4 default gateway:
|
||||
: <input type="text" name="GATEWAY:<?=$i?>" maxlength="15" value="<?=$eth0["GATEWAY:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
<input type="text" name="METRIC:<?=$i?>" min="1" max="9999" value="<?=$eth0["METRIC:$i"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv4 default gateway)_:
|
||||
: <input type="text" name="GATEWAY:<?=$i?>" maxlength="15" value="<?=$eth0["GATEWAY:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
<input type="text" name="METRIC:<?=$i?>" min="1" max="9999" value="<?=$eth0["METRIC:$i"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
:help150
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of your router.
|
||||
:end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div markdown="1" class="ipv6-eth0-<?=$i?>" style="display:none">
|
||||
IPv6 address assignment:
|
||||
: <select name="USE_DHCP6:<?=$i?>" size="1" onchange="selectProtocol(this.form,'eth0',<?=$i?>)">
|
||||
<?=mk_option($eth0["USE_DHCP6:$i"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($eth0["USE_DHCP6:$i"], 'no', 'Static');?>
|
||||
_(IPv6 address assignment)_:
|
||||
: <select name="USE_DHCP6:<?=$i?>" onchange="selectProtocol(this.form,'eth0',<?=$i?>)">
|
||||
<?=mk_option($eth0["USE_DHCP6:$i"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($eth0["USE_DHCP6:$i"], 'no', _('Static'))?>
|
||||
<?if ($i>0):?>
|
||||
<?=mk_option($eth0["USE_DHCP6:$i"], '', 'None');?>
|
||||
<?=mk_option($eth0["USE_DHCP6:$i"], '', _('None'))?>
|
||||
<?endif;?>
|
||||
</select>
|
||||
|
||||
:help151
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain a IPv6 address from the local DHCP server or Router Advertisement (RA)<br>
|
||||
> *Static* - the IPv6 address is manually set for this interface<br>
|
||||
> *None* - no IPv6 address is assigned to the interface (only available for VLANs)
|
||||
:end
|
||||
|
||||
<div markdown="1" class="more-ipv6-eth0-<?=$i?>" style="display:none">
|
||||
IPv6 address:
|
||||
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" value="<?=$eth0["IPADDR6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">/<input type="number" name="NETMASK6:<?=$i?>" min="1" max="128" value="<?=$eth0["NETMASK6:$i"]?>" class="slim">
|
||||
_(IPv6 address)_:
|
||||
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" value="<?=$eth0["IPADDR6:$i"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:<?=$i?>" min="1" max="128" value="<?=$eth0["NETMASK6:$i"]?>" class="slim">
|
||||
|
||||
:help152
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address and prefix of the system.
|
||||
:end
|
||||
|
||||
IPv6 default gateway:
|
||||
: <input type="text" name="GATEWAY6:<?=$i?>" maxlength="39" value="<?=$eth0["GATEWAY6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
<input type="text" name="METRIC6:<?=$i?>" min="1" max="9999" value="<?=$eth0["METRIC6:$i"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv6 default gateway)_:
|
||||
: <input type="text" name="GATEWAY6:<?=$i?>" maxlength="39" value="<?=$eth0["GATEWAY6:$i"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
<input type="text" name="METRIC6:<?=$i?>" min="1" max="9999" value="<?=$eth0["METRIC6:$i"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
:help153
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of your router.
|
||||
:end
|
||||
|
||||
IPv6 privacy extensions:
|
||||
: <select name="PRIVACY6:<?=$i?>" size="1">
|
||||
<?=mk_option($eth0["PRIVACY6:$i"], "0", "Disabled");?>
|
||||
<?=mk_option($eth0["PRIVACY6:$i"], "2", "Enabled");?>
|
||||
_(IPv6 privacy extensions)_:
|
||||
: <select name="PRIVACY6:<?=$i?>">
|
||||
<?=mk_option($eth0["PRIVACY6:$i"], "0", _("Disabled"))?>
|
||||
<?=mk_option($eth0["PRIVACY6:$i"], "2", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
:help154
|
||||
> Enable or disable the generation of a random IPv6 interface identifier according to RFC4941. This is similar to the temporary IPv6 address generation on Windows machines.
|
||||
:end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -840,85 +905,85 @@ IPv6 privacy extensions:
|
||||
<?endforeach;?>
|
||||
|
||||
|
||||
: <input type="submit" value="Apply" onclick="$('#wait_eth0').show()" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" value="_(Apply)_" onclick="$('#wait_eth0').show()" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
<?if (!$service):?>
|
||||
<input type="button" class="access-eth0" value="Add VLAN" onclick="addVLAN('eth0')" style="display:none">
|
||||
<?else:?><?=$service?> must be <span class='strong big'>Stopped</span> to change (see [Settings](/Settings))<?endif;?>
|
||||
<input type="button" class="access-eth0" value="_(Add VLAN)_" onclick="addVLAN('eth0')" style="display:none">
|
||||
<?else:?><?=sprintf(_('Stop **%s** to make changes, see'),$service).' (<a href="/Settings">'._('Settings').'</a>)'?><?endif;?>
|
||||
</form>
|
||||
|
||||
<script markdown="1" type="text/html" id="network-template-eth0">
|
||||
<div markdown="1" id="index-eth0-INDEX" class="access-eth0 shade-<?=$display['theme']?>">
|
||||
Interface description:
|
||||
_(Interface description)_:
|
||||
: <span class="status vshift"><i id="tag-eth0-INDEX" class="fa fa-fw fa-chevron-up" style="cursor:pointer" onclick="viewToggle('eth0','INDEX')"></i></span>
|
||||
<input type="text" name="DESCRIPTION:INDEX" maxlength="80" value="<?=htmlspecialchars($eth0["DESCRIPTION:INDEX"])?>" onchange="exitCode(this.form,true)">
|
||||
|
||||
<div markdown="1" id="view-eth0-INDEX">
|
||||
VLAN number:
|
||||
_(VLAN number)_:
|
||||
: <input type="number" name="VLANID:INDEX" min="1" max="4095" value="<?=$eth0["VLANID:INDEX"]?>" class="narrow gap" required>
|
||||
<input type="button" class="form" value="Delete VLAN" onclick="removeVLAN($('#index-eth0-INDEX'))">
|
||||
<input type="button" class="form" value="_(Delete VLAN)_" onclick="removeVLAN($('#index-eth0-INDEX'))">
|
||||
|
||||
Network protocol:
|
||||
: <select name="PROTOCOL:INDEX" size="1" onchange="selectProtocol(this.form,'eth0',INDEX)">
|
||||
<?=mk_option($eth0["PROTOCOL:INDEX"], 'ipv4', 'IPv4 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:INDEX"], 'ipv6', 'IPv6 only');?>
|
||||
<?=mk_option($eth0["PROTOCOL:INDEX"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
||||
_(Network protocol):
|
||||
: <select name="PROTOCOL:INDEX" onchange="selectProtocol(this.form,'eth0',INDEX)">
|
||||
<?=mk_option($eth0["PROTOCOL:INDEX"], 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option($eth0["PROTOCOL:INDEX"], 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option($eth0["PROTOCOL:INDEX"], 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
</select>
|
||||
|
||||
<div markdown="1" class="ipv4-eth0-INDEX" style="display:none">
|
||||
IPv4 address assignment:
|
||||
: <select name="USE_DHCP:INDEX" size="1" onchange="selectProtocol(this.form,'eth0',INDEX)">
|
||||
<?=mk_option($eth0["USE_DHCP:INDEX"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($eth0["USE_DHCP:INDEX"], 'no', 'Static');?>
|
||||
<?=mk_option($eth0["USE_DHCP:INDEX"], '', 'None');?>
|
||||
_(IPv4 address assignment)_:
|
||||
: <select name="USE_DHCP:INDEX" onchange="selectProtocol(this.form,'eth0',INDEX)">
|
||||
<?=mk_option($eth0["USE_DHCP:INDEX"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($eth0["USE_DHCP:INDEX"], 'no', _('Static'))?>
|
||||
<?=mk_option($eth0["USE_DHCP:INDEX"], '', _('None'))?>
|
||||
</select>
|
||||
|
||||
<div markdown="1" class="more-ipv4-eth0-INDEX" style="display:none">
|
||||
IPv4 address:
|
||||
: <input type="text" name="IPADDR:INDEX" maxlength="15" value="<?=$eth0["IPADDR:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">/<select name="NETMASK:INDEX" size="1" class="slim">
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.0.0.0", "8");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.0.0", "16");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.128.0", "17");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.192.0", "18");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.224.0", "19");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.240.0", "20");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.248.0", "21");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.252.0", "22");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.254.0", "23");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.0", "24", "selected");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.128", "25");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.192", "26");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.224", "27");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.240", "28");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.248", "29");?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.252", "30");?>
|
||||
_(IPv4 address)_:
|
||||
: <input type="text" name="IPADDR:INDEX" maxlength="15" value="<?=$eth0["IPADDR:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="=_(IPv4 address A.B.C.D)_">/<select name="NETMASK:INDEX" class="slim">
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.0.0.0", "8")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.0.0", "16")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.128.0", "17")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.192.0", "18")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.224.0", "19")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.240.0", "20")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.248.0", "21")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.252.0", "22")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.254.0", "23")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.0", "24", "selected")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.128", "25")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.192", "26")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.224", "27")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.240", "28")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.248", "29")?>
|
||||
<?=mk_option($eth0["NETMASK:INDEX"], "255.255.255.252", "30")?>
|
||||
</select>
|
||||
|
||||
IPv4 default gateway:
|
||||
: <input type="text" name="GATEWAY:INDEX" maxlength="15" value="<?=$eth0["GATEWAY:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
<input type="text" name="METRIC:INDEX" min="1" max="9999" value="<?=$eth0["METRIC:INDEX"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv4 default gateway)_:
|
||||
: <input type="text" name="GATEWAY:INDEX" maxlength="15" value="<?=$eth0["GATEWAY:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
<input type="text" name="METRIC:INDEX" min="1" max="9999" value="<?=$eth0["METRIC:INDEX"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div markdown="1" class="ipv6-eth0-INDEX" style="display:none">
|
||||
IPv6 address assignment:
|
||||
: <select name="USE_DHCP6:INDEX" size="1" onchange="selectProtocol(this.form,'eth0',INDEX)">
|
||||
<?=mk_option($eth0["USE_DHCP6:INDEX"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($eth0["USE_DHCP6:INDEX"], 'no', 'Static');?>
|
||||
<?=mk_option($eth0["USE_DHCP6:INDEX"], '', 'None');?>
|
||||
_(IPv6 address assignment)_:
|
||||
: <select name="USE_DHCP6:INDEX" onchange="selectProtocol(this.form,'eth0',INDEX)">
|
||||
<?=mk_option($eth0["USE_DHCP6:INDEX"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($eth0["USE_DHCP6:INDEX"], 'no', _('Static'))?>
|
||||
<?=mk_option($eth0["USE_DHCP6:INDEX"], '', _('None'))?>
|
||||
</select>
|
||||
|
||||
<div markdown="1" class="more-ipv6-eth0-INDEX" style="display:none">
|
||||
IPv6 address:
|
||||
: <input type="text" name="IPADDR6:INDEX" maxlength="39" value="<?=$eth0["IPADDR6:INDEX"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">/<input type="number" name="NETMASK6:INDEX" min="1" max="128" value="<?=$eth0["NETMASK6:INDEX"]?>" class="slim">
|
||||
_(IPv6 address)_:
|
||||
: <input type="text" name="IPADDR6:INDEX" maxlength="39" value="<?=$eth0["IPADDR6:INDEX"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:INDEX" min="1" max="128" value="<?=$eth0["NETMASK6:INDEX"]?>" class="slim">
|
||||
|
||||
IPv6 default gateway:
|
||||
: <input type="text" name="GATEWAY6:INDEX" maxlength="39" value="<?=$eth0["GATEWAY6:INDEX"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
<input type="text" name="METRIC6:INDEX" min="1" max="9999" value="<?=$eth0["METRIC6:INDEX"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv6 default gateway)_:
|
||||
: <input type="text" name="GATEWAY6:INDEX" maxlength="39" value="<?=$eth0["GATEWAY6:INDEX"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
<input type="text" name="METRIC6:INDEX" min="1" max="9999" value="<?=$eth0["METRIC6:INDEX"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
IPv6 privacy extensions:
|
||||
: <select name="PRIVACY6:INDEX" size="1">
|
||||
<?=mk_option($eth0['PRIVACY6:INDEX'], "0", "Disabled");?>
|
||||
<?=mk_option($eth0['PRIVACY6:INDEX'], "2", "Enabled");?>
|
||||
_(IPv6 privacy extensions)_:
|
||||
: <select name="PRIVACY6:INDEX">
|
||||
<?=mk_option($eth0['PRIVACY6:INDEX'], "0", _("Disabled"))?>
|
||||
<?=mk_option($eth0['PRIVACY6:INDEX'], "2", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
+236
-182
@@ -26,14 +26,14 @@ $cmd = 'Down';
|
||||
$more = true;
|
||||
if (strpos($locked,'bond')===0 || strpos($locked,'br')===0) {
|
||||
list($master_ethX,$root) = explode(' ',$locked);
|
||||
$reason = "member of $master_ethX (see interface $root)";
|
||||
$reason = _('member of')." $master_ethX ("._('see interface')." $root)";
|
||||
$class = 'green-text';
|
||||
} elseif (!exec("ip link show ethX|grep -om1 'UP>'")) {
|
||||
$reason = "shutdown (inactive)";
|
||||
$reason = _("shutdown")." ("._("inactive").")";
|
||||
$class = 'blue-text';
|
||||
$cmd = 'Up';
|
||||
} elseif (empty($ethX)) {
|
||||
$reason = "not configured";
|
||||
$reason = _("not configured");
|
||||
$class = 'red-text';
|
||||
} else {
|
||||
$more = false;
|
||||
@@ -49,20 +49,20 @@ function portcheck_ethX() {
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
var ctrl = "<span id='wait_ethX' class='status vshift red-text' style='display:none;font-size:1.2rem;font-style:italic'><i class='fa fa-spinner fa-spin'></i> Please wait... configuring interface</span>";
|
||||
var ctrl = "<span id='wait_ethX' class='status vshift red-text' style='display:none;font-size:1.2rem;font-style:italic'><i class='fa fa-spinner fa-spin'></i> _(Please wait)_... _(configuring interface)_</span>";
|
||||
var form = document.ethX_settings;
|
||||
<?if ($tabbed && !$service):?>
|
||||
$('#tabX').bind({click:function(){
|
||||
$('#bond-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
||||
$('#bridge-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
||||
$('#bond-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>});
|
||||
$('#bridge-ethX').dropdownchecklist('destroy').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>});
|
||||
}});
|
||||
<?endif;?>
|
||||
if (!$.cookie('#view-ethX')) {$('#view-ethX').show(); $('#tag-ethX').removeClass('fa-chevron-down').addClass('fa-chevron-up');}
|
||||
<?foreach ($vlan_ethX as $i):?>
|
||||
if (!$.cookie('#view-ethX-<?=$i?>')) {$('#view-ethX-<?=$i?>').show(); $('#tag-ethX-<?=$i?>').removeClass('fa-chevron-down').addClass('fa-chevron-up');}
|
||||
<?endforeach;?>
|
||||
$('#bond-ethX').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
||||
$('#bridge-ethX').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>});
|
||||
$('#bond-ethX').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>});
|
||||
$('#bridge-ethX').dropdownchecklist({emptyText:'_(None)_ ', width:<?=$width[0]?>});
|
||||
checkBondingSettings(form,0,'ethX');
|
||||
checkBridgingSettings(form,0,'ethX');
|
||||
checkNetworkAccess(form,'ethX');
|
||||
@@ -95,7 +95,7 @@ $(function() {
|
||||
<input type="hidden" name="BRNAME" value="brX">
|
||||
<input type="hidden" name="BRSTP" value="no">
|
||||
<input type="hidden" name="BRFD" value="0">
|
||||
Interface description:
|
||||
_(Interface description)_:
|
||||
: <span class="status vshift"><i id="tag-ethX" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="viewToggle('ethX')"></i></span>
|
||||
<?if (!$more):?>
|
||||
<input type="text" name="DESCRIPTION:0" maxlength="80" value="<?=htmlspecialchars($ethX["DESCRIPTION:0"])?>" onchange="exitCode(this.form,true)">
|
||||
@@ -103,39 +103,46 @@ Interface description:
|
||||
<span class="<?=$class?>"><?=$reason?></span>
|
||||
<?endif;?>
|
||||
|
||||
:help120
|
||||
> Use this field to give addditional information about the purpose of the connection.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="view-ethX" style="display:none">
|
||||
MAC address:
|
||||
_(MAC address)_:
|
||||
: <?=strtoupper(exec("ip link show ethX|grep -Pom1 'ether \K\S+'"))?>
|
||||
|
||||
:help121
|
||||
> This is the hardware address of the interface.
|
||||
> When tagging is enabled all VLANs on this interface will share the same hardware address.
|
||||
:end
|
||||
|
||||
<div markdown="1" class="slave-ethX">
|
||||
Enable bonding:
|
||||
: <select name="BONDING" size="1" onchange="checkBondingSettings(this.form,1,'ethX')">
|
||||
<?=mk_option($ethX['BONDING'], "no", "No");?>
|
||||
<?=mk_option($ethX['BONDING'], "yes", "Yes");?>
|
||||
_(Enable bonding)_:
|
||||
: <select name="BONDING" onchange="checkBondingSettings(this.form,1,'ethX')">
|
||||
<?=mk_option($ethX['BONDING'], "no", _("No"))?>
|
||||
<?=mk_option($ethX['BONDING'], "yes", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help122
|
||||
> Bonding is a feature that combines multiple physical Ethernet interfaces into a single *bonded* interface named **bond0**.
|
||||
> This can be used to improve the connection redundancy and/or throughput of the system.
|
||||
> Different bonding modes are supported (see below), but some modes require proper switch support.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="bond-members-ethX" style="display:none">
|
||||
Bonding mode:
|
||||
: <select name="BONDING_MODE" size="1" onchange="checkBondingSettings(this.form,-1,'ethX')">
|
||||
<?=mk_option($ethX['BONDING_MODE'], "0", "balance-rr (0)");?>
|
||||
<?=mk_option($ethX['BONDING_MODE'], "1", "active-backup (1)",isset($ethX['BONDING_MODE'])?'':'selected');?>
|
||||
<?=mk_option($ethX['BONDING_MODE'], "2", "balance-xor (2)");?>
|
||||
<?=mk_option($ethX['BONDING_MODE'], "3", "broadcast (3)");?>
|
||||
<?=mk_option($ethX['BONDING_MODE'], "4", "802.3ad (4)");?>
|
||||
<?=mk_option($ethX['BONDING_MODE'], "5", "balance-tlb (5)");?>
|
||||
<?=mk_option($ethX['BONDING_MODE'], "6", "balance-alb (6)");?>
|
||||
_(Bonding mode)_:
|
||||
: <select name="BONDING_MODE" onchange="checkBondingSettings(this.form,-1,'ethX')">
|
||||
<?=mk_option($eth0['BONDING_MODE'], "0", _("balance-rr")." (0)")?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "1", _("active-backup")." (1)",isset($ethX['BONDING_MODE'])?'':'selected')?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "2", _("balance-xor")." (2)")?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "3", _("broadcast")." (3)")?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "4", _("802.3ad")." (4)")?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "5", _("balance-tlb")." (5)")?>
|
||||
<?=mk_option($eth0['BONDING_MODE'], "6", _("balance-alb")." (6)")?>
|
||||
</select>
|
||||
<span id="attention0" style="display:none"><b>Attention:</b> this mode requires a network switch with proper setup and support...</span>
|
||||
<span id="attention0" style="display:none">**_(Attention)_:** _(this mode requires a network switch with proper setup and support)_...</span>
|
||||
|
||||
:help123
|
||||
> **Mode 0 (balance-rr)**<br>
|
||||
> This mode transmits packets in a sequential order from the first available slave through the last.
|
||||
> If two real interfaces are slaves in the bond and two packets arrive destined out of the bonded interface the first will be transmitted on the first slave and the second frame will be transmitted on the second slave.
|
||||
@@ -172,253 +179,300 @@ Bonding mode:
|
||||
>
|
||||
> *Mode 1 (active-backup) is the recommended setting. Other modes allow you to set up a specific environment, but may require proper switch support.
|
||||
> Choosing a unsupported mode can result in a disrupted communication.*
|
||||
:end
|
||||
|
||||
Bonding members of bondX:
|
||||
: <select id="bond-ethX" name="BONDNICS" size="1" multiple="multiple" style="display:none">
|
||||
_(Bonding members of)_ bondX:
|
||||
: <select id="bond-ethX" name="BONDNICS" multiple="multiple" style="display:none">
|
||||
<?=mk_option($ethX['BONDNICS'],'ethX','ethX','selected disabled')?>
|
||||
<?foreach ($ports as $port):?>
|
||||
<?if ($port!='ethX' && !locked('ethX',$port)) echo mk_option_check($ethX['BONDNICS'],$port,$port)?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
|
||||
:help124
|
||||
> Select which interfaces are member of the *bonded* interface. By default ethX is a member, while other interfaces are optional.
|
||||
:end
|
||||
|
||||
</div>
|
||||
Enable bridging:
|
||||
: <select name="BRIDGING" size="1" onchange="checkBridgingSettings(this.form,1,'ethX')">
|
||||
<?=mk_option($ethX['BRIDGING'], "no", "No");?>
|
||||
<?=mk_option($ethX['BRIDGING'], "yes", "Yes");?>
|
||||
_(Enable bridging)_:
|
||||
: <select name="BRIDGING" onchange="checkBridgingSettings(this.form,1,'ethX')">
|
||||
<?=mk_option($ethX['BRIDGING'], "no", _("No"))?>
|
||||
<?=mk_option($ethX['BRIDGING'], "yes", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help125
|
||||
> Bridging is a feature which creates a virtual bridge and allows VMs and Docker containers to communicate directly with the physical Ethernet port.
|
||||
> Both bonding and bridging can be combined to let VMs or containers communicate over a *bonded* interface.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="bridge-members-ethX" style="display:none">
|
||||
Bridging members of brX:
|
||||
: <select id="bridge-ethX" name="BRNICS" size="1" multiple="multiple" style="display:none">
|
||||
_(Bridging members of)_ brX:
|
||||
: <select id="bridge-ethX" name="BRNICS" multiple="multiple" style="display:none">
|
||||
<?=mk_option($ethX['BRNICS'],'ethX','ethX','selected disabled')?>
|
||||
<?foreach ($ports as $port):?>
|
||||
<?if ($port!='ethX' && !locked('ethX',$port)) echo mk_option_check($ethX['BRNICS'],$port,$port)?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
|
||||
:help126
|
||||
> Select which interfaces are member of the *bridged* interface. By default ethX is a member, while other interfaces are optional.
|
||||
:end
|
||||
|
||||
</div>
|
||||
Network protocol:
|
||||
: <select name="PROTOCOL:0" size="1" onchange="selectProtocol(this.form,'ethX',0)">
|
||||
<?=mk_option($ethX["PROTOCOL:0"], 'ipv4', 'IPv4 only');?>
|
||||
<?=mk_option($ethX["PROTOCOL:0"], 'ipv6', 'IPv6 only');?>
|
||||
<?=mk_option($ethX["PROTOCOL:0"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
||||
_(Network protocol)_:
|
||||
: <select name="PROTOCOL:0" onchange="selectProtocol(this.form,'ethX',0)">
|
||||
<?=mk_option($ethX["PROTOCOL:0"], 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option($ethX["PROTOCOL:0"], 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option($ethX["PROTOCOL:0"], 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
</select>
|
||||
|
||||
:help127
|
||||
> Select which protocol(s) are used. By default IPv4 only is used.<br>
|
||||
> When both IPv4 and IPv6 is selected, each protocol can be configured independently.
|
||||
:end
|
||||
|
||||
<div markdown="1" class="ipv4-ethX-0" style="display:none">
|
||||
IPv4 address assignment:
|
||||
: <select name="USE_DHCP:0" size="1" onchange="selectProtocol(this.form,'ethX',0)">
|
||||
<?=mk_option($ethX["USE_DHCP:0"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($ethX["USE_DHCP:0"], 'no', 'Static');?>
|
||||
<?=mk_option($ethX["USE_DHCP:0"], '', 'None');?>
|
||||
_(IPv4 address assignment)_:
|
||||
: <select name="USE_DHCP:0" onchange="selectProtocol(this.form,'ethX',0)">
|
||||
<?=mk_option($ethX["USE_DHCP:0"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($ethX["USE_DHCP:0"], 'no', _('Static'))?>
|
||||
<?=mk_option($ethX["USE_DHCP:0"], '', _('None'))?>
|
||||
</select>
|
||||
|
||||
:help128
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain a IPv4 address from the local DHCP server<br>
|
||||
> *Static* - the IPv4 address is manually set for this interface<br>
|
||||
> *None* - no IPv4 address is assigned to the interface
|
||||
:end
|
||||
|
||||
<div markdown="1" class="more-ipv4-ethX-0" style="display:none">
|
||||
IPv4 address:
|
||||
: <input type="text" name="IPADDR:0" maxlength="15" value="<?=$ethX["IPADDR:0"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">/<select name="NETMASK:0" size="1" class="slim">
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.0.0.0", "8");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.0.0", "16");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.128.0", "17");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.192.0", "18");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.224.0", "19");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.240.0", "20");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.248.0", "21");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.252.0", "22");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.254.0", "23");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.0", "24", $ethX["IPADDR:0"]?"":"selected");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.128", "25");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.192", "26");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.224", "27");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.240", "28");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.248", "29");?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.252", "30");?>
|
||||
_(IPv4 address)_:
|
||||
: <input type="text" name="IPADDR:0" maxlength="15" value="<?=$ethX["IPADDR:0"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:0" class="slim">
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.0.0.0", "8")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.0.0", "16")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.128.0", "17")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.192.0", "18")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.224.0", "19")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.240.0", "20")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.248.0", "21")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.252.0", "22")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.254.0", "23")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.0", "24", $ethX["IPADDR:0"]?"":"selected")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.128", "25")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.192", "26")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.224", "27")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.240", "28")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.248", "29")?>
|
||||
<?=mk_option($ethX["NETMASK:0"], "255.255.255.252", "30")?>
|
||||
</select>
|
||||
|
||||
:help129
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address and mask of the interface.
|
||||
:end
|
||||
|
||||
IPv4 default gateway:
|
||||
: <input type="text" name="GATEWAY:0" maxlength="15" value="<?=$ethX["GATEWAY:0"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
<input type="text" name="METRIC:0" min="1" max="9999" value="<?=$ethX["METRIC:0"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv4 default gateway)_:
|
||||
: <input type="text" name="GATEWAY:0" maxlength="15" value="<?=$ethX["GATEWAY:0"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
<input type="text" name="METRIC:0" min="1" max="9999" value="<?=$ethX["METRIC:0"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
:help130
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of your router.
|
||||
:end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div markdown="1" class="ipv6-ethX-0" style="display:none">
|
||||
IPv6 address assignment:
|
||||
: <select name="USE_DHCP6:0" size="1" onchange="selectProtocol(this.form,'ethX',0)">
|
||||
<?=mk_option($ethX["USE_DHCP6:0"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($ethX["USE_DHCP6:0"], 'no', 'Static');?>
|
||||
<?=mk_option($ethX["USE_DHCP6:0"], '', 'None');?>
|
||||
_(IPv6 address assignment)_:
|
||||
: <select name="USE_DHCP6:0" onchange="selectProtocol(this.form,'ethX',0)">
|
||||
<?=mk_option($ethX["USE_DHCP6:0"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($ethX["USE_DHCP6:0"], 'no', _('Static'))?>
|
||||
<?=mk_option($ethX["USE_DHCP6:0"], '', _('None'))?>
|
||||
</select>
|
||||
|
||||
:help135
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain a IPv6 address from the local DHCP server or Router Advertisement (RA)<br>
|
||||
> *Static* - the IPv6 address is manually set for this interface<br>
|
||||
> *None* - no IPv6 address is assigned to the interface
|
||||
:end
|
||||
|
||||
<div markdown="1" class="more-ipv6-ethX-0" style="display:none">
|
||||
IPv6 address:
|
||||
: <input type="text" name="IPADDR6:0" maxlength="39" value="<?=$ethX["IPADDR6:0"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">/<input type="number" name="NETMASK6:0" min="1" max="128" value="<?=$ethX["NETMASK6:0"]?>" class="slim">
|
||||
_(IPv6 address)_:
|
||||
: <input type="text" name="IPADDR6:0" maxlength="39" value="<?=$ethX["IPADDR6:0"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:0" min="1" max="128" value="<?=$ethX["NETMASK6:0"]?>" class="slim">
|
||||
|
||||
:help136
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address and prefix of the interface.
|
||||
:end
|
||||
|
||||
IPv6 default gateway:
|
||||
: <input type="text" name="GATEWAY6:0" maxlength="39" value="<?=$ethX["GATEWAY6:0"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
<input type="text" name="METRIC6:0" min="1" max="9999" value="<?=$ethX["METRIC6:0"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv6 default gateway)_:
|
||||
: <input type="text" name="GATEWAY6:0" maxlength="39" value="<?=$ethX["GATEWAY6:0"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
<input type="text" name="METRIC6:0" min="1" max="9999" value="<?=$ethX["METRIC6:0"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
:help137
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of your router.
|
||||
:end
|
||||
|
||||
IPv6 privacy extensions:
|
||||
: <select name="PRIVACY6:0" size="1">
|
||||
<?=mk_option($ethX["PRIVACY6:0"], "0", "Disabled");?>
|
||||
<?=mk_option($ethX["PRIVACY6:0"], "2", "Enabled");?>
|
||||
_(IPv6 privacy extensions)_:
|
||||
: <select name="PRIVACY6:0">
|
||||
<?=mk_option($ethX["PRIVACY6:0"], "0", _("Disabled"))?>
|
||||
<?=mk_option($ethX["PRIVACY6:0"], "2", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
:help138
|
||||
> Enable or disable the generation of a random IPv6 interface identifier according to RFC4941. This is similar to the temporary IPv6 address generation on Windows machines.
|
||||
:end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Desired MTU:
|
||||
_(Desired MTU)_:
|
||||
: <input type="number" name="MTU" min="68" max="9198" value="<?=$locked?$ethX['MTU']:$ethX['MTU']?>" class="narrow" placeholder="1500">
|
||||
|
||||
:help143
|
||||
> This is the MTU size to use on the physical Ethernet interface.
|
||||
> If left blank, the MTU will automatically be determined (by default 1500 bytes).
|
||||
:end
|
||||
|
||||
Enable VLANs:
|
||||
: <select name="TYPE" size="1" onchange="checkNetworkAccess(this.form,'ethX')">
|
||||
<?=mk_option($ethX['TYPE'], 'access', 'No');?>
|
||||
<?=mk_option($ethX['TYPE'], 'trunk', 'Yes');?>
|
||||
_(Enable VLANs)_:
|
||||
: <select name="TYPE" onchange="checkNetworkAccess(this.form,'ethX')">
|
||||
<?=mk_option($ethX['TYPE'], 'access', _('No'))?>
|
||||
<?=mk_option($ethX['TYPE'], 'trunk', _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help144
|
||||
> By default no VLANs are configured.<br>
|
||||
> Enabling VLANs extends the number of logical connections over the same physical connection.
|
||||
>
|
||||
> Note: your router and switch must support VLANs too when this feature is used.
|
||||
:end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id='index-ethX-0'></div>
|
||||
<?foreach ($vlan_ethX as $i):?>
|
||||
<div markdown="1" id="index-ethX-<?=$i?>" class="access-ethX shade-<?=$display['theme']?>" style="display:none">
|
||||
Interface description:
|
||||
_(Interface description)_:
|
||||
: <span class="status vshift"><i id="tag-ethX-<?=$i?>" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="viewToggle('ethX','<?=$i?>')"></i></span>
|
||||
<input type="text" name="DESCRIPTION:<?=$i?>" maxlength="80" value="<?=htmlspecialchars($ethX["DESCRIPTION:$i"])?>" onchange="exitCode(this.form,true)">
|
||||
|
||||
:help145
|
||||
> Use this field to give addditional information about the purpose of the connection.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="view-ethX-<?=$i?>" style="display:none">
|
||||
VLAN number:
|
||||
_(VLAN number)_:
|
||||
: <input type="number" name="VLANID:<?=$i?>" min="1" max="4095" value="<?=$ethX["VLANID:$i"]?>" class="narrow gap" required>
|
||||
<?if (!$service):?><input type="button" class="form" value="Delete VLAN" onclick="removeVLAN($('#index-ethX-<?=$i?>'))"><?endif;?>
|
||||
<?if (!$service):?><input type="button" class="form" value="_(Delete VLAN)_" onclick="removeVLAN($('#index-ethX-<?=$i?>'))"><?endif;?>
|
||||
|
||||
:help146
|
||||
> Give each VLAN a unique identifier. Numbers range from 1 to 4095.
|
||||
:end
|
||||
|
||||
Network protocol:
|
||||
: <select name="PROTOCOL:<?=$i?>" size="1" onchange="selectProtocol(this.form,'ethX',<?=$i?>)">
|
||||
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv4', 'IPv4 only');?>
|
||||
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv6', 'IPv6 only');?>
|
||||
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
||||
_(Network protocol)_:
|
||||
: <select name="PROTOCOL:<?=$i?>" onchange="selectProtocol(this.form,'ethX',<?=$i?>)">
|
||||
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option($ethX["PROTOCOL:$i"], 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
</select>
|
||||
|
||||
:help147
|
||||
> Select which protocol(s) are used. By default IPv4 only is used.<br>
|
||||
> When both IPv4 and IPv6 is selected, each protocol can be configured independently.
|
||||
:end
|
||||
|
||||
<div markdown="1" class="ipv4-ethX-<?=$i?>" style="display:none">
|
||||
IPv4 address assignment:
|
||||
: <select name="USE_DHCP:<?=$i?>" size="1" onchange="selectProtocol(this.form,'ethX',<?=$i?>)">
|
||||
<?=mk_option($ethX["USE_DHCP:$i"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($ethX["USE_DHCP:$i"], 'no', 'Static');?>
|
||||
<?=mk_option($ethX["USE_DHCP:$i"], '', 'None');?>
|
||||
_(IPv4 address assignment)_:
|
||||
: <select name="USE_DHCP:<?=$i?>" onchange="selectProtocol(this.form,'ethX',<?=$i?>)">
|
||||
<?=mk_option($ethX["USE_DHCP:$i"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($ethX["USE_DHCP:$i"], 'no', _('Static'))?>
|
||||
<?=mk_option($ethX["USE_DHCP:$i"], '', _('None'))?>
|
||||
</select>
|
||||
|
||||
:help148
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain a IPv4 address from the local DHCP server<br>
|
||||
> *Static* - the IPv4 address is manually set for this interface<br>
|
||||
> *None* - no IPv4 address is assigned to the interface
|
||||
:end
|
||||
|
||||
<div markdown="1" class="more-ipv4-ethX-<?=$i?>" style="display:none">
|
||||
IPv4 address:
|
||||
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" value="<?=$ethX["IPADDR:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">/<select name="NETMASK:<?=$i?>" size="1" class="slim">
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.0.0.0", "8");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.0.0", "16");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.128.0", "17");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.192.0", "18");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.224.0", "19");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.240.0", "20");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.248.0", "21");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.252.0", "22");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.254.0", "23");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.0", "24", $ethX["IPADDR:$i"]?"":"selected");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.128", "25");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.192", "26");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.224", "27");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.240", "28");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.248", "29");?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.252", "30");?>
|
||||
_(IPv4 address)_:
|
||||
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" value="<?=$ethX["IPADDR:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:<?=$i?>" class="slim">
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.0.0.0", "8")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.0.0", "16")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.128.0", "17")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.192.0", "18")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.224.0", "19")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.240.0", "20")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.248.0", "21")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.252.0", "22")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.254.0", "23")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.0", "24", $ethX["IPADDR:$i"]?"":"selected")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.128", "25")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.192", "26")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.224", "27")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.240", "28")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.248", "29")?>
|
||||
<?=mk_option($ethX["NETMASK:$i"], "255.255.255.252", "30")?>
|
||||
</select>
|
||||
|
||||
:help149
|
||||
> Greyed out when using automatic IP assignment or NONE assignment. Otherwise specify here the IPv4 address and mask of the interface.
|
||||
:end
|
||||
|
||||
IPv4 default gateway:
|
||||
: <input type="text" name="GATEWAY:<?=$i?>" maxlength="15" value="<?=$ethX["GATEWAY:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
<input type="text" name="METRIC:<?=$i?>" min="1" max="9999" value="<?=$ethX["METRIC:$i"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv4 default gateway)_:
|
||||
: <input type="text" name="GATEWAY:<?=$i?>" maxlength="15" value="<?=$ethX["GATEWAY:$i"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
<input type="text" name="METRIC:<?=$i?>" min="1" max="9999" value="<?=$ethX["METRIC:$i"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
:help150
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv4 address of your router.
|
||||
:end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div markdown="1" class="ipv6-ethX-<?=$i?>" style="display:none">
|
||||
IPv6 address assignment:
|
||||
: <select name="USE_DHCP6:<?=$i?>" size="1" onchange="selectProtocol(this.form,'ethX',<?=$i?>)">
|
||||
<?=mk_option($ethX["USE_DHCP6:$i"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($ethX["USE_DHCP6:$i"], 'no', 'Static');?>
|
||||
<?=mk_option($ethX["USE_DHCP6:$i"], '', 'None');?>
|
||||
_(IPv6 address assignment)_:
|
||||
: <select name="USE_DHCP6:<?=$i?>" onchange="selectProtocol(this.form,'ethX',<?=$i?>)">
|
||||
<?=mk_option($ethX["USE_DHCP6:$i"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($ethX["USE_DHCP6:$i"], 'no', _('Static'))?>
|
||||
<?=mk_option($ethX["USE_DHCP6:$i"], '', _('None'))?>
|
||||
</select>
|
||||
|
||||
:help151
|
||||
> The following settings are possible:
|
||||
>
|
||||
> *Automatic* - the server will attempt to obtain a IPv6 address from the local DHCP server or Router Advertisement (RA)<br>
|
||||
> *Static* - the IPv6 address is manually set for this interface<br>
|
||||
> *None* - no IPv6 address is assigned to the interface
|
||||
:end
|
||||
|
||||
<div markdown="1" class="more-ipv6-ethX-<?=$i?>" style="display:none">
|
||||
IPv6 address:
|
||||
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" value="<?=$ethX["IPADDR6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">/<input type="number" name="NETMASK6:<?=$i?>" min="1" max="128" value="<?=$ethX["NETMASK6:$i"]?>" class="slim">
|
||||
_(IPv6 address)_:
|
||||
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" value="<?=$ethX["IPADDR6:$i"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:<?=$i?>" min="1" max="128" value="<?=$ethX["NETMASK6:$i"]?>" class="slim">
|
||||
|
||||
:help152
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address and prefix of the interface.
|
||||
:end
|
||||
|
||||
IPv6 default gateway:
|
||||
: <input type="text" name="GATEWAY6:<?=$i?>" maxlength="39" value="<?=$ethX["GATEWAY6:$i"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
<input type="text" name="METRIC6:<?=$i?>" min="1" max="9999" value="<?=$ethX["METRIC6:$i"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv6 default gateway)_:
|
||||
: <input type="text" name="GATEWAY6:<?=$i?>" maxlength="39" value="<?=$ethX["GATEWAY6:$i"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
<input type="text" name="METRIC6:<?=$i?>" min="1" max="9999" value="<?=$ethX["METRIC6:$i"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
:help153
|
||||
> Greyed out when using automatic IP assignment. Otherwise specify here the IPv6 address of your router.
|
||||
:end
|
||||
|
||||
IPv6 privacy extensions:
|
||||
: <select name="PRIVACY6:<?=$i?>" size="1">
|
||||
<?=mk_option($ethX["PRIVACY6:$i"], "0", "Disabled");?>
|
||||
<?=mk_option($ethX["PRIVACY6:$i"], "2", "Enabled");?>
|
||||
_(IPv6 privacy extensions)_:
|
||||
: <select name="PRIVACY6:<?=$i?>">
|
||||
<?=mk_option($ethX["PRIVACY6:$i"], "0", _("Disabled"))?>
|
||||
<?=mk_option($ethX["PRIVACY6:$i"], "2", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
:help154
|
||||
> Enable or disable the generation of a random IPv6 interface identifier according to RFC4941. This is similar to the temporary IPv6 address generation on Windows machines.
|
||||
:end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -427,86 +481,86 @@ IPv6 privacy extensions:
|
||||
<?endforeach;?>
|
||||
|
||||
|
||||
: <input type="submit" value="Apply" onclick="$('#wait_<?=$tabbed?'eth0':'ethX'?>').show()" disabled><input type="button" value="Done" onclick="done()">
|
||||
<input type="button" name="#shut_ethX" value="Port <?=$cmd?>" onclick="portToggle('ethX','<?=$cmd?>')">
|
||||
: <input type="submit" value="_(Apply)_" onclick="$('#wait_<?=$tabbed?'eth0':'ethX'?>').show()" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
<input type="button" name="#shut_ethX" value="<?=_('Port '.$cmd)?>" onclick="portToggle('ethX','<?=$cmd?>')">
|
||||
<?if (!$service):?>
|
||||
<input type="button" class="access-ethX" value="Add VLAN" onclick="addVLAN('ethX')" style="display:none">
|
||||
<?else:?><?=$service?> must be <span class='strong big'>Stopped</span> to change (see [Settings](/Settings))<?endif;?>
|
||||
<input type="button" class="access-ethX" value="_(Add VLAN)_" onclick="addVLAN('ethX')" style="display:none">
|
||||
<?else:?><?=sprintf(_('Stop **%s** to make changes, see'),$service).' (<a href="/Settings">'._('Settings').'</a>)'?><?endif;?>
|
||||
</form>
|
||||
|
||||
<script markdown="1" type="text/html" id="network-template-ethX">
|
||||
<div markdown="1" id="index-ethX-INDEX" class="access-ethX shade-<?=$display['theme']?>">
|
||||
Interface description:
|
||||
_(Interface description)_:
|
||||
: <span class="status vshift"><i id="tag-ethX-INDEX" class="fa fa-fw fa-chevron-up" style="cursor:pointer" onclick="viewToggle('ethX','INDEX')"></i></span>
|
||||
<input type="text" name="DESCRIPTION:INDEX" maxlength="80" value="<?=htmlspecialchars($ethX["DESCRIPTION:INDEX"])?>" onchange="exitCode(this.form,true)">
|
||||
|
||||
<div markdown="1" id="view-ethX-INDEX">
|
||||
VLAN number:
|
||||
_(VLAN number)_:
|
||||
: <input type="number" name="VLANID:INDEX" min="1" max="4095" value="<?=$ethX["VLANID:INDEX"]?>" class="narrow gap" required>
|
||||
<input type="button" class="form" value="Delete VLAN" onclick="removeVLAN($('#index-ethX-INDEX'))">
|
||||
<input type="button" class="form" value="_(Delete VLAN)_" onclick="removeVLAN($('#index-ethX-INDEX'))">
|
||||
|
||||
Network protocol:
|
||||
: <select name="PROTOCOL:INDEX" size="1" onchange="selectProtocol(this.form,'ethX',INDEX)">
|
||||
<?=mk_option($ethX["PROTOCOL:INDEX"], 'ipv4', 'IPv4 only');?>
|
||||
<?=mk_option($ethX["PROTOCOL:INDEX"], 'ipv6', 'IPv6 only');?>
|
||||
<?=mk_option($ethX["PROTOCOL:INDEX"], 'ipv4+ipv6', 'IPv4 + IPv6');?>
|
||||
_(Network protocol)_:
|
||||
: <select name="PROTOCOL:INDEX" onchange="selectProtocol(this.form,'ethX',INDEX)">
|
||||
<?=mk_option($ethX["PROTOCOL:INDEX"], 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option($ethX["PROTOCOL:INDEX"], 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option($ethX["PROTOCOL:INDEX"], 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
</select>
|
||||
|
||||
<div markdown="1" class="ipv4-ethX-INDEX" style="display:none">
|
||||
IPv4 address assignment:
|
||||
: <select name="USE_DHCP:INDEX" size="1" onchange="selectProtocol(this.form,'ethX',INDEX)">
|
||||
<?=mk_option($ethX["USE_DHCP:INDEX"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($ethX["USE_DHCP:INDEX"], 'no', 'Static');?>
|
||||
<?=mk_option($ethX["USE_DHCP:INDEX"], '', 'None');?>
|
||||
_(IPv4 address assignment)_:
|
||||
: <select name="USE_DHCP:INDEX" onchange="selectProtocol(this.form,'ethX',INDEX)">
|
||||
<?=mk_option($ethX["USE_DHCP:INDEX"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($ethX["USE_DHCP:INDEX"], 'no', _('Static'))?>
|
||||
<?=mk_option($ethX["USE_DHCP:INDEX"], '', _('None'))?>
|
||||
</select>
|
||||
|
||||
<div markdown="1" class="more-ipv4-ethX-INDEX" style="display:none">
|
||||
IPv4 address:
|
||||
: <input type="text" name="IPADDR:INDEX" maxlength="15" value="<?=$ethX["IPADDR:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">/<select name="NETMASK:INDEX" size="1" class="slim">
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.0.0.0", "8");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.0.0", "16");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.128.0", "17");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.192.0", "18");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.224.0", "19");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.240.0", "20");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.248.0", "21");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.252.0", "22");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.254.0", "23");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.0", "24", "selected");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.128", "25");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.192", "26");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.224", "27");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.240", "28");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.248", "29");?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.252", "30");?>
|
||||
_(IPv4 address)_:
|
||||
: <input type="text" name="IPADDR:INDEX" maxlength="15" value="<?=$ethX["IPADDR:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:INDEX" class="slim">
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.0.0.0", "8")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.0.0", "16")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.128.0", "17")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.192.0", "18")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.224.0", "19")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.240.0", "20")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.248.0", "21")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.252.0", "22")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.254.0", "23")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.0", "24", "selected")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.128", "25")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.192", "26")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.224", "27")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.240", "28")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.248", "29")?>
|
||||
<?=mk_option($ethX["NETMASK:INDEX"], "255.255.255.252", "30")?>
|
||||
</select>
|
||||
|
||||
IPv4 default gateway:
|
||||
: <input type="text" name="GATEWAY:INDEX" maxlength="15" value="<?=$ethX["GATEWAY:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="IPv4 address A.B.C.D">
|
||||
<input type="text" name="METRIC:INDEX" min="1" max="9999" value="<?=$ethX["METRIC:INDEX"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv4 default gateway)_:
|
||||
: <input type="text" name="GATEWAY:INDEX" maxlength="15" value="<?=$ethX["GATEWAY:INDEX"]?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
<input type="text" name="METRIC:INDEX" min="1" max="9999" value="<?=$ethX["METRIC:INDEX"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div markdown="1" class="ipv6-ethX-INDEX" style="display:none">
|
||||
IPv6 address assignment:
|
||||
: <select name="USE_DHCP6:INDEX" size="1" onchange="selectProtocol(this.form,'ethX',INDEX)">
|
||||
<?=mk_option($ethX["USE_DHCP6:INDEX"], 'yes', 'Automatic');?>
|
||||
<?=mk_option($ethX["USE_DHCP6:INDEX"], 'no', 'Static');?>
|
||||
<?=mk_option($ethX["USE_DHCP6:INDEX"], '', 'None');?>
|
||||
_(IPv6 address assignment)_:
|
||||
: <select name="USE_DHCP6:INDEX" onchange="selectProtocol(this.form,'ethX',INDEX)">
|
||||
<?=mk_option($ethX["USE_DHCP6:INDEX"], 'yes', _('Automatic'))?>
|
||||
<?=mk_option($ethX["USE_DHCP6:INDEX"], 'no', _('Static'))?>
|
||||
<?=mk_option($ethX["USE_DHCP6:INDEX"], '', _('None'))?>
|
||||
</select>
|
||||
|
||||
<div markdown="1" class="more-ipv6-ethX-INDEX" style="display:none">
|
||||
IPv6 address:
|
||||
: <input type="text" name="IPADDR6:INDEX" maxlength="39" value="<?=$ethX["IPADDR6:INDEX"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">/<input type="number" name="NETMASK6:INDEX" min="1" max="128" value="<?=$ethX["NETMASK6:INDEX"]?>" class="slim">
|
||||
_(IPv6 address)_:
|
||||
: <input type="text" name="IPADDR6:INDEX" maxlength="39" value="<?=$ethX["IPADDR6:INDEX"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:INDEX" min="1" max="128" value="<?=$ethX["NETMASK6:INDEX"]?>" class="slim">
|
||||
|
||||
IPv6 default gateway:
|
||||
: <input type="text" name="GATEWAY6:INDEX" maxlength="39" value="<?=$ethX["GATEWAY6:INDEX"]?>" pattern="<?=$validIP6?>" title="IPv6 address nnnn:xxxx::yyyy">
|
||||
<input type="text" name="METRIC6:INDEX" min="1" max="9999" value="<?=$ethX["METRIC6:INDEX"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> <em>optional metric (lowest is preferred)</em>
|
||||
_(IPv6 default gateway)_:
|
||||
: <input type="text" name="GATEWAY6:INDEX" maxlength="39" value="<?=$ethX["GATEWAY6:INDEX"]?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
<input type="text" name="METRIC6:INDEX" min="1" max="9999" value="<?=$ethX["METRIC6:INDEX"]?>" class="slim"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
IPv6 privacy extensions:
|
||||
: <select name="PRIVACY6:INDEX" size="1">
|
||||
<?=mk_option($ethX['PRIVACY6:INDEX'], "0", "Disabled");?>
|
||||
<?=mk_option($ethX['PRIVACY6:INDEX'], "2", "Enabled");?>
|
||||
_(IPv6 privacy extensions)_:
|
||||
: <select name="PRIVACY6:INDEX">
|
||||
<?=mk_option($ethX['PRIVACY6:INDEX'], "0", _("Disabled"))?>
|
||||
<?=mk_option($ethX['PRIVACY6:INDEX'], "2", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-ftp"
|
||||
Tag="globe"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018 Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020 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,
|
||||
@@ -15,7 +15,6 @@ Tag="globe"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
|
||||
<?
|
||||
$ftp_userlist_file = "/boot/config/vsftpd.user_list";
|
||||
$ftp_userlist = "";
|
||||
@@ -34,30 +33,36 @@ $(function() {
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/ftpusers">
|
||||
|
||||
FTP server:
|
||||
: <select name="#arg[1]" size="1">
|
||||
<?=mk_option($ftp_server, "0", "Disabled")?>
|
||||
<?=mk_option($ftp_server, "1", "Enabled")?>
|
||||
_(FTP server)_:
|
||||
: <select name="#arg[1]">
|
||||
<?=mk_option($ftp_server, "0", _("Disabled"))?>
|
||||
<?=mk_option($ftp_server, "1", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
:help69
|
||||
> Enable or disable the FTP server daemon. By default the FTP server is enabled.
|
||||
> This setting is not saved, i.e. upon system reboot it will revert to its default setting.
|
||||
:end
|
||||
|
||||
FTP user(s):
|
||||
_(FTP user(s))_:
|
||||
: <input type="text" name="#arg[2]" size="40" maxlength="80" value="<?=htmlspecialchars($ftp_userlist)?>">
|
||||
|
||||
:help70
|
||||
> Enter the user names (separated by spaces) permitted to access the server using FTP.
|
||||
> To disallow any user access, clear this setting.
|
||||
>
|
||||
> **Note:** do not enter user name `root` since this may cause problems in the future.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
</form>
|
||||
|
||||
:help71
|
||||
> ### Overview
|
||||
>
|
||||
> Unraid includes the popular `vsftpd` FTP server. The configuration of `vsftp` is currently very
|
||||
> simple: **All** user names entered above are permitted to access the server via FTP and will have
|
||||
> *full read/write/delete access* to the entire server, so use with caution.
|
||||
:end
|
||||
@@ -5,8 +5,8 @@ Tag="icon-u-chat"
|
||||
Code="e93e"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -18,6 +18,6 @@ Code="e93e"
|
||||
?>
|
||||
<script>
|
||||
function FeedbackButton() {
|
||||
openBox('/webGui/include/Feedback.php','Feedback',600,600,false);
|
||||
openBox('/webGui/include/Feedback.php','_(Feedback)_',600,600,false);
|
||||
}
|
||||
</script>
|
||||
@@ -17,7 +17,7 @@ Tag="usb"
|
||||
<script>
|
||||
function cleanUp(zip) {
|
||||
if (document.hasFocus()) {
|
||||
$('input[value="Creating Flash backup..."]').val('Flash backup').prop('disabled',false);
|
||||
$('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});
|
||||
@@ -26,7 +26,7 @@ function cleanUp(zip) {
|
||||
}
|
||||
}
|
||||
function backup() {
|
||||
$('input[value="Flash backup"]').val('Creating Flash backup...').prop('disabled',true);
|
||||
$('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) {
|
||||
@@ -34,38 +34,40 @@ function backup() {
|
||||
location = '/'+zip;
|
||||
setTimeout(function(){cleanUp(zip);},6000);
|
||||
} else {
|
||||
$('input[value="Creating Flash backup..."]').val('Flash backup');
|
||||
$('input[value="_(Creating Flash backup)_..."]').val('_(Flash backup)_');
|
||||
$('div.spinner').hide('slow');
|
||||
$('#pleaseWait').hide('slow');
|
||||
swal('Creation error','Insufficient free disk space available','error');
|
||||
swal('_(Creation error)_','_(Insufficient free disk space available)_','error');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<div id="pleaseWait" style="display:none;text-align:center;margin-bottom:24px"><span class="red-text strong">Please wait... creating Flash backup zip file (this may take several minutes)</span></div>
|
||||
<div id="pleaseWait" style="display:none;text-align:center;margin-bottom:24px"><span class="red-text strong">_(Please wait)_... _(creating Flash backup zip file (this may take several minutes))_</span></div>
|
||||
|
||||
Flash Vendor:
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor'];?>
|
||||
|
||||
Flash Product:
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct'];?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID'];?>
|
||||
|
||||
<?if (strstr($var['regTy'], "blacklisted")):?>
|
||||
|
||||
|
||||
: **Blacklisted** - <a href="http://lime-technology.com/contact" target="_blank">Contact Support</a>
|
||||
: **_(Blacklisted)_** - <a href="http://lime-technology.com/contact" target="_blank">_(Contact Support)_</a>
|
||||
|
||||
<?else:?>
|
||||
|
||||
|
||||
: [Registration Key Manager](/Tools/Registration)
|
||||
: [_(Registration Key Manager)_](/Tools/Registration)
|
||||
|
||||
<?endif;?>
|
||||
|
||||
:help38
|
||||
> Use *Flash backup* to create a single zip file of the current contents of the flash device and store it locally on your computer.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="button" value="Flash backup" onclick="backup()"><input type="button" value="Done" onclick="done()">
|
||||
: <input type="button" value="_(Flash backup)_" onclick="backup()"><input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-profile"
|
||||
Tag="wrench"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -22,28 +22,28 @@ $keyfile = trim(base64_encode(@file_get_contents($var['regFILE'])));
|
||||
|
||||
<script>
|
||||
function toggle_hw() {
|
||||
if ($('#hw_details a').html() == 'Show Details') {
|
||||
if ($('#hw_details a').html()=='_(Show Details)_') {
|
||||
$.getJSON('/webGui/include/HardwareCollect.php',function(hwdata) {
|
||||
$('#hw_details a').html('Hide Details');
|
||||
$('#hw_details a').html('_(Hide Details)_');
|
||||
$('#hw_details pre').text(hwdata.hwxml).slideDown('fast');
|
||||
});
|
||||
} else {
|
||||
$('#hw_details a').html('Show Details');
|
||||
$('#hw_details a').html('_(Show Details)_');
|
||||
$('#hw_details pre').slideUp('fast', function(){$(this).html('');});
|
||||
}
|
||||
}
|
||||
function upload() {
|
||||
$('input[value="Upload"]').val('Uploading...').prop('disabled',true);
|
||||
$('input[value="Upload"]').val('_(Uploading)_...').prop('disabled',true);
|
||||
$('#pleaseWait').show('fast');
|
||||
|
||||
$.getJSON('/webGui/include/HardwareCollect.php',function(hwdata) {
|
||||
$.post('https://keys.lime-technology.com/account/hwprofile/upload',{keyfile:hwdata.keyfile,osversion:hwdata.osversion,hwxml:hwdata.hwxml},function(data) {
|
||||
$('#pleaseWait').hide().html(data.message).fadeIn('fast');
|
||||
$('input[value="Uploading..."]').val('Uploaded!');
|
||||
$('input[value="_(Uploading)_..."]').val('_(Uploaded)_!');
|
||||
}).fail(function(data) {
|
||||
var msg = "<p>Sorry, an error ("+data.status+") occurred. Please try again later.</p>";
|
||||
var msg = "<p>_(Sorry, an error occurred)_. _(Please try again later)_.</p>";
|
||||
$('#pleaseWait').hide().html(msg).fadeIn('fast');
|
||||
$('input[value="Uploading..."]').val('Upload').prop('disabled',false);
|
||||
$('input[value="_(Uploading)_..."]').val('_(Upload)_').prop('disabled',false);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -51,24 +51,24 @@ $(function() {
|
||||
$.getJSON('https://keys.lime-technology.com/account/hwprofile/status',{keyfile:'<?=$keyfile?>'},function(status) {
|
||||
if (status.last_submitted) {
|
||||
var d = new Date(status.last_submitted * 1000);
|
||||
$('#lastUploaded').html('Your hardware profile was last submitted on ' + d.toLocaleDateString()).fadeIn('fast');
|
||||
$('#lastUploaded').html('_(Your hardware profile was last submitted on)_ ' + d.toLocaleDateString()).fadeIn('fast');
|
||||
} else {
|
||||
$('#lastUploaded').html('You haven\'t sent Limetech your hardware profile yet').fadeIn('fast');
|
||||
$('#lastUploaded').html("_(You haven't sent Limetech your hardware profile yet)_").fadeIn('fast');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
This utility is used for troubleshooting purposes. It will collect all of the system hardware information, remove any serial numbers, and securely upload it to Lime Tech.
|
||||
_(This utility is used for troubleshooting purposes)_. _(It will collect all of the system hardware information, remove any serial numbers, and securely upload it to LimeTech)_.
|
||||
|
||||
<div id="hw_details">
|
||||
<pre style="display:none;max-height:300px;overflow-y:auto"></pre>
|
||||
<a href="#" onclick="toggle_hw();return false;">Show Details</a>
|
||||
<a href="#" onclick="toggle_hw();return false;">_(Show Details)_</a>
|
||||
</div>
|
||||
|
||||
*No personal information such as user names, passwords, or any other file contents is included in the hardware profile.*
|
||||
*_(No personal information such as user names, passwords, or any other file contents is included in the hardware profile)_.*
|
||||
|
||||
<div id="lastUploaded" style="color:grey"></div>
|
||||
|
||||
<input type="button" value="Upload" onclick="upload()"><input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Upload)_" onclick="upload()"><input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
<br><div id="pleaseWait" style="display:none;font-weight:bold;color:blue;text-align:center">Please wait... uploading hardware information (this may take several minutes)</div>
|
||||
<br><div id="pleaseWait" style="display:none;font-weight:bold;color:blue;text-align:center">_(Please wait)_... _(uploading hardware information)_ (_(this may take several minutes)_)</div>
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-u-help"
|
||||
Code="e934"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
|
||||
@@ -5,8 +5,8 @@ Icon="icon-home"
|
||||
Tag="home"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -23,37 +23,43 @@ $name_warn = preg_match('/'.$name_regex.'/', $var['NAME']) ? 'none' : 'block';
|
||||
?>
|
||||
<form markdown="1" name="NameSettings" method="POST" action="/update.htm" target="progressFrame">
|
||||
|
||||
Server name:
|
||||
: <input type="text" name="NAME" id="NAME" maxlength="15" pattern="<?=$name_regex;?>" value="<?=htmlspecialchars($var['NAME'])?>" title="Only alphanumeric characters ("A-Z", "a-z", and "0-9"), dashes ("-"), and dots ("."); and, the first and last characters must be alphanumeric" <?=$disabled?> required> <span id="name_warning" style="display:<?=$name_warn?>"><i class="fa fa-warning icon warning"></i> Not compatible with NetBIOS</span>
|
||||
_(Server name)_:
|
||||
: <input type="text" name="NAME" id="NAME" maxlength="15" pattern="<?=$name_regex?>" value="<?=htmlspecialchars($var['NAME'])?>" title="_(Only alphanumeric characters)_ ("A-Z", "a-z", and "0-9"), dashes ("-"), and dots ("."); _(and, the first and last characters must be alphanumeric)_" <?=$disabled?> required> <span id="name_warning" style="display:<?=$name_warn?>"><i class="fa fa-warning icon warning"></i> _(Not compatible with NetBIOS)_</span>
|
||||
|
||||
:help55
|
||||
> The network identity of your server. Also known as *hostname* or *short hostname*. Windows networking
|
||||
> refers to this as the *NetBIOS name* and must be 15 characters or less in length.
|
||||
> Use only alphanumeric characters (that is, "A-Z", "a-z", and "0-9"), dashes ("-"), and dots (".");
|
||||
> and, the first and last characters must be alphanumeric.
|
||||
:end
|
||||
|
||||
Description:
|
||||
_(Description)_:
|
||||
: <input type="text" name="COMMENT" value="<?=htmlspecialchars($var['COMMENT'])?>" <?=$disabled?>>
|
||||
|
||||
:help56
|
||||
> This is a text field that is seen next to a server when listed within Network or Network Neighborhood
|
||||
> (Windows), or Finder (macOS).
|
||||
:end
|
||||
|
||||
Model:
|
||||
_(Model)_:
|
||||
: <input type="text" name="SYS_MODEL" value="<?=htmlspecialchars($var['SYS_MODEL'])?>" <?=$disabled?>>
|
||||
|
||||
:help57
|
||||
> This is the server model number.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeNames" value="Apply" disabled><input type="button" value="Done" onclick="done()"><?if ($disabled):?>Array must be <span class="strong big">Stopped</span> to change<?endif;?>
|
||||
: <input type="submit" name="changeNames" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"><?if ($disabled):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
</form>
|
||||
<script>
|
||||
$("#NAME").keypress(function(event) {
|
||||
return event.key.match(/[A-Za-z0-9\-\.]/)!==null;
|
||||
return event.key.match(/[A-Za-z0-9\-\.]/)!==null;
|
||||
});
|
||||
$("#NAME").on("input change", function() {
|
||||
if ($(this).val().match(/<?=$name_regex;?>/) === null) {
|
||||
$('#name_warning').fadeIn('fast');
|
||||
} else {
|
||||
$('#name_warning').fadeOut('fast');
|
||||
}
|
||||
if ($(this).val().match(/<?=$name_regex;?>/) === null) {
|
||||
$('#name_warning').fadeIn('fast');
|
||||
} else {
|
||||
$('#name_warning').fadeOut('fast');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-u-display"
|
||||
Code="e930"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -17,6 +17,6 @@ Code="e930"
|
||||
?>
|
||||
<script>
|
||||
function InfoButton() {
|
||||
openBox('/webGui/include/SystemInformation.php?more=<?=isset($display['sysinfo'])?$display['sysinfo']:''?>','System Information',600,600);
|
||||
openBox('/webGui/include/SystemInformation.php?more=<?=isset($display['sysinfo'])?$display['sysinfo']:''?>','_(System Information)_',600,600);
|
||||
}
|
||||
</script>
|
||||
@@ -4,7 +4,7 @@ Tag="flag"
|
||||
Cond="($var['regTy']!='Pro')"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
/* Copyright 2005-2020, 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,
|
||||
@@ -17,15 +17,15 @@ Cond="($var['regTy']!='Pro')"
|
||||
<script>
|
||||
function installKey(file) {
|
||||
if (file)
|
||||
openBox('/webGui/include/InstallKey.php?url='+file,'Install Key',600,900,true);
|
||||
openBox('/webGui/include/InstallKey.php?url='+file,'_(Install Key)_',600,900,true);
|
||||
}
|
||||
</script>
|
||||
<form markdown="1">
|
||||
|
||||
To install a registration key, paste the key file URL in the box below and click **Install Key**.
|
||||
_(To install a registration key, paste the key file URL in the box below and click **Install Key**)_.
|
||||
|
||||
Key file URL:
|
||||
_(Key file URL)_:
|
||||
: <input type="text" name="file" id="key_file" maxlength="1024" value="" style="width:33%">
|
||||
<input type="button" value="Install Key" onclick="installKey(this.form.file.value.trim())">
|
||||
<input type="button" value="_(Install Key)_" onclick="installKey(this.form.file.value.trim())">
|
||||
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
Menu="WebGui"
|
||||
Title="Language"
|
||||
Icon="language"
|
||||
Tag="language"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$installed = ['English'];
|
||||
$keys = parse_ini_file('webGui/include/languages.key');
|
||||
|
||||
foreach (glob("$docroot/languages/*",GLOB_ONLYDIR) as $dir) $installed[] = $keys[basename($dir)];
|
||||
?>
|
||||
<style>
|
||||
select.wide{min-width:<?=$themes2?'314':'300'?>px}
|
||||
</style>
|
||||
<script>
|
||||
var keys = {};
|
||||
<?foreach ($keys as $key => $name) echo "keys['$key'] = '$keys[$key]'\n";?>
|
||||
|
||||
function upload(form) {
|
||||
var language = form.language.value;
|
||||
if (!language) {
|
||||
swal('_(Missing Language)_','_(Please select a language before proceeding)_!','error');
|
||||
return;
|
||||
}
|
||||
var cmd = form.check.checked ? 'rm' :'add';
|
||||
var title = form.check.checked ? '_(Language support deleted)_' : '_(Language support added)_';
|
||||
$.post("/webGui/include/FileUpload.php",{cmd:cmd,filename:language,filedata:form.file.value},function(list){
|
||||
if (list.indexOf('Error 500')==-1) {
|
||||
var installed = ['English'];
|
||||
var name = list.split(',');
|
||||
for (var i=0; i < name.length; i++) installed.push(keys[name[i]]);
|
||||
$('#installed').text(installed.join(', '));
|
||||
swal({title:title,text:'_(See)_ <a href="/Settings/DisplaySettings">_(Display Settings)_</a> _(to select your language)_',type:'success',html:true});
|
||||
$('#uploadbutton').prop('disabled',true);
|
||||
}
|
||||
});
|
||||
}
|
||||
function getZIPfile(event,form) {
|
||||
var input = event.target;
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(){
|
||||
var name = input.files[0].name;
|
||||
if (name.slice(-4)=='.zip') {
|
||||
form.file.value = reader.result;
|
||||
$('#uploadbutton').prop('disabled',false);
|
||||
} else {
|
||||
swal('_(Wrong File Extension)_','_(Only ZIP files are allowed)_','warning');
|
||||
}
|
||||
};
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
}
|
||||
function screenUpdate(check) {
|
||||
$('#uploadbutton').prop('disabled',false);
|
||||
$('#selectlang').toggle('slow');
|
||||
if (check) $('#uploadbutton').val("_(Delete)_"); else $('#uploadbutton').val("_(Upload)_")
|
||||
}
|
||||
</script>
|
||||
|
||||
<form markdown="1">
|
||||
<input type="hidden" name="file" value="">
|
||||
|
||||
_(Installed languages)_:
|
||||
: <span id="installed"><?=implode(', ',$installed)?></span>
|
||||
|
||||
_(Select language)_:
|
||||
: <select name="language" class="wide">
|
||||
<?=mk_option(1, "", "---")?>
|
||||
<?foreach ($keys as $key => $name) echo mk_option(1, $key, $name)?>
|
||||
</select><input name="check" type="checkbox" onchange="screenUpdate(this.checked)">_(Remove the installed language)_
|
||||
|
||||
<div id="selectlang" markdown="1">
|
||||
_(Select language file)_:
|
||||
: <input type="file" accept=".zip" onchange="getZIPfile(event,this.form)">
|
||||
|
||||
</div>
|
||||
|
||||
: <input id="uploadbutton" type="button" value="_(Upload)_" onclick="upload(this.form)" disabled><input type="button" value="_(Done)_" class="lock" onclick="done()">
|
||||
</form>
|
||||
@@ -4,8 +4,8 @@ Icon="icon-u-log"
|
||||
Code="e936"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -17,6 +17,6 @@ Code="e936"
|
||||
?>
|
||||
<script>
|
||||
function LogButton() {
|
||||
openWindow('/webGui/scripts/tail_log&arg1=syslog','System Log',600,900);
|
||||
openWindow('/webGui/scripts/tail_log&arg1=syslog','_(System Log)_',600,900);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -5,8 +5,8 @@ Icon="icon-u-logout"
|
||||
Code="e937"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
|
||||
@@ -5,8 +5,8 @@ Icon="icon-key"
|
||||
Tag="expeditedssl"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2019, Lime Technology
|
||||
* Copyright 2012-2019, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -42,7 +42,7 @@ $keyfile = @file_get_contents($var['regFILE']);
|
||||
$isLEcert = file_exists("/boot/config/ssl/certs/certificate_bundle.pem");
|
||||
if ($keyfile !== false) $keyfile = base64_encode($keyfile);
|
||||
if ($isLEcert) exec("/usr/bin/openssl x509 -checkend 2592000 -noout -in /etc/ssl/certs/unraid_bundle.pem",$arrout,$retval_expired);
|
||||
$provisionlabel = $isLEcert ? 'Renew' : 'Provision';
|
||||
$provisionlabel = $isLEcert ? _('Renew') : _('Provision');
|
||||
$disabled_provision = $keyfile===false || ($isLEcert && $retval_expired===0) || $var['USE_SSL']!="auto" ? 'disabled' : '';
|
||||
$disabled_updatedns = $keyfile!==false && $isLEcert ? '' : 'disabled';
|
||||
$internalip = $eth0['IPADDR:0'];
|
||||
@@ -51,30 +51,29 @@ $tasks = find_tasks();
|
||||
<script>
|
||||
function provisionSSL(button) {
|
||||
var oldlabel = $.trim($(button).text());
|
||||
$(button).prop("disabled", true).html("<i class='fa fa-circle-o-notch fa-spin fa-fw'></i> "+oldlabel+"ing");
|
||||
var msg = "Your Let's Encrypt SSL Certificate has been provisioned and a DNS record for local IP address <?=$internalip?> has been created on unraid.net.";
|
||||
$(button).prop("disabled", true).html("<i class='fa fa-circle-o-notch fa-spin fa-fw'></i>"+oldlabel);
|
||||
var msg = "_(Your Let's Encrypt SSL Certificate has been provisioned and a DNS record for local IP address)_ <?=$internalip?> _(has been created on unraid.net)_.";
|
||||
var failure = function(data) {
|
||||
var status = data.status;
|
||||
var obj = data.responseJSON;
|
||||
msg = "Sorry, an error ("+status+") occurred "+oldlabel.toLowerCase()+"ing your SSL certificate. " +
|
||||
"The error is: "+obj.error+".";
|
||||
var msg = "_(Sorry, an error occurred in processing your SSL certificate)_. _(The error is)_: "+obj.error+".";
|
||||
$(button).prop("disabled", false).html(oldlabel);
|
||||
swal("Oops",msg,"error");
|
||||
swal("_(Oops)_",msg,"error");
|
||||
};
|
||||
var success_provision = function(data) {
|
||||
if (data.bundle) {
|
||||
if (oldlabel == 'Renew') {
|
||||
msg = "Your Let's Encrypt SSL Certificate has been renewed.";
|
||||
msg = "_(Your Let's Encrypt SSL Certificate has been renewed)_.";
|
||||
success_rebind_check(data);
|
||||
} else {
|
||||
$.get("//"+data.internal_dns+":<?=$var['PORT']?>/dnscheck",function() {
|
||||
success_rebind_check(data);
|
||||
}).fail(function(){
|
||||
failure({"status":403, "responseJSON":{"error": "Your router or DNS server has DNS rebinding protection enabled, preventing "+data.internal_dns+" <?=$internalip?> resolution. See Help for more details and workarounds"}});
|
||||
failure({"status":403, "responseJSON":{"error":"_(Your router or DNS server has DNS rebinding protection enabled, preventing)_ "+data.internal_dns+" <?=$internalip?> _(resolution)_. _(See Help for more details and workarounds)_"}});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
failure({"status":403, "responseJSON":{"error": "Server was unable to provision SSL certificate"}});
|
||||
failure({"status":403, "responseJSON":{"error":"_(Server was unable to provision SSL certificate)_"}});
|
||||
}
|
||||
};
|
||||
var success_rebind_check = function(data) {
|
||||
@@ -85,17 +84,17 @@ function provisionSSL(button) {
|
||||
$.post("/webGui/include/ProvisionCert.php",success_provision).fail(failure);
|
||||
}
|
||||
function updateDNS(button) {
|
||||
$(button).prop("disabled", true).html("<i class='fa fa-circle-o-notch fa-spin fa-fw'></i> Updating DNS");
|
||||
$(button).prop("disabled", true).html("<i class='fa fa-circle-o-notch fa-spin fa-fw'></i>_(Update DNS)_");
|
||||
var failure = function(data) {
|
||||
var status = data.status;
|
||||
var obj = data.responseJSON;
|
||||
var msg = "Sorry, an error ("+status+") occurred updating unraid.net DNS records. The error is: "+obj.error+".";
|
||||
$(button).prop("disabled", false).html("Update DNS");
|
||||
swal('Oops',msg,'error');
|
||||
var msg = "_(Sorry, an error occurred updating unraid.net DNS records)_. _(The error is)_: "+obj.error+".";
|
||||
$(button).prop("disabled", false).html('_(Update DNS)_');
|
||||
swal("_(Oops)_",msg,"error");
|
||||
};
|
||||
var success = function(data) {
|
||||
$(button).prop("disabled", false).html("Update DNS");
|
||||
swal("","Your local IP address <?=$internalip?> has been updated for unraid.net.","success");
|
||||
$(button).prop("disabled", false).html('_(Update DNS)_');
|
||||
swal("","_(Your local IP address)_ <?=$internalip?> _(has been updated for unraid.net)_.","success");
|
||||
};
|
||||
$.post("/webGui/include/UpdateDNS.php",success).fail(failure);
|
||||
}
|
||||
@@ -112,19 +111,19 @@ function checkPorts(form) {
|
||||
item.prop('disabled',false);
|
||||
}
|
||||
if (list.length > 0) {
|
||||
swal({title:'Non-recommended port'+(list.length>1?'s':''),text:list.join(', ')+'<br>may conflict with well-known services',html:true,type:'warning',showCancelButton:true},function(){form.submit();});
|
||||
swal({title:'_(Non-recommended port)_'+(list.length>1?'s':''),text:list.join(', ')+'<br>_(may conflict with well-known services)_',html:true,type:'warning',showCancelButton:true},function(){form.submit();});
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
function updateTELNET(form) {
|
||||
form.PORTTELNET.disabled = form.USE_TELNET.value=='no';
|
||||
form.PORTTELNET.disabled = form.USE_TELNET.value=='_(no)_';
|
||||
}
|
||||
function updateSSH(form) {
|
||||
form.PORTSSH.disabled = form.USE_SSH.value=='no';
|
||||
form.PORTSSH.disabled = form.USE_SSH.value=='_(no)_';
|
||||
}
|
||||
function updateSSL(form) {
|
||||
form.PORTSSL.disabled = form.USE_SSL.value=='no';
|
||||
form.PORTSSL.disabled = form.USE_SSL.value=='_(no)_';
|
||||
}
|
||||
$(function(){
|
||||
var form = document.SSLSettings;
|
||||
@@ -135,18 +134,20 @@ $(function(){
|
||||
</script>
|
||||
<form markdown="1" name="SSLSettings" method="POST" action="/update.htm" target="progressFrame">
|
||||
<input type="hidden" name="changePorts" value="apply">
|
||||
Start page:
|
||||
: <select name="START_PAGE" size="1">
|
||||
_(Start page)_:
|
||||
: <select name="START_PAGE">
|
||||
<?foreach ($tasks as $task) echo mk_option($var['START_PAGE']??'Main', $task, $task);?>
|
||||
</select>
|
||||
|
||||
:help58
|
||||
> Select the page which is opened first when entering the GUI. By default the *Main* page is selected.
|
||||
:end
|
||||
|
||||
<!--
|
||||
Restrict access:
|
||||
: <select name="BIND_MGT" size="1" class="narrow">
|
||||
<?=mk_option($var['BIND_MGT'], "no", "No")?>
|
||||
<?=mk_option($var['BIND_MGT'], "yes", "Yes")?>
|
||||
: <select name="BIND_MGT" class="narrow">
|
||||
<?=mk_option($var['BIND_MGT'], "no", _('No'))?>
|
||||
<?=mk_option($var['BIND_MGT'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
> By default GUI, SSH and TELNET access are available on all active interfaces of the system.
|
||||
@@ -154,49 +155,60 @@ Restrict access:
|
||||
> *Restrict access* limits GUI, SSH and TELNET access to the management interface only (eth0).
|
||||
-->
|
||||
|
||||
Use TELNET:
|
||||
: <select name="USE_TELNET" size="1" onchange="updateTELNET(this.form)">
|
||||
<?=mk_option($var['USE_TELNET'], "no", "No")?>
|
||||
<?=mk_option($var['USE_TELNET'], "yes", "Yes")?>
|
||||
_(Use TELNET)_:
|
||||
: <select name="USE_TELNET" onchange="updateTELNET(this.form)">
|
||||
<?=mk_option($var['USE_TELNET'], "no", _('No'))?>
|
||||
<?=mk_option($var['USE_TELNET'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help59
|
||||
> By default TELNET access is enabled. TELNET is an insecure type of CLI access however,
|
||||
> and it is highly recommended to use SSH access instead and disable TELNET access.
|
||||
:end
|
||||
|
||||
TELNET port:
|
||||
_(TELNET port)_:
|
||||
: <input type="number" name="PORTTELNET" class="narrow" min="1" max="65535" value="<?=htmlspecialchars($var['PORTTELNET']??23)?>">
|
||||
|
||||
:help60
|
||||
> Enter the TELNET port, default port is 23.
|
||||
:end
|
||||
|
||||
Use SSH:
|
||||
: <select name="USE_SSH" size="1" onchange="updateSSH(this.form)">
|
||||
<?=mk_option($var['USE_SSH'], "no", "No")?>
|
||||
<?=mk_option($var['USE_SSH'], "yes", "Yes")?>
|
||||
_(Use SSH)_:
|
||||
: <select name="USE_SSH" onchange="updateSSH(this.form)">
|
||||
<?=mk_option($var['USE_SSH'], "no", _('No'))?>
|
||||
<?=mk_option($var['USE_SSH'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help61
|
||||
> SSH is enabled by default and offers a secure way of CLI access. Upon system startup SSH keys are automatically generated
|
||||
> if not yet existing, and stored on the flash device in the folder */config/ssh*.
|
||||
:end
|
||||
|
||||
SSH port:
|
||||
_(SSH port)_:
|
||||
: <input type="number" name="PORTSSH" class="narrow" min="1" max="65535" value="<?=htmlspecialchars($var['PORTSSH']??22)?>">
|
||||
|
||||
:help62
|
||||
> Enter the SSH port, default port is 22.
|
||||
:end
|
||||
|
||||
Use UPnP:
|
||||
: <select name="USE_UPNP" size="1">
|
||||
<?=mk_option($var['USE_UPNP'], "yes", "Yes")?>
|
||||
<?=mk_option($var['USE_UPNP'], "no", "No")?>
|
||||
_(Use UPnP)_:
|
||||
: <select name="USE_UPNP">
|
||||
<?=mk_option($var['USE_UPNP'], "yes", _('Yes'))?>
|
||||
<?=mk_option($var['USE_UPNP'], "no", _('No'))?>
|
||||
</select>
|
||||
|
||||
:help63
|
||||
> Enable (default) or disable the UPnP function on the server. This function allows automatic forwarding of ports on the router, only applicable when UPnP is enabled on the router itself.
|
||||
:end
|
||||
|
||||
Use SSL/TLS:
|
||||
: <select name="USE_SSL" size="1" onchange="updateSSL(this.form)">
|
||||
<?=mk_option($var['USE_SSL'], "auto", "Auto")?>
|
||||
<?=mk_option($var['USE_SSL'], "no", "No")?>
|
||||
<?=mk_option($var['USE_SSL'], "yes", "Yes")?>
|
||||
_(Use SSL/TLS)_:
|
||||
: <select name="USE_SSL" onchange="updateSSL(this.form)">
|
||||
<?=mk_option($var['USE_SSL'], "auto", _('Auto'))?>
|
||||
<?=mk_option($var['USE_SSL'], "no", _('No'))?>
|
||||
<?=mk_option($var['USE_SSL'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help64
|
||||
> Determines how the webGUI responds to HTTP and/or HTTPS protocol.
|
||||
>
|
||||
> Select **No** to disable HTTPS
|
||||
@@ -238,42 +250,50 @@ Use SSL/TLS:
|
||||
> Whether nginx enables OCSP Staping is determined by which certificate is in use:<br>
|
||||
> `config/ssl/certs/certificate_bundle.pem` => Yes<br>
|
||||
> `config/ssl/certs/<server-name>_unraid_bundle.pem` => No
|
||||
:end
|
||||
|
||||
HTTP port:
|
||||
_(HTTP port)_:
|
||||
: <input type="number" name="PORT" class="narrow" min="1" max="65535" value="<?=htmlspecialchars($var['PORT']??80)?>">
|
||||
|
||||
:help65
|
||||
> Enter the HTTP port, default port is 80.
|
||||
:end
|
||||
|
||||
HTTPS port:
|
||||
_(HTTPS port)_:
|
||||
: <input type="number" name="PORTSSL" class="narrow" min="1" max="65535" value="<?=htmlspecialchars($var['PORTSSL']??443)?>">
|
||||
|
||||
:help66
|
||||
> Enter the HTTPS port, default port is 443.
|
||||
:end
|
||||
|
||||
Local TLD:
|
||||
_(Local TLD)_:
|
||||
: <input type="text" name="LOCAL_TLD" class="narrow" value="<?=htmlspecialchars($var['LOCAL_TLD'])?>">
|
||||
|
||||
:help67
|
||||
> Enter your local Top Level Domain. May be blank.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="button" value="Apply" onclick="checkPorts(this.form)" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="button" value="_(Apply)_" onclick="checkPorts(this.form)" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
</form>
|
||||
<div style="height:24px"></div>
|
||||
<form markdown="1" name="Provision" method="POST" action="/update.htm" target="progressFrame">
|
||||
<input type="hidden" name="changePorts" value="apply">
|
||||
Certificate issuer:
|
||||
_(Certificate issuer)_:
|
||||
: <?=shell_exec("/usr/bin/openssl x509 -text -noout -in /etc/ssl/certs/unraid_bundle.pem|sed -n -e 's/^.*Issuer: //p'")?>
|
||||
|
||||
<?
|
||||
$time = strtotime(exec("/usr/bin/openssl x509 -text -noout -in /etc/ssl/certs/unraid_bundle.pem|sed -n -e 's/^.*Not After : //p'"));
|
||||
$format = $display['date'].($display['date']!='%c' ? ', '.str_replace(['%M','%R'],['%M:%S','%R:%S'],$display['time']):'');
|
||||
?>
|
||||
Certificate expiration:
|
||||
: <?=strftime($format, $time)?>
|
||||
_(Certificate expiration)_:
|
||||
: <?=my_lang(strftime($format, $time))?>
|
||||
|
||||
|
||||
: <button type="button" onclick="provisionSSL(this)" <?=$disabled_provision?>><?=$provisionlabel?></button><button type="button" onclick="updateDNS(this)" <?=$disabled_updatedns?>>Update DNS</button>
|
||||
: <button type="button" onclick="provisionSSL(this)" <?=$disabled_provision?>><?=$provisionlabel?></button><button type="button" onclick="updateDNS(this)" <?=$disabled_updatedns?>>_(Update DNS)_</button>
|
||||
|
||||
:help68
|
||||
> **Provision** may be used to allocate a *free* SSL Certficiate from [Let's Encrypt](https://letsencrypt.org/) and
|
||||
> then upload to your server. Note: We **highly** recommend using a static IP address in this case.
|
||||
|
||||
@@ -313,5 +333,6 @@ Certificate expiration:
|
||||
|
||||
> When all else fails, you can create an entry in your PC's *hosts* file to override external DNS and
|
||||
> directly resolve your servers unraid.net FQDN to its local IP address.
|
||||
:end
|
||||
|
||||
</form>
|
||||
|
||||
@@ -3,8 +3,8 @@ Title="Mover Settings"
|
||||
Tag="calendar-check-o"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -16,11 +16,11 @@ Tag="calendar-check-o"
|
||||
?>
|
||||
<?
|
||||
if (empty($disks['cache']) || $disks['cache']['status']=='DISK_NP') {
|
||||
echo "<p class='notice'>No Cache disk present!</p>";
|
||||
echo "<p class='notice'>"._('No Cache disk present')."!</p>";
|
||||
} elseif ($var['shareCacheEnabled']!='yes') {
|
||||
echo "<p class='notice'>Cache disk not enabled!</p>";
|
||||
echo "<p class='notice'>"._('Cache disk not enabled')."!</p>";
|
||||
} elseif ($var['shareUser']=='-') {
|
||||
echo "<p class='notice'>User shares not enabled!</p>";
|
||||
echo "<p class='notice'>"._('User shares not enabled')."!</p>";
|
||||
}
|
||||
$cron = explode(' ',$var['shareMoverSchedule']);
|
||||
$move = $cron[2]!='*' ? 3 : ($cron[4]!='*' ? 2 : (substr($cron[1],0,1)!='*' ? 1 : 0));
|
||||
@@ -54,78 +54,88 @@ function presetMover(form) {
|
||||
}
|
||||
</script>
|
||||
<form markdown="1" name="mover_schedule" method="POST" action="/update.htm" target="progressFrame" onsubmit="prepareMover(this)">
|
||||
Mover schedule:
|
||||
: <select name="shareMoverSchedule" size="1" onchange="presetMover(this.form)">
|
||||
_(Mover schedule)_:
|
||||
: <select name="shareMoverSchedule" onchange="presetMover(this.form)">
|
||||
<?for ($m=0; $m<count($mode); $m++):?>
|
||||
<?=mk_option($move, strval($m), $mode[$m])?>
|
||||
<?=mk_option($move, strval($m), _($mode[$m]))?>
|
||||
<?endfor;?>
|
||||
</select>
|
||||
|
||||
:help171
|
||||
> Choose a mover schedule ranging from hourly, daily, weekly and monthly.
|
||||
>
|
||||
> The interval determines how fast the mover will activated, it runs in the background.
|
||||
:end
|
||||
|
||||
Day of the week:
|
||||
: <select name="day" size="1">
|
||||
_(Day of the week)_:
|
||||
: <select name="day">
|
||||
<?for ($d=0; $d<count($days); $d++):?>
|
||||
<?=mk_option($cron[4], strval($d), $days[$d])?>
|
||||
<?=mk_option($cron[4], strval($d), my_lang($days[$d]))?>
|
||||
<?endfor;?>
|
||||
<?=mk_option($cron[4], "*", "--------", "disabled")?>
|
||||
</select>
|
||||
|
||||
:help172
|
||||
> Choose a day when the weekly schedule is selected. Otherwise disabled.
|
||||
:end
|
||||
|
||||
Day of the month:
|
||||
: <select name="dotm" size="1">
|
||||
_(Day of the month)_:
|
||||
: <select name="dotm">
|
||||
<?for ($d=1; $d<=31; $d++):?>
|
||||
<?=mk_option($cron[2], strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
<?=mk_option($cron[2], "*", "--------", "disabled")?>
|
||||
</select>
|
||||
|
||||
:help173
|
||||
> Choose a date when the monthly schedule is selected. Otherwise disabled.
|
||||
:end
|
||||
|
||||
Time of the day:
|
||||
: <span id="H1"<?if ($move==0):?> style="display:none"<?endif;?>><select name="hour1" size="1" class="narrow">
|
||||
_(Time of the day)_:
|
||||
: <span id="H1"<?if ($move==0):?> style="display:none"<?endif;?>><select name="hour1" class="narrow">
|
||||
<?for ($d=0; $d<=23; $d++):?>
|
||||
<?=mk_option($cron[1], strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select>
|
||||
<select name="min" size="1" class="narrow">
|
||||
<select name="min" class="narrow">
|
||||
<?for ($d=0; $d<=55; $d+=5):?>
|
||||
<?=mk_option($cron[0], strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select> HH:MM</span>
|
||||
: <span id="H2"<?if ($move!=0):?> style="display:none"<?endif;?>><select name="hour2" size="1">
|
||||
<?=mk_option($cron[1], "*/1", "Every hour")?>
|
||||
<?=mk_option($cron[1], "*/2", "Every 2 hours")?>
|
||||
<?=mk_option($cron[1], "*/3", "Every 3 hours")?>
|
||||
<?=mk_option($cron[1], "*/4", "Every 4 hours")?>
|
||||
<?=mk_option($cron[1], "*/6", "Every 6 hours")?>
|
||||
<?=mk_option($cron[1], "*/8", "Every 8 hours")?>
|
||||
: <span id="H2"<?if ($move!=0):?> style="display:none"<?endif;?>><select name="hour2">
|
||||
<?=mk_option($cron[1], "*/1", _("Every hour"))?>
|
||||
<?=mk_option($cron[1], "*/2", _("Every 2 hours"))?>
|
||||
<?=mk_option($cron[1], "*/3", _("Every 3 hours"))?>
|
||||
<?=mk_option($cron[1], "*/4", _("Every 4 hours"))?>
|
||||
<?=mk_option($cron[1], "*/6", _("Every 6 hours"))?>
|
||||
<?=mk_option($cron[1], "*/8", _("Every 8 hours"))?>
|
||||
</select></span>
|
||||
|
||||
:help174
|
||||
> When an hourly schedule is selected this will set the interval in hours. An interval always starts on the whole hour (minute 0).
|
||||
>
|
||||
> For the other schedules choose here the time of the day the mover should start.
|
||||
:end
|
||||
|
||||
Mover logging:
|
||||
: <select name="shareMoverLogging" size="1">
|
||||
<?=mk_option($var['shareMoverLogging'], "yes", "Enabled")?>
|
||||
<?=mk_option($var['shareMoverLogging'], "no", "Disabled")?>
|
||||
_(Mover logging)_:
|
||||
: <select name="shareMoverLogging">
|
||||
<?=mk_option($var['shareMoverLogging'], "yes", _("Enabled"))?>
|
||||
<?=mk_option($var['shareMoverLogging'], "no", _("Disabled"))?>
|
||||
</select>
|
||||
|
||||
:help175
|
||||
> Write mover messages to the syslog file.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeMover" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeMover" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
<?if ($var['shareCacheEnabled']=="yes" && is_dir("/mnt/cache")):?>
|
||||
|
||||
<?if (file_exists("/var/run/mover.pid")):?>
|
||||
: <input type="submit" name="cmdStartMover" value="Move now" disabled> Mover is running.
|
||||
: <input type="submit" name="cmdStartMover" value="_(Move now)_" disabled> _(Mover is running)_.
|
||||
<?else:?>
|
||||
: <input type="submit" name="cmdStartMover" value="Move now"> Click to invoke the Mover.
|
||||
: <input type="submit" name="cmdStartMover" value="_(Move now)_"> _(Click to invoke the Mover)_.
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
</form>
|
||||
+14
-10
@@ -4,8 +4,8 @@ Icon="icon-linux"
|
||||
Tag="linux"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -18,23 +18,26 @@ Tag="linux"
|
||||
<script>
|
||||
function checkNFSenable() {
|
||||
var form = document.nfs_enable;
|
||||
form.fuse_remember.disabled = form.shareNFSEnabled.value=="no";
|
||||
form.fuse_remember.disabled = form.shareNFSEnabled.value=="_(no)_";
|
||||
}
|
||||
$(checkNFSenable);
|
||||
</script>
|
||||
|
||||
<form markdown="1" name="nfs_enable" method="POST" action="/update.htm" target="progressFrame">
|
||||
Enable NFS:
|
||||
: <select name="shareNFSEnabled" size="1" onchange="checkNFSenable()">
|
||||
<?=mk_option($var['shareNFSEnabled'], "no", "No");?>
|
||||
<?=mk_option($var['shareNFSEnabled'], "yes", "Yes");?>
|
||||
_(Enable NFS)_:
|
||||
: <select name="shareNFSEnabled" onchange="checkNFSenable()">
|
||||
<?=mk_option($var['shareNFSEnabled'], "no", _('No'));?>
|
||||
<?=mk_option($var['shareNFSEnabled'], "yes", _('Yes'));?>
|
||||
</select>
|
||||
|
||||
:help83
|
||||
> Select 'Yes' to enable the NFS protocol.
|
||||
:end
|
||||
|
||||
Tunable (fuse_remember):
|
||||
: <input type="text" name="fuse_remember" maxlength="10" value="<?=$var['fuse_remember']?>" class="narrow"><?=$var['fuse_remember_status']?>
|
||||
_(Tunable (fuse_remember))_:
|
||||
: <input type="text" name="fuse_remember" maxlength="10" value="<?=$var['fuse_remember']?>" class="narrow"><?=_($var['fuse_remember_status'])?>
|
||||
|
||||
:help84
|
||||
> When NFS is enabled, this Tunable may be used to alleviate or solve instances of "NFS Stale File Handles"
|
||||
> you might encounter with your NFS client.
|
||||
>
|
||||
@@ -57,7 +60,8 @@ Tunable (fuse_remember):
|
||||
> your client. Be aware that setting a value of -1 will cause the memory footprint to grow by approximatel
|
||||
> 108 bytes per file/directory name cached. Depending how much RAM is installed in your server and how many
|
||||
> files/directories you access via NFS this may or may not lead to out-of-memory conditions.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeShare" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
@@ -4,8 +4,8 @@ Tag="icon-network"
|
||||
Cond="file_exists('/boot/config/network-rules.cfg')"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2018, Lime Technology
|
||||
* Copyright 2018, Bergware International.
|
||||
/* Copyright 2020, Lime Technology
|
||||
* Copyright 2020, 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,
|
||||
@@ -50,7 +50,7 @@ function check_rules(form) {
|
||||
var mac = [];
|
||||
$(form).find('select[name^="eth"]').each(function(){mac.push($(this).val());});
|
||||
if (mac.same()) {
|
||||
swal('MAC address mismatch','Rules contain duplicate MAC address assignments','error');
|
||||
swal('_(MAC address mismatch)_','_(Rules contain duplicate MAC address assignments)_','error');
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
@@ -89,8 +89,8 @@ $(function(){
|
||||
<input type="hidden" name="#cfg" value="<?=$cfg?>">
|
||||
<?foreach ($link as $eth => $file):?>
|
||||
|
||||
Interface <?=$eth?>:
|
||||
: <select name="<?=$eth?>" size="1" onchange="update_info(this.name,this.value)">
|
||||
_(Interface)_ <?=$eth?>:
|
||||
: <select name="<?=$eth?>" onchange="update_info(this.name,this.value)">
|
||||
<?foreach ($link as $my => $val):?>
|
||||
<?=mk_option($file['mac'],$val['mac'],strtoupper($val['mac']));?>
|
||||
<?endforeach;?>
|
||||
@@ -99,9 +99,10 @@ Interface <?=$eth?>:
|
||||
<?endforeach;?>
|
||||
|
||||
|
||||
: <input type="submit" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
:help
|
||||
> The interface assignment rules can be changed here and might be necessary to set the preferred interface for managing Unraid - *use with care, usually there is no need to change*.
|
||||
>
|
||||
> **eth0** is the main interface used to manage the Unraid system. The other interfaces are optional and may be used as desired.
|
||||
@@ -109,8 +110,9 @@ Interface <?=$eth?>:
|
||||
>
|
||||
> The interface assignment is stored on the flash device under */config/network-rules.cfg*. This file can be viewed with any editor, but it is recommended to make changes via the webGUI only.<br>
|
||||
> Deleting the file *network-rules.cfg* from the flash device will restore automatic interface assignment after a system reboot.
|
||||
:end
|
||||
|
||||
<?if (file_exists('/tmp/network-rules.tmp')):?>
|
||||
<br><span class="error" style="text-align:center;padding:12px 0">Please <span class="strong big">Reboot</span> system to make new rules active</span>
|
||||
<br><span class="error" style="text-align:center;padding:12px 0">_(Please **Reboot** system to make new rules active)_</span>
|
||||
<?endif;?>
|
||||
</div>
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-config"
|
||||
Tag="cog"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -27,7 +27,7 @@ if ($newarray) {
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
span.indent{display:inline-block;width:240px;margin-top:11px;}
|
||||
span.indent{display:inline-block;width:240px;margin-top:30px;}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
@@ -42,13 +42,14 @@ function prepareNewConfig(form) {
|
||||
form.preset.disabled = true;
|
||||
}
|
||||
$(function() {
|
||||
$('#s1').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>, firstItemChecksAll:true, explicitClose:'...close'});
|
||||
$('#s1').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>, firstItemChecksAll:true, explicitClose:'..._(close)_'});
|
||||
<?if ($disabled):?>
|
||||
$('#s1').dropdownchecklist('disable');
|
||||
<?endif;?>
|
||||
});
|
||||
</script>
|
||||
|
||||
:plug4
|
||||
This is a utility to reset the array disk configuration so that all disks appear as "New" disks, as
|
||||
if it were a fresh new server.
|
||||
|
||||
@@ -59,6 +60,7 @@ Use the *'Preserve current assignments'* selection to populate the desired disk
|
||||
|
||||
**DO NOT USE THIS UTILITY THINKING IT WILL REBUILD A FAILED DRIVE** - it will have the opposite
|
||||
effect of making it ***impossible*** to rebuild an existing failed drive - you have been warned!
|
||||
:end
|
||||
|
||||
<hr>
|
||||
<form name="newConfig" method="POST" action="/update.htm" target="progressFrame" onsubmit="prepareNewConfig(this)">
|
||||
@@ -66,20 +68,20 @@ effect of making it ***impossible*** to rebuild an existing failed drive - you h
|
||||
<input type="hidden" name="preserveData" value="yes" disabled>
|
||||
<input type="hidden" name="preserveCache" value="yes" disabled>
|
||||
|
||||
<span class="indent">Preserve current assignments:</span>
|
||||
<select id="s1" name="preset" size="1" multiple="multiple" style="display:none">
|
||||
<option value=''>All</option>
|
||||
<?=mk_option_check(0,'parity','Parity slots')?>
|
||||
<?=mk_option_check(0,'data','Data slots')?>
|
||||
<?=mk_option_check(0,'cache','Cache slots')?>
|
||||
<span class="indent">_(Preserve current assignments)_:</span>
|
||||
<select id="s1" name="preset" multiple="multiple" style="display:none">
|
||||
<option value=''>_(All)_</option>
|
||||
<?=mk_option_check(0,'parity',_('Parity slots'))?>
|
||||
<?=mk_option_check(0,'data',_('Data slots'))?>
|
||||
<?=mk_option_check(0,'cache',_('Cache slots'))?>
|
||||
</select>
|
||||
<br>
|
||||
<span class="indent"><input type="submit" class="lock" name="cmdInit" value="Apply" disabled><input type="button" class="lock" value="Done" onclick="done()"></span>
|
||||
<span class="indent"><input type="submit" class="lock" name="cmdInit" value="_(Apply)_" disabled><input type="button" class="lock" value="_(Done)_" onclick="done()"></span>
|
||||
<?if ($newarray):?>
|
||||
Array has been <span class='strong big'>Reset</span> (please configure)
|
||||
_(Array has been **Reset**)_ (_(please configure)_)
|
||||
<?elseif ($disabled):?>
|
||||
Array must be <span class='strong big'>Stopped</span>
|
||||
_(Array must be **Stopped** to change)_
|
||||
<?else:?>
|
||||
<input type="checkbox" onClick="cmdInit.disabled=!this.checked"><small>Yes I want to do this</small>
|
||||
<input type="checkbox" onClick="cmdInit.disabled=!this.checked"><small>_(Yes, I want to do this)_</small>
|
||||
<?endif;?>
|
||||
</form>
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-permissions"
|
||||
Tag="folder-o"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -22,6 +22,13 @@ function data_disks($disk) {
|
||||
return ($disk['type']=='Data' && $disk['status']=='DISK_OK');
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
.block{display:inline-block;width:300px;margin-top:24px;margin-bottom:24px}
|
||||
div.div{font-weight:bold;margin-bottom:12px}
|
||||
pre.pre{margin:30px 0;padding:20px}
|
||||
pre>p{margin:0;padding:0}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function setNewPerms(form) {
|
||||
var dirs = '';
|
||||
@@ -37,17 +44,19 @@ function setNewPerms(form) {
|
||||
dirs += item.value;
|
||||
}
|
||||
}
|
||||
if (dirs) swal({title:'Proceed?',text:'This will update folder & file permissions',type:'warning',showCancelButton:true},function(){openBox('/webGui/scripts/newperms&arg1='+dirs,'New Permissions',490,430,true);});
|
||||
if (dirs) swal({title:'_(Proceed)_?',text:'_(This will update folder & file permissions)_',type:'warning',showCancelButton:true},function(){openBox('/webGui/scripts/newperms&arg1='+dirs,'_(New Permissions)_',490,430,true);});
|
||||
}
|
||||
$(function() {
|
||||
$('#s1').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>, firstItemChecksAll:true, explicitClose:'...close'});
|
||||
$('#s2').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>, firstItemChecksAll:true, explicitClose:'...close'});
|
||||
$('#s1').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>, firstItemChecksAll:true, explicitClose:'..._(close)_'});
|
||||
$('#s2').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>, firstItemChecksAll:true, explicitClose:'..._(close)_'});
|
||||
<?if ($var['fsState']!="Started"):?>
|
||||
$('#s1').dropdownchecklist('disable');
|
||||
$('#s2').dropdownchecklist('disable');
|
||||
<?endif;?>
|
||||
});
|
||||
</script>
|
||||
|
||||
:plug5
|
||||
This is a mandatory one-time action to be taken after upgrading from a pre-5.0 Unraid server release to Unraid v5 or a later release.
|
||||
Select **ALL DISKS** when performing this one-time action.
|
||||
|
||||
@@ -57,7 +66,10 @@ directories when transitioning back from Active Directory to non-Active Director
|
||||
The utility starts a background process that goes to each of your data disks and cache disks and selected user shares
|
||||
and changes file and directory ownership to *nobody/users* (i.e., uid/gid to 99/100), and sets permissions
|
||||
as follows:
|
||||
~~~
|
||||
:end
|
||||
|
||||
<pre class="pre">
|
||||
:plug6
|
||||
For directories:
|
||||
drwxrwxrwx
|
||||
|
||||
@@ -66,40 +78,42 @@ For read/write files:
|
||||
|
||||
For readonly files:
|
||||
-r--r--r--
|
||||
~~~
|
||||
:end
|
||||
</pre>
|
||||
|
||||
:plug7
|
||||
Clicking **Start** will open another window and start the background process.
|
||||
|
||||
Closing the window before completion will terminate the background process - so don't do that. This process can take a long time if you have many files.
|
||||
|
||||
Note that this tool may negatively affect any docker containers if you allow your appdata share to be included.
|
||||
:end
|
||||
|
||||
<form method="POST" action="/update.htm" target="progressFrame">
|
||||
<span style="display:inline-block;margin-top:8px">
|
||||
<span style="display:block;margin-bottom:4px;font-weight:bold">Disks</span>
|
||||
<span class="block"><div class="div">_(Disks)_</div>
|
||||
<select id="s1" name="includeDisk" size="1" multiple="multiple" style="display:none">
|
||||
<option value=''>All</option>
|
||||
<option value=''>_(All)_</option>
|
||||
<?if (isset($disks['cache'])):?>
|
||||
<option value='/mnt/cache'>Cache</option>
|
||||
<option value='/mnt/cache'>_(Cache)_</option>
|
||||
<?endif;?>
|
||||
<?foreach (array_filter($disks,'data_disks') as $disk):?>
|
||||
<?=mk_option(1,"/mnt/{$disk['name']}",my_disk($disk['name']))?>
|
||||
<?=mk_option(1,"/mnt/{$disk['name']}",my_lang(my_disk($disk['name'])),3)?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
</span>
|
||||
<span style="display:inline-block">
|
||||
<span style="display:block;margin-bottom:4px;font-weight:bold">User Shares</span>
|
||||
<span class="block"><div class="div">_(User Shares)_</div>
|
||||
<select id="s2" name="includeShare" size="1" multiple="multiple" style="display:none">
|
||||
<option value=''>All</option>
|
||||
<option value=''>_(All)_</option>
|
||||
<?uksort($shares,'strnatcasecmp');?>
|
||||
<?foreach ($shares as $share):?>
|
||||
<?=mk_option(1,"/mnt/user/{$share['name']}",$share['name'])?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
</span>
|
||||
<br><br>
|
||||
|
||||
<?if ($var['fsState']=="Started"):?>
|
||||
<input type="button" value="Start" onclick="setNewPerms(this.form)"><input type="button" value=" Done " onclick="done()">
|
||||
<div><input type="button" value="_(Start)_" onclick="setNewPerms(this.form)"><input type="button" value="_(Done)_" class="lock" onclick="done()"></div>
|
||||
<?else:?>
|
||||
<input type="button" value="Start" disabled><input type="button" value=" Done " onclick="done()"> Array must be <span class="strong big">Started</span> to change permissions.
|
||||
<div><input type="button" value="_(Start)_" disabled><input type="button" value="_(Done)_" class="lock" onclick="done()">_(Array must be **Started** to change permissions)_.</div>
|
||||
<?endif;?>
|
||||
</form>
|
||||
|
||||
@@ -3,8 +3,8 @@ Title="Notification Agents"
|
||||
Tag="rss-square"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -79,7 +79,7 @@ function testService(name) {
|
||||
form.submit();
|
||||
}
|
||||
function initDropdown() {
|
||||
if (openPage) {$("[id^='slot_']").dropdownchecklist({width:<?=$width[1]?>,explicitClose:'...close'}); openPage = false;}
|
||||
if (openPage) {$("[id^='slot_']").dropdownchecklist({width:<?=$width[1]?>,explicitClose:'..._(close)_'}); openPage = false;}
|
||||
}
|
||||
</script>
|
||||
<form method="POST" id="formExec" action="/update.php" target="progressFrame">
|
||||
@@ -90,7 +90,7 @@ function initDropdown() {
|
||||
<?
|
||||
$fields = ['Event','Subject','Timestamp','Description','Importance','Content'];
|
||||
$xml_file = "webGui/include/NotificationAgents.xml";
|
||||
$xml = @simplexml_load_file($xml_file) or die("Failed to open $xml_file");
|
||||
$xml = @simplexml_load_file($xml_file) or die(_("Failed to open")." $xml_file");
|
||||
foreach ($xml->Agent as $agent) {
|
||||
$name = str_replace(' ','_',$agent->Name);
|
||||
$enabledAgent = agent_fullname("$name.sh", "enabled");
|
||||
@@ -115,7 +115,7 @@ foreach ($xml->Agent as $agent) {
|
||||
}
|
||||
}
|
||||
foreach (explode(PHP_EOL,(String) $agent->Script) as $line) if (trim($line)) $script .= trim($line)."{1}";
|
||||
echo '<div id="title" class="shift"><span class="left"><img src="/plugins/dynamix/icons/'.strtolower(str_replace('_','',$name)).'.png" class="icon" style="height:16px;width:16px;">'.str_replace('_',' ',$name).'</span><span class="status vhshift">'.(is_file($enabledAgent) ? '<span class="green">Enabled</span>' : '<span class="red">Disabled</span>').'</span></div>';
|
||||
echo '<div id="title" class="shift"><span class="left"><img src="/plugins/dynamix/icons/'.strtolower(str_replace('_','',$name)).'.png" class="icon" style="height:16px;width:16px;">'.str_replace('_',' ',$name).'</span><span class="status vhshift">'.(is_file($enabledAgent) ? '<span class="green">'._("Enabled").'</span>' : '<span class="red">'._("Disabled").'</span>').'</span></div>';
|
||||
echo '<form method="POST" name="'.$name.'" action="/update.php" target="progressFrame">';
|
||||
echo '<input type="hidden" name="#include" value="/webGui/include/update.file.php">';
|
||||
echo '<input type="hidden" name="#file" value="'.$file.'">';
|
||||
@@ -123,9 +123,9 @@ foreach ($xml->Agent as $agent) {
|
||||
echo '<input type="hidden" name="#arg[1]" value="">';
|
||||
echo '<input type="hidden" name="#arg[2]" value="">';
|
||||
echo '<input type="hidden" name="text" value="">';
|
||||
echo '<dl><dt>Agent function:</dt><dd><select name="Enabled" size="1">';
|
||||
echo mk_option(is_file($disabledAgent), 'no', 'Disabled');
|
||||
echo mk_option(is_file($enabledAgent), 'yes', 'Enabled');
|
||||
echo '<dl><dt>'._("Agent function").':</dt><dd><select name="Enabled">';
|
||||
echo mk_option(is_file($disabledAgent), 'no', _('Disabled'));
|
||||
echo mk_option(is_file($enabledAgent), 'yes', _('Enabled'));
|
||||
echo '</select></dd></dl>';
|
||||
echo '<script>scripts["'.$name.'"]='.json_encode($script).';enabledAgents["'.$name.'"]="'.$enabledAgent.'";disabledAgents["'.$name.'"]="'.$disabledAgent.'";</script>';
|
||||
$i = 1;
|
||||
@@ -136,10 +136,10 @@ foreach ($xml->Agent as $agent) {
|
||||
$vHelp = preg_replace('#\[([^\]]*)\]#', '<$1>', $v->attributes()->Help);
|
||||
echo "<dl><dt>$vDesc:</dt><dd>";
|
||||
if (preg_match('/title|message/', $vDesc)) {
|
||||
echo '<select id="slot_'.$i.'" name="'.$vName.'" size="1" multiple style="display:none">';
|
||||
echo '<select id="slot_'.$i.'" name="'.$vName.'" multiple style="display:none">';
|
||||
$i++;
|
||||
$value = str_replace('\n',',',isset($values[$vName]) ? $values[$vName] : $vDefault);
|
||||
foreach ($fields as $field) echo mk_option_check($value,'$'.strtoupper($field),$field);
|
||||
foreach ($fields as $field) echo mk_option_check($value,'$'.strtoupper($field),_($field));
|
||||
echo '</select>';
|
||||
} else {
|
||||
echo '<input type="text" name="'.$vName.'" class="variable" required value="'.( isset($values[$vName]) ? $values[$vName] : $vDefault ).'">';
|
||||
@@ -147,11 +147,11 @@ foreach ($xml->Agent as $agent) {
|
||||
echo '</dd></dl>';
|
||||
if ($vHelp) echo '<blockquote class="inline_help">'.$vHelp.'</blockquote>';
|
||||
}
|
||||
echo '<dl><dt> </dt><dd><input type="submit" value="Apply" onclick="prepareService(this, \''.$name.'\')" disabled>';
|
||||
echo '<input type="button" value="Done" onclick="done()">';
|
||||
echo '<dl><dt> </dt><dd><input type="submit" value='._("Apply").' onclick="prepareService(this, \''.$name.'\')" disabled>';
|
||||
echo '<input type="button" value='._("Done").' onclick="done()">';
|
||||
if (is_file($file)) {
|
||||
echo '<input type="button" value="Delete" onclick="execCmd(\'delete\',\''.$name.'\')">';
|
||||
echo '<input type="button" value="Test" onclick="testService(\''.$name.'\')"'.($file==$enabledAgent ? '>' : ' disabled>');
|
||||
echo '<input type="button" value='._("Delete").' onclick="execCmd(\'delete\',\''.$name.'\')">';
|
||||
echo '<input type="button" value='._("Test").' onclick="testService(\''.$name.'\')"'.($file==$enabledAgent ? '>' : ' disabled>');
|
||||
}
|
||||
echo '</dd></dl></form><div style="min-height:50px;"></div>';
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ Icon="icon-notifications"
|
||||
Tag="phone-square"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, Bergware International.
|
||||
* Copyright 2012, Andrew Hamer-Adams, http://www.pixeleyes.co.nz.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -57,7 +57,7 @@ function prepareSystem(index) {
|
||||
if (index==0) $('.checkbox').attr('disabled','disabled'); else $('.checkbox').removeAttr('disabled');
|
||||
}
|
||||
function prepareTitle() {
|
||||
var title = 'Available notifications:';
|
||||
var title = '_(Available notifications)_:';
|
||||
$('#unraidTitle,#pluginTitle,#dockerTitle,#reportTitle').html(' ');
|
||||
if ($('.unraid').is(':visible')) { $('#unraidTitle').html(title); return; }
|
||||
if ($('.plugin').is(':visible')) { $('#pluginTitle').html(title); return; }
|
||||
@@ -100,163 +100,186 @@ $(function(){
|
||||
<input type="hidden" name="plugin">
|
||||
<input type="hidden" name="docker_notify">
|
||||
<input type="hidden" name="report">
|
||||
Notifications display:
|
||||
: <select name="display" size="1">
|
||||
<?=mk_option($notify['display'], "0", "Detailed")?>
|
||||
<?=mk_option($notify['display'], "1", "Summarized")?>
|
||||
_(Notifications display)_:
|
||||
: <select name="display">
|
||||
<?=mk_option($notify['display'], "0", _("Detailed"))?>
|
||||
<?=mk_option($notify['display'], "1", _("Summarized"))?>
|
||||
</select>
|
||||
|
||||
:help176
|
||||
> In *Detailed* view all notifications will be displayed on screen as soon as they arrive.<br>
|
||||
> Notifications can be acknowledged individually or all in once.
|
||||
>
|
||||
> In *Summarized* view notifications will be counted only and the number of unread notifications is shown in the menu header per category.<br>
|
||||
> Click on the counters to either acknowledge or view the unread notifications.
|
||||
:end
|
||||
|
||||
Date format:
|
||||
: <select name="date" size="1">
|
||||
<?=mk_option($notify['date'], "d-m-Y", "DD-MM-YYYY")?>
|
||||
<?=mk_option($notify['date'], "m-d-Y", "MM-DD-YYYY")?>
|
||||
<?=mk_option($notify['date'], "Y-m-d", "YYYY-MM-DD")?>
|
||||
_(Date format)_:
|
||||
: <select name="date">
|
||||
<?=mk_option($notify['date'], "d-m-Y", _("DD-MM-YYYY"))?>
|
||||
<?=mk_option($notify['date'], "m-d-Y", _("MM-DD-YYYY"))?>
|
||||
<?=mk_option($notify['date'], "Y-m-d", _("YYYY-MM-DD"))?>
|
||||
</select>
|
||||
|
||||
:help177
|
||||
> Select the desired date format which is used in the notifications archive. Recommended is YYYY-MM-DD, which makes the date/time column sortable in a sensible way.
|
||||
:end
|
||||
|
||||
Time format:
|
||||
: <select name="time" size="1">
|
||||
<?=mk_option($notify['time'], "h:i A", "12 hours")?>
|
||||
<?=mk_option($notify['time'], "H:i", "24 hours")?>
|
||||
_(Time format)_:
|
||||
: <select name="time">
|
||||
<?=mk_option($notify['time'], "h:i A", _("12 hours"))?>
|
||||
<?=mk_option($notify['time'], "H:i", _("24 hours"))?>
|
||||
</select>
|
||||
|
||||
:help178
|
||||
> Select the desired time format which is used in the notifications archive. Recommended is 24 hours, which makes the date/time column sortable in a sensible way.
|
||||
:end
|
||||
|
||||
Display position:
|
||||
: <select name="position" size="1">
|
||||
<?=mk_option($notify['position'], "top-left", "top-left")?>
|
||||
<?=mk_option($notify['position'], "top-right", "top-right")?>
|
||||
<?=mk_option($notify['position'], "bottom-left", "bottom-left")?>
|
||||
<?=mk_option($notify['position'], "bottom-right", "bottom-right")?>
|
||||
<?=mk_option($notify['position'], "center", "center")?>
|
||||
_(Display position)_:
|
||||
: <select name="position">
|
||||
<?=mk_option($notify['position'], "top-left", _("top-left"))?>
|
||||
<?=mk_option($notify['position'], "top-right", _("top-right"))?>
|
||||
<?=mk_option($notify['position'], "bottom-left", _("bottom-left"))?>
|
||||
<?=mk_option($notify['position'], "bottom-right", _("bottom-right"))?>
|
||||
<?=mk_option($notify['position'], "center", _("center"))?>
|
||||
</select>
|
||||
|
||||
:help179
|
||||
> Choose the position of where notifications appear on screen. Multiple notifications are stacked, bottom-to-top or top-to-bottom depending on the selected placement.
|
||||
:end
|
||||
|
||||
Store notifications to flash:
|
||||
: <select name="path" size="1">
|
||||
<?=mk_option($notify['path'], "/tmp/notifications", "No")?>
|
||||
<?=mk_option($notify['path'], "/boot/config/plugins/dynamix/notifications", "Yes")?>
|
||||
_(Store notifications to flash)_:
|
||||
: <select name="path">
|
||||
<?=mk_option($notify['path'], "/tmp/notifications", _("No"))?>
|
||||
<?=mk_option($notify['path'], "/boot/config/plugins/dynamix/notifications", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help180
|
||||
> By default notifications are stored on RAM disk, which will get lost upon system reboot.
|
||||
> Notifications may be stored permanently on the flash drive under folder '/boot/config/plugins/dynamix' instead.
|
||||
:end
|
||||
|
||||
System notifications:
|
||||
: <select name="system" size="1" onchange="prepareSystem(this.selectedIndex)">
|
||||
<?=mk_option($notify['system'], "", "Disabled")?>
|
||||
<?=mk_option($notify['system'], "*/1 * * * *", "Enabled")?>
|
||||
_(System notifications)_:
|
||||
: <select name="system" onchange="prepareSystem(this.selectedIndex)">
|
||||
<?=mk_option($notify['system'], "", _("Disabled"))?>
|
||||
<?=mk_option($notify['system'], "*/1 * * * *", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
:help181
|
||||
> By default the notifications system is disabled. Enable it here to start receiving notifications.
|
||||
> The following sections give more options about which and what type of notifications will be sent.
|
||||
:end
|
||||
|
||||
Unraid OS update notification:
|
||||
: <select name="unraidos" size="1" onchange="prepareUnraid(this.value)">
|
||||
<?=mk_option($notify['unraidos'], "", "Never check")?>
|
||||
<?=mk_option($notify['unraidos'], "11 */6 * * *", "Check four times a day")?>
|
||||
<?=mk_option($notify['unraidos'], "11 0,12 * * *", "Check twice a day")?>
|
||||
<?=mk_option($notify['unraidos'], "11 0 * * *", "Check once a day")?>
|
||||
<?=mk_option($notify['unraidos'], "11 0 * * 1", "Check once a week")?>
|
||||
<?=mk_option($notify['unraidos'], "11 0 1 * *", "Check once a month")?>
|
||||
_(Unraid OS update notification)_:
|
||||
: <select name="unraidos" onchange="prepareUnraid(this.value)">
|
||||
<?=mk_option($notify['unraidos'], "", _("Never check"))?>
|
||||
<?=mk_option($notify['unraidos'], "11 */6 * * *", _("Check four times a day"))?>
|
||||
<?=mk_option($notify['unraidos'], "11 0,12 * * *", _("Check twice a day"))?>
|
||||
<?=mk_option($notify['unraidos'], "11 0 * * *", _("Check once a day"))?>
|
||||
<?=mk_option($notify['unraidos'], "11 0 * * 1", _("Check once a week"))?>
|
||||
<?=mk_option($notify['unraidos'], "11 0 1 * *", _("Check once a month"))?>
|
||||
</select>
|
||||
|
||||
:help182
|
||||
> Start a periodic verification and notify the user when a new version of the Unraid OS system is detected.
|
||||
> Use the checkboxes below to select how notifications need to be given; by browser, by email and/or by custom agent.
|
||||
:end
|
||||
|
||||
Plugins update notification:
|
||||
: <select name="version" size="1" onchange="preparePlugin(this.value)">
|
||||
<?=mk_option($notify['version'], "", "Never check")?>
|
||||
<?=mk_option($notify['version'], "10 */6 * * *", "Check four times a day")?>
|
||||
<?=mk_option($notify['version'], "10 0,12 * * *", "Check twice a day")?>
|
||||
<?=mk_option($notify['version'], "10 0 * * *", "Check once a day")?>
|
||||
<?=mk_option($notify['version'], "10 0 * * 1", "Check once a week")?>
|
||||
<?=mk_option($notify['version'], "10 0 1 * *", "Check once a month")?>
|
||||
_(Plugins update notification)_:
|
||||
: <select name="version" onchange="preparePlugin(this.value)">
|
||||
<?=mk_option($notify['version'], "", _("Never check"))?>
|
||||
<?=mk_option($notify['version'], "10 */6 * * *", _("Check four times a day"))?>
|
||||
<?=mk_option($notify['version'], "10 0,12 * * *", _("Check twice a day"))?>
|
||||
<?=mk_option($notify['version'], "10 0 * * *", _("Check once a day"))?>
|
||||
<?=mk_option($notify['version'], "10 0 * * 1", _("Check once a week"))?>
|
||||
<?=mk_option($notify['version'], "10 0 1 * *", _("Check once a month"))?>
|
||||
</select>
|
||||
|
||||
:help183
|
||||
> Start a periodic verification and notify the user when a new version of one or more of the installed plugins is detected.
|
||||
> Use the checkboxes below to select how notifications need to be given; by browser, by email and/or by custom agent.
|
||||
:end
|
||||
|
||||
Docker update notification:
|
||||
: <select name="docker_update" size="1" onchange="prepareDocker(this.value)">
|
||||
<?=mk_option($notify['docker_update'], "", "Never check")?>
|
||||
<?=mk_option($notify['docker_update'], "10 */6 * * *", "Check four times a day")?>
|
||||
<?=mk_option($notify['docker_update'], "10 0,12 * * *", "Check twice a day")?>
|
||||
<?=mk_option($notify['docker_update'], "10 0 * * *", "Check once a day")?>
|
||||
<?=mk_option($notify['docker_update'], "10 0 * * 1", "Check once a week")?>
|
||||
<?=mk_option($notify['docker_update'], "10 0 1 * *", "Check once a month")?>
|
||||
_(Docker update notification)_:
|
||||
: <select name="docker_update" onchange="prepareDocker(this.value)">
|
||||
<?=mk_option($notify['docker_update'], "", _("Never check"))?>
|
||||
<?=mk_option($notify['docker_update'], "10 */6 * * *", _("Check four times a day"))?>
|
||||
<?=mk_option($notify['docker_update'], "10 0,12 * * *", _("Check twice a day"))?>
|
||||
<?=mk_option($notify['docker_update'], "10 0 * * *", _("Check once a day"))?>
|
||||
<?=mk_option($notify['docker_update'], "10 0 * * 1", _("Check once a week"))?>
|
||||
<?=mk_option($notify['docker_update'], "10 0 1 * *", _("Check once a month"))?>
|
||||
</select>
|
||||
|
||||
:help184
|
||||
> Start a periodic verification and notify the user when a new version of one or more of the installed dockers is detected.
|
||||
> Use the checkboxes below to select how notifications need to be given; by browser, by email and/or by custom agent.
|
||||
:end
|
||||
|
||||
Array status notification:
|
||||
: <select name="status" size="1" onchange="prepareReport(this.value)">
|
||||
<?=mk_option($notify['status'], "", "Never send")?>
|
||||
<?=mk_option($notify['status'], "20 * * * *", "Send every hour")?>
|
||||
<?=mk_option($notify['status'], "20 */2 * * *", "Send every two hours")?>
|
||||
<?=mk_option($notify['status'], "20 */6 * * *", "Send four times a day")?>
|
||||
<?=mk_option($notify['status'], "20 */8 * * *", "Send three times a day")?>
|
||||
<?=mk_option($notify['status'], "20 0,12 * * *", "Send twice a day")?>
|
||||
<?=mk_option($notify['status'], "20 0 * * *", "Send once a day")?>
|
||||
<?=mk_option($notify['status'], "20 0 * * 1", "Send once a week")?>
|
||||
<?=mk_option($notify['status'], "20 0 1 * *", "Send once a month")?>
|
||||
_(Array status notification)_:
|
||||
: <select name="status" onchange="prepareReport(this.value)">
|
||||
<?=mk_option($notify['status'], "", _("Never send"))?>
|
||||
<?=mk_option($notify['status'], "20 * * * *", _("Send every hour"))?>
|
||||
<?=mk_option($notify['status'], "20 */2 * * *", _("Send every two hours"))?>
|
||||
<?=mk_option($notify['status'], "20 */6 * * *", _("Send four times a day"))?>
|
||||
<?=mk_option($notify['status'], "20 */8 * * *", _("Send three times a day"))?>
|
||||
<?=mk_option($notify['status'], "20 0,12 * * *", _("Send twice a day"))?>
|
||||
<?=mk_option($notify['status'], "20 0 * * *", _("Send once a day"))?>
|
||||
<?=mk_option($notify['status'], "20 0 * * 1", _("Send once a week"))?>
|
||||
<?=mk_option($notify['status'], "20 0 1 * *", _("Send once a month"))?>
|
||||
</select>
|
||||
|
||||
:help185
|
||||
> Start a periodic array health check (preventive maintenance) and notify the user the result of this check.
|
||||
:end
|
||||
|
||||
<span id="unraidTitle" class="unraid" style="display:none"> </span>
|
||||
: <span class="unraid" style="display:none"><span style="display:inline-block;width:130px;font-style:italic">Unraid OS update</span>
|
||||
<input type="checkbox" name="unraid1"<?=($notify['unraid'] & 1)==1 ? ' checked' : ''?>>Browser
|
||||
<input type="checkbox" name="unraid2"<?=($notify['unraid'] & 2)==2 ? ' checked' : ''?>>Email
|
||||
<input type="checkbox" name="unraid3"<?=($notify['unraid'] & 4)==4 ? ' checked' : ''?>>Agents </span>
|
||||
: <span class="unraid" style="display:none"><span style="display:inline-block;width:130px;font-style:italic">_(Unraid OS update)_</span>
|
||||
<input type="checkbox" name="unraid1"<?=($notify['unraid'] & 1)==1 ? ' checked' : ''?>>_(Browser)_
|
||||
<input type="checkbox" name="unraid2"<?=($notify['unraid'] & 2)==2 ? ' checked' : ''?>>_(Email)_
|
||||
<input type="checkbox" name="unraid3"<?=($notify['unraid'] & 4)==4 ? ' checked' : ''?>>_(Agents)_ </span>
|
||||
|
||||
<span id="pluginTitle" class="plugin" style="display:none"> </span>
|
||||
: <span class="plugin" style="display:none"><span style="display:inline-block;width:130px;font-style:italic">Plugins update</span>
|
||||
<input type="checkbox" name="plugin1"<?=($notify['plugin'] & 1)==1 ? ' checked' : ''?>>Browser
|
||||
<input type="checkbox" name="plugin2"<?=($notify['plugin'] & 2)==2 ? ' checked' : ''?>>Email
|
||||
<input type="checkbox" name="plugin3"<?=($notify['plugin'] & 4)==4 ? ' checked' : ''?>>Agents </span>
|
||||
: <span class="plugin" style="display:none"><span style="display:inline-block;width:130px;font-style:italic">_(Plugins update)_</span>
|
||||
<input type="checkbox" name="plugin1"<?=($notify['plugin'] & 1)==1 ? ' checked' : ''?>>_(Browser)_
|
||||
<input type="checkbox" name="plugin2"<?=($notify['plugin'] & 2)==2 ? ' checked' : ''?>>_(Email)_
|
||||
<input type="checkbox" name="plugin3"<?=($notify['plugin'] & 4)==4 ? ' checked' : ''?>>_(Agents)_ </span>
|
||||
|
||||
<span id="dockerTitle" class="docker" style="display:none"> </span>
|
||||
: <span class="docker" style="display:none"><span style="display:inline-block;width:130px;font-style:italic">Docker update</span>
|
||||
<input type="checkbox" name="docker_notify1"<?=($notify['docker_notify'] & 1)==1 ? ' checked' : ''?>>Browser
|
||||
<input type="checkbox" name="docker_notify2"<?=($notify['docker_notify'] & 2)==2 ? ' checked' : ''?>>Email
|
||||
<input type="checkbox" name="docker_notify3"<?=($notify['docker_notify'] & 4)==4 ? ' checked' : ''?>>Agents </span>
|
||||
: <span class="docker" style="display:none"><span style="display:inline-block;width:130px;font-style:italic">_(Docker update)_</span>
|
||||
<input type="checkbox" name="docker_notify1"<?=($notify['docker_notify'] & 1)==1 ? ' checked' : ''?>>_(Browser)_
|
||||
<input type="checkbox" name="docker_notify2"<?=($notify['docker_notify'] & 2)==2 ? ' checked' : ''?>>_(Email)_
|
||||
<input type="checkbox" name="docker_notify3"<?=($notify['docker_notify'] & 4)==4 ? ' checked' : ''?>>_(Agents)_ </span>
|
||||
|
||||
<span id="reportTitle" class="report" style="display:none"> </span>
|
||||
: <span class="report" style="display:none"><span style="display:inline-block;width:130px;font-style:italic">Array status</span>
|
||||
<input type="checkbox" name="report1"<?=($notify['report'] & 1)==1 ? ' checked' : ''?>>Browser
|
||||
<input type="checkbox" name="report2"<?=($notify['report'] & 2)==2 ? ' checked' : ''?>>Email
|
||||
<input type="checkbox" name="report3"<?=($notify['report'] & 4)==4 ? ' checked' : ''?>>Agents </span>
|
||||
: <span class="report" style="display:none"><span style="display:inline-block;width:130px;font-style:italic">_(Array status)_</span>
|
||||
<input type="checkbox" name="report1"<?=($notify['report'] & 1)==1 ? ' checked' : ''?>>_(Browser)_
|
||||
<input type="checkbox" name="report2"<?=($notify['report'] & 2)==2 ? ' checked' : ''?>>_(Email)_
|
||||
<input type="checkbox" name="report3"<?=($notify['report'] & 4)==4 ? ' checked' : ''?>>_(Agents)_ </span>
|
||||
|
||||
:help186
|
||||
> Use the checkboxes above to select what and how notifications need to be given; by browser, by email and/or by a service.<br>
|
||||
> <b>Tip:</b> you can use custom notification agents; just add them to "/boot/config/plugins/dynamix/notification/agents" directory and check 'Agents'.
|
||||
:end
|
||||
|
||||
Notification entity:
|
||||
: <span style="display:inline-block;width:130px;font-style:italic">Notices</span>
|
||||
<input type="checkbox" class="checkbox" name="normal1"<?=($notify['normal'] & 1)==1 ? " checked $disabled" : $disabled?>>Browser
|
||||
<input type="checkbox" class="checkbox" name="normal2"<?=($notify['normal'] & 2)==2 ? " checked $disabled" : $disabled?>>Email
|
||||
<input type="checkbox" class="checkbox" name="normal3"<?=($notify['normal'] & 4)==4 ? " checked $disabled" : $disabled?>>Agents
|
||||
_(Notification entity)_:
|
||||
: <span style="display:inline-block;width:130px;font-style:italic">_(Notices)_</span>
|
||||
<input type="checkbox" class="checkbox" name="normal1"<?=($notify['normal'] & 1)==1 ? " checked $disabled" : $disabled?>>_(Browser)_
|
||||
<input type="checkbox" class="checkbox" name="normal2"<?=($notify['normal'] & 2)==2 ? " checked $disabled" : $disabled?>>_(Email)_
|
||||
<input type="checkbox" class="checkbox" name="normal3"<?=($notify['normal'] & 4)==4 ? " checked $disabled" : $disabled?>>_(Agents)_
|
||||
|
||||
|
||||
: <span style="display:inline-block;width:130px;font-style:italic">Warnings</span>
|
||||
<input type="checkbox" class="checkbox" name="warning1"<?=($notify['warning'] & 1)==1 ? " checked $disabled" : $disabled?>>Browser
|
||||
<input type="checkbox" class="checkbox" name="warning2"<?=($notify['warning'] & 2)==2 ? " checked $disabled" : $disabled?>>Email
|
||||
<input type="checkbox" class="checkbox" name="warning3"<?=($notify['warning'] & 4)==4 ? " checked $disabled" : $disabled?>>Agents
|
||||
: <span style="display:inline-block;width:130px;font-style:italic">_(Warnings)_</span>
|
||||
<input type="checkbox" class="checkbox" name="warning1"<?=($notify['warning'] & 1)==1 ? " checked $disabled" : $disabled?>>_(Browser)_
|
||||
<input type="checkbox" class="checkbox" name="warning2"<?=($notify['warning'] & 2)==2 ? " checked $disabled" : $disabled?>>_(Email)_
|
||||
<input type="checkbox" class="checkbox" name="warning3"<?=($notify['warning'] & 4)==4 ? " checked $disabled" : $disabled?>>_(Agents)_
|
||||
|
||||
|
||||
: <span style="display:inline-block;width:130px;font-style:italic">Alerts</span>
|
||||
<input type="checkbox" class="checkbox" name="alert1"<?=($notify['alert'] & 1)==1 ? " checked $disabled" : $disabled?>>Browser
|
||||
<input type="checkbox" class="checkbox" name="alert2"<?=($notify['alert'] & 2)==2 ? " checked $disabled" : $disabled?>>Email
|
||||
<input type="checkbox" class="checkbox" name="alert3"<?=($notify['alert'] & 4)==4 ? " checked $disabled" : $disabled?>>Agents
|
||||
: <span style="display:inline-block;width:130px;font-style:italic">_(Alerts)_</span>
|
||||
<input type="checkbox" class="checkbox" name="alert1"<?=($notify['alert'] & 1)==1 ? " checked $disabled" : $disabled?>>_(Browser)_
|
||||
<input type="checkbox" class="checkbox" name="alert2"<?=($notify['alert'] & 2)==2 ? " checked $disabled" : $disabled?>>_(Email)_
|
||||
<input type="checkbox" class="checkbox" name="alert3"<?=($notify['alert'] & 4)==4 ? " checked $disabled" : $disabled?>>_(Agents)_
|
||||
|
||||
:help187
|
||||
> Notifications are classified as:
|
||||
>
|
||||
> *notice* - these are informative notifications and do not indicate a problem situation, e.g. a new version is available<br>
|
||||
@@ -264,7 +287,8 @@ Notification entity:
|
||||
> *alert* - these are serious notifications and require immediate attention, e.g. a failing hard disk<br>
|
||||
>
|
||||
> Choose for each classification how you want to be notified.
|
||||
:end
|
||||
|
||||
<input type="submit" name="#default" value="Default">
|
||||
: <input type="submit" name="#apply" value="Apply" disabled><input type="button" value="Done" onclick="done()"></td>
|
||||
<input type="submit" name="#default" value="_(Default)_">
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"></td>
|
||||
</form>
|
||||
|
||||
@@ -62,7 +62,7 @@ function archiveList(init) {
|
||||
});
|
||||
}
|
||||
function askConfirmation() {
|
||||
swal({title:"Are you sure?",text:"This will delete all notification files!",type:"warning",showCancelButton:true},function(){$.post('/webGui/include/DeleteLogFile.php',{log:'*.notify'},function(){archiveList();});});
|
||||
swal({title:"_(Are you sure)_?",text:"_(This will delete all notification files)_!",type:"warning",showCancelButton:true},function(){$.post('/webGui/include/DeleteLogFile.php',{log:'*.notify'},function(){archiveList();});});
|
||||
}
|
||||
function openClose(row) {
|
||||
var extra = '#archive_list .tablesorter-childRow.row'+row+' td';
|
||||
@@ -84,7 +84,7 @@ $(function(){
|
||||
// Adjust the width of thead cells when window resizes
|
||||
</script>
|
||||
<table class="tablesorter left shift" id="archive_table">
|
||||
<thead><tr><th>Time</th><th>Event</th><th>Subject</th><th>Description</th><th>Importance</th><th><?if ($files):?><a href="#" onclick="askConfirmation();return false" title="Delete all notifications"><i class="fa fa-trash"></i></a><?endif;?></th></tr></thead>
|
||||
<thead><tr><th>_(Time)_</th><th>_(Event)_</th><th>_(Subject)_</th><th>_(Description)_</th><th>_(Importance)_</th><th><?if ($files):?><a href="#" onclick="askConfirmation();return false" title="_(Delete all notifications)_"><i class="fa fa-trash"></i></a><?endif;?></th></tr></thead>
|
||||
<tbody id="archive_list"><tr><td colspan="6"></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="unlink"
|
||||
Cond="((count($devs)>0)&&($var['fsState']=='Started'))"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -35,7 +35,7 @@ open_status();
|
||||
</script>
|
||||
|
||||
<table class="disk_status wide">
|
||||
<thead><tr><td>Device</td><td>Identification</td><td>Temp.</td><td>Reads</td><td>Writes</td><td>Errors</td><td>FS</td><td>Size</td><td>Used</td><td>Free</td><td>View</td></tr></thead>
|
||||
<thead><tr><td>_(Device)_</td><td>_(Identification)_</td><td>_(Temp)_.</td><td>_(Reads)_</td><td>_(Writes)_</td><td>_(Errors)_</td><td>_(FS)_</td><td>_(Size)_</td><td>_(Used)_</td><td>_(Free)_</td><td>_(View)_</td></tr></thead>
|
||||
<tbody id="open_devices">
|
||||
<?
|
||||
foreach ($devs as $dev):
|
||||
@@ -45,5 +45,7 @@ endforeach;
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
:help37
|
||||
> These are devices installed in your server but not assigned to either the parity-protected
|
||||
> array or the cache disk/pool.
|
||||
:end
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-pagemap"
|
||||
Tag="map-o"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -50,4 +50,4 @@ show_map("Tasks", 1);
|
||||
show_map("Buttons", 1);
|
||||
echo "</div>";
|
||||
?>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
@@ -3,8 +3,8 @@ Title="Parity Check"
|
||||
Tag="calendar"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2012-2018, Bergware International.
|
||||
* Copyright 2005-2018, Lime Technology
|
||||
/* Copyright 2012-2020, Bergware International.
|
||||
* Copyright 2005-2020, 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,
|
||||
@@ -16,7 +16,7 @@ Tag="calendar"
|
||||
?>
|
||||
<?
|
||||
if ($disks['parity']['status']=='DISK_NP_DSBL' && $disks['parity2']['status']=='DISK_NP_DSBL') {
|
||||
echo "<p class='notice'>No Parity disk present!</p>";
|
||||
echo "<p class='notice'>"._('No Parity disk present')."!</p>";
|
||||
}
|
||||
$width = [166,300];
|
||||
$mode = ['Disabled','Daily','Weekly','Monthly','Yearly','Custom'];
|
||||
@@ -35,8 +35,8 @@ if (file_exists($memory)) {
|
||||
<script>
|
||||
<?if ($parity['mode']==5):?>
|
||||
$(function() {
|
||||
$("#s1").dropdownchecklist({emptyText:'Every day', width:<?=$width[0]?>, explicitClose:'...close'});
|
||||
$("#s2").dropdownchecklist({emptyText:'Every month', width:<?=$width[0]?>, explicitClose:'...close'});
|
||||
$("#s1").dropdownchecklist({emptyText:'_(Every day)_', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
|
||||
$("#s2").dropdownchecklist({emptyText:'_(Every month)_', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
|
||||
});
|
||||
// Simulate a single input field
|
||||
function prepareParity(form) {
|
||||
@@ -70,8 +70,8 @@ function prepareParity(form) {
|
||||
<?endif;?>
|
||||
$(function() {
|
||||
<?if (file_exists($memory)):?>
|
||||
setTimeout(function(){$('input[value="Apply"]').removeAttr('disabled');},0);
|
||||
$('input[value="Done"]').val('Reset').prop('onclick',null).click(function(){refresh($(this).parentsUntil('form').parent().offset().top)});
|
||||
setTimeout(function(){$('input[value="_(Apply)_"]').removeAttr('disabled');},0);
|
||||
$('input[value="_(Done)_"]').val('_(Reset)_').prop('onclick',null).click(function(){refresh($(this).parentsUntil('form').parent().offset().top)});
|
||||
<?unlink($memory);?>
|
||||
<?endif;?>
|
||||
presetParity(document.parity_settings);
|
||||
@@ -89,51 +89,55 @@ function presetParity(form) {
|
||||
<input type="hidden" name="#file" value="dynamix/dynamix.cfg"/>
|
||||
<input type="hidden" name="#section" value="parity"/>
|
||||
<input type="hidden" name="#include" value="/webGui/include/update.parity.php"/>
|
||||
Scheduled parity check:
|
||||
: <select name="mode" size="1" onchange="submit()">
|
||||
_(Scheduled parity check)_:
|
||||
: <select name="mode" onchange="submit()">
|
||||
<?for ($m=0; $m<count($mode); $m++):?>
|
||||
<?=mk_option($parity['mode'], strval($m), $mode[$m])?>
|
||||
<?=mk_option($parity['mode'], strval($m), _($mode[$m]))?>
|
||||
<?endfor;?>
|
||||
</select>
|
||||
|
||||
:help165
|
||||
> By default no parity check is scheduled. Select here the desired schedule. This can be one of the preset schedules for daily, weekly, monthly, yearly or a custom schedule.
|
||||
:end
|
||||
|
||||
Day of the week:
|
||||
_(Day of the week)_:
|
||||
<?if ($parity['mode']==2):?>
|
||||
: <select name="day" size="1">
|
||||
: <select name="day">
|
||||
<?for ($d=0; $d<count($days); $d++):?>
|
||||
<?=mk_option($parity['day'], strval($d), $days[$d])?>
|
||||
<?=mk_option($parity['day'], strval($d), ucfirst(my_lang($days[$d])))?>
|
||||
<?endfor;?>
|
||||
<?elseif ($parity['mode']==5):?>
|
||||
: <select id="s1" name="day" size="1" multiple="multiple" style="display:none">
|
||||
: <select id="s1" name="day" multiple="multiple" style="display:none">
|
||||
<?for ($d=0; $d<count($days); $d++):?>
|
||||
<?=mk_option_check($parity['day'], strval($d), $days[$d])?>
|
||||
<?=mk_option_check($parity['day'], strval($d), ucfirst(my_lang($days[$d])))?>
|
||||
<?endfor;?>
|
||||
<?else:?>
|
||||
: <select name="day" size="1">
|
||||
: <select name="day">
|
||||
<?=mk_option($parity['day'], "*", "--------")?>
|
||||
<?endif;?>
|
||||
</select>
|
||||
|
||||
:help166
|
||||
> When a **weekly** or **custom** schedule is selected then choose here the preferred *day of the week*, in the other schedules this setting is not used and unavailable.
|
||||
:end
|
||||
|
||||
<?if ($parity['mode']<5):?>
|
||||
Day of the month:
|
||||
_(Day of the month)_:
|
||||
<?else:?>
|
||||
Week of the month:
|
||||
_(Week of the month)_:
|
||||
<?endif;?>
|
||||
: <select name="dotm" size="1">
|
||||
: <select name="dotm">
|
||||
<?if ($parity['mode']>=3):?>
|
||||
<?if ($parity['mode']==5):?>
|
||||
<?=mk_option($parity['dotm'], "*", "Every week")?>
|
||||
<?=mk_option($parity['dotm'], "W1", "First week")?>
|
||||
<?=mk_option($parity['dotm'], "W2", "Second week")?>
|
||||
<?=mk_option($parity['dotm'], "W3", "Third week")?>
|
||||
<?=mk_option($parity['dotm'], "W4", "Fourth week")?>
|
||||
<?=mk_option($parity['dotm'], "WL", "Last week")?>
|
||||
<?=mk_option($parity['dotm'], "*", _("Every week"))?>
|
||||
<?=mk_option($parity['dotm'], "W1", _("First week"))?>
|
||||
<?=mk_option($parity['dotm'], "W2", _("Second week"))?>
|
||||
<?=mk_option($parity['dotm'], "W3", _("Third week"))?>
|
||||
<?=mk_option($parity['dotm'], "W4", _("Fourth week"))?>
|
||||
<?=mk_option($parity['dotm'], "WL", _("Last week"))?>
|
||||
<?else:?>
|
||||
<?=mk_option($parity['dotm'], "1", "First day")?>
|
||||
<?=mk_option($parity['dotm'], "28-31", "Last day")?>
|
||||
<?=mk_option($parity['dotm'], "1", _("First day"))?>
|
||||
<?=mk_option($parity['dotm'], "28-31", _("Last day"))?>
|
||||
<?for ($d=2; $d<=31; $d++):?>
|
||||
<?=mk_option($parity['dotm'], strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
@@ -143,11 +147,13 @@ Week of the month:
|
||||
<?endif;?>
|
||||
</select>
|
||||
|
||||
:help167
|
||||
> When a **monthly** or **yearly** schedule is selected then choose here the preferred *day of the month*.
|
||||
> When a **custom** schedule is selected then choose here the preferred *week of the month*, in the other schedules this setting is not used and unavailable.
|
||||
:end
|
||||
|
||||
Time of the day:
|
||||
: <select name="hour" size="1">
|
||||
_(Time of the day)_:
|
||||
: <select name="hour">
|
||||
<?if ($parity['mode']>0):?>
|
||||
<?for ($h=0; $h<24; $h++):?>
|
||||
<?=mk_option($parity['hour'], sprintf("0 %d", $h), sprintf("%02d:00", $h))?>
|
||||
@@ -158,37 +164,43 @@ Time of the day:
|
||||
<?endif;?>
|
||||
</select>
|
||||
|
||||
:help168
|
||||
> Choose the desired *time of the day* to start the schedule. Time granularity is given in half hour periods.
|
||||
:end
|
||||
|
||||
Month of the year:
|
||||
_(Month of the year)_:
|
||||
<?if ($parity['mode']>=4):?>
|
||||
<?if ($parity['mode']==5):?>
|
||||
: <select id="s2" name="month" size="1" multiple="multiple" style="display:none">
|
||||
: <select id="s2" name="month" multiple="multiple" style="display:none">
|
||||
<?for ($m=0; $m<count($months); $m++):?>
|
||||
<?=mk_option_check($parity['month'], strval($m+1), $months[$m])?>
|
||||
<?=mk_option_check($parity['month'], strval($m+1), ucfirst(my_lang($months[$m])))?>
|
||||
<?endfor;?>
|
||||
<?else:?>
|
||||
: <select name="month" size="1">
|
||||
: <select name="month">
|
||||
<?for ($m=0; $m<count($months); $m++):?>
|
||||
<?=mk_option($parity['month'], strval($m+1), $months[$m])?>
|
||||
<?=mk_option($parity['month'], strval($m+1), ucfirst(my_lang($months[$m])))?>
|
||||
<?endfor;?>
|
||||
<?endif;?>
|
||||
<?else:?>
|
||||
: <select name="month" size="1">
|
||||
: <select name="month">
|
||||
<?=mk_option($parity['month'], "*", "--------")?>
|
||||
<?endif;?>
|
||||
</select>
|
||||
|
||||
:help169
|
||||
> When a **yearly** or **custom** schedule is selected then choose here the preferred *month of the year*, in the other schedules this setting is not used and unavailable.
|
||||
:end
|
||||
|
||||
Write corrections to parity disk:
|
||||
: <select name="write" size="1">
|
||||
<?=mk_option($parity['write'], "", "Yes")?>
|
||||
<?=mk_option($parity['write'], "NOCORRECT", "No")?>
|
||||
_(Write corrections to parity disk)_:
|
||||
: <select name="write">
|
||||
<?=mk_option($parity['write'], "", _("Yes"))?>
|
||||
<?=mk_option($parity['write'], "NOCORRECT", _("No"))?>
|
||||
</select>
|
||||
|
||||
:help170
|
||||
> Choose here whether any parity errors found during the check, need to be corrected on the parity disk or not.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="Apply" disabled><input type="button" value="Done" onclick="done()"></td>
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"></td>
|
||||
</form>
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-processes"
|
||||
Tag="cogs"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -29,4 +29,4 @@ $(function() {
|
||||
<?
|
||||
echo ($display['resize'] ? "<pre class='up' style='display:none'>" : "<pre class='up'>").shell_exec('ps -aux')."</pre>";
|
||||
?>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
+141
-148
@@ -5,7 +5,7 @@ Icon="icon-registration"
|
||||
Tag="pencil"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
/* Copyright 2005-2020, 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,
|
||||
@@ -16,11 +16,13 @@ Tag="pencil"
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
function my_time2($time) {
|
||||
return $time ? my_time($time) : "Anytime";
|
||||
function my_time_any($time) {
|
||||
return $time ? my_lang(my_time($time)) : _('Anytime');
|
||||
}
|
||||
$attached_devices="This server has {$var['deviceCount']} attached storage device".($var['deviceCount']==1 ? "" : "s").".";
|
||||
$contact_support="<a href='https://lime-technology.com/contact' target='_blank'>Contact Support</a>";
|
||||
function my_time_now($time) {
|
||||
return $time ? my_lang(my_time($time)) : _('Unknown');
|
||||
}
|
||||
$attached_devices=sprintf(_("This server has %s attached storage device".($var['deviceCount']==1?'.':'s.')),$var['deviceCount']);
|
||||
?>
|
||||
<style>
|
||||
span.thanks{padding-left:10px;color:#6FA239;font-weight:bold;}
|
||||
@@ -29,14 +31,13 @@ span.device{font-weight:normal;font-style:italic;}
|
||||
div.remark{padding:0 10px;text-align:justify;}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<?if (strstr($var['regTy'], "unregistered")):?>
|
||||
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
|
||||
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
|
||||
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
|
||||
<span class="thanks">Thank you for trying Unraid OS!</span>
|
||||
<span class="thanks">_(Thank you for trying Unraid OS)_!</span>
|
||||
<div markdown="1" class="remark">
|
||||
:plug8
|
||||
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.
|
||||
|
||||
@@ -44,414 +45,406 @@ Registration keys are bound to your USB Flash boot device serial number (GUID).
|
||||
at least 1GB in size.
|
||||
|
||||
Note: USB memory card readers are generally **not** supported because most do not present unique serial numbers.
|
||||
:end
|
||||
<span class="red-text">_(Important)_:</span>
|
||||
|
||||
<span class="red-text">Important:</span>
|
||||
|
||||
+ Please make sure your <u>[server time](DateTime)</u> is accurate to within 5 minutes.
|
||||
+ Please make sure there is a <u>[DNS server](NetworkSettings)</u> specified.
|
||||
:plug9
|
||||
+ Please make sure your [server time](DateTime) is accurate to within 5 minutes.
|
||||
+ Please make sure there is a [DNS server](NetworkSettings) specified.
|
||||
:end
|
||||
</div>
|
||||
|
||||
Flash Vendor:
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor']?>
|
||||
|
||||
Flash Product:
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct']?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Purchase Key"> <input type="button" value="Get Trial Key" onclick="openBox('/webGui/include/TrialRequest.php','Get Trial Key',300,600);">
|
||||
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Get Trial Key)_" onclick="openBox('/webGui/include/TrialRequest.php','_(Get Trial Key)_',300,600);">
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if ($var['regTy']=="Trial"):?>
|
||||
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
|
||||
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
|
||||
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
|
||||
<span class="thanks">Thank you for trying Unraid OS!</span>
|
||||
<span class="thanks">_(Thank you for trying Unraid OS)_!</span>
|
||||
<div markdown="1" class="remark">
|
||||
:plug10
|
||||
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 <code>Stop</code> the array.
|
||||
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>
|
||||
|
||||
***Trial*** key expires on:
|
||||
: <?=my_time($var['regTm2'])?>
|
||||
_(***Trial*** key expires on)_:
|
||||
: <?=my_time_now($var['regTm2'])?>
|
||||
|
||||
Flash Vendor:
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor']?>
|
||||
|
||||
Flash Product:
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct']?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Purchase Key"> <input type="button" value="Request Extension" disabled>
|
||||
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Request Extension)_" disabled>
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if (strstr($var['regTy'], "no connection")):?>
|
||||
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
|
||||
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
|
||||
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
|
||||
<span class="thanks">Thank you for trying Unraid OS!</span>
|
||||
<span class="thanks">_(Thank you for trying Unraid OS)_!</span>
|
||||
<div markdown="1" class="remark">
|
||||
<span class='red-text'>Cannot connect to key-server!</span>
|
||||
<span class='red-text'>_(Cannot connect to key-server)_!</span>
|
||||
|
||||
Your *Trial* key requires an internet connection. Please check your [Nework Settings](NetworkSettings).
|
||||
_(Your *Trial* key requires an internet connection)_. _(Please check your)_ [_(Network Settings)_](NetworkSettings).
|
||||
</div>
|
||||
|
||||
***Trial*** key expires on:
|
||||
: <?=my_time($var['regTm2'])?>
|
||||
_(***Trial*** key expires on)_:
|
||||
: <?=my_time_now($var['regTm2'])?>
|
||||
|
||||
Flash Vendor:
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor']?>
|
||||
|
||||
Flash Product:
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct']?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Purchase Key"> <input type="button" value="Request Extension" disabled>
|
||||
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Request Extension)_" disabled>
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if (strstr($var['regTy'], "withdrawn")):?>
|
||||
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
|
||||
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
|
||||
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
|
||||
<span class="thanks">Thank you for trying Unraid OS!</span>
|
||||
<span class="thanks">_(Thank you for trying Unraid OS)_!</span>
|
||||
<div markdown="1" class="remark">
|
||||
<span class='red-text'>Release has been withdrawn!</span>
|
||||
<span class='red-text'>_(Release has been withdrawn)_!</span>
|
||||
|
||||
This release has been withdrawn for use with *Trial* keys.
|
||||
_(This release has been withdrawn for use with *Trial* keys)_.
|
||||
</div>
|
||||
|
||||
***Trial*** key expires on:
|
||||
: <?=my_time($var['regTm2'])?>
|
||||
_(***Trial*** key expires on)_:
|
||||
: <?=my_time_now($var['regTm2'])?>
|
||||
|
||||
Flash Vendor:
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor']?>
|
||||
|
||||
Flash Product:
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct']?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Purchase Key"> <input type="button" value="Request Extension" disabled>
|
||||
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Request Extension)_" disabled>
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if (strstr($var['regTy'], "expired")):?>
|
||||
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
|
||||
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
|
||||
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
|
||||
<span class="thanks">Thank you for trying Unraid OS!</span>
|
||||
<span class="thanks">_(Thank you for trying Unraid OS)_!</span>
|
||||
<div markdown="1" class="remark">
|
||||
<span class='red-text'>Your *Trial* key has expired.</span>
|
||||
|
||||
<span class='red-text'>_(Your *Trial* key has expired)_.</span>
|
||||
:plug11
|
||||
To continue using Unraid OS you may purchase a Registration key. Alternately, you may request a *Trial* extension key.
|
||||
|
||||
Most *Trial* extension requests are processed immediately but please allow up to one business day to receive your *Trial* extension key.
|
||||
:end
|
||||
</div>
|
||||
|
||||
Flash Vendor:
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor']?>
|
||||
|
||||
Flash Product:
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct']?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Purchase Key"> <input type="button" value="Request Extension" onclick="openBox('/webGui/include/TrialRequest.php','Request Trial Extension',300,600);">
|
||||
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Request Extension)_" onclick="openBox('/webGui/include/TrialRequest.php','_(Request Trial Extension)_',300,600);">
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if (strstr($var['regTy'], "invalid installation")):?>
|
||||
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
|
||||
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID'];?>">
|
||||
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
|
||||
<span class='thanks red'>Invalid <em>Trial</em> Installation</span>
|
||||
<span class='thanks red'>_(Invalid *Trial* Installation)_</span>
|
||||
<div markdown="1" class="remark">
|
||||
:plug12
|
||||
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?>.
|
||||
For more information, please [Contact Support](https://lime-technology.com/contact).
|
||||
:end
|
||||
</div>
|
||||
|
||||
Flash Vendor:
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor']?>
|
||||
|
||||
Flash Product:
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct']?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
Registered GUID:
|
||||
_(Registered GUID)_:
|
||||
: <?=$var['regGUID'];?>
|
||||
|
||||
Registered to:
|
||||
_(Registered to)_:
|
||||
: <?=htmlspecialchars($var['regTo'])?>
|
||||
|
||||
Registered on:
|
||||
: <?=my_time($var['regTm']);?>
|
||||
_(Registered on)_:
|
||||
: <?=my_time_now($var['regTm'])?>
|
||||
|
||||
Expiration:
|
||||
: <?=my_time($var['regTm2']);?>
|
||||
_(Expiration)_:
|
||||
: <?=my_time_now($var['regTm2'])?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Purchase Key">
|
||||
: <input type="submit" value="_(Purchase Key)_">
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if ($var['regTy']=="Basic"):?>
|
||||
<span class="thanks">Thank you for choosing Unraid OS!</span>
|
||||
<span class="thanks">_(Thank you for choosing Unraid OS)_!</span>
|
||||
<div markdown="1" class="remark">
|
||||
To support more storage devices as your server grows, click Upgrade Key below.
|
||||
_(To support more storage devices as your server grows, click Upgrade Key below)_.
|
||||
</div>
|
||||
|
||||
Registered to:
|
||||
: <span class="big"><?=htmlspecialchars($var['regTo'])?></span>
|
||||
_(Registered to)_:
|
||||
: <?=htmlspecialchars($var['regTo'])?>
|
||||
|
||||
Registered on:
|
||||
: <?=my_time($var['regTm'])?>
|
||||
_(Registered on)_:
|
||||
: <?=my_time_now($var['regTm'])?>
|
||||
|
||||
Replaceable:
|
||||
: <?=my_time2($var['regTm2'])?>
|
||||
_(Replaceable)_:
|
||||
: <?=my_time_any($var['regTm2'])?>
|
||||
|
||||
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
|
||||
<input type="hidden" name="BasicGUID" value="<?=$var['flashGUID']?>">
|
||||
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Upgrade Key">
|
||||
: <input type="submit" value="_(Upgrade Key)_">
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if ($var['regTy']=="Plus"):?>
|
||||
<span class="thanks">Thank you for choosing Unraid OS!</span>
|
||||
<span class="thanks">_(Thank you for choosing Unraid OS)_!</span>
|
||||
<div markdown="1" class="remark">
|
||||
To support more storage devices as your server grows, click Upgrade Key below.
|
||||
_(To support more storage devices as your server grows, click Upgrade Key below)_.
|
||||
</div>
|
||||
|
||||
Registered to:
|
||||
: <span class="big"><?=htmlspecialchars($var['regTo'])?></span>
|
||||
_(Registered to)_:
|
||||
: <?=htmlspecialchars($var['regTo'])?>
|
||||
|
||||
Registered on:
|
||||
: <?=my_time($var['regTm'])?>
|
||||
_(Registered on)_:
|
||||
: <?=my_time_now($var['regTm'])?>
|
||||
|
||||
Replaceable:
|
||||
: <?=my_time2($var['regTm2'])?>
|
||||
_(Replaceable)_:
|
||||
: <?=my_time_any($var['regTm2'])?>
|
||||
|
||||
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
|
||||
<input type="hidden" name="PlusGUID" value="<?=$var['flashGUID']?>">
|
||||
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Upgrade Key">
|
||||
: <input type="submit" value="_(Upgrade Key)_">
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if ($var['regTy']=="Pro"):?>
|
||||
<span class="thanks">Thank you for choosing Unraid OS!</span>
|
||||
<span class="thanks">_(Thank you for choosing Unraid OS)_!</span>
|
||||
|
||||
Registered to:
|
||||
: <span class="big"><?=htmlspecialchars($var['regTo'])?></span>
|
||||
_(Registered to)_:
|
||||
: <?=htmlspecialchars($var['regTo'])?>
|
||||
|
||||
Registered on:
|
||||
: <?=my_time($var['regTm'])?>
|
||||
_(Registered on)_:
|
||||
: <?=my_time_now($var['regTm'])?>
|
||||
|
||||
Replaceable:
|
||||
: <?=my_time2($var['regTm2'])?>
|
||||
_(Replaceable)_:
|
||||
: <?=my_time_any($var['regTm2'])?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <button type="button" onclick="done()">Done</button>
|
||||
: <button type="button" onclick="done()">_(Done)_</button>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if (strstr($var['regTy'], "missing")):?>
|
||||
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
|
||||
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
|
||||
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
|
||||
<span class='thanks red'>Missing Key File</span>
|
||||
<span class='thanks red'>_(Missing Key File)_</span>
|
||||
<div markdown="1" class="remark">
|
||||
:plug13
|
||||
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.
|
||||
[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?>.
|
||||
If you do not have a backup copy of your Registration key file, [Contact Support](https://lime-technology.com/contact).
|
||||
|
||||
If this was a <em>Trial</em> installation, you may purchase a Registration key.
|
||||
If this was a *Trial* installation, you may purchase a Registration key.
|
||||
:end
|
||||
</div>
|
||||
|
||||
Flash Vendor:
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor']?>
|
||||
|
||||
Flash Product:
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct']?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Purchase Key">
|
||||
: <input type="submit" value="_(Purchase Key)_">
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if (strstr($var['regTy'], "invalid key")):?>
|
||||
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
|
||||
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
|
||||
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
|
||||
<span class='thanks red'>The registered GUID does not match the USB Flash boot device GUID</span>
|
||||
<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">
|
||||
:plug14
|
||||
*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">
|
||||
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?>.
|
||||
:plug15
|
||||
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?>.
|
||||
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;?>
|
||||
|
||||
Flash Vendor:
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor']?>
|
||||
|
||||
Flash Product:
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct']?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
Registered GUID:
|
||||
_(Registered GUID)_:
|
||||
: <?=$var['regGUID']?>
|
||||
|
||||
Registered to:
|
||||
_(Registered to)_:
|
||||
: <?=htmlspecialchars($var['regTo'])?>
|
||||
|
||||
Registered on:
|
||||
: <?=my_time($var['regTm'])?>
|
||||
_(Registered on)_:
|
||||
: <?=my_time_now($var['regTm'])?>
|
||||
|
||||
<?if (strstr($var['regTy'], "Trial")):?>
|
||||
|
||||
Expiration:
|
||||
: <?=my_time($var['regTm2'])?>
|
||||
_(Expiration):
|
||||
: <?=my_time_now($var['regTm2'])?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Purchase Key">
|
||||
|
||||
<?else:?>
|
||||
|
||||
Replaceable:
|
||||
: <?=my_time2($var['regTm2'])?>
|
||||
_(Replaceable)_:
|
||||
: <?=my_time_any($var['regTm2'])?>
|
||||
|
||||
<?if ($var['regTm2']==0 || $var['regTm2']<time()):?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Purchase Key"> <input type="button" value="Replace Key" onclick="openBox('/webGui/include/ReplaceKey.php','Replace Key',600,900);">
|
||||
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Replace Key)_" onclick="openBox('/webGui/include/ReplaceKey.php','Replace Key',600,900);">
|
||||
|
||||
<?else:?>
|
||||
|
||||
<span class="device"><?=$attached_devices?></span>
|
||||
: <input type="submit" value="Purchase Key"> <input type="button" value="Replace Key" disabled>
|
||||
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Replace Key)_" disabled>
|
||||
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if (strstr($var['regTy'], "blacklisted")):?>
|
||||
<span class='thanks red'>Blacklisted USB Flash GUID</span>
|
||||
<span class='thanks red'>_(Blacklisted USB Flash GUID)_</span>
|
||||
<div markdown="1" class="remark">
|
||||
:plug16
|
||||
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?>.
|
||||
For more information, please [Contact Support](https://lime-technology.com/contact).
|
||||
:end
|
||||
</div>
|
||||
|
||||
Flash Vendor:
|
||||
_(Flash Vendor)_:
|
||||
: <?=$var['flashVendor']?>
|
||||
|
||||
Flash Product:
|
||||
_(Flash Product)_:
|
||||
: <?=$var['flashProduct']?>
|
||||
|
||||
Flash GUID:
|
||||
_(Flash GUID)_:
|
||||
: <?=$var['flashGUID']?>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<?if (strstr($var['regTy'], "flash device error")):?>
|
||||
<span class='thanks red'>Error accessing your physical USB Flash boot device</span>
|
||||
<span class='thanks red'>_(Error accessing your physical USB Flash boot device)_</span>
|
||||
<div markdown="1" class="remark">
|
||||
There is a physical problem acessing your USB Flash boot device. Please <?=$contact_support?>.
|
||||
_(There is a physical problem accessing your USB Flash boot device)_. _(Please)_ [Contact Support](https://lime-technology.com/contact).
|
||||
</div>
|
||||
|
||||
Flash GUID:
|
||||
: Error code: <?=$var['regCheck']?>
|
||||
_(Flash GUID)_:
|
||||
: _(Error code)_: <?=$var['regCheck']?>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
@@ -3,8 +3,8 @@ Title="Routing Table"
|
||||
Tag="icon-share"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -81,27 +81,29 @@ $(function(){
|
||||
</script>
|
||||
<div markdown="1" id="route_table" style="display:none">
|
||||
<table class="share_status">
|
||||
<thead><tr><td>Protocol</td><td>Route</td><td>Gateway</td><td>Metric</td><td style="width:8%;text-align:center">Delete</td></tr></thead>
|
||||
<thead><tr><td>_(Protocol)_</td><td>_(Route)_</td><td>_(Gateway)_</td><td>_(Metric)_</td><td style="width:8%;text-align:center">_(Delete)_</td></tr></thead>
|
||||
<tbody id="route_list"></tbody>
|
||||
</table>
|
||||
|
||||
<div class="shade-<?=$display['theme']?>" style="margin-top:12px;padding:12px 4px;">
|
||||
<form markdown="1" name="add_routes" method="POST" action="/webGui/include/RoutingTable.php" target="progressFrame" onsubmit="setTimeout(resetTable,500)">
|
||||
Enter route + gateway + metric:
|
||||
: <input type="text" name="route" maxlength="39" value="" class="fixed" placeholder="IPv4/nn or IPv6/nn route" required>
|
||||
<input type="text" name="gateway" class="fixed" value="" list="device" placeholder="gateway name or address" required>
|
||||
_(Enter route + gateway + metric)_:
|
||||
: <input type="text" name="route" maxlength="39" value="" class="fixed" placeholder="_(IPv4/nn or IPv6/nn route)_" required>
|
||||
<input type="text" name="gateway" class="fixed" value="" list="device" placeholder="_(gateway name or address)_" required>
|
||||
<datalist id="device"><?foreach ($list as $port):?><?echo "<option value='$port'>"?><?endforeach;?></datalist>
|
||||
<input type="text" name="metric" min="1" max="9999" value="" class="trim" placeholder="1"><em><i class="fa fa-sort-numeric-asc"></i> optional metric (lowest is preferred)</em>
|
||||
<input type="text" name="metric" min="1" max="9999" value="" class="trim" placeholder="1"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
|
||||
:help
|
||||
> Enter a valid IPv4 route in the format *nnn.nnn.nnn.nnn/xx*, e.g. *192.168.1.0/24*<br>
|
||||
> or enter a valid IPv6 route in the format *nnnn:nnnn:nnnn::nnnn/xxx*, e.g. *fe80::3ad8:2fff:fe25:9709/64*
|
||||
>
|
||||
> Select the gateway from the dropdown list or enter a valid IPv4/IPv6 address as gateway value.
|
||||
>
|
||||
> The metric value is optional, it defaults to 1. Use it to select the prefered gateway when more than one entry of the same route exist.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="task" value="Add Route"><input type="button" value=" Done " onclick="done()">
|
||||
: <input type="submit" name="task" value="_(Add Route)_"><input type="button" value="_(Done)_" class="lock" onclick="done()">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="list-ul"
|
||||
Cond="($var['shareSMBEnabled']=='ads')"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -16,37 +16,37 @@ Cond="($var['shareSMBEnabled']=='ads')"
|
||||
*/
|
||||
?>
|
||||
<form markdown="1" name="JoinOps" method="POST" action="/update.htm" target="progressFrame">
|
||||
AD join status:
|
||||
_(AD join status)_:
|
||||
: <?=$var['joinStatus'];?>
|
||||
|
||||
AD domain name (FQDN):
|
||||
_(AD domain name)_ (FQDN):
|
||||
: <input type="text" name="DOMAIN" maxlength="80" value="<?=htmlspecialchars($var['DOMAIN'])?>">
|
||||
|
||||
AD short domain name:
|
||||
_(AD short domain name)_:
|
||||
: <input type="text" name="DOMAIN_SHORT" maxlength="40" value="<?=htmlspecialchars($var['DOMAIN_SHORT'])?>">
|
||||
|
||||
AD account login:
|
||||
_(AD account login)_:
|
||||
: <input type="text" name="DOMAIN_LOGIN" maxlength="40" value="<?=htmlspecialchars($var['DOMAIN_LOGIN'])?>">
|
||||
|
||||
AD account password:
|
||||
_(AD account password)_:
|
||||
: <input type="password" name="DOMAIN_PASSWD" maxlength="40" value="<?=htmlspecialchars($var['DOMAIN_PASSWD'])?>">
|
||||
|
||||
|
||||
: <?if ($var['joinStatus']=="Joined"):?>
|
||||
<input type="submit" name="cmdJoinDomain" value="Join" disabled><input type="submit" name="cmdLeaveDomain" value="Leave">
|
||||
<input type="submit" name="cmdJoinDomain" value="_(Join)_" disabled><input type="submit" name="cmdLeaveDomain" value="_(Leave)_">
|
||||
<?else:?>
|
||||
<input type="submit" name="cmdJoinDomain" value="Join"><input type="submit" name="cmdLeaveDomain" value="Leave" disabled>
|
||||
<input type="submit" name="cmdJoinDomain" value="_(Join)_"><input type="submit" name="cmdLeaveDomain" value="_(Leave)_" disabled>
|
||||
<?endif;?>
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<form markdown="1" name="shareOwnership" method="POST" action="/update.htm" target="progressFrame">
|
||||
AD initial owner:
|
||||
_(AD initial owner)_:
|
||||
: <input type="text" name="shareInitialOwner" maxlength="40" value="<?=htmlspecialchars($var['shareInitialOwner'])?>">
|
||||
|
||||
AD initial group:
|
||||
_(AD initial group)_:
|
||||
: <input type="text" name="shareInitialGroup" maxlength="40" value="<?=htmlspecialchars($var['shareInitialGroup'])?>">
|
||||
|
||||
|
||||
: <input type="submit" name="changeShare" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
@@ -4,8 +4,8 @@ Cond="($var['shareSMBEnabled']!='no')"
|
||||
Tag="share-alt-square"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2018, Lime Technology
|
||||
* Copyright 2018, Bergware International.
|
||||
/* Copyright 2020, Lime Technology
|
||||
* Copyright 2020, 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,
|
||||
@@ -33,13 +33,15 @@ $(function(){
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||||
<input type="hidden" name="#include" value="/webGui/include/update.file.php">
|
||||
<input type="hidden" name="#file" value="<?=$file;?>">
|
||||
Samba extra configuration:
|
||||
_(Samba extra configuration)_:
|
||||
: <textarea spellcheck="false" cols="80" rows="<?=substr_count($text,"\n")+1?>" maxlength="2048" name="text" style="resize:none;font-family:bitstream;width:65.5%" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>><?=htmlspecialchars($text)?></textarea>
|
||||
|
||||
|
||||
: <input type="submit" value="Apply" disabled><input type="button" value="Done" onclick="done()"><?if ($var['fsState']=="Started"):?>Array must be <span class="strong big">Stopped</span> to change<?endif;?>
|
||||
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"><?if ($var['fsState']=="Started"):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
|
||||
:help78
|
||||
> Click the **Apply** button to commit the current edits. Click **Reset** to
|
||||
> undo any changes you make (before Saving). Click **Done** to exit this page.
|
||||
:end
|
||||
|
||||
</form>
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="sitemap"
|
||||
Cond="($var['shareSMBEnabled']=='yes')"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -16,20 +16,24 @@ Cond="($var['shareSMBEnabled']=='yes')"
|
||||
*/
|
||||
?>
|
||||
<form markdown="1" name="WorkGroup" method="POST" action="/update.htm" target="progressFrame">
|
||||
Workgroup:
|
||||
_(Workgroup)_:
|
||||
: <input type="text" name="WORKGROUP" maxlength="40" value="<?=htmlspecialchars($var['WORKGROUP'])?>" class="narrow" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
|
||||
:help79
|
||||
> Enter your local network Workgroup name. Usually this is "WORKGROUP".
|
||||
:end
|
||||
|
||||
Local master:
|
||||
_(Local master)_:
|
||||
: <select name="localMaster" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['localMaster'], "no", "No");?>
|
||||
<?=mk_option($var['localMaster'], "yes", "Yes");?>
|
||||
<?=mk_option($var['localMaster'], "no", _('No'))?>
|
||||
<?=mk_option($var['localMaster'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help80
|
||||
> If set to 'Yes' then the server will fully participate in browser elections, and in the absense
|
||||
> of other servers, will usually become the local Master Browser.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeShare" value="Apply" disabled><input type="button" value="Done" onclick="done()"><?if ($var['fsState']=="Started"):?>Array must be <span class="strong big">Stopped</span> to change<?endif;?>
|
||||
: <input type="submit" name="changeShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"><?if ($var['fsState']=="Started"):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
</form>
|
||||
|
||||
@@ -16,66 +16,78 @@ Tag="windows"
|
||||
?>
|
||||
<form markdown="1" name="SMBEnable" method="POST" action="/update.htm" target="progressFrame">
|
||||
|
||||
Enable SMB:
|
||||
: <select name="shareSMBEnabled" size="1" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['shareSMBEnabled'], "no", "No")?>
|
||||
<?=mk_option($var['shareSMBEnabled'], "yes", "Yes (Workgroup)")?>
|
||||
<?=mk_option($var['shareSMBEnabled'], "ads", "Yes (Active Directory)")?>
|
||||
_(Enable SMB)_:
|
||||
: <select name="shareSMBEnabled" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['shareSMBEnabled'], "no", _('No'))?>
|
||||
<?=mk_option($var['shareSMBEnabled'], "yes", _('Yes').' ('._('Workgroup').')')?>
|
||||
<?=mk_option($var['shareSMBEnabled'], "ads", _('Yes').' ('._('Active Directory').')')?>
|
||||
</select>
|
||||
|
||||
:help72
|
||||
> Select 'Yes (Workgroup)' to enable SMB (Windows Networking) protocol support. This
|
||||
> also enables Windows host discovery.
|
||||
>
|
||||
> Select 'Yes (Active Directory)' to enable Active Directory integration.
|
||||
:end
|
||||
|
||||
Hide "dot" files:
|
||||
: <select name="hideDotFiles" size="1" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['hideDotFiles'], "no", "No");?>
|
||||
<?=mk_option($var['hideDotFiles'], "yes", "Yes");?>
|
||||
_(Hide "dot" files)_:
|
||||
: <select name="hideDotFiles" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['hideDotFiles'], "no", _('No'))?>
|
||||
<?=mk_option($var['hideDotFiles'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help73
|
||||
> If set to 'Yes' then files starting with a '.' (dot) will appear as *hidden files* and normally
|
||||
> will not appear in Windows folder lists unless you have "Show hidden files, folders, and drives" enabled
|
||||
> in Windows Folder Options.
|
||||
|
||||
> If set to 'No' then dot files will appear in folder lists the same as any other file.
|
||||
:end
|
||||
|
||||
Enhanced macOS interoperability:
|
||||
: <select name="enableFruit" size="1" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['enableFruit'], "no", "No");?>
|
||||
<?=mk_option($var['enableFruit'], "yes", "Yes");?>
|
||||
_(Enhanced macOS interoperability)_:
|
||||
: <select name="enableFruit" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['enableFruit'], "no", _('No'))?>
|
||||
<?=mk_option($var['enableFruit'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help74
|
||||
> When set to 'Yes' provides enhanced compatibility with Apple SMB clients, resulting, for example, in faster
|
||||
> Finder browsing, and ability to export Time Machine shares. This may cause some issues with Windows clients, however.
|
||||
> Please also refer to the [VFS_FRUIT MAN PAGE](https://www.mankier.com/8/vfs_fruit).
|
||||
:end
|
||||
|
||||
Enable NetBIOS:
|
||||
: <select name="USE_NETBIOS" size="1" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['USE_NETBIOS'], "no", "No")?>
|
||||
<?=mk_option($var['USE_NETBIOS'], "yes", "Yes")?>
|
||||
_(Enable NetBIOS)_:
|
||||
: <select name="USE_NETBIOS" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['USE_NETBIOS'], "no", _('No'))?>
|
||||
<?=mk_option($var['USE_NETBIOS'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help75
|
||||
> Select 'Yes' to enable NetBIOS. If enabled, SMBv1 protocol will also be recognized. If disabled,
|
||||
> clients must use SMBv2 or higher.
|
||||
:end
|
||||
|
||||
Enable WSD:
|
||||
: <select name="USE_WSD" size="1" onchange="checkWSDSettings()" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['USE_WSD'], "no", "No")?>
|
||||
<?=mk_option($var['USE_WSD'], "yes", "Yes")?>
|
||||
_(Enable WSD)_:
|
||||
: <select name="USE_WSD" onchange="checkWSDSettings()" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
<?=mk_option($var['USE_WSD'], "no", _('No'))?>
|
||||
<?=mk_option($var['USE_WSD'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help76
|
||||
> Select 'Yes' to enable WSD (WS-Discovery). The only reason to turn this off is when you are running an
|
||||
> old LAN setup based on SMBv1.
|
||||
:end
|
||||
|
||||
WSD options [experimental]:
|
||||
_(WSD options [experimental])_:
|
||||
: <input type="text" name="WSD_OPT" maxlength="80" class="narrow" value="<?=htmlspecialchars($var['WSD_OPT'])?>" <?if ($var['fsState']=="Started"):?>disabled<?endif;?>>
|
||||
|
||||
> This is a command line otions string passed to the WSD daemon upon startup. Leave this field blank unless
|
||||
:help77
|
||||
> This is a command line otions string passed to the WSD daemon upon startup. Leave this field blank unless
|
||||
> instructed by support to put something here.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeShare" value="Apply" disabled><input type="button" value="Done" onclick="done()"><?if ($var['fsState']=="Started"):?>Array must be <span class="strong big">Stopped</span> to change<?endif;?>
|
||||
: <input type="submit" name="changeShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"><?if ($var['fsState']=="Started"):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -16,8 +16,11 @@ Cond="(($var['shareAFPEnabled']!='no') && (isset($name)?array_key_exists($name,$
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
require_once "$docroot/webGui/include/InputSecurity.php";
|
||||
|
||||
$width = [123,300];
|
||||
?>
|
||||
:help22
|
||||
> This section is used to configure the security settings for the share when accessed using AFP and
|
||||
> appears only when AFP is enabled on the Network Services page.
|
||||
>
|
||||
@@ -28,75 +31,83 @@ $width = [123,300];
|
||||
> *Write settings to* is used to copy the AFP security settings of the current selected share to one or more other existing shares.
|
||||
>
|
||||
> Select the desired destinations and press **Write** to copy the AFP security settings to the selected shares.
|
||||
:end
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">Read settings from</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readafp" size="1" class="clone" onchange="toggleButton('readafp',false)">
|
||||
<option disabled selected>select...</option>
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readafp" class="clone" onchange="toggleButton('readafp',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readafp" value="Read" class="clone" onclick="readAFP()" disabled>
|
||||
</select></span><input type="button" id="readafp" value="_(Read)_" class="clone" onclick="readAFP()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">Write settings to</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="afp1" name="writeafp" size="1" multiple="multiple" style="display:none" onchange="toggleButton('writeafp',this.id)">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="afp1" name="writeafp" multiple="multiple" style="display:none" onchange="toggleButton('writeafp',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
if ($rows) echo "<option>(All)</option>";
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writeafp" value="Write" class="clone" onclick="writeAFP()" disabled>
|
||||
</select></span><input type="button" id="writeafp" value="_(Write)_" class="clone" onclick="writeAFP()" disabled>
|
||||
</div>
|
||||
|
||||
<form markdown="1" name="afp_edit" method="POST" action="/update.htm" target="progressFrame" onchange="toggleButton('writeafp',true);$('#afp1').dropdownchecklist('disable')">
|
||||
<input type="hidden" name="shareName" value="<?=htmlspecialchars($name)?>">
|
||||
|
||||
Share name:
|
||||
: <span class="big"><?=htmlspecialchars($name)?></span>
|
||||
_(Share name)_:
|
||||
: <?=htmlspecialchars($name)?>
|
||||
|
||||
Export:
|
||||
: <select name="shareExportAFP" size="1" onchange="checkShareSettingsAFP(this.form)">
|
||||
<?=mk_option($sec_afp[$name]['export'], "-", "No");?>
|
||||
<?=mk_option($sec_afp[$name]['export'], "e", "Yes");?>
|
||||
<?=mk_option($sec_afp[$name]['export'], "et", "Yes (TimeMachine)");?>
|
||||
_(Export)_:
|
||||
: <select name="shareExportAFP" onchange="checkShareSettingsAFP(this.form)">
|
||||
<?=mk_option($sec_afp[$name]['export'], "-", _('No'));?>
|
||||
<?=mk_option($sec_afp[$name]['export'], "e", _('Yes'));?>
|
||||
<?=mk_option($sec_afp[$name]['export'], "et", _('Yes (Time Machine)'));?>
|
||||
</select>
|
||||
|
||||
:help23
|
||||
> The Export setting determines whether this share is exported via AFP (Yes or No)
|
||||
> The Export setting also includes a third option (Yes - TimeMachine). This setting enables various
|
||||
> special options for TimeMachine; in particular a "volume size limit". Note: Apple recommends not
|
||||
> to use the volume for anything but TimeMachine due to the way locks are used.
|
||||
> The Export setting also includes a third option (Yes - Time Machine). This setting enables various
|
||||
> special options for Time Machine; in particular a "volume size limit". Note: Apple recommends not
|
||||
> to use the volume for anything but Time Machine due to the way locks are used.
|
||||
:end
|
||||
|
||||
TimeMachine volume size limit:
|
||||
_(Time Machine volume size limit)_:
|
||||
: <input type="text" name="shareVolsizelimitAFP" maxlen="20" value="<?=$sec_afp[$name]['volsizelimit']?>"> MB
|
||||
|
||||
> This limits the reported volume size, preventing TimeMachine from using the entire real disk space
|
||||
:help24
|
||||
> This limits the reported volume size, preventing Time Machine from using the entire real disk space
|
||||
> for backup. For example, setting this value to "1024" would limit the reported disk space to 1GB.
|
||||
:end
|
||||
|
||||
Volume dbpath:
|
||||
_(Volume dbpath)_:
|
||||
: <input type="text" name="shareVoldbpathAFP" maxlen="20" value="<?=htmlspecialchars($sec_afp[$name]['voldbpath'])?>">
|
||||
|
||||
:help25
|
||||
> Sets where to store netatalk database information. A directory with same name as the share will be
|
||||
> created here.
|
||||
>
|
||||
> Leave this field blank to have the database created in the root of the share.
|
||||
:end
|
||||
|
||||
Security:
|
||||
: <select name="shareSecurityAFP" size="1">
|
||||
<?=mk_option($sec_afp[$name]['security'], "public", "Public");?>
|
||||
<?=mk_option($sec_afp[$name]['security'], "secure", "Secure");?>
|
||||
<?=mk_option($sec_afp[$name]['security'], "private", "Private");?>
|
||||
_(Security)_:
|
||||
: <select name="shareSecurityAFP">
|
||||
<?=mk_option($sec_afp[$name]['security'], "public", _('Public'));?>
|
||||
<?=mk_option($sec_afp[$name]['security'], "secure", _('Secure'));?>
|
||||
<?=mk_option($sec_afp[$name]['security'], "private", _('Private'));?>
|
||||
</select>
|
||||
|
||||
:help26
|
||||
> The Unraid AFP implementation supports Guest access and fully supports the three security
|
||||
> modes: Public, Secure, and Private.
|
||||
> In general, when you click on your server's icon in Finder, you will be asked to log in as Guest or to
|
||||
@@ -122,14 +133,16 @@ Security:
|
||||
> macOS user.<br>
|
||||
> macOS users logged in with a user name/password previously created on the server may read or
|
||||
> read/write (or have no access) according their access right for the share on the server.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareSecurityAFP" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShareSecurityAFP" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
<?if ($sec_afp[$name]['security'] == 'secure'):?>
|
||||
<div id="title" class="nocontrol"><dt>AFP User Access</dt><i>Guests have <b>read-only</b> access.</i></div>
|
||||
<div id="title" class="nocontrol"><dt>_(AFP)_ _(User Access)_</dt><i>_(Guests have **read-only** access)_.</i></div>
|
||||
|
||||
:help27
|
||||
> *Read settings from* is used to preset the AFP User Access settings of the current selected share with the settings of an existing share.
|
||||
>
|
||||
> Select the desired share name and press **Read** to copy the AFP security settings from the selected source.
|
||||
@@ -137,34 +150,35 @@ Security:
|
||||
> *Write settings to* is used to copy the AFP User Access settings of the current share to one or more other existing shares.
|
||||
>
|
||||
> Select the desired destinations and press **Write** to copy the AFP User access settings to the selected shares.
|
||||
:end
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">Read settings from</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readuserafp" size="1" class="clone" onchange="toggleButton('readuserafp',false)">
|
||||
<option disabled selected>select...</option>
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readuserafp" class="clone" onchange="toggleButton('readuserafp',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='secure') echo mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='secure') echo mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='secure') echo mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readuserafp" value="Read" class="clone" onclick="readUserAFP()" disabled>
|
||||
</select></span><input type="button" id="readuserafp" value="_(Read)_" class="clone" onclick="readUserAFP()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">Write settings to</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="afp2" name="writeuserafp" size="1" multiple="multiple" style="display:none" onchange="toggleButton('writeuserafp',this.id)">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="afp2" name="writeuserafp" multiple="multiple" style="display:none" onchange="toggleButton('writeuserafp',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='secure') $rows[] = mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='secure') $rows[] = mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='secure') $rows[] = mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
if ($rows) echo "<option>(All)</option>";
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row)echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writeuserafp" value="Write" class="clone" onclick="writeUserAFP()" disabled>
|
||||
</select></span><input type="button" id="writeuserafp" value="_(Write)_" class="clone" onclick="writeUserAFP()" disabled>
|
||||
</div>
|
||||
|
||||
<form markdown="1" name="afp_user_edit" method="POST" action="/update.htm" target="progressFrame" onchange="toggleButton('writeuserafp',true);$('#afp2').dropdownchecklist('disable')">
|
||||
@@ -172,12 +186,13 @@ foreach ($rows as $row)echo $row;
|
||||
<?input_secure_users($sec_afp);?>
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareAccessAFP" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShareAccessAFP" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
<?elseif ($sec_afp[$name]['security'] == 'private'):?>
|
||||
<div id="title" class="nocontrol"><dt>AFP User Access</dt><i>Guests have <b>no</b> access.</i></div>
|
||||
<div id="title" class="nocontrol"><dt>_(AFP)_ _(User Access)_</dt><i>_(Guests have **no** access)_.</i></div>
|
||||
|
||||
:help28
|
||||
> *Read settings from* is used to preset the AFP User Access settings of the current selected share with the settings of an existing share.
|
||||
>
|
||||
> Select the desired share name and press **Read** to copy the AFP security settings from the selected source.
|
||||
@@ -185,34 +200,35 @@ foreach ($rows as $row)echo $row;
|
||||
> *Write settings to* is used to copy the AFP User Access settings of the current share to one or more other existing shares.
|
||||
>
|
||||
> Select the desired destinations and press **Write** to copy the AFP User access settings to the selected shares.
|
||||
:end
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">Read settings from</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readuserafp" size="1" class="clone" onchange="toggleButton('readuserafp',false)">
|
||||
<option disabled selected>select...</option>
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readuserafp" class="clone" onchange="toggleButton('readuserafp',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='private') echo mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='private') echo mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='private') echo mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readuserafp" value="Read" class="clone" onclick="readUserAFP()" disabled>
|
||||
</select></span><input type="button" id="readuserafp" value="_(Read)_" class="clone" onclick="readUserAFP()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">Write settings to</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="afp2" name="writeuserafp" size="1" multiple="multiple" style="display:none" onchange="toggleButton('writeuserafp',this.id)">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="afp2" name="writeuserafp" multiple="multiple" style="display:none" onchange="toggleButton('writeuserafp',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='private') $rows[] = mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='private') $rows[] = mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec_afp[$list['name']]['security']=='private') $rows[] = mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
if ($rows) echo "<option>(All)</option>";
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writeuserafp" value="Write" class="clone" onclick="writeUserAFP()" disabled>
|
||||
</select></span><input type="button" id="writeuserafp" value="_(Write)_" class="clone" onclick="writeUserAFP()" disabled>
|
||||
</div>
|
||||
|
||||
<form markdown="1" name="afp_user_edit" method="POST" action="/update.htm" target="progressFrame" onchange="toggleButton('writeuserafp',true);$('#afp2').dropdownchecklist('disable')">
|
||||
@@ -220,7 +236,7 @@ foreach($rows as $row) echo $row;
|
||||
<?input_private_users($sec_afp);?>
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareAccessAFP" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShareAccessAFP" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
@@ -245,8 +261,8 @@ function initDropdownAFP(reset) {
|
||||
$('#afp1').dropdownchecklist('destroy');
|
||||
$('#afp2').dropdownchecklist('destroy');
|
||||
}
|
||||
$("#afp1").dropdownchecklist({firstItemChecksAll:true, emptyText:'select...', width:<?=$width[0]?>, explicitClose:'...close'});
|
||||
$("#afp2").dropdownchecklist({firstItemChecksAll:true, emptyText:'select...', width:<?=$width[0]?>, explicitClose:'...close'});
|
||||
$("#afp1").dropdownchecklist({firstItemChecksAll:true, emptyText:'_(select)_...', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
|
||||
$("#afp2").dropdownchecklist({firstItemChecksAll:true, emptyText:'_(select)_...', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
|
||||
}
|
||||
function readAFP() {
|
||||
var form = document.afp_edit;
|
||||
@@ -270,7 +286,7 @@ function writeAFP(data,n,i) {
|
||||
}
|
||||
} else {
|
||||
$('select#afp1 option').map(function(i) {
|
||||
if ($(this).prop('selected')==true && $(this).val()!='(All)') {
|
||||
if ($(this).prop('selected')==true && $(this).val()!='(_(All)_)') {
|
||||
data[i] = {};
|
||||
data[i]['shareName'] = $(this).val();
|
||||
data[i]['shareExportAFP'] = '<?=addslashes(htmlspecialchars($sec_afp[$name]['export']))?>';
|
||||
|
||||
@@ -18,6 +18,7 @@ Cond="(($var['shareNFSEnabled']!='no') && (isset($name)?array_key_exists($name,$
|
||||
<?
|
||||
$width = [123,300];
|
||||
?>
|
||||
:help29
|
||||
> *Read settings from* is used to preset the NFS security settings of the current selected share with the settings of an existing share.
|
||||
>
|
||||
> Select the desired share name and press **Read** to copy the NFS security settings from the selected source.
|
||||
@@ -25,67 +26,68 @@ $width = [123,300];
|
||||
> *Write settings to* is used to copy the NFS security settings of the current selected share to one or more other existing shares.
|
||||
>
|
||||
> Select the desired destinations and press **Write** to copy the NFS security settings to the selected shares.
|
||||
:end
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">Read settings from</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readnfs" size="1" class="clone" onchange="toggleButton('readnfs',false)">
|
||||
<option disabled selected>select...</option>
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readnfs" class="clone" onchange="toggleButton('readnfs',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readnfs" value="Read" class="clone" onclick="readNFS()" disabled>
|
||||
</select></span><input type="button" id="readnfs" value="_(Read)_" class="clone" onclick="readNFS()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">Write settings to</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="nfs1" name="writenfs" size="1" multiple="multiple" style="display:none" onchange="toggleButton('writenfs',this.id)">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="nfs1" name="writenfs" multiple="multiple" style="display:none" onchange="toggleButton('writenfs',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
if ($rows) echo "<option>(All)</option>";
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writenfs" value="Write" class="clone" onclick="writeNFS()" disabled>
|
||||
</select></span><input type="button" id="writenfs" value="_(Write)_" class="clone" onclick="writeNFS()" disabled>
|
||||
</div>
|
||||
|
||||
<form markdown="1" name="nfs_edit" method="POST" action="/update.htm" target="progressFrame" onchange="toggleButton('writenfs',true);$('#nfs1').dropdownchecklist('disable')">
|
||||
<input type="hidden" name="shareName" value="<?=htmlspecialchars($name)?>">
|
||||
|
||||
Share name:
|
||||
: <span class="big"><?=htmlspecialchars($name)?></span>
|
||||
_(Share name)_:
|
||||
: <?=htmlspecialchars($name)?>
|
||||
|
||||
Export:
|
||||
: <select name="shareExportNFS" size="1">
|
||||
<?=mk_option($sec_nfs[$name]['export'], "-", "No");?>
|
||||
<?=mk_option($sec_nfs[$name]['export'], "e", "Yes");?>
|
||||
_(Export)_:
|
||||
: <select name="shareExportNFS">
|
||||
<?=mk_option($sec_nfs[$name]['export'], "-", _('No'));?>
|
||||
<?=mk_option($sec_nfs[$name]['export'], "e", _('Yes'));?>
|
||||
</select>
|
||||
|
||||
Security:
|
||||
: <select name="shareSecurityNFS" size="1">
|
||||
<?=mk_option($sec_nfs[$name]['security'], "public", "Public");?>
|
||||
<?=mk_option($sec_nfs[$name]['security'], "secure", "Secure");?>
|
||||
<?=mk_option($sec_nfs[$name]['security'], "private", "Private");?>
|
||||
_(Security)_:
|
||||
: <select name="shareSecurityNFS">
|
||||
<?=mk_option($sec_nfs[$name]['security'], "public", _('Public'));?>
|
||||
<?=mk_option($sec_nfs[$name]['security'], "secure", _('Secure'));?>
|
||||
<?=mk_option($sec_nfs[$name]['security'], "private", _('Private'));?>
|
||||
</select>
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareSecurityNFS" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShareSecurityNFS" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
<?if ($sec_nfs[$name]['security']=="private"):?>
|
||||
<form markdown="1" method="POST" name="otherForm" action="/update.htm" target="progressFrame">
|
||||
<input type="hidden" name="shareName" value="<?=htmlspecialchars($name)?>">
|
||||
Rule:
|
||||
_(Rule)_:
|
||||
: <input type="text" name="shareHostListNFS" maxlength="256" value="<?=htmlspecialchars($sec_nfs[$name]['hostList'])?>">
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareAccessNFS" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShareAccessNFS" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
@@ -104,7 +106,7 @@ function initDropdownNFS(reset) {
|
||||
if (reset) {
|
||||
$('#nfs1').dropdownchecklist('destroy');
|
||||
}
|
||||
$("#nfs1").dropdownchecklist({firstItemChecksAll:true, emptyText:'select...', width:<?=$width[0]?>, explicitClose:'...close'});
|
||||
$("#nfs1").dropdownchecklist({firstItemChecksAll:true, emptyText:'_(select)_...', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
|
||||
}
|
||||
function readNFS() {
|
||||
var form = document.nfs_edit;
|
||||
@@ -127,7 +129,7 @@ function writeNFS(data,n,i) {
|
||||
} else {
|
||||
var data = [], i = 0;
|
||||
$('select#nfs1 option').map(function(i) {
|
||||
if ($(this).prop('selected')==true && $(this).val()!='(All)') {
|
||||
if ($(this).prop('selected')==true && $(this).val()!='(_(All)_)') {
|
||||
data[i] = {};
|
||||
data[i]['shareName'] = $(this).val();
|
||||
data[i]['shareExportNFS'] = '<?=addslashes(htmlspecialchars($sec_nfs[$name]['export']))?>';
|
||||
|
||||
@@ -16,8 +16,11 @@ Cond="(($var['shareSMBEnabled']!='no') && (isset($name)?array_key_exists($name,$
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
require_once "$docroot/webGui/include/InputSecurity.php";
|
||||
|
||||
$width = [123,300];
|
||||
?>
|
||||
:help15
|
||||
> *Read settings from* is used to preset the SMB security settings of the current selected share with the settings of an existing share.
|
||||
>
|
||||
> Select the desired share name and press **Read** to copy the SMB security settings from the selected source.
|
||||
@@ -25,81 +28,89 @@ $width = [123,300];
|
||||
> *Write settings to* is used to copy the SMB security settings of the current selected share to one or more other existing shares.
|
||||
>
|
||||
> Select the desired destinations and press **Write** to copy the SMB security settings to the selected shares.
|
||||
:end
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">Read settings from</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readsmb" size="1" class="clone" onchange="toggleButton('readsmb',false)">
|
||||
<option disabled selected>select...</option>
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readsmb" class="clone" onchange="toggleButton('readsmb',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readsmb" value="Read" class="clone" onclick="readSMB()" disabled>
|
||||
</select></span><input type="button" id="readsmb" value="_(Read)_" class="clone" onclick="readSMB()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">Write settings to</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="smb1" name="writesmb" size="1" multiple="multiple" style="display:none" onchange="toggleButton('writesmb',this.id)">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="smb1" name="writesmb" multiple="multiple" style="display:none" onchange="toggleButton('writesmb',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
if ($rows) echo "<option>(All)</option>";
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writesmb" value="Write" class="clone" onclick="writeSMB()" disabled>
|
||||
</select></span><input type="button" id="writesmb" value="_(Write)_" class="clone" onclick="writeSMB()" disabled>
|
||||
</div>
|
||||
|
||||
<form markdown="1" name="smb_edit" method="POST" action="/update.htm" target="progressFrame" onchange="toggleButton('writesmb',true);$('#smb1').dropdownchecklist('disable')">
|
||||
<input type="hidden" name="shareName" value="<?=htmlspecialchars($name)?>">
|
||||
|
||||
Share name:
|
||||
: <span class="big"><?=htmlspecialchars($name)?></span>
|
||||
_(Share name)_:
|
||||
: <?=htmlspecialchars($name)?>
|
||||
|
||||
<?if (($name == 'flash')||($var['enableFruit']!='yes')):?>
|
||||
Export:
|
||||
: <select name="shareExport" size="1">
|
||||
<?=mk_option($sec[$name]['export'], "-", "No");?>
|
||||
<?=mk_option($sec[$name]['export'], "e", "Yes");?>
|
||||
<?=mk_option($sec[$name]['export'], "eh", "Yes (hidden)");?>
|
||||
<?if (($name=='flash')||($var['enableFruit']!='yes')):?>
|
||||
_(Export)_:
|
||||
: <select name="shareExport">
|
||||
<?=mk_option($sec[$name]['export'], "-", _('No'))?>
|
||||
<?=mk_option($sec[$name]['export'], "e", _('Yes'))?>
|
||||
<?=mk_option($sec[$name]['export'], "eh", _('Yes (hidden)'))?>
|
||||
</select>
|
||||
|
||||
:help16
|
||||
> This setting determines whether the share is visible and/or accessible. The 'Yes (hidden)' setting
|
||||
> will *hide* the share from *browsing* but is still accessible if you know the share name.
|
||||
:end
|
||||
|
||||
<input type="hidden" name="shareVolsizelimit" value="">
|
||||
<?else:?>
|
||||
Export:
|
||||
: <select name="shareExport" size="1" onchange="checkShareSettingsSMB(this.form)">
|
||||
<?=mk_option($sec[$name]['export'], "-", "No");?>
|
||||
<?=mk_option($sec[$name]['export'], "e", "Yes");?>
|
||||
<?=mk_option($sec[$name]['export'], "eh", "Yes (hidden)");?>
|
||||
<?=mk_option($sec[$name]['export'], "et", "Yes/Time Machine");?>
|
||||
<?=mk_option($sec[$name]['export'], "eth", "Yes/Time Machine (hidden)");?>
|
||||
_(Export)_:
|
||||
: <select name="shareExport" onchange="checkShareSettingsSMB(this.form)">
|
||||
<?=mk_option($sec[$name]['export'], "-", _('No'))?>
|
||||
<?=mk_option($sec[$name]['export'], "e", _('Yes'))?>
|
||||
<?=mk_option($sec[$name]['export'], "eh", _('Yes (hidden)'))?>
|
||||
<?=mk_option($sec[$name]['export'], "et", _('Yes/Time Machine'))?>
|
||||
<?=mk_option($sec[$name]['export'], "eth", _('Yes/Time Machine (hidden)'))?>
|
||||
</select>
|
||||
|
||||
:help17
|
||||
> This setting determines whether the share is visible and/or accessible. The 'Yes (hidden)' setting
|
||||
> will *hide* the share from *browsing* but is still accessible if you know the share name.
|
||||
:end
|
||||
|
||||
Time Machine volume size limit:
|
||||
_(Time Machine volume size limit)_:
|
||||
: <input type="text" name="shareVolsizelimit" maxlen="20" value="<?=$sec[$name]['volsizelimit']?>"> MB
|
||||
|
||||
:help18
|
||||
> This limits the reported volume size, preventing Time Machine from using the entire real disk space
|
||||
> for backup. For example, setting this value to "1024" would limit the reported disk space to 1GB.
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
Security:
|
||||
: <select name="shareSecurity" size="1">
|
||||
<?=mk_option($sec[$name]['security'], "public", "Public");?>
|
||||
<?=mk_option($sec[$name]['security'], "secure", "Secure");?>
|
||||
<?=mk_option($sec[$name]['security'], "private", "Private");?>
|
||||
_(Security)_:
|
||||
: <select name="shareSecurity">
|
||||
<?=mk_option($sec[$name]['security'], "public", _('Public'))?>
|
||||
<?=mk_option($sec[$name]['security'], "secure", _('Secure'))?>
|
||||
<?=mk_option($sec[$name]['security'], "private", _('Private'))?>
|
||||
</select>
|
||||
|
||||
:help19
|
||||
> Summary of security modes:
|
||||
>
|
||||
> **Public** All users including guests have full read/write access.
|
||||
@@ -109,14 +120,16 @@ Security:
|
||||
>
|
||||
> **Private** No guest access at all, you select which of your users have read/write or
|
||||
> read-only access.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareSecurity" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShareSecurity" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
<?if ($sec[$name]['security'] == 'secure'):?>
|
||||
<div id="title" class="nocontrol"><dt>SMB User Access</dt><i>Guests have <b>read-only</b> access.</i></div>
|
||||
<?if ($sec[$name]['security']=='secure'):?>
|
||||
<div id="title" class="nocontrol"><dt>_(SMB)_ _(User Access)_</dt><i>_(Guests have **read-only** access)_.</i></div>
|
||||
|
||||
:help20
|
||||
> *Read settings from* is used to preset the SMB User Access settings of the current selected share with the settings of an existing share.
|
||||
>
|
||||
> Select the desired share name and press **Read** to copy the SMB security settings from the selected source.
|
||||
@@ -124,47 +137,49 @@ Security:
|
||||
> *Write settings to* is used to copy the SMB User Access settings of the current share to one or more other existing shares.
|
||||
>
|
||||
> Select the desired destinations and press **Write** to copy the SMB User access settings to the selected shares.
|
||||
:end
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">Read settings from</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readusersmb" size="1" class="clone" onchange="toggleButton('readusersmb',false)">
|
||||
<option disabled selected>select...</option>
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readusersmb" class="clone" onchange="toggleButton('readusersmb',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') echo mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') echo mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') echo mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readusersmb" value="Read" class="clone" onclick="readUserSMB()" disabled>
|
||||
</select></span><input type="button" id="readusersmb" value="_(Read)_" class="clone" onclick="readUserSMB()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">Write settings to</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="smb2" name="writeusersmb" size="1" multiple="multiple" style="display:none" onchange="toggleButton('writeusersmb',this.id)">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="smb2" name="writeusersmb" multiple="multiple" style="display:none" onchange="toggleButton('writeusersmb',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') $rows[] = mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') $rows[] = mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') $rows[] = mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
if ($rows) echo "<option>(All)</option>";
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writeusersmb" value="Write" class="clone" onclick="writeUserSMB()" disabled>
|
||||
</select></span><input type="button" id="writeusersmb" value="_(Write)_" class="clone" onclick="writeUserSMB()" disabled>
|
||||
</div>
|
||||
|
||||
<form markdown="1" name="smb_user_edit" method="POST" action="/update.htm" target="progressFrame" onchange="toggleButton('writeusersmb',true);$('#smb2').dropdownchecklist('disable')">
|
||||
<input type="hidden" name="shareName" value="<?=htmlspecialchars($name)?>">
|
||||
<?input_secure_users($sec);?>
|
||||
<?input_secure_users($sec)?>
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareAccess" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShareAccess" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
<?elseif ($sec[$name]['security'] == 'private'):?>
|
||||
<div id="title" class="nocontrol"><dt>SMB User Access</dt><i>Guests have <b>no</b> access.</i></div>
|
||||
<?elseif ($sec[$name]['security']=='private'):?>
|
||||
<div id="title" class="nocontrol"><dt>_(SMB)_ _(User Access)_</dt><i>_(Guests have **no** access)_.</i></div>
|
||||
|
||||
:help21
|
||||
> *Read settings from* is used to preset the SMB User Access settings of the current selected share with the settings of an existing share.
|
||||
>
|
||||
> Select the desired share name and press **Read** to copy the SMB security settings from the selected source.
|
||||
@@ -172,42 +187,43 @@ foreach ($rows as $row) echo $row;
|
||||
> *Write settings to* is used to copy the SMB User Access settings of the current share to one or more other existing shares.
|
||||
>
|
||||
> Select the desired destinations and press **Write** to copy the SMB User access settings to the selected shares.
|
||||
:end
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">Read settings from</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readusersmb" size="1" class="clone" onchange="toggleButton('readusersmb',false)">
|
||||
<option disabled selected>select...</option>
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readusersmb" class="clone" onchange="toggleButton('readusersmb',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') echo mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') echo mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') echo mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readusersmb" value="Read" class="clone" onclick="readUserSMB()" disabled>
|
||||
</select></span><input type="button" id="readusersmb" value="_(Read)_" class="clone" onclick="readUserSMB()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">Write settings to</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="smb2" name="writeusersmb" size="1" multiple="multiple" style="display:none" onchange="toggleButton('writeusersmb',this.id)">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="smb2" name="writeusersmb" multiple="multiple" style="display:none" onchange="toggleButton('writeusersmb',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') $rows[] = mk_option("", $list['name'], my_disk($list['name']));
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') $rows[] = mk_option("", $list['name'], my_lang(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') $rows[] = mk_option("", $list['name'], $list['name']);
|
||||
}
|
||||
if ($rows) echo "<option>(All)</option>";
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writeusersmb" value="Write" class="clone" onclick="writeUserSMB()" disabled>
|
||||
</select></span><input type="button" id="writeusersmb" value="_(Write)_" class="clone" onclick="writeUserSMB()" disabled>
|
||||
</div>
|
||||
|
||||
<form markdown="1" name="smb_user_edit" method="POST" action="/update.htm" target="progressFrame" onchange="toggleButton('writeusersmb',true);$('#smb2').dropdownchecklist('disable')">
|
||||
<input type="hidden" name="shareName" value="<?=htmlspecialchars($name)?>">
|
||||
<?input_private_users($sec);?>
|
||||
<?input_private_users($sec)?>
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareAccess" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="changeShareAccess" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
@@ -232,8 +248,8 @@ function initDropdownSMB(reset) {
|
||||
$('#smb1').dropdownchecklist('destroy');
|
||||
$('#smb2').dropdownchecklist('destroy');
|
||||
}
|
||||
$("#smb1").dropdownchecklist({firstItemChecksAll:true, emptyText:'select...', width:<?=$width[0]?>, explicitClose:'...close'});
|
||||
$("#smb2").dropdownchecklist({firstItemChecksAll:true, emptyText:'select...', width:<?=$width[0]?>, explicitClose:'...close'});
|
||||
$("#smb1").dropdownchecklist({firstItemChecksAll:true, emptyText:'_(select)_...', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
|
||||
$("#smb2").dropdownchecklist({firstItemChecksAll:true, emptyText:'_(select)_...', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
|
||||
}
|
||||
function readSMB() {
|
||||
var form = document.smb_edit;
|
||||
@@ -257,7 +273,7 @@ function writeSMB(data,n,i) {
|
||||
} else {
|
||||
var data = [], i = 0;
|
||||
$('select#smb1 option').map(function() {
|
||||
if ($(this).prop('selected')==true && $(this).val()!='(All)') {
|
||||
if ($(this).prop('selected')==true && $(this).val()!='(_(All)_)') {
|
||||
data[i] = {};
|
||||
data[i]['shareName'] = $(this).val();
|
||||
data[i]['shareExport'] = '<?=addslashes(htmlspecialchars($sec[$name]['export']))?>';
|
||||
@@ -303,7 +319,7 @@ function writeUserSMB(data,n,i) {
|
||||
} else {
|
||||
var data = [], i = 0;
|
||||
$('select#smb2 option').map(function() {
|
||||
if ($(this).prop('selected')==true && $(this).val()!='(All)') {
|
||||
if ($(this).prop('selected')==true && $(this).val()!='(_(All)_)') {
|
||||
data[i] = {};
|
||||
data[i]['shareName'] = $(this).val();
|
||||
data[i]['userAccess.0'] = 'no-access';
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="wrench"
|
||||
Cond="strpos($disks[$name]['status'],'_NP')===false"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -34,53 +34,63 @@ function spindownDelay() {
|
||||
return file_exists($tmp) ? file_get_contents($tmp) : $delay;
|
||||
}
|
||||
?>
|
||||
Download SMART report:
|
||||
: <input type='button' value='Download' onclick='saveSMART()'>
|
||||
_(Download SMART report)_:
|
||||
: <input type='button' value='_(Download)_' onclick='saveSMART()'>
|
||||
|
||||
SMART self-test history:
|
||||
: <input type="button" value="Show" id="toggle_log" onclick="selftestLog()" disabled>
|
||||
_(SMART self-test history)_:
|
||||
: <input type="button" value="_(Show)_" id="toggle_log" onclick="selftestLog()" disabled>
|
||||
|
||||
:help29
|
||||
> Press **Show** to view the self-test history as is kept on the disk itself.
|
||||
> This feature is only available when the disk is in active mode.
|
||||
:end
|
||||
|
||||
<pre id="selftest" style="display:none"></pre>
|
||||
|
||||
SMART error log:
|
||||
: <input type="button" value="Show" id="toggle_error" onclick="errorLog()" disabled>
|
||||
_(SMART error log)_:
|
||||
: <input type="button" value="_(Show)_" id="toggle_error" onclick="errorLog()" disabled>
|
||||
|
||||
:help30
|
||||
> Press **Show** to view the error report as is kept on the disk itself.
|
||||
> This feature is only available when the disk is in active mode.
|
||||
:end
|
||||
|
||||
<pre id="errorlog" style="display:none"></pre>
|
||||
|
||||
SMART short self-test:
|
||||
: <input type='button' value='Start' id='short_test' onclick="startShortTest()" disabled>
|
||||
_(SMART short self-test)_:
|
||||
: <input type='button' value='_(Start)_' id='short_test' onclick="startShortTest()" disabled>
|
||||
|
||||
:help31
|
||||
> Starts a *short* SMART self-test, the estimated duration can be viewed under the *Capabilities* section. This is usually a few minutes.
|
||||
>
|
||||
> When the disk is spun down, it will abort any running self-test.
|
||||
> This feature is only available when the disk is in active mode.
|
||||
:end
|
||||
|
||||
SMART extended self-test:
|
||||
: <input type='button' value='Start' id='long_test' onclick="startLongTest()" disabled>
|
||||
_(SMART extended self-test)_:
|
||||
: <input type='button' value='_(Start)_' id='long_test' onclick="startLongTest()" disabled>
|
||||
|
||||
:help32
|
||||
> Starts an *extended* SMART self-test, the estimated duration can be viewed under the *Capabilities* section. This is usually several hours.
|
||||
>
|
||||
> When the disk is spun down, it will abort any running self-test. It is advised to disable the spin down timer of the disk
|
||||
> to avoid interruption of this self-test.
|
||||
>
|
||||
> This feature is only available when the disk is in active mode.
|
||||
:end
|
||||
|
||||
Last SMART test result:
|
||||
_(Last SMART test result)_:
|
||||
: <span id="test_result"><i class='fa fa-circle-o-notch fa-spin fa-fw'></i></span>
|
||||
|
||||
:help33
|
||||
> When no test is running it will show here the latest obtained self-test result (if available).
|
||||
> Otherwise a progress indicator (percentage value) is shown for a running test.
|
||||
:end
|
||||
|
||||
<script>
|
||||
function cleanUp() {
|
||||
if (document.hasFocus()) {
|
||||
$('input[value="Downloading..."]').val('Download').prop('disabled',false);
|
||||
$('input[value="_(Downloading)_..."]').val('_(Download)_').prop('disabled',false);
|
||||
$.post('/webGui/include/Download.php',{cmd:'delete',file:'<?=addslashes(htmlspecialchars($file))?>'});
|
||||
$.post('/webGui/include/Download.php',{cmd:'delete',file:'<?=addslashes(htmlspecialchars($zip))?>'});
|
||||
} else {
|
||||
@@ -88,7 +98,7 @@ function cleanUp() {
|
||||
}
|
||||
}
|
||||
function saveSMART() {
|
||||
$('input[value="Download"]').val('Downloading...').prop('disabled',true);
|
||||
$('input[value="_(Download)_"]').val('_(Downloading)_...').prop('disabled',true);
|
||||
$.post('/webGui/include/SmartInfo.php',{cmd:'save',port:'<?=addslashes(htmlspecialchars($dev))?>',name:'<?=addslashes(htmlspecialchars($name))?>',file:'<?=addslashes(htmlspecialchars($file))?>'}, function() {
|
||||
$.post('/webGui/include/Download.php',{cmd:'save',source:'<?=addslashes(htmlspecialchars($file))?>',file:'<?=addslashes(htmlspecialchars($zip))?>'},function(zip) {
|
||||
location = zip;
|
||||
@@ -104,13 +114,13 @@ function testUpdate(init) {
|
||||
<?if ($spindown):?>
|
||||
$('select[name="<?=addslashes(htmlspecialchars($spindown))?>"]').prop('disabled',true);
|
||||
<?endif;?>
|
||||
$('#smart_selftest').html('<i class="fa fa-camera"></i> S.M.A.R.T self-test in progress...');
|
||||
$('#smart_selftest').html('<i class="fa fa-camera"></i> _(SMART self-test in progress)_...');
|
||||
}
|
||||
if (!init) timers.testUpdate = setTimeout(testUpdate, 3000);
|
||||
} else {
|
||||
if ($('#smart_selftest').length) $('#smart_selftest').html('');
|
||||
$('#short_test').val('Start');
|
||||
$('#long_test').val('Start');
|
||||
$('#short_test').val('_(Start)_');
|
||||
$('#long_test').val('_(Start)_');
|
||||
<?if ($live):?>
|
||||
$('#short_test').removeAttr('disabled');
|
||||
$('#long_test').removeAttr('disabled');
|
||||
@@ -128,17 +138,17 @@ function testUpdate(init) {
|
||||
}
|
||||
function selftestLog() {
|
||||
$('#selftest').toggle('slow');
|
||||
var text = $('#toggle_log').val()=='Show' ? 'Hide' : 'Show';
|
||||
var text = $('#toggle_log').val()=='_(Show)_' ? '_(Hide)_' : '_(Show)_';
|
||||
$('#toggle_log').val(text);
|
||||
}
|
||||
function errorLog() {
|
||||
$('#errorlog').toggle('slow');
|
||||
var text = $('#toggle_error').val()=='Show' ? 'Hide' : 'Show';
|
||||
var text = $('#toggle_error').val()=='_(Show)_' ? '_(Hide)_' : '_(Show)_';
|
||||
$('#toggle_error').val(text);
|
||||
}
|
||||
function startShortTest() {
|
||||
if ($('#short_test').val()=='Start') {
|
||||
$('#short_test').val('Stop');
|
||||
if ($('#short_test').val()=='_(Start)_') {
|
||||
$('#short_test').val('_(Stop)_');
|
||||
$('#long_test').attr('disabled','disabled');
|
||||
$.cookie('test.<?=addslashes(htmlspecialchars($dev))?>','short',{path:'/',expires:365});
|
||||
$.post('/webGui/include/SmartInfo.php',{cmd:'short',port:'<?=addslashes(htmlspecialchars($dev))?>',name:'<?=addslashes(htmlspecialchars($name))?>'},function(){timers.testUpdate = setTimeout(testUpdate,0);});
|
||||
@@ -158,8 +168,8 @@ function startShortTest() {
|
||||
}
|
||||
}
|
||||
function startLongTest() {
|
||||
if ($('#long_test').val()=='Start') {
|
||||
$('#long_test').val('Stop');
|
||||
if ($('#long_test').val()=='_(Start)_') {
|
||||
$('#long_test').val('_(Stop)_');
|
||||
$('#short_test').attr('disabled','disabled');
|
||||
$.cookie('test.<?=addslashes(htmlspecialchars($dev))?>','long',{path:'/',expires:365});
|
||||
$.post('/webGui/include/SmartInfo.php',{cmd:'long',port:'<?=addslashes(htmlspecialchars($dev))?>',name:'<?=addslashes(htmlspecialchars($name))?>'},function(){timers.testUpdate = setTimeout(testUpdate,0);});
|
||||
@@ -181,7 +191,7 @@ function startLongTest() {
|
||||
$(function() {
|
||||
var smarttest = $.cookie('test.<?=addslashes(htmlspecialchars($dev))?>');
|
||||
testUpdate(smarttest===undefined);
|
||||
if (smarttest !== undefined) $('#'+smarttest+'_test').val('Stop').removeAttr('disabled');
|
||||
if (smarttest !== undefined) $('#'+smarttest+'_test').val('_(Stop)_').removeAttr('disabled');
|
||||
<?if ($live):?>
|
||||
$('#toggle_log').removeAttr('disabled');
|
||||
$('#toggle_error').removeAttr('disabled');
|
||||
|
||||
@@ -36,6 +36,7 @@ if ($name) {
|
||||
<style>
|
||||
div.clone1{position:absolute;right:0;margin-top:0}
|
||||
div.clone2{position:absolute;right:0;margin-top:48px}
|
||||
span.input{display:inline-block;width:420px}
|
||||
<?if ($themes1):?>
|
||||
span.wrap{display:inline-block;width:128px}
|
||||
select.clone{min-width:123px;margin-right:0}
|
||||
@@ -61,7 +62,7 @@ function toggleButton(button,id) {
|
||||
}
|
||||
|
||||
<?if ($name):?>
|
||||
var ctrl = "<span class='ctrl1 status <?=$tabbed?'vhshift':'vshift'?>'><a href='/Shares/Share?name=<?=$prev?>' title='previous user share'><button type='button' style='margin-right:4px'><i class='fa fa-chevron-left fa-fw'></i></button></a><a href='/Shares/Share?name=<?=$next?>' title='next user share'><button type='button'><i class='fa fa-chevron-right fa-fw'></i></button></a></span>";
|
||||
var ctrl = "<span class='ctrl1 status <?=$tabbed?'vhshift':'vshift'?>'><a href='/Shares/Share?name=<?=$prev?>' title='_(previous user share)_'><button type='button' style='margin-right:4px'><i class='fa fa-chevron-left fa-fw'></i></button></a><a href='/Shares/Share?name=<?=$next?>' title='_(next user share)_'><button type='button'><i class='fa fa-chevron-right fa-fw'></i></button></a></span>";
|
||||
|
||||
$(function() {
|
||||
<?if ($tabbed):?>
|
||||
|
||||
@@ -34,7 +34,7 @@ if ($name == "") {
|
||||
$share = $shares[$name];
|
||||
} else {
|
||||
/* handle share deleted case */
|
||||
echo "<p class='notice'>Share ".htmlspecialchars($name)." has been deleted.</p><input type='button' value='Done' onclick='done()'>";
|
||||
echo "<p class='notice'>"._('Share')." '".htmlspecialchars($name)."' "._('has been deleted').".</p><input type='button' value='"._('Done')."' onclick='done()'>";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ function globalInclude($name) {
|
||||
$disks = array_filter($disks,'my_disks');
|
||||
$myDisks = array_filter(array_diff(array_keys($disks), explode(',',$var['shareUserExclude'])), 'globalInclude');
|
||||
?>
|
||||
:help3
|
||||
> A *Share*, also called a *User Share*, is simply the name of a top-level directory that exists on one or more of your
|
||||
> storage devices (array and cache). Each share can be exported for network access. When browsing a share, we return the
|
||||
> composite view of all files and subdirectories for which that top-level directory exists on each storage device.
|
||||
@@ -65,55 +66,61 @@ $myDisks = array_filter(array_diff(array_keys($disks), explode(',',$var['shareUs
|
||||
>
|
||||
> Select the desired destinations and press **Write** to copy the settings to the selected shares.
|
||||
<?endif;?>
|
||||
:end
|
||||
|
||||
<div id="" class="clone1">
|
||||
<span class="clone">Read settings from</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readshare" size="1" class="clone" onchange="toggleButton('readshare',false)">
|
||||
<option disabled selected>select...</option>
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
foreach ($shares as $list) if ($list['name']!=$name || !$name) echo mk_option("", $list['name'], $list['name']);
|
||||
?>
|
||||
</select></span><input type="button" id="readshare" value="Read" class="clone" onclick="readShare()" disabled>
|
||||
</select></span><input type="button" id="readshare" value="_(Read)_" class="clone" onclick="readShare()" disabled>
|
||||
</div>
|
||||
<?if ($name):?>
|
||||
<div id="" class="clone2">
|
||||
<span class="clone">Write settings to</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="s3" name="writeshare" size="1" multiple="multiple" style="display:none" onchange="toggleButton('writeshare',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
foreach ($shares as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], $list['name']);
|
||||
if ($rows) echo "<option>(All)</option>";
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writeshare" value="Write" class="clone" onclick="writeShare()" disabled>
|
||||
</select></span><input type="button" id="writeshare" value="_(Write)_" class="clone" onclick="writeShare()" disabled>
|
||||
</div>
|
||||
<?endif;?>
|
||||
|
||||
<form markdown="1" name="share_edit" method="POST" action="/update.htm" target="progressFrame" onsubmit="return prepareEdit(this)"<?=$name?" onchange=\"toggleButton('writeshare',true);$('#s3').dropdownchecklist('disable')\">":">"?>
|
||||
<input type="hidden" name="shareNameOrig" value="<?=htmlspecialchars($share['nameOrig'])?>">
|
||||
|
||||
Share name:
|
||||
_(Share name)_:
|
||||
: <input type="text" name="shareName" maxlength="40" value="<?=htmlspecialchars($name)?>">
|
||||
|
||||
:help4
|
||||
> The share name can be up to 40 characters, and is case-sensitive with these restrictions:
|
||||
>
|
||||
> * cannot contain a double-quote character (") or the following characters: / \ * < > |
|
||||
> * cannot be one of the reserved share names: flash, cache, cach2, .., disk1, disk2, ..
|
||||
>
|
||||
> We highly recommend to make your life easier and avoid special characters.
|
||||
:end
|
||||
|
||||
Comments:
|
||||
_(Comments)_:
|
||||
: <input type="text" name="shareComment" maxlength="256" value="<?=htmlspecialchars($share['comment'])?>">
|
||||
|
||||
:help5
|
||||
> Anything you like, up to 256 characters.
|
||||
:end
|
||||
|
||||
Allocation method:
|
||||
_(Allocation method)_:
|
||||
: <select name="shareAllocator" size="1">
|
||||
<?=mk_option($share['allocator'], "highwater", "High-water")?>
|
||||
<?=mk_option($share['allocator'], "fillup", "Fill-up")?>
|
||||
<?=mk_option($share['allocator'], "mostfree", "Most-free")?>
|
||||
<?=mk_option($share['allocator'], "highwater", _('High-water'))?>
|
||||
<?=mk_option($share['allocator'], "fillup", _('Fill-up'))?>
|
||||
<?=mk_option($share['allocator'], "mostfree", _('Most-free'))?>
|
||||
</select>
|
||||
|
||||
:help6
|
||||
> This setting determines how Unraid OS will choose which disk to use when creating a new file or directory:
|
||||
>
|
||||
> **High-water**
|
||||
@@ -131,26 +138,30 @@ Allocation method:
|
||||
>
|
||||
> **Most-free**
|
||||
> Choose the disk that currently has the most free space.
|
||||
:end
|
||||
|
||||
Minimum free space:
|
||||
_(Minimum free space)_:
|
||||
: <input type="text" name="shareFloor" maxlength="16" value="<?=htmlspecialchars($share['floor'])?>">
|
||||
|
||||
:help7
|
||||
> The *minimum free space* available to allow writing to any disk belonging to the share.<br>
|
||||
>
|
||||
> Choose a value which is equal or greater than the biggest single file size you intend to copy to the share.
|
||||
> Include units KB, MB, GB and TB as appropriate, e.g. 10MB.
|
||||
:end
|
||||
|
||||
Split level:
|
||||
_(Split level)_:
|
||||
: <select name="shareSplitLevel" size="1">
|
||||
<?=mk_option($share['splitLevel'], "", "Automatically split any directory as required")?>
|
||||
<?=mk_option($share['splitLevel'], "1", "Automatically split only the top level directory as required")?>
|
||||
<?=mk_option($share['splitLevel'], "2", "Automatically split only the top two directory levels as required")?>
|
||||
<?=mk_option($share['splitLevel'], "3", "Automatically split only the top three directory levels as required")?>
|
||||
<?=mk_option($share['splitLevel'], "4", "Automatically split only the top four directory levels as required")?>
|
||||
<?=mk_option($share['splitLevel'], "5", "Automatically split only the top five directory levels as required")?>
|
||||
<?=mk_option($share['splitLevel'], "0", "Manual: do not automatically split directories")?>
|
||||
<?=mk_option($share['splitLevel'], "", _('Automatically split any directory as required'))?>
|
||||
<?=mk_option($share['splitLevel'], "1", _('Automatically split only the top level directory as required'))?>
|
||||
<?=mk_option($share['splitLevel'], "2", _('Automatically split only the top two directory levels as required'))?>
|
||||
<?=mk_option($share['splitLevel'], "3", _('Automatically split only the top three directory levels as required'))?>
|
||||
<?=mk_option($share['splitLevel'], "4", _('Automatically split only the top four directory levels as required'))?>
|
||||
<?=mk_option($share['splitLevel'], "5", _('Automatically split only the top five directory levels as required'))?>
|
||||
<?=mk_option($share['splitLevel'], "0", _('Manual: do not automatically split directories'))?>
|
||||
</select>
|
||||
|
||||
:help8
|
||||
> Determines whether a directory is allowed to expand onto multiple disks.
|
||||
|
||||
> **Automatically split any directory as required**
|
||||
@@ -174,34 +185,40 @@ Split level:
|
||||
> **Manual: do not automatically split directories**
|
||||
> When a new file or subdirectory needs to be created in a share, Unraid OS will only consider disks where the
|
||||
> parent directory already exists.
|
||||
:end
|
||||
|
||||
Included disk(s):
|
||||
_(Included disk(s))_:
|
||||
: <select id="s1" name="shareInclude" size="1" multiple="multiple" style="display:none">
|
||||
<?foreach ($myDisks as $disk):?>
|
||||
<?=mk_option_luks($disk, $share['include'], strstr($disks[$disk]['fsType'],':',true))?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
|
||||
:help9
|
||||
> Specify the disks which can be used by the share. By default all disks are included; that is, if specific
|
||||
> disks are not selected here, then the share may expand into *all* array disks.
|
||||
:end
|
||||
|
||||
Excluded disk(s):
|
||||
_(Excluded disk(s))_:
|
||||
: <select id="s2" name="shareExclude" size="1" multiple="multiple" style="display:none">
|
||||
<?foreach ($myDisks as $disk):?>
|
||||
<?=mk_option_luks($disk, $share['exclude'], strstr($disks[$disk]['fsType'],':',true))?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
|
||||
:help10
|
||||
> Specify the disks which can *not* be used by the share. By default no disks are excluded.
|
||||
:end
|
||||
|
||||
Use cache (for new files/directories):
|
||||
: <select name="shareUseCache" size="1" onchange="setDiskList(this.value) ; setMoverAction(this.value)">
|
||||
<?=mk_option($share['useCache'], "no", "No")?>
|
||||
<?=mk_option($share['useCache'], "yes", "Yes")?>
|
||||
<?=mk_option($share['useCache'], "only", "Only")?>
|
||||
<?=mk_option($share['useCache'], "prefer", "Prefer")?>
|
||||
</select><span id="moverAction"></span>
|
||||
_(Use cache (for new files/directories))_:
|
||||
: <span class="input"><select name="shareUseCache" size="1" onchange="setDiskList(this.value) ; setMoverAction(this.value)">
|
||||
<?=mk_option($share['useCache'], "no", _('No'))?>
|
||||
<?=mk_option($share['useCache'], "yes", _('Yes'))?>
|
||||
<?=mk_option($share['useCache'], "only", _('Only'))?>
|
||||
<?=mk_option($share['useCache'], "prefer", _('Prefer'))?>
|
||||
</select></span><span id="moverAction"></span>
|
||||
|
||||
:help11
|
||||
> Specify whether new files and directories written on the share can be written onto the Cache disk/pool if present.
|
||||
> This setting also affects *mover* behavior.
|
||||
>
|
||||
@@ -225,13 +242,15 @@ Use cache (for new files/directories):
|
||||
> **NOTE:** Mover will never move any files that are currently in use.
|
||||
> This means if you want to move files associated with system services such as Docker or VMs then you need to
|
||||
> disable these services while mover is running.
|
||||
:end
|
||||
|
||||
Enable Copy-on-write:
|
||||
: <select name="shareCOW" size="1"<?if ($name):?> disabled<?endif;?>>
|
||||
<?=mk_option($share['cow'], "no", "No")?>
|
||||
<?=mk_option($share['cow'], "auto", "Auto")?>
|
||||
</select><?if ($name):?>Set when adding new share only.<?endif;?>
|
||||
_(Enable Copy-on-write)_:
|
||||
: <span class="input"><select name="shareCOW" size="1"<?if ($name):?> disabled<?endif;?>>
|
||||
<?=mk_option($share['cow'], "no", _('No'))?>
|
||||
<?=mk_option($share['cow'], "auto", _('Auto'))?>
|
||||
</select></span><?if ($name):?>_(Set when adding new share only)_<?endif;?>
|
||||
|
||||
:help12
|
||||
> Set to **No** to cause the *btrfs* NOCOW (No Copy-on-Write) attribute to be set on the share directory
|
||||
> when created on a device formatted with *btrfs* file system. Once set, newly created files and
|
||||
> subdirectories on the device will inherit the NOCOW attribute. We recommend this setting for shares
|
||||
@@ -239,26 +258,31 @@ Enable Copy-on-write:
|
||||
> on non-btrfs file systems.
|
||||
>
|
||||
> Set to **Auto** for normal operation, meaning COW **will** be in effect on devices formatted with *btrfs*.
|
||||
:end
|
||||
|
||||
<?if (!$name):?>
|
||||
|
||||
: <input type="submit" name="cmdEditShare" value="Add Share"><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="cmdEditShare" value="_(Add Share)_" onclick="this.value='Add Share'"><input type="button" value="_(Done)_" onclick="done()">
|
||||
<?elseif (shareEmpty($name)):?>
|
||||
Share status:
|
||||
: <span class="big">Share is empty</span>
|
||||
_(Share status)_:
|
||||
: _(Share is empty)_
|
||||
|
||||
:help13
|
||||
> Share does *not* contain any data and may be deleted if not needed any longer.
|
||||
:end
|
||||
|
||||
Delete<input type="checkbox" name="confirmDelete" onchange="chkDelete(this.form, this.form.cmdEditShare);">
|
||||
: <input type="submit" name="cmdEditShare" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
_(Delete)_<input type="checkbox" name="confirmDelete" onchange="chkDelete(this.form, this.form.cmdEditShare);">
|
||||
: <input type="submit" name="cmdEditShare" value="_(Apply)_" onclick="if (this.value=='_(Delete)_')this.value='Delete'" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
<?else:?>
|
||||
Share status:
|
||||
: <span class="big">Share contains data</span>
|
||||
_(Share status)_:
|
||||
: _(Share contains data)_
|
||||
|
||||
:help14
|
||||
> Share can *not* be deleted as long as it contains data. Be aware that some data can be hidden. See also [SMB Settings](/Settings/SMB) -> Hide "dot" files.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="cmdEditShare" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
: <input type="submit" name="cmdEditShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
<?endif;?>
|
||||
</form>
|
||||
<script>
|
||||
@@ -280,10 +304,10 @@ function initDropdown(remove,create) {
|
||||
<?endif;?>
|
||||
}
|
||||
if (create) {
|
||||
$('#s1').dropdownchecklist({emptyText:'All', width:<?=$width[1]?>, explicitClose:'...close'});
|
||||
$('#s2').dropdownchecklist({emptyText:'None', width:<?=$width[1]?>, explicitClose:'...close'});
|
||||
$('#s1').dropdownchecklist({emptyText:'_(All)_', width:<?=$width[1]?>, explicitClose:'..._(close)_'});
|
||||
$('#s2').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[1]?>, explicitClose:'..._(close)_'});
|
||||
<?if ($name):?>
|
||||
$("#s3").dropdownchecklist({firstItemChecksAll:true, emptyText:'select...', width:<?=$width[0]?>, explicitClose:'...close'});
|
||||
$("#s3").dropdownchecklist({firstItemChecksAll:true, emptyText:'_(select)_...', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
|
||||
<?endif;?>
|
||||
}
|
||||
}
|
||||
@@ -295,11 +319,11 @@ function setDiskList(cache) {
|
||||
function setMoverAction(cache) {
|
||||
var textAction;
|
||||
switch (cache) {
|
||||
case 'yes': textAction = 'Mover transfers files from cache to array'; break;
|
||||
case 'prefer': textAction = 'Mover transfers files from array to cache'; break;
|
||||
default: textAction = 'Mover takes no action'; break;
|
||||
case 'yes': textAction = '_(Mover transfers files from cache to array)_'; break;
|
||||
case 'prefer': textAction = '_(Mover transfers files from array to cache)_'; break;
|
||||
default: textAction = '_(Mover takes no action)_'; break;
|
||||
}
|
||||
document.getElementById("moverAction").innerHTML=textAction;
|
||||
document.getElementById('moverAction').innerHTML=textAction;
|
||||
}
|
||||
function presetSpace(shareFloor) {
|
||||
var unit = ['KB','MB','GB','TB','PB'];
|
||||
@@ -314,15 +338,15 @@ function prepareEdit(form) {
|
||||
// Test share name validity
|
||||
var share = form.shareName.value.trim();
|
||||
if (share.length==0) {
|
||||
swal('Missing share name', 'Enter a name for the share', 'error');
|
||||
swal('_(Missing share name)_', '_(Enter a name for the share)_', 'error');
|
||||
return false;
|
||||
}
|
||||
if (share.match('^(disk[0-9]+|cache[0-9]*|flash)$')) {
|
||||
swal('Invalid share name', 'Do not use reserved names', 'error');
|
||||
swal('_(Invalid share name)_', '_(Do not use reserved names)_', 'error');
|
||||
return false;
|
||||
}
|
||||
if (share.match('[:\\\/*<>|"]')) {
|
||||
swal('Invalid Characters', 'You cannot use the following within share names : \\ / * < > | "','error');
|
||||
swal('_(Invalid Characters)_', '_(You cannot use the following within share names)_ : \\ / * < > | "','error');
|
||||
return false;
|
||||
}
|
||||
form.shareName.value = share;
|
||||
|
||||
@@ -4,8 +4,8 @@ Tag="user-circle"
|
||||
Cond="$var['fsState']!='Stopped' && $var['shareUser']=='e'"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2019, Lime Technology
|
||||
* Copyright 2012-2019, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -34,18 +34,19 @@ $(function() {
|
||||
</script>
|
||||
|
||||
<table class="share_status share">
|
||||
<thead><tr><td style="width:15%">Name</td><td style="width:33%">Comment</td><td>SMB</td><td>NFS</td><td>AFP</td><td style="width:8%">Cache</td><td style="width:8%">Size</td><td style="width:8%">Free</td><td style="width:4%">View</td></tr></thead>
|
||||
<thead><tr><td style="width:15%">_(Name)_</td><td style="width:33%">_(Comment)_</td><td>_(SMB)_</td><td>_(NFS)_</td><td>_(AFP)_</td><td style="width:8%">_(Cache)_</td><td style="width:8%">_(Size)_</td><td style="width:8%">_(Free)_</td><td style="width:4%">_(View)_</td></tr></thead>
|
||||
<tbody id="shareslist"></tbody>
|
||||
</table>
|
||||
<p><form name="share_form" method="POST" action="<?=htmlspecialchars($path)?>/Share?name=">
|
||||
<input id="compute-shares" type="button" value="Compute All" onclick="$(this).prop('disabled',true);displayShares('yes')">
|
||||
<input id="compute-shares" type="button" value="_(Compute All)_" onclick="$(this).prop('disabled',true);displayShares('yes')">
|
||||
<?if ($var['startMode']=='Normal'):?>
|
||||
<input type="submit" value="Add Share"<?=$var['shareUser']=='e'?'>':' disabled>User shares must be <strong>enabled</strong> to add shares.'?>
|
||||
<input type="submit" value="_(Add Share)_"<?=$var['shareUser']=='e'?'>':' disabled>User shares must be <strong>enabled</strong> to add shares.'?>
|
||||
<?else:?>
|
||||
<input type="submit" value="Add Share" disabled>
|
||||
<input type="submit" value="_(Add Share)_" disabled>
|
||||
<?endif;?>
|
||||
</form></p>
|
||||
|
||||
:help1
|
||||
> **Colored Status Indicator** -- the significance of the color indicator at the beginning of each line in *User Shares* is as follows:
|
||||
>
|
||||
> <i class='fa fa-circle orb green-orb'></i>All files are on protected storage.
|
||||
@@ -64,3 +65,4 @@ $(function() {
|
||||
> + SMB security mode displayed in *italics* indicates exported hidden user shares.
|
||||
> + AFP security mode displayed in *italics* indicates exported time-machine user shares.
|
||||
> + NFS does not have special modes for user shares.
|
||||
:end
|
||||
|
||||
@@ -5,8 +5,8 @@ Icon="icon-share"
|
||||
Tag="share-alt"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -23,8 +23,8 @@ $width = [166,300];
|
||||
?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#s1').dropdownchecklist({emptyText:'All', width:<?=$width[0]?>, explicitClose:'...close'});
|
||||
$('#s2').dropdownchecklist({emptyText:'None', width:<?=$width[0]?>, explicitClose:'...close'});
|
||||
$('#s1').dropdownchecklist({emptyText:'_(All)_', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
|
||||
$('#s2').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
|
||||
presetShare(document.share_settings);
|
||||
});
|
||||
// Simulate the original input field
|
||||
@@ -63,80 +63,90 @@ function presetShare(form,shares) {
|
||||
</script>
|
||||
<form markdown="1" name="share_settings" method="POST" action="/update.htm" target="progressFrame" onsubmit="prepareShare(this)">
|
||||
|
||||
Enable disk shares:
|
||||
: <select name="shareDisk" size="1" <?=$disabled?>>
|
||||
<?=mk_option($var['shareDisk'], "no", "No")?>
|
||||
<?=mk_option($var['shareDisk'], "yes", "Yes")?>
|
||||
<?=mk_option($var['shareDisk'], "auto", "Auto")?>
|
||||
_(Enable disk shares)_:
|
||||
: <select name="shareDisk" <?=$disabled?>>
|
||||
<?=mk_option($var['shareDisk'], "no", _('No'))?>
|
||||
<?=mk_option($var['shareDisk'], "yes", _('Yes'))?>
|
||||
<?=mk_option($var['shareDisk'], "auto", _('Auto'))?>
|
||||
</select>
|
||||
|
||||
:help85
|
||||
> If set to No, disk shares are unconditionally not exported.
|
||||
>
|
||||
> If set to Yes, disk shares may be exported. **WARNING:** Do not copy data from a disk share to a user share
|
||||
> unless you *know* what you are doing. This may result in the loss of data and is not supported.
|
||||
>
|
||||
> If set to Auto, only disk shares not participating in User Shares may be exported.
|
||||
:end
|
||||
|
||||
Enable user shares:
|
||||
: <select name="shareUser" size="1" onchange="presetShare(this.form,this.value)" <?=$disabled?>>
|
||||
<?=mk_option($var['shareUser'], "e", "Yes")?>
|
||||
<?=mk_option($var['shareUser'], "-", "No")?>
|
||||
_(Enable user shares)_:
|
||||
: <select name="shareUser" onchange="presetShare(this.form,this.value)" <?=$disabled?>>
|
||||
<?=mk_option($var['shareUser'], "e", _('Yes'))?>
|
||||
<?=mk_option($var['shareUser'], "-", _('No'))?>
|
||||
</select>
|
||||
|
||||
:help86
|
||||
> If set to 'Yes' the User Shares feature is activated.
|
||||
:end
|
||||
|
||||
Included disk(s):
|
||||
: <select id="s1" name="shareUserInclude" size="1" multiple="multiple" style="display:none">
|
||||
_(Included disk(s))_:
|
||||
: <select id="s1" name="shareUserInclude" multiple="multiple" style="display:none">
|
||||
<?foreach ($disks as $disk):?>
|
||||
<?=mk_option_luks($disk['name'], $var['shareUserInclude'], strstr($disk['fsType'],':',true))?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
|
||||
:help87
|
||||
> This setting defines the set of array disks which are *included* in User Shares.
|
||||
> Unchecking all disks will allow **all** array disks to be included.
|
||||
:end
|
||||
|
||||
Excluded disk(s):
|
||||
: <select id="s2" name="shareUserExclude" size="1" multiple="multiple" style="display:none">
|
||||
_(Excluded disk(s))_:
|
||||
: <select id="s2" name="shareUserExclude" multiple="multiple" style="display:none">
|
||||
<?foreach ($disks as $disk):?>
|
||||
<?=mk_option_luks($disk['name'], $var['shareUserExclude'], strstr($disk['fsType'],':',true))?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
|
||||
:help88
|
||||
> This setting defines the set of array disk which are *excluded* from User Shares.
|
||||
> Uncheck all disks in order to not exclude any disks
|
||||
>
|
||||
> **Note:** Each separate User Share also includes its own set of Included and Excluded
|
||||
> disks which represent a subset of the Included/Excluded disks defined here.
|
||||
:end
|
||||
|
||||
Tunable (support Hard Links):
|
||||
: <select name="fuse_useino" size="1" <?=$disabled?>>
|
||||
<?=mk_option($var['fuse_useino'], "no", "No")?>
|
||||
<?=mk_option($var['fuse_useino'], "yes", "Yes")?>
|
||||
_(Tunable (support Hard Links))_:
|
||||
: <select name="fuse_useino" <?=$disabled?>>
|
||||
<?=mk_option($var['fuse_useino'], "no", _('No'))?>
|
||||
<?=mk_option($var['fuse_useino'], "yes", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help89
|
||||
> If set to Yes then support the link() operation.
|
||||
>
|
||||
> If set to No then hard links are not supported.
|
||||
>
|
||||
> Notes:
|
||||
>
|
||||
> * Setting to Yes may cause problems for older media and dvd/bluray players accessing shares
|
||||
> using NFS.
|
||||
> * No matter how this is set, the **mover** will still properly handle any detected
|
||||
> hard links.
|
||||
> * Setting to Yes may cause problems for older media and dvd/bluray players accessing shares using NFS.
|
||||
> * No matter how this is set, the **mover** will still properly handle any detected hard links.
|
||||
:end
|
||||
|
||||
Tunable (enable Direct IO):
|
||||
: <select name="fuse_directio" size="1" <?=$disabled?>>
|
||||
<?=mk_option($var['fuse_directio'], "auto", "Auto")?>
|
||||
<?=mk_option($var['fuse_directio'], "0", "No")?>
|
||||
<?=mk_option($var['fuse_directio'], "1", "Yes")?>
|
||||
_(Tunable (enable Direct IO))_:
|
||||
: <select name="fuse_directio" <?=$disabled?>>
|
||||
<?=mk_option($var['fuse_directio'], "auto", _('Auto'))?>
|
||||
<?=mk_option($var['fuse_directio'], "0", _('No'))?>
|
||||
<?=mk_option($var['fuse_directio'], "1", _('Yes'))?>
|
||||
</select>
|
||||
|
||||
:help90
|
||||
> **Experimental**: If set to Yes then mount User Share file system with FUSE *direct_io* mount option.
|
||||
> This will increase write performance but might possibly decrease read performance.
|
||||
>
|
||||
> *Auto* selects No.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeShare" value="Apply" disabled><input type="button" value="Done" onclick="done()"><?if ($disabled):?>Array must be <span class="strong big">Stopped</span> to change<?endif;?>
|
||||
: <input type="submit" name="changeShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"><?if ($disabled):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
</form>
|
||||
|
||||
@@ -4,7 +4,7 @@ Code="e92a"
|
||||
----
|
||||
<?PHP
|
||||
if ($var['fsState']=="Stopped") {
|
||||
echo "<p class='notice shift'>Array must be <span class='strong big'>Started</span> to view Shares.</p>";
|
||||
echo "<p class='notice shift'>"._('Array must be **Started** to view Shares').".</p>";
|
||||
return;
|
||||
}
|
||||
if (count($pages)==2) $tabbed = false;
|
||||
|
||||
@@ -3,8 +3,8 @@ Title="SMTP Settings"
|
||||
Tag="envelope"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -25,7 +25,7 @@ var counter,pid;
|
||||
|
||||
$(function() {
|
||||
$('#testbutton').click(function(){
|
||||
$('#testresult').html('Test running:<span class="orange">obtaining <span id="testcounter"></span>...</span>');
|
||||
$('#testresult').html('_(Test running)_:<span class="orange">_(obtaining)_ <span id="testcounter"></span>...</span>');
|
||||
counter = 20;
|
||||
mailtest();
|
||||
$.get('/webGui/include/SMTPtest.php',function(data){clearTimeout(pid); $('#testresult').html(data)});
|
||||
@@ -36,7 +36,7 @@ $(function() {
|
||||
function mailcheck(form) {
|
||||
var email = /^\S+@\S+\.\S+/;
|
||||
if (!email.test(form.root.value)) {
|
||||
swal({title:"Invalid email address",text:"Please enter a valid sending email address",type:"error"});
|
||||
swal({title:"_(Invalid email address)_",text:"_(Please enter a valid sending email address)_",type:"error"});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -73,7 +73,7 @@ function settings(form, data) {
|
||||
<input type="hidden" name="#include" value="/webGui/include/update.ssmtp.php">
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/notify">
|
||||
<input type="hidden" name="#arg[1]" value="smtp-init">
|
||||
Preset service:
|
||||
_(Preset service)_:
|
||||
: <select name="service" size="1" onchange="settings(this.form,this.value)">
|
||||
<?=mk_option($ssmtp['service'], "smtp.gmail.com:465:YES:NO:login", "Gmail")?>
|
||||
<?=mk_option($ssmtp['service'], "smtp.gmail.com:587:YES:YES:login", "Gmail with TLS")?>
|
||||
@@ -100,91 +100,117 @@ Preset service:
|
||||
<?=mk_option($ssmtp['service'], "smtp.mail.com:465:YES:NO:login", "Mail.com")?>
|
||||
<?=mk_option($ssmtp['service'], "smtp.gmx.com:465:YES:NO:login", "GMX.com")?>
|
||||
<?=mk_option($ssmtp['service'], "smtp.zoho.com:465:YES:NO:login", "zoho Mail")?>
|
||||
<?=mk_option($ssmtp['service'], "::NO:NO:none", "Custom")?>
|
||||
<?=mk_option($ssmtp['service'], "::NO:NO:none", _("Custom"))?>
|
||||
</select>
|
||||
|
||||
:help188
|
||||
> Select a preset service to set the basic service settings.
|
||||
:end
|
||||
|
||||
Sending email address:
|
||||
_(Sending email address)_:
|
||||
: <input type="text" name="root" value="<?=htmlspecialchars($ssmtp['root'])?>">
|
||||
|
||||
:help189
|
||||
> Email address of your mail account. This address is used as sender of the notifications.
|
||||
:end
|
||||
|
||||
Email recipients:
|
||||
_(Email recipients)_:
|
||||
: <input type="text" name="RcptTo" value="<?=htmlspecialchars($ssmtp['RcptTo'])?>">
|
||||
|
||||
:help190
|
||||
> Recipients of status and error notifications. Specify one or more email addresses, separate multiple email addresses with a space.
|
||||
:end
|
||||
|
||||
Priority in header:
|
||||
: <select name="SetEmailPriority" size="1">
|
||||
<?=mk_option($ssmtp['SetEmailPriority'], "False", "No")?>
|
||||
<?=mk_option($ssmtp['SetEmailPriority'], "True", "Yes")?>
|
||||
_(Priority in header)_:
|
||||
: <select name="SetEmailPriority">
|
||||
<?=mk_option($ssmtp['SetEmailPriority'], "False", _("No"))?>
|
||||
<?=mk_option($ssmtp['SetEmailPriority'], "True", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help191
|
||||
> Set email header with high importance, when there is a problem with unRaid.
|
||||
:end
|
||||
|
||||
Email subject prefix:
|
||||
_(Email subject prefix)_:
|
||||
: <input type="text" name="Subject" value="<?=htmlspecialchars($ssmtp['Subject'])?>">
|
||||
|
||||
:help192
|
||||
> Set a prefix for easy recognition of Unraid messages.
|
||||
:end
|
||||
|
||||
Mail server:
|
||||
_(Mail server)_:
|
||||
: <input type="text" name="server" value="<?=htmlspecialchars($ssmtp['server'])?>">
|
||||
|
||||
:help193
|
||||
> Specify the name of the email server. Use the preset service selection to have this filled-in automatically.
|
||||
:end
|
||||
|
||||
Mail server port:
|
||||
_(Mail server port)_:
|
||||
: <input type="text" name="port" class="narrow" maxlength="5" value="<?=htmlspecialchars($ssmtp['port'])?>">
|
||||
|
||||
:help194
|
||||
> Specify the port of the email server. Use the preset service selection to have this filled-in automatically.
|
||||
:end
|
||||
|
||||
Use SSL/TLS:
|
||||
: <select name="UseTLS" size="1">
|
||||
<?=mk_option($ssmtp['UseTLS'], "NO", "No")?>
|
||||
<?=mk_option($ssmtp['UseTLS'], "YES", "Yes")?>
|
||||
_(Use SSL/TLS)_:
|
||||
: <select name="UseTLS">
|
||||
<?=mk_option($ssmtp['UseTLS'], "NO", _("No"))?>
|
||||
<?=mk_option($ssmtp['UseTLS'], "YES", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help195
|
||||
> Specifies whether to use SSL/TLS to talk to the SMTP server.
|
||||
:end
|
||||
|
||||
Use STARTTLS:
|
||||
: <select name="UseSTARTTLS" size="1">
|
||||
<?=mk_option($ssmtp['UseSTARTTLS'], "NO", "No")?>
|
||||
<?=mk_option($ssmtp['UseSTARTTLS'], "YES", "Yes")?>
|
||||
_(Use STARTTLS)_:
|
||||
: <select name="UseSTARTTLS">
|
||||
<?=mk_option($ssmtp['UseSTARTTLS'], "NO", _("No"))?>
|
||||
<?=mk_option($ssmtp['UseSTARTTLS'], "YES", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help196
|
||||
> Specifies whether to use STARTTLS before starting SSL negotiation - See RFC 2487.
|
||||
:end
|
||||
|
||||
Define a TLS certificate:
|
||||
: <select name="UseTLSCert" size="1" onchange="tls(this.form)">
|
||||
<?=mk_option($ssmtp['UseTLSCert'], "NO", "No")?>
|
||||
<?=mk_option($ssmtp['UseTLSCert'], "YES", "Yes")?>
|
||||
_(Define a TLS certificate)_:
|
||||
: <select name="UseTLSCert" onchange="tls(this.form)">
|
||||
<?=mk_option($ssmtp['UseTLSCert'], "NO", _("No"))?>
|
||||
<?=mk_option($ssmtp['UseTLSCert'], "YES", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help197
|
||||
> Select only when you have a certificate which required for communication.
|
||||
:end
|
||||
|
||||
TLS certificate location:
|
||||
_(TLS certificate location)_:
|
||||
: <input type="text" name="TLSCert" value="<?=htmlspecialchars($ssmtp['TLSCert'])?>">
|
||||
|
||||
:help198
|
||||
> The file name of an RSA certificate to use for TLS - as required.
|
||||
:end
|
||||
|
||||
Authentication method:
|
||||
: <select name="AuthMethod" size="1" onchange="pwd(this.form)">
|
||||
<?=mk_option($ssmtp['AuthMethod'], "none", "None")?>
|
||||
<?=mk_option($ssmtp['AuthMethod'], "cram-md5", "CRAM-MD5")?>
|
||||
<?=mk_option($ssmtp['AuthMethod'], "login", "Login")?>
|
||||
_(Authentication method)_:
|
||||
: <select name="AuthMethod" onchange="pwd(this.form)">
|
||||
<?=mk_option($ssmtp['AuthMethod'], "none", _("None"))?>
|
||||
<?=mk_option($ssmtp['AuthMethod'], "cram-md5", _("CRAM-MD5"))?>
|
||||
<?=mk_option($ssmtp['AuthMethod'], "login", _("Login"))?>
|
||||
</select>
|
||||
|
||||
:help199
|
||||
> Select the correct authentication method for your email server. Use test to verify that access is working properly.
|
||||
:end
|
||||
|
||||
Username:
|
||||
_(Username)_:
|
||||
: <input type="text" name="AuthUser" value="<?=htmlspecialchars($ssmtp['AuthUser'])?>">
|
||||
|
||||
Password:
|
||||
_(Password)_:
|
||||
: <input type="password" name="AuthPass" value="<?=htmlspecialchars($ssmtp['AuthPass'])?>">
|
||||
|
||||
:help200
|
||||
> Enter the username and password to login to your email account. Be aware that the password is stored unencrypted in the email configuration file.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
<span id="testresult"><input type="button" id="testbutton" value="Test"<?if ($incomplete):?> disabled<?endif;?>></span>
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
<span id="testresult"><input type="button" id="testbutton" value="_(Test)_"<?if ($incomplete):?> disabled<?endif;?>></span>
|
||||
</form>
|
||||
|
||||
@@ -3,8 +3,8 @@ Title="Syslinux Configuration"
|
||||
Tag="edit"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2019, Lime Technology
|
||||
* Copyright 2012-2019, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -26,7 +26,7 @@ $default = @file_get_contents("$file-") ?: $current;
|
||||
$current = preg_replace(["/\r\n/","/\r/","/\n$/"],["\n","\n",""],$current);
|
||||
$default = preg_replace(["/\r\n/","/\r/","/\n$/"],["\n","\n",""],$default);
|
||||
|
||||
$title = 'Global Configuration';
|
||||
$title = _('Global Configuration');
|
||||
$menu = 'menu default';
|
||||
$mark = 'label ';
|
||||
?>
|
||||
@@ -55,8 +55,8 @@ case 'black':
|
||||
</style>
|
||||
<script src="<?autov('/webGui/javascript/jquery.switchbutton.js')?>"></script>
|
||||
<script>
|
||||
const menu = '<?=$menu?>';
|
||||
const title = '<?=$title?>';
|
||||
const menu = '<?=$menu?>';
|
||||
const mark = '<?=$mark?>';
|
||||
|
||||
Array.prototype.indent = function(o) {
|
||||
@@ -102,7 +102,7 @@ function setDefault(form) {
|
||||
var label = (i) ? area.shift():title;
|
||||
var start = (area[0]==menu);
|
||||
var checked = start ? ' checked':'';
|
||||
if (i) label += "<span style='float:right'><input type='radio' id='input-"+i+"' title='Set default boot menu' onchange='changeMenu(this.form,this.id,true)'"+checked+"></span>";
|
||||
if (i) label += "<span style='float:right'><input type='radio' id='input-"+i+"' title='_(Set default boot menu)_' onchange='changeMenu(this.form,this.id,true)'"+checked+"></span>";
|
||||
$('#label-'+i).html(label).prop('class',start ? 'array':'system');
|
||||
if (start) area.shift();
|
||||
$(this).val(area.join('\n')).prop('rows',area.length).trigger('change');
|
||||
@@ -185,8 +185,8 @@ $(function(){
|
||||
}
|
||||
$('.advancedview').switchButton({
|
||||
labels_placement: 'left',
|
||||
off_label: 'Menu View',
|
||||
on_label: 'Raw View',
|
||||
off_label: '_(Menu View)_',
|
||||
on_label: '_(Raw View)_',
|
||||
checked: $.cookie('syslinux_viewmode')=='advanced'
|
||||
});
|
||||
$('.advancedview').change(function() {
|
||||
@@ -198,8 +198,10 @@ $(function(){
|
||||
</script>
|
||||
<span class="status" style="margin-top:<?=$top?>px"><input type="checkbox" class="advancedview"></span>
|
||||
|
||||
:help39
|
||||
> Use this page to make changes to your `syslinux.cfg` file.
|
||||
> You will need to reboot your server for these changes to take effect.
|
||||
:end
|
||||
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareMenu(this)">
|
||||
<input type="hidden" name="#include" value="/webGui/include/update.file.php">
|
||||
@@ -208,7 +210,7 @@ $(function(){
|
||||
<input type="hidden" name="#arg[1]" value="">
|
||||
<input type="hidden" name="text" value="">
|
||||
<div markdown="1" class="basic">
|
||||
Syslinux configuration:
|
||||
_(Syslinux configuration)_:
|
||||
: <?$i=0;
|
||||
foreach (array_map('strip',explode($mark,$current)) as $area):
|
||||
$area = explode("\n", $area);
|
||||
@@ -216,30 +218,32 @@ Syslinux configuration:
|
||||
$start = in_array($menu,$area);
|
||||
if ($start) unset($area[array_search($menu,$area)]);
|
||||
?><span id="label-<?=$i?>" class="<?=$start?'array':'system'?>"><?=$label?>
|
||||
<?if ($i):?><span style="float:right"><input type="radio" id="input-<?=$i?>" class="menu" <?=$start?'checked':''?> title="Set default boot menu" onchange="changeMenu(this.form,this.id,true)"></span><?endif;?></span>
|
||||
<?if ($i):?><span style="float:right"><input type="radio" id="input-<?=$i?>" class="menu" <?=$start?'checked':''?> title="_(Set default boot menu)_" onchange="changeMenu(this.form,this.id,true)"></span><?endif;?></span>
|
||||
<textarea class="menu" id="menu-<?=$i++?>" spellcheck="false" cols="80" rows="<?=count($area)?>" maxlength="2048"><?=implode("\n",$area)?></textarea>
|
||||
<?endforeach;?>
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="advanced">
|
||||
Syslinux configuration:
|
||||
_(Syslinux configuration)_:
|
||||
: <textarea class="raw" name="raw" spellcheck="false" cols="80" rows="<?=substr_count($current,"\n")+1?>" maxlength="2048"><?=$current?></textarea>
|
||||
|
||||
</div>
|
||||
Server boot mode:
|
||||
_(Server boot mode)_:
|
||||
: <?=is_dir('/sys/firmware/efi') ? 'UEFI' : 'Legacy'?>
|
||||
|
||||
Permit UEFI boot mode <input type="checkbox" name="boot" <?=is_dir('/boot/EFI')?'checked':''?>>
|
||||
: *Boot system in UEFI mode. Please check your system settings to support UEFI boot mode.*
|
||||
_(Permit UEFI boot mode)_ <input type="checkbox" name="boot" <?=is_dir('/boot/EFI')?'checked':''?>>
|
||||
: *_(Boot system in UEFI mode)_. _(Please check your system settings to support UEFI boot mode)_.*
|
||||
|
||||
<input type="button" value="Default" onclick="setDefault(this.form)">
|
||||
: <input type="submit" value="Apply"><input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Default)_" onclick="setDefault(this.form)">
|
||||
: <input type="submit" value="_(Apply)_"><input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
:help40
|
||||
> Click the **Default** button to initialize the edit box with the
|
||||
> factory-default contents. You still need to click **Apply** in order to
|
||||
>commit the change.
|
||||
>
|
||||
> Click the **Apply** button to commit the current edits. Click **Reset** to
|
||||
> undo any changes you make (before Saving). Click **Done** to exit this page.
|
||||
:end
|
||||
|
||||
</form>
|
||||
|
||||
@@ -40,14 +40,14 @@ function zipfile(){
|
||||
}
|
||||
function cleanUp(file) {
|
||||
if (document.hasFocus()) {
|
||||
$('input[value="Downloading..."]').val('Download').prop('disabled',false);
|
||||
$('input[value="_(Downloading)_..."]').val('_(Download)_').prop('disabled',false);
|
||||
$.post('/webGui/include/Download.php',{cmd:'delete',file:file});
|
||||
} else {
|
||||
setTimeout(function(){cleanUp(file);},2000);
|
||||
}
|
||||
}
|
||||
function syslog(file) {
|
||||
$('input[value="Download"]').val('Downloading...').prop('disabled',true);
|
||||
$('input[value="_(Download)_"]').val('_(Downloading)_...').prop('disabled',true);
|
||||
$.post('/webGui/include/Download.php',{cmd:'save',source:logfile,file:file},function(zip) {
|
||||
location = zip;
|
||||
setTimeout(function(){cleanUp(file);},4000);
|
||||
@@ -98,7 +98,7 @@ function showLog(log,init) {
|
||||
$(function() {
|
||||
showLog(logfile,true);
|
||||
});
|
||||
$('.tabs').append("<span class='status'><?=$select?><span class='lite label'><label>Text<input type='checkbox' class='ctrl' onclick='highlight(!this.checked,\"N\")' checked></label></span><span class='error label'><label>Error<input type='checkbox' onclick='highlight(this.checked,\"E\")' checked></label></span><span class='warn label'><label>Warning<input type='checkbox' onclick='highlight(this.checked,\"W\")' checked></label></span><span class='system label'><label>System<input type='checkbox' onclick='highlight(this.checked,\"S\")' checked></label></span><span class='array label'><label>Array<input type='checkbox' onclick='highlight(this.checked,\"A\")' checked></label></span><span class='login label'><label>Login<input type='checkbox' onclick='highlight(this.checked,\"L\")' checked></label></span><span class='lite label'><input type='checkbox' class='ctrl' onclick='toggle(this.checked)' checked></span></span>");
|
||||
$('.tabs').append("<span class='status'><?=$select?><span class='lite label'><label>_(Text)_<input type='checkbox' class='ctrl' onclick='highlight(!this.checked,\"N\")' checked></label></span><span class='error label'><label>_(Error)_<input type='checkbox' onclick='highlight(this.checked,\"E\")' checked></label></span><span class='warn label'><label>_(Warning)_<input type='checkbox' onclick='highlight(this.checked,\"W\")' checked></label></span><span class='system label'><label>_(System)_<input type='checkbox' onclick='highlight(this.checked,\"S\")' checked></label></span><span class='array label'><label>_(Array)_<input type='checkbox' onclick='highlight(this.checked,\"A\")' checked></label></span><span class='login label'><label>_(Login)_<input type='checkbox' onclick='highlight(this.checked,\"L\")' checked></label></span><span class='lite label'><input type='checkbox' class='ctrl' onclick='toggle(this.checked)' checked></span></span>");
|
||||
</script>
|
||||
<pre class='up'></pre>
|
||||
<input type="button" value="Download" onclick="syslog(zipfile())"><input type="button" value="Refresh" onclick="showLog(logfile)"><input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Download)_" onclick="syslog(zipfile())"><input type="button" value="_(Refresh)_" onclick="showLog(logfile)"><input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
@@ -39,60 +39,68 @@ $(function(){
|
||||
<input type="hidden" name="#file" value="/boot/config/rsyslog.cfg">
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/rsyslog_config">
|
||||
|
||||
Local syslog server:
|
||||
_(Local syslog server)_:
|
||||
: <span class="span"><select name="local_server" onchange="localFolder(this.value,'slow')">
|
||||
<?=mk_option($syslog['local_server'], "", "Disabled")?>
|
||||
<?=mk_option($syslog['local_server'], "1", "Enabled")?>
|
||||
<?=mk_option($syslog['local_server'], "", _("Disabled"))?>
|
||||
<?=mk_option($syslog['local_server'], "1", _("Enabled"))?>
|
||||
</select></span>
|
||||
<select name="server_protocol" class="narrow">
|
||||
<?=mk_option($syslog['server_protocol'], "udp", "UDP")?>
|
||||
<?=mk_option($syslog['server_protocol'], "tcp", "TCP")?>
|
||||
<?=mk_option($syslog['server_protocol'], "both", "Both")?>
|
||||
<?=mk_option($syslog['server_protocol'], "udp", _("UDP"))?>
|
||||
<?=mk_option($syslog['server_protocol'], "tcp", _("TCP"))?>
|
||||
<?=mk_option($syslog['server_protocol'], "both", _("Both"))?>
|
||||
</select>
|
||||
<input type="text" name="server_port" class="trim" value="<?=$syslog['server_port']?>" maxlength="5" placeholder="514">
|
||||
|
||||
:help91
|
||||
> Let the server act as a central syslog server and collect syslog messages from other systems.
|
||||
> The server can listen on UDP, TCP or both with a selectable port number.
|
||||
>
|
||||
> Syslog information is stored per IP address. That is every system gets its own syslog file.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="local_folder" style="display:none">
|
||||
Local syslog folder:
|
||||
_(Local syslog folder)_:
|
||||
: <select name="server_folder">
|
||||
<?=mk_option(0,'','<custom>','disabled')?>
|
||||
<?=mk_option(0,'','<'._('custom').'>','disabled')?>
|
||||
<?foreach ($shares as $share){echo mk_option($syslog['server_folder'], '/mnt/user/'.$share['name'], $share['name']);}?>
|
||||
</select>
|
||||
|
||||
:help92
|
||||
> Select the share folder where the syslogs will be stored.
|
||||
> It is recommended that you use a share located on the cache drive to prevent array disk spinups.
|
||||
:end
|
||||
|
||||
Local syslog rotation:
|
||||
_(Local syslog rotation)_:
|
||||
: <select name="log_rotation" onchange="logOptions(this.value,'slow')">
|
||||
<?=mk_option($syslog['log_rotation'], "", "Disabled")?>
|
||||
<?=mk_option($syslog['log_rotation'], "1", "Enabled")?>
|
||||
<?=mk_option($syslog['log_rotation'], "", _("Disabled"))?>
|
||||
<?=mk_option($syslog['log_rotation'], "1", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
:help93
|
||||
> By default LOG rotation is disabled and will create a single LOG file of unlimited size.
|
||||
>
|
||||
> Enable LOG rotation to limit the size of the LOG file and specify the number of files to keep in the rotation scheme.
|
||||
:end
|
||||
|
||||
<div markdown="1" id="log_options" style="display:none">
|
||||
Local syslog maximum file size:
|
||||
_(Local syslog maximum file size)_:
|
||||
: <select name="log_size">
|
||||
<?=mk_option($syslog['log_size'], '1M', '1 MB')?>
|
||||
<?=mk_option($syslog['log_size'], '2M', '2 MB')?>
|
||||
<?=mk_option($syslog['log_size'], '5M', '5 MB')?>
|
||||
<?=mk_option($syslog['log_size'], '10M', '10 MB')?>
|
||||
<?=mk_option($syslog['log_size'], '20M', '20 MB')?>
|
||||
<?=mk_option($syslog['log_size'], '50M', '50 MB')?>
|
||||
<?=mk_option($syslog['log_size'], '100M', '100 MB')?>
|
||||
<?=mk_option($syslog['log_size'], '200M', '200 MB')?>
|
||||
<?=mk_option($syslog['log_size'], '500M', '500 MB')?>
|
||||
<?=mk_option($syslog['log_size'], '1M', '1 '._('MB'))?>
|
||||
<?=mk_option($syslog['log_size'], '2M', '2 '._('MB'))?>
|
||||
<?=mk_option($syslog['log_size'], '5M', '5 '._('MB'))?>
|
||||
<?=mk_option($syslog['log_size'], '10M', '10 '._('MB'))?>
|
||||
<?=mk_option($syslog['log_size'], '20M', '20 '._('MB'))?>
|
||||
<?=mk_option($syslog['log_size'], '50M', '50 '._('MB'))?>
|
||||
<?=mk_option($syslog['log_size'], '100M', '100 '._('MB'))?>
|
||||
<?=mk_option($syslog['log_size'], '200M', '200 '._('MB'))?>
|
||||
<?=mk_option($syslog['log_size'], '500M', '500 '._('MB'))?>
|
||||
</select>
|
||||
|
||||
:help94
|
||||
> Specifies the maximum LOG size. When exceeded LOG rotation will occur.
|
||||
:end
|
||||
|
||||
Local syslog number of files:
|
||||
_(Local syslog number of files)_:
|
||||
: <select name="log_files">
|
||||
<?=mk_option($syslog['log_files'], '1', '1')?>
|
||||
<?=mk_option($syslog['log_files'], '2', '2')?>
|
||||
@@ -100,33 +108,39 @@ Local syslog number of files:
|
||||
<?=mk_option($syslog['log_files'], '4', '4')?>
|
||||
</select>
|
||||
|
||||
:help95
|
||||
> Specifies the number of additional LOG files to keep in the rotation scheme.
|
||||
:end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Remote syslog server:
|
||||
: <span class="span"><input type="text" name="remote_server" class="narrow" value="<?=$syslog['remote_server']?>" maxlength="23" placeholder="name or ip address"></span>
|
||||
_(Remote syslog server)_:
|
||||
: <span class="span"><input type="text" name="remote_server" class="narrow" value="<?=$syslog['remote_server']?>" maxlength="23" placeholder="_(name or ip address)_"></span>
|
||||
<select name="remote_protocol" class="narrow" size="1">
|
||||
<?=mk_option($syslog['remote_protocol'], "udp", "UDP")?>
|
||||
<?=mk_option($syslog['remote_protocol'], "tcp", "TCP")?>
|
||||
<?=mk_option($syslog['remote_protocol'], "udp", _("UDP"))?>
|
||||
<?=mk_option($syslog['remote_protocol'], "tcp", _("TCP"))?>
|
||||
</select>
|
||||
<input type="text" name="remote_port" class="trim" value="<?=$syslog['remote_port']?>" maxlength="4" placeholder="514">
|
||||
|
||||
:help96
|
||||
> Enter a name or IP address of a remote syslog server.
|
||||
> This will send a copy of the syslog messages to the designated server.
|
||||
:end
|
||||
|
||||
Mirror syslog to flash:
|
||||
_(Mirror syslog to flash)_:
|
||||
: <select name="syslog_flash" size="1">
|
||||
<?=mk_option($syslog['syslog_flash'], "", "No")?>
|
||||
<?=mk_option($syslog['syslog_flash'], "1", "Yes")?>
|
||||
<?=mk_option($syslog['syslog_flash'], "", _("No"))?>
|
||||
<?=mk_option($syslog['syslog_flash'], "1", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:help97
|
||||
> This setting is NO by default and must be used with care to avoid unnecessary wear and tear of the USB device.
|
||||
>
|
||||
> Change this setting to YES when troubleshooting is required and it is not possible to get the regular diagnostics information.
|
||||
> A mirror of the syslog file is stored in the **logs** folder of the flash device.
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
||||
</form>
|
||||
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
@@ -5,8 +5,8 @@ Href="/webterminal/"
|
||||
Code="e93f"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -19,7 +19,7 @@ Code="e93f"
|
||||
<script>
|
||||
function TerminalButton() {
|
||||
if (/MSIE|Edge/.test(navigator.userAgent)) {
|
||||
swal({title:'Unsupported Feature',text:'Sorry, this feature is not supported by MSIE/Edge.<br>Please try a different browser',html:true,type:'error'});
|
||||
swal({title:'_(Unsupported Feature)_',text:'_(Sorry, this feature is not supported by MSIE/Edge)_.<br>_(Please try a different browser)_',html:true,type:'error'});
|
||||
return;
|
||||
}
|
||||
var d = new Date();
|
||||
|
||||
@@ -17,7 +17,7 @@ Tag="user"
|
||||
|
||||
<?
|
||||
$void = "<img src='/webGui/images/user.png' width='48' height='48' onclick='$("#drop").click()' style='cursor:pointer' title='Click to select PNG file'>";
|
||||
$icon = "<i class='fa fa-trash top' title='Restore default image' onclick='restore()'></i>";
|
||||
$icon = "<i class='fa fa-trash top' title='_(Restore default image)_' onclick='restore()'></i>";
|
||||
$zxcvbn = file_exists('/boot/config/plugins/dynamix/zxcvbn.js');
|
||||
?>
|
||||
|
||||
@@ -47,28 +47,27 @@ var filename = '';
|
||||
|
||||
function showPassword() {
|
||||
if ($('#showPass').hasClass('checked')) {
|
||||
$('#showPass').removeClass('checked');
|
||||
$('#showPass').removeClass('checked fa-eye-slash').addClass('fa-eye');
|
||||
var type = 'password';
|
||||
} else {
|
||||
$('#showPass').addClass('checked');
|
||||
$('#showPass').addClass('checked fa-eye-slash').removeClass('fa-eye');
|
||||
var type = 'text';
|
||||
}
|
||||
$('input[name="userPasswordGUI"]').attr('type',type);
|
||||
$('input[name="userPasswordConfGUI"]').attr('type',type);
|
||||
}
|
||||
|
||||
function checkUsername(form) {
|
||||
var username = form.userName.value.trim();
|
||||
if (!username.match('^[a-z_][a-z0-9_-]*[$]?$')) {
|
||||
swal({title:"Invalid user name",text:"Use only lowercase letters, digits, underscores and dashes",type:"error"});
|
||||
swal({title:"_(Invalid user name)_",text:"_(Use only lowercase letters, digits, underscores and dashes)_",type:"error"});
|
||||
return false;
|
||||
}
|
||||
if (username.match('^(disk[0-9]+|cache[0-9]*|parity[0-9]*|flash)$')) {
|
||||
swal({title:"Invalid user name",text:"Do not use reserved names",type:"error"});
|
||||
swal({title:"_(Invalid user name)_",text:"_(Do not use reserved names)_",type:"error"});
|
||||
return false;
|
||||
}
|
||||
if (form.userPasswordGUI.value.length > 128 || form.userPasswordConfGUI.value.length > 128) {
|
||||
swal({title:"Password too long",text:"Use a password up to 128 characters",type:"error"});
|
||||
swal({title:"_(Password too long)_",text:"_(Use a password up to 128 characters)_",type:"error"});
|
||||
return false;
|
||||
}
|
||||
if (filename) {
|
||||
@@ -80,7 +79,6 @@ function checkUsername(form) {
|
||||
form.userPasswordConfGUI.disabled = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
function validatePassword(input) {
|
||||
<?if ($zxcvbn):?>
|
||||
var custom = ['unraid','limetech','lime-technology','bergware','squidly'];
|
||||
@@ -105,13 +103,11 @@ function validatePassword(input) {
|
||||
}
|
||||
<?endif;?>
|
||||
}
|
||||
|
||||
function restore() {
|
||||
// restore original image
|
||||
$('#dropbox').html("<?=$void?>");
|
||||
filename = '';
|
||||
}
|
||||
|
||||
$(function(){
|
||||
var dropbox = $('#dropbox');
|
||||
// attach the drag-n-drop feature to the 'dropbox' element
|
||||
@@ -129,13 +125,13 @@ $(function(){
|
||||
error: function(error, file, i) {
|
||||
switch (error) {
|
||||
case 'BrowserNotSupported':
|
||||
swal({title:"Browser error",text:"Your browser does not support HTML5 file uploads!",type:"error"});
|
||||
swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error"});
|
||||
break;
|
||||
case 'TooManyFiles':
|
||||
swal({title:"Too many files",text:"Please select one file only!",type:"error"});
|
||||
swal({title:"_(Too many files)_",text:"_(Please select one file only)_!",type:"error"});
|
||||
break;
|
||||
case 'FileTooLarge':
|
||||
swal({title:"File too large",text:"Maximum file upload size is 95 kB (97,280 bytes)",type:"error"});
|
||||
swal({title:"_(File too large)_",text:"_(Maximum file upload size is 95 kB)_ (97,280 _(bytes)_)",type:"error"});
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -153,7 +149,7 @@ $(function(){
|
||||
$('input[name="userDesc"]').trigger('change');
|
||||
filename = file.name;
|
||||
} else {
|
||||
swal({title:"Upload error",text:response,type:"error"});
|
||||
swal({title:"_(Upload error)_",text:response,type:"error"});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -166,33 +162,41 @@ $(function(){
|
||||
</script>
|
||||
|
||||
<form markdown="1" name="user_edit" method="POST" action="/update.htm" target="progressFrame" onsubmit="return checkUsername(this)">
|
||||
User name:
|
||||
_(User name)_:
|
||||
: <input type="text" name="userName" maxlength="32" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userName.value=='')" pattern="^[a-z_][a-z0-9_-]*[$]?$">
|
||||
|
||||
:help1
|
||||
> Usernames may be up to 32 characters long and must start with a **lower case letter** or an underscore,
|
||||
> followed by **lower case letters**, digits, underscores, or dashes. They can end with a dollar sign.
|
||||
:end
|
||||
|
||||
Description:
|
||||
_(Description)_:
|
||||
: <input type="text" name="userDesc" maxlength="64" pattern='[^&:"]*'>
|
||||
|
||||
:help2
|
||||
> Up to 64 characters. The characters ampersand (&) quote (") and colon (:) are not allowed.
|
||||
:end
|
||||
|
||||
Custom image:
|
||||
: <span id="dropbox"><?=$void?></span><em>Drag-n-drop a PNG file or click the image at the left.</em><input type="file" id="drop" accept=".png" style="display:none">
|
||||
_(Custom image)_:
|
||||
: <span id="dropbox"><?=$void?></span><em>_(Drag-n-drop a PNG file or click the image at the left)_</em><input type="file" id="drop" accept=".png" style="display:none">
|
||||
|
||||
:help3
|
||||
> The image will be scaled to 48x48 pixels in size. The maximum image file upload size is 95 kB (97,280 bytes).
|
||||
:end
|
||||
|
||||
Password:
|
||||
_(Password)_:
|
||||
<input type="hidden" name="userPassword" value="">
|
||||
: <input type="password" name="userPasswordGUI" maxlength="129" onKeyUp="validatePassword(this.value);this.form.cmdUserEdit.disabled=(this.form.userName.value=='' || this.form.userPasswordGUI.value!=this.form.userPasswordConfGUI.value)">
|
||||
<i id="showPass" class="fa fa-eye" style="cursor:pointer" title="Show / Hide password" onclick="showPassword()"></i><span><span class="usage-disk sys none"><span id="strength-bar" style="width:0"></span><span></span></span><span id="strength-text"></span></span>
|
||||
<i id="showPass" class="fa fa-eye" style="cursor:pointer" title="_(Show / Hide password)_" onclick="showPassword()"></i><span><span class="usage-disk sys none"><span id="strength-bar" style="width:0"></span><span></span></span><span id="strength-text"></span></span>
|
||||
|
||||
:help4
|
||||
> Up to 128 characters.
|
||||
:end
|
||||
|
||||
Retype password:
|
||||
_(Retype password)_:
|
||||
<input type="hidden" name="userPasswordConf" value="">
|
||||
: <input type="password" name="userPasswordConfGUI" maxlength="129" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userName.value=='' || this.form.userPasswordGUI.value!=this.form.userPasswordConfGUI.value)">
|
||||
|
||||
|
||||
: <input type="submit" name="cmdUserEdit" value="Add" disabled><input type="button" value="Done" onclick="done('UserAdd')">
|
||||
: <input type="submit" name="cmdUserEdit" value="_(Add)_" onclick="this.value='Add'" disabled><input type="button" value="_(Done)_" onclick="done('UserAdd')">
|
||||
</form>
|
||||
|
||||
@@ -24,7 +24,7 @@ Tag="user"
|
||||
<?
|
||||
$user = "/boot/config/plugins/dynamix/users/$name.png";
|
||||
$void = "<img src='/webGui/images/user.png' width='48' height='48' id='image' onclick='$("#drop").click()' style='cursor:pointer' title='Click to select PNG file'>";
|
||||
$icon = "<i class='fa fa-trash top' title='Restore default image' onclick='restore()'></i>";
|
||||
$icon = "<i class='fa fa-trash top' title='_(Restore default image)_' onclick='restore()'></i>";
|
||||
$zxcvbn = file_exists('/boot/config/plugins/dynamix/zxcvbn.js');
|
||||
?>
|
||||
|
||||
@@ -54,16 +54,15 @@ var filename = '';
|
||||
|
||||
function showPassword() {
|
||||
if ($('#showPass').hasClass('checked')) {
|
||||
$('#showPass').removeClass('checked');
|
||||
$('#showPass').removeClass('checked fa-eye-slash').addClass('fa-eye');
|
||||
var type = 'password';
|
||||
} else {
|
||||
$('#showPass').addClass('checked');
|
||||
$('#showPass').addClass('checked fa-eye-slash').removeClass('fa-eye');
|
||||
var type = 'text';
|
||||
}
|
||||
$('input[name="userPasswordGUI"]').attr('type',type);
|
||||
$('input[name="userPasswordConfGUI"]').attr('type',type);
|
||||
}
|
||||
|
||||
function checkPassword(form) {
|
||||
if (form.userPasswordGUI.value.length > 128 || form.userPasswordConfGUI.value.length > 128) {
|
||||
swal({title:"Password too long",text:"Use a password up to 128 characters",type:"error"});
|
||||
@@ -75,7 +74,6 @@ function checkPassword(form) {
|
||||
form.userPasswordConfGUI.disabled = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
function validatePassword(input) {
|
||||
<?if ($zxcvbn):?>
|
||||
var custom = ['unraid','limetech','lime-technology','bergware','squidly'];
|
||||
@@ -100,14 +98,12 @@ function validatePassword(input) {
|
||||
}
|
||||
<?endif;?>
|
||||
}
|
||||
|
||||
function restore() {
|
||||
// restore original image and activate APPLY button
|
||||
$('#dropbox').html("<?=$void?>");
|
||||
$('input[name="userDesc"]').trigger('change');
|
||||
filename = 'reset';
|
||||
}
|
||||
|
||||
function upload(remove) {
|
||||
// save or delete upload when APPLY is pressed
|
||||
if (remove || filename=='reset') {
|
||||
@@ -116,7 +112,6 @@ function upload(remove) {
|
||||
$.post("/webGui/include/FileUpload.php",{cmd:'save',path:path,filename:filename,output:'<?=addslashes(htmlspecialchars($name))?>.png'});
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
var dropbox = $('#dropbox');
|
||||
// attach the drag-n-drop feature to the 'dropbox' element
|
||||
@@ -134,13 +129,13 @@ $(function(){
|
||||
error: function(error, file, i) {
|
||||
switch (error) {
|
||||
case 'BrowserNotSupported':
|
||||
swal({title:"Browser error",text:"Your browser does not support HTML5 file uploads!",type:"error"});
|
||||
swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error"});
|
||||
break;
|
||||
case 'TooManyFiles':
|
||||
swal({title:"Too many files",text:"Please select one file only!",type:"error"});
|
||||
swal({title:"_(Too many files)_",text:"_(Please select one file only)_!",type:"error"});
|
||||
break;
|
||||
case 'FileTooLarge':
|
||||
swal({title:"File too large",text:"Maximum file upload size is 512 kB (524,288 bytes)",type:"error"});
|
||||
swal({title:"_(File too large)_",text:"_(Maximum file upload size is 512 kB (524,288 bytes))_",type:"error"});
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -158,7 +153,7 @@ $(function(){
|
||||
$('input[name="userDesc"]').trigger('change');
|
||||
filename = file.name;
|
||||
} else {
|
||||
swal({title:"Upload error",text:response,type:"error"});
|
||||
swal({title:"_(Upload error)_",text:response,type:"error"});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -172,48 +167,54 @@ $(function(){
|
||||
<div class="spinner fixed"></div>
|
||||
<form markdown="1" method="POST" action="/update.htm" target="progressFrame" onsubmit="upload(<?=$name=="root" ? 'false' : 'this.confirmDelete.checked'?>)">
|
||||
<input type="hidden" name="userName" value="<?=htmlspecialchars($name)?>">
|
||||
User name:
|
||||
_(User name)_:
|
||||
: <?=htmlspecialchars($name)?>
|
||||
|
||||
Description:
|
||||
_(Description)_:
|
||||
: <input type="text" name="userDesc" maxlength="64" value="<?=htmlspecialchars($users[$name]['desc'])?>" pattern='[^&:"]*'>
|
||||
|
||||
:help5
|
||||
> Up to 64 characters. The characters ampersand (&) quote (") and colon (:) are not allowed.
|
||||
:end
|
||||
|
||||
Custom image:
|
||||
_(Custom image)_:
|
||||
: <span id="dropbox">
|
||||
<?if (file_exists($user)):?>
|
||||
<img src="<?=autov($user)?>" id="image" width="48" height="48" onclick="$('#drop').click()" style="cursor:pointer" title="Click to select PNG file"><?=$icon?>
|
||||
<?else:?>
|
||||
<?=$void?>
|
||||
<?endif;?>
|
||||
</span><em>Drag-n-drop a PNG file or click the image at the left.</em><input type="file" id="drop" accept=".png" style="display:none">
|
||||
</span><em>_(Drag-n-drop a PNG file or click the image at the left)_</em><input type="file" id="drop" accept=".png" style="display:none">
|
||||
|
||||
:help6
|
||||
> The image will be scaled to 48x48 pixels in size. The maximum image file upload size is 512 kB (524,288 bytes).
|
||||
:end
|
||||
|
||||
<?if ($name=="root"):?>
|
||||
|
||||
<?else:?>
|
||||
Delete<input type="checkbox" name="confirmDelete" onChange="chkDelete(this.form, this.form.cmdUserEdit)">
|
||||
_(Delete)_<input type="checkbox" name="confirmDelete" onChange="chkDelete(this.form, this.form.cmdUserEdit)">
|
||||
<?endif;?>
|
||||
: <input type="submit" name="cmdUserEdit" value="Apply" disabled><input type="button" value="Done" onclick="done('UserEdit')">
|
||||
: <input type="submit" name="cmdUserEdit" value="_(Apply)_" onclick="if (this.value=='_(Delete)_')this.value='Delete'" disabled><input type="button" value="_(Done)_" onclick="done('UserEdit')">
|
||||
</form>
|
||||
<br><br>
|
||||
<form markdown="1" method="POST" action="/update.htm" target="progressFrame" onsubmit="return checkPassword(this)">
|
||||
<input type="hidden" name="userName" value="<?=htmlspecialchars($name)?>">
|
||||
Password:
|
||||
_(Password)_:
|
||||
<input type="hidden" name="userPassword" value="">
|
||||
: <input type="password" name="userPasswordGUI" maxlength="129" onKeyUp="validatePassword(this.value);this.form.cmdUserEdit.disabled=(this.form.userPasswordGUI.value != this.form.userPasswordConfGUI.value);">
|
||||
<i id="showPass" class="fa fa-eye" style="cursor:pointer" title="Show / Hide password" onclick="showPassword()"></i><span><span class="usage-disk sys none"><span id="strength-bar" style="width:0"></span><span></span></span><span id="strength-text"></span></span>
|
||||
<i id="showPass" class="fa fa-eye" style="cursor:pointer" title="_(Show / Hide password)_" onclick="showPassword()"></i><span><span class="usage-disk sys none"><span id="strength-bar" style="width:0"></span><span></span></span><span id="strength-text"></span></span>
|
||||
|
||||
:help7
|
||||
> Up to 128 characters.
|
||||
:end
|
||||
|
||||
Retype password:
|
||||
_(Retype password)_:
|
||||
<input type="hidden" name="userPasswordConf" value="">
|
||||
: <input type="password" name="userPasswordConfGUI" maxlength="129" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userPasswordGUI.value != this.form.userPasswordConfGUI.value);">
|
||||
|
||||
|
||||
: <input type="submit" name="cmdUserEdit" value="Change" disabled><input type="button" value="Done" onclick="done('UserEdit')">
|
||||
: <input type="submit" name="cmdUserEdit" value="_(Change)_" onclick="this.value='Change'" disabled><input type="button" value="_(Done)_" onclick="done('UserEdit')">
|
||||
</form>
|
||||
|
||||
<?if ($name != 'root' && $var['shareSMBEnabled'] != 'no'):?>
|
||||
@@ -286,7 +287,7 @@ function updateAccess(form,data,n,i) {
|
||||
<form markdown="1" method="POST">
|
||||
<?
|
||||
echo "<table class='share_status' style='margin-top:20px'>";
|
||||
echo "<thead><tr><td>Share</td><td>Security</td><td>User Access</td></tr></thead>";
|
||||
echo "<thead><tr><td>"._('Share')."</td><td>"._('Security')."</td><td>"._('User Access')."</td></tr></thead>";
|
||||
echo "<tbody>";
|
||||
foreach ($shares as $share => $data) {
|
||||
if ($sec[$share]['export']=='-') continue;
|
||||
@@ -297,10 +298,10 @@ foreach ($shares as $share => $data) {
|
||||
case 'public' : $access = $rw; break;
|
||||
case 'secure' : $access = $write ? $rw : $ro; break;
|
||||
case 'private': $access = $write ? $rw : ($read ? $ro : $no); break;}
|
||||
echo "<tr><td>$share</td><td>$security</td><td><select onchange='$(this).prop(\"id\",\"".rawurlencode($share)."\")'>";
|
||||
echo mk_option($access,$rw,'Read/Write');
|
||||
if ($security!='public') echo mk_option($access,$ro,'Read-only');
|
||||
if ($security=='private') echo mk_option($access,$no,'No Access');
|
||||
echo "<tr><td>$share</td><td>"._(ucfirst($security))."</td><td><select onchange='$(this).prop(\"id\",\"".rawurlencode($share)."\")'>";
|
||||
echo mk_option($access,$rw,_('Read/Write'));
|
||||
if ($security!='public') echo mk_option($access,$ro,_('Read-only'));
|
||||
if ($security=='private') echo mk_option($access,$no,_('No Access'));
|
||||
echo "</select></td></tr>";
|
||||
}
|
||||
echo "</tbody>";
|
||||
@@ -308,6 +309,6 @@ echo "</table>";
|
||||
?>
|
||||
|
||||
|
||||
: <input type="button" value="Apply" onclick="updateAccess(this.form)" disabled><input type="button" value="Done" onclick="done('UserEdit')">
|
||||
: <input type="button" value="_(Apply)_" onclick="updateAccess(this.form)" disabled><input type="button" value="_(Done)_" onclick="done('UserEdit')">
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
@@ -3,8 +3,8 @@ Title="Users"
|
||||
Tag="users"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -25,5 +25,5 @@ ksort($users);
|
||||
<?endforeach;?>
|
||||
<div style='clear:both'></div>
|
||||
<form method="POST" action="<?=$path?>/UserAdd">
|
||||
<input type="submit" value="Add User"><?if ($submenu):?><input type="button" value="Done" onclick="done()"><?endif;?>
|
||||
<input type="submit" value="_(Add User)_"><?if ($submenu):?><input type="button" value="_(Done)_" onclick="done()"><?endif;?>
|
||||
</form>
|
||||
|
||||
@@ -4,8 +4,8 @@ Icon="icon-vars"
|
||||
Tag="code"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2012-2018, Bergware International.
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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,
|
||||
@@ -36,4 +36,4 @@ ksort($GLOBALS);
|
||||
if (isset($GLOBALS['_SERVER']['PHP_AUTH_PW'])) $GLOBALS['_SERVER']['PHP_AUTH_PW'] = "***";
|
||||
echo ($display['resize'] ? "<pre class='up' style='display:none'>" : "<pre class='up'>").htmlspecialchars(print_r($GLOBALS,true))."</pre>";
|
||||
?>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
@@ -24,6 +24,7 @@ critical="90"
|
||||
hot="45"
|
||||
max="55"
|
||||
theme="white"
|
||||
locale=""
|
||||
[parity]
|
||||
mode="0"
|
||||
hour="0 0"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user