mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 09:39:58 -06:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -44,7 +44,10 @@ $(function() {
|
||||
<tbody id="ups_summary"><tr class="ups"><td colspan="7"> </td></tr></tbody>
|
||||
</table>
|
||||
|
||||
<span style="float:right;margin-right:10px"><a href="https://linux.die.net/man/8/apcupsd" target="_blank" title="_(APC UPS Daemon user manual)_"><i class="fa fa-file-text-o"></i> <u>_(Online Manual)_</u></a></span>
|
||||
|
||||
|
||||
: <span><a href="https://linux.die.net/man/8/apcupsd" target="_blank" title="_(APC UPS Daemon user manual)_"><i class="fa fa-file-text-o"></i> <u>_(Online Manual)_</u></a></span>
|
||||
|
||||
<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">
|
||||
@@ -122,5 +125,8 @@ _(Turn off UPS after shutdown)_:
|
||||
:apc_killups_help:
|
||||
|
||||
<input type="submit" name="#default" value="_(Default)_">
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="#apply" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -28,10 +28,25 @@ $cpus = cpu_list();
|
||||
?>
|
||||
<link type="text/css" rel="stylesheet" href="<?autov('/webGui/styles/jquery.switchbutton.css')?>">
|
||||
|
||||
<table id="docker_containers" class="tablesorter shift">
|
||||
<thead><tr><th><a id="resetsort" class="nohand" onclick="resetSorting()" title="_(Reset sorting)_"><i class="fa fa-th-list"></i></a>_(Application)_</th><th>_(Version)_</th><th>_(Network)_</th><th>_(Container IP)_</th><th>_(Container Port)_</th><th>_(LAN IP:Port)_</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">_(Uptime)_</th></tr></thead>
|
||||
<tbody id="docker_list"><tr><td colspan='9'></td></tr></tbody>
|
||||
</table>
|
||||
<div class="TableContainer--widest">
|
||||
<table id="docker_containers" class="tablesorter shift">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><a id="resetsort" class="nohand" onclick="resetSorting()" title="_(Reset sorting)_"><i class="fa fa-th-list"></i></a>_(Application)_</th>
|
||||
<th>_(Version)_</th>
|
||||
<th>_(Network)_</th>
|
||||
<th>_(Container IP)_</th>
|
||||
<th>_(Container Port)_</th>
|
||||
<th>_(LAN IP:Port)_</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">_(Uptime)_</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="docker_list"><tr><td colspan='9'></td></tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<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">
|
||||
|
||||
@@ -130,7 +130,9 @@ $no_dockercfg = !is_file('/boot/config/docker.cfg');
|
||||
?>
|
||||
<link type="text/css" rel="stylesheet" href="<?autov('/webGui/styles/jquery.filetree.css')?>">
|
||||
<link type="text/css" rel="stylesheet" href="<?autov('/webGui/styles/jquery.switchbutton.css')?>">
|
||||
<span class="status vhshift"><input type="checkbox" class="advancedview"></span>
|
||||
|
||||
|
||||
: <span><input type="checkbox" class="advancedview"></span>
|
||||
|
||||
<form markdown="1" id="settingsForm" name="settingsForm" method="POST" action="/update.php" target="progressFrame" onsubmit="return prepareDocker(this)">
|
||||
<input type="hidden" name="#file" value="<?=$docker_cfgfile?>">
|
||||
@@ -183,7 +185,11 @@ _(Docker data-root)_:
|
||||
|
||||
<div markdown="1" id="vdisk_file" style="display:none">
|
||||
_(Docker vDisk size)_:
|
||||
: <input id="DOCKER_IMAGE_SIZE" type="number" name="DOCKER_IMAGE_SIZE" value="<?=htmlspecialchars(_var($dockercfg,'DOCKER_IMAGE_SIZE'))?>" class="narrow" required>GB<span id="SIZE_ERROR" class="errortext"></span>
|
||||
: <span>
|
||||
<input id="DOCKER_IMAGE_SIZE" type="number" name="DOCKER_IMAGE_SIZE" value="<?=htmlspecialchars(_var($dockercfg,'DOCKER_IMAGE_SIZE'))?>" class="narrow" required>
|
||||
<span>GB</span>
|
||||
<span id="SIZE_ERROR" class="errortext"></span>
|
||||
</span>
|
||||
|
||||
:docker_vdisk_size_help:
|
||||
|
||||
@@ -530,7 +536,7 @@ $hide_wlan = hide_wlan($network);
|
||||
_(IPv4 custom network on interface)_ <?=$network?>:
|
||||
: <span class="<?=$gw4class?>">**_(Subnet)_:** <?=$route?></span>
|
||||
<span class="<?=$gw4class?>">**_(Gateway)_:** <?=$gateway[$network]?></span>
|
||||
**_(DHCP pool)_:** <?=_var($dockercfg,$docker_dhcp) ?: "_(not set)_"?><?if (isset($dockercfg[$docker_dhcp])):?> (<?=pow(2,32-my_explode('/',$dockercfg[$docker_dhcp])[1])?> _(hosts)_)<?endif;?>
|
||||
<span>**_(DHCP pool)_:** <?=_var($dockercfg,$docker_dhcp) ?: "_(not set)_"?><?if (isset($dockercfg[$docker_dhcp])):?> (<?=pow(2,32-my_explode('/',$dockercfg[$docker_dhcp])[1])?> _(hosts)_)<?endif;?></span>
|
||||
|
||||
<?if ($hide_wlan):?>
|
||||
</div>
|
||||
@@ -635,7 +641,10 @@ _(IPv6 custom network on interface)_ <?=$network?>:
|
||||
<?endif;?>
|
||||
|
||||
|
||||
: <input id="applyBtn" type="button" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input id="applyBtn" type="button" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<form id="removeForm" method="POST" action="/update.php" target="progressFrame">
|
||||
@@ -659,7 +668,10 @@ _(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>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Scrub)_">
|
||||
<label><input type="checkbox" name="#arg[3]" value=""> _(Correct file system errors)_</label>
|
||||
</span>
|
||||
|
||||
:docker_scrub_help:
|
||||
|
||||
@@ -668,7 +680,9 @@ _(btrfs scrub status)_:
|
||||
<input type="hidden" name="#arg[1]" value="cancel">
|
||||
<input type="hidden" name="#arg[2]" value="/var/lib/docker">
|
||||
|
||||
: <input type="submit" value="_(Cancel)_">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Cancel)_">
|
||||
</span>
|
||||
|
||||
:docker_cancel_help:
|
||||
|
||||
|
||||
@@ -863,11 +863,11 @@ function prepareCategory() {
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var ctrl = "<span class='status <?=$tabbed?'':'vhshift'?>'><input type='checkbox' class='advancedview'></span>";
|
||||
var ctrl = "<span class='status'><input type='checkbox' class='advancedview'></span>";
|
||||
<?if ($tabbed):?>
|
||||
$('.tabs').append(ctrl);
|
||||
<?else:?>
|
||||
$('div[class=title]').append(ctrl);
|
||||
$('div[class=title] .right').append(ctrl);
|
||||
<?endif;?>
|
||||
$('.advancedview').switchButton({labels_placement:'left', on_label: "_(Advanced View)_", off_label: "_(Basic View)_"});
|
||||
$('.advancedview').change(function() {
|
||||
@@ -1427,8 +1427,11 @@ _(Privileged)_:
|
||||
: <a href="javascript:addConfigPopup()"><i class="fa fa-fw fa-plus"></i> _(Add another Path, Port, Variable, Label or Device)_</a>
|
||||
|
||||
|
||||
: <input type="submit" value="<?=$xmlType=='edit' ? "_(Apply)_" : " _(Apply)_ "?>"><input type="button" value="_(Done)_" onclick="done()">
|
||||
<?if ($authoringMode):?><button type="submit" name="dryRun" value="true" onclick="$('*[required]').prop('required', null);">_(Save)_</button><?endif;?>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="<?=$xmlType=='edit' ? "_(Apply)_" : " _(Apply)_ "?>">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
<?if ($authoringMode):?><button type="submit" name="dryRun" value="true" onclick="$('*[required]').prop('required', null);">_(Save)_</button><?endif;?>
|
||||
</span>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@ var eventURL = '/plugins/dynamix.docker.manager/include/Events.php';
|
||||
|
||||
function addDockerContainerContext(container, image, template, started, paused, update, autostart, webui, tswebui, shell, id, Support, Project, Registry, donateLink, ReadMe) {
|
||||
var opts = [];
|
||||
context.settings({right:false,above:'auto'});
|
||||
context.settings({right:false,above:false});
|
||||
if (started && !paused) {
|
||||
if (webui !== '' && webui != '#') opts.push({text:_('WebUI'), icon:'fa-globe', action:function(e){e.preventDefault();window.open(webui,'_blank');}});
|
||||
if (tswebui !== '' && tswebui != '#') opts.push({text:_('Tailscale WebUI'), icon:'fa-globe', action:function(e){e.preventDefault();window.open(tswebui,'_blank');}});
|
||||
|
||||
@@ -50,18 +50,22 @@ Tag="download"
|
||||
});
|
||||
</script>
|
||||
|
||||
**_(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%">
|
||||
<label style="margin-right: 10px;" title="_(Allows you to install the same or older version of a plugin)_">
|
||||
<input type="checkbox" id="force_install" name="force_install">
|
||||
_(Force Install)_
|
||||
</label>
|
||||
<input type="submit" value="_(Install)_">
|
||||
<p><strong>_(Enter URL of remote plugin file or local plugin file)_</strong></p>
|
||||
<div>
|
||||
<input type="text" name="file" id="plugin_file" maxlength="1024" value="">
|
||||
<label style="margin-right: 10px;" title="_(Allows you to install the same or older version of a plugin)_">
|
||||
<input type="checkbox" id="force_install" name="force_install">
|
||||
_(Force Install)_
|
||||
</label>
|
||||
<input type="submit" value="_(Install)_">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
:plugin_install_help:
|
||||
|
||||
**_(Select local plugin file)_**
|
||||
<div id="plugin_tree" class="textarea"></div>
|
||||
<div class="max-w-20 mx-auto">
|
||||
<p><strong>_(Select local plugin file)_</strong></p>
|
||||
<div id="plugin_tree" class="textarea h-50 overflow-y-scroll scrollbar-thin"></div>
|
||||
</div>
|
||||
|
||||
@@ -151,7 +151,19 @@ $(function() {
|
||||
$('.tabs').append("<span id='removeall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value=\"_(Remove Selected Plugins)_\" onclick='removeList()'></span>");
|
||||
});
|
||||
</script>
|
||||
<table class='unraid 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>
|
||||
<tbody id="plugin_list"><tr><td colspan="6"></td><tr></tbody>
|
||||
</table>
|
||||
|
||||
<div class="TableContainer">
|
||||
<table class='unraid 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>
|
||||
<tbody id="plugin_list"><tr><td colspan="6"></td><tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#plugin_tree {
|
||||
width: 33%;
|
||||
height: 200px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
table tbody td {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.Theme--black,
|
||||
.Theme--white {
|
||||
span.status.vhshift {
|
||||
margin-top: 8px !important;
|
||||
}
|
||||
}
|
||||
@@ -486,10 +486,23 @@ $(function() {
|
||||
});
|
||||
</script>
|
||||
|
||||
<table id="kvm_table" class="tablesorter four shift">
|
||||
<thead><tr><th class="th1"><a id="resetsort" class="nohand" 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 / vCDs)_</th><th>_(Graphics)_</th><th>_(IP Address)_</th><th class="th3">_(Autostart)_</th></tr></thead>
|
||||
<tbody id="kvm_list"><tr><td colspan='8'></td></tr></tbody>
|
||||
</table>
|
||||
<div class="TableContainer--widest">
|
||||
<table id="kvm_table" class="tablesorter four shift">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th1"><a id="resetsort" class="nohand" 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 / vCDs)_</th>
|
||||
<th>_(Graphics)_</th>
|
||||
<th>_(IP Address)_</th>
|
||||
<th class="th3">_(Autostart)_</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="kvm_list"><tr><td colspan='8'></td></tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<input type="button" onclick="addVM()" id="btnAddVM" value="_(Add VM)_" style="display:none">
|
||||
<input type="button" onclick="startAll()" value="_(Start All)_" style="display:none">
|
||||
|
||||
@@ -3,7 +3,7 @@ Title="VM Manager"
|
||||
Icon="icon-virtualization"
|
||||
Tag="columns"
|
||||
---
|
||||
<?PHP
|
||||
<?php
|
||||
/* Copyright 2005-2025, Lime Technology
|
||||
* Copyright 2012-2025, Bergware International.
|
||||
* Copyright 2015-2021, Derek Macias, Eric Schultz, Jon Panozzo.
|
||||
@@ -16,97 +16,114 @@ Tag="columns"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
<?php
|
||||
require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
|
||||
|
||||
// Check for Intel VT-x (vmx) or AMD-V (svm) cpu virtualization support
|
||||
// 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='https://docs.unraid.net/go/determining-hvmiommu-hardware-support/' target='_blank'> "._('View the Docs 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='https://docs.unraid.net/go/determining-hvmiommu-hardware-support/' target='_blank'> "._('View the Docs for more information')."</a></p>";
|
||||
}
|
||||
|
||||
function scan($area, $text) {
|
||||
return strpos($area,$text)!==false;
|
||||
function scan($area, $text)
|
||||
{
|
||||
return strpos($area, $text) !== false;
|
||||
}
|
||||
function detect(&$bootcfg, $bootenv, $key) {
|
||||
if ($bootenv === 'syslinux') {
|
||||
$size = count($bootcfg);
|
||||
$menu = $i = 0;
|
||||
$value = '';
|
||||
// find the default section
|
||||
while ($i < $size) {
|
||||
if (scan($bootcfg[$i],'label ')) {
|
||||
$n = $i + 1;
|
||||
// find the current requested setting
|
||||
while (!scan($bootcfg[$n],'label ') && $n < $size) {
|
||||
if (scan($bootcfg[$n],'menu default')) $menu = 1;
|
||||
if (scan($bootcfg[$n],'append')) foreach (explode(' ',$bootcfg[$n]) as $cmd) if (scan($cmd,$key)) {$value = explode('=',$cmd)[1]; break;}
|
||||
$n++;
|
||||
function detect(&$bootcfg, $bootenv, $key)
|
||||
{
|
||||
if ($bootenv === 'syslinux') {
|
||||
$size = count($bootcfg);
|
||||
$menu = $i = 0;
|
||||
$value = '';
|
||||
// find the default section
|
||||
while ($i < $size) {
|
||||
if (scan($bootcfg[$i], 'label ')) {
|
||||
$n = $i + 1;
|
||||
// find the current requested setting
|
||||
while (!scan($bootcfg[$n], 'label ') && $n < $size) {
|
||||
if (scan($bootcfg[$n], 'menu default')) {
|
||||
$menu = 1;
|
||||
}
|
||||
if (scan($bootcfg[$n], 'append')) {
|
||||
foreach (explode(' ', $bootcfg[$n]) as $cmd) {
|
||||
if (scan($cmd, $key)) {
|
||||
$value = explode('=', $cmd)[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$n++;
|
||||
}
|
||||
if ($menu) {
|
||||
break;
|
||||
} else {
|
||||
$i = $n - 1;
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if ($menu) break; else $i = $n - 1;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} elseif ($bootenv === 'grub') {
|
||||
$menu_entries = [];
|
||||
// find the current boot entry
|
||||
foreach ($bootcfg as $line) {
|
||||
if (preg_match('/set default=(\d+)/', $line, $match)) {
|
||||
$bootentry = (int)$match[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
// split boot entries
|
||||
foreach ($bootcfg as $line) {
|
||||
if (strpos($line, 'menuentry ') === 0) {
|
||||
$in_menuentry = true;
|
||||
$current_entry = $line . "\n";
|
||||
} elseif ($in_menuentry) {
|
||||
$current_entry .= $line . "\n";
|
||||
if (trim($line) === "}") {
|
||||
$menu_entries[] = $current_entry;
|
||||
$in_menuentry = false;
|
||||
} elseif ($bootenv === 'grub') {
|
||||
$menu_entries = [];
|
||||
// find the current boot entry
|
||||
foreach ($bootcfg as $line) {
|
||||
if (preg_match('/set default=(\d+)/', $line, $match)) {
|
||||
$bootentry = (int)$match[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
// split boot entries
|
||||
foreach ($bootcfg as $line) {
|
||||
if (strpos($line, 'menuentry ') === 0) {
|
||||
$in_menuentry = true;
|
||||
$current_entry = $line . "\n";
|
||||
} elseif ($in_menuentry) {
|
||||
$current_entry .= $line . "\n";
|
||||
if (trim($line) === "}") {
|
||||
$menu_entries[] = $current_entry;
|
||||
$in_menuentry = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// search in selected menuentry
|
||||
$menuentry = explode("\n", $menu_entries[$bootentry]);
|
||||
foreach (explode(' ', $menu_entries[$bootentry]) as $cmd) {
|
||||
if (scan($cmd, $key)) {
|
||||
$value = explode('=', $cmd)[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// search in selected menuentry
|
||||
$menuentry = explode("\n", $menu_entries[$bootentry]);
|
||||
foreach (explode(' ', $menu_entries[$bootentry]) as $cmd) {
|
||||
if (scan($cmd,$key)) {
|
||||
$value = explode('=',$cmd)[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return trim($value);
|
||||
return trim($value);
|
||||
}
|
||||
if (is_file('/boot/syslinux/syslinux.cfg')) {
|
||||
$bootcfg = file('/boot/syslinux/syslinux.cfg',FILE_IGNORE_NEW_LINES+FILE_SKIP_EMPTY_LINES);
|
||||
$bootenv = 'syslinux';
|
||||
$bootcfg = file('/boot/syslinux/syslinux.cfg', FILE_IGNORE_NEW_LINES + FILE_SKIP_EMPTY_LINES);
|
||||
$bootenv = 'syslinux';
|
||||
} elseif (is_file('/boot/grub/grub.cfg')) {
|
||||
$bootcfg = file('/boot/grub/grub.cfg',FILE_IGNORE_NEW_LINES+FILE_SKIP_EMPTY_LINES);
|
||||
$bootenv = 'grub';
|
||||
$bootcfg = file('/boot/grub/grub.cfg', FILE_IGNORE_NEW_LINES + FILE_SKIP_EMPTY_LINES);
|
||||
$bootenv = 'grub';
|
||||
}
|
||||
$arrValidNetworks = getValidNetworks();
|
||||
$pcie_acs_override = detect($bootcfg, $bootenv, 'pcie_acs_override');
|
||||
$vfio_allow_unsafe = detect($bootcfg, $bootenv, 'allow_unsafe_interrupts');
|
||||
$bgcolor = $themeHelper->isLightTheme() ? '#f2f2f2' : '#1c1c1c'; // $themeHelper set in DefaultPageLayout.php
|
||||
$started = $var['fsState']=='Started';
|
||||
$libvirt_up = $libvirt_running=='yes';
|
||||
$started = $var['fsState'] == 'Started';
|
||||
$libvirt_up = $libvirt_running == 'yes';
|
||||
$libvirt_log = file_exists("/var/log/libvirt/libvirtd.log");
|
||||
?>
|
||||
<link type="text/css" rel="stylesheet" href="<?autov('/webGui/styles/jquery.filetree.css')?>">
|
||||
<link type="text/css" rel="stylesheet" href="<?autov('/webGui/styles/jquery.switchbutton.css')?>">
|
||||
|
||||
<?if ($hardware):?>
|
||||
<span class="status vhshift"><input type="checkbox" class="advancedview"></span>
|
||||
|
||||
: <span><input type="checkbox" class="advancedview"></span>
|
||||
<?endif;?>
|
||||
<form markdown="1" id="settingsForm" method="POST" action="/update.php" target="progressFrame">
|
||||
<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)_:
|
||||
: <select id="SERVICE" name="SERVICE">
|
||||
<?= mk_option($libvirt_service, 'disable', _('No'))?>
|
||||
@@ -114,7 +131,7 @@ _(Enable VMs)_:
|
||||
</select>
|
||||
<?if ($hardware):?>
|
||||
<?if (!$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>
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
|
||||
@@ -171,7 +188,7 @@ _(Default VM storage path)_:
|
||||
:vms_libvirt_storage_help:
|
||||
|
||||
_(Default ISO storage path)_:
|
||||
: <input type="text" id="mediadir" name="MEDIADIR" autocomplete="off" spellcheck="false" data-pickfolders="true" data-pickfilter="HIDE_FILES_FILTER" data-pickroot="<?=is_dir('/mnt/user')?'/mnt/user':'/mnt'?>" value="<?=htmlspecialchars($domain_cfg['MEDIADIR'])?>" placeholder="_(Click to Select)_" pattern="^[^\\]*/$">
|
||||
: <input type="text" id="mediadir" name="MEDIADIR" autocomplete="off" spellcheck="false" data-pickfolders="true" data-pickfilter="HIDE_FILES_FILTER" data-pickroot="<?=is_dir('/mnt/user') ? '/mnt/user' : '/mnt'?>" value="<?=htmlspecialchars($domain_cfg['MEDIADIR'])?>" placeholder="_(Click to Select)_" pattern="^[^\\]*/$">
|
||||
<?if (!$started):?>
|
||||
<span><i class="fa fa-warning icon warning"></i> _(Modify with caution: unable to validate path until Array is Started)_</span>
|
||||
<?endif;?>
|
||||
@@ -180,7 +197,7 @@ _(Default ISO storage path)_:
|
||||
|
||||
</div>
|
||||
_(Default Windows VirtIO driver ISO)_ (_(optional)_):
|
||||
: <select id="winvirtio_select" class="lock" disabled></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 ($started):?> placeholder="_(Click to Select)_" pattern="^[^\\]*\.(iso|ISO)$"<?endif;?>>
|
||||
: <select id="winvirtio_select" class="lock" disabled></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 ($started):?> placeholder="_(Click to Select)_" pattern="^[^\\]*\.(iso|ISO)$"<?endif;?>>
|
||||
<?if ($started):?>
|
||||
<i class="fa fa-trash fa-fw" id="remove_button" title="_(Remove Windows VirtIO driver ISO)_"><span> _(Remove)_</span></i><i class="fa fa-download fa-fw" id="download_button" title="_(Download Windows VirtIO driver ISO)_"><span> _(Download)_</span></i><span id="download_status"></span>
|
||||
<?endif;?>
|
||||
@@ -245,7 +262,7 @@ _(VM Usage refresh timer(seconds))_:
|
||||
:vms_usage_timer_help:
|
||||
|
||||
_(PCIe ACS override)_:
|
||||
: <select id="pcie_acs_override"<?=$safemode?' disabled':''?>>
|
||||
: <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'))?>
|
||||
@@ -255,7 +272,7 @@ _(PCIe ACS override)_:
|
||||
:vms_acs_override_help:
|
||||
|
||||
_(VFIO allow unsafe interrupts)_:
|
||||
: <select id="vfio_allow_unsafe"<?=$safemode?' disabled':''?>>
|
||||
: <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;?>
|
||||
@@ -271,7 +288,10 @@ _(VFIO allow unsafe interrupts)_:
|
||||
<?else:?>
|
||||
|
||||
<?endif;?>
|
||||
: <input type="button" id="applyBtn" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="button" id="applyBtn" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
<?if ($libvirt_log):?>
|
||||
|
||||
@@ -296,7 +316,10 @@ _(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>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Scrub)_">
|
||||
<label><input type="checkbox" name="#arg[3]" value="">_(Correct file system errors)_</label>
|
||||
</span>
|
||||
|
||||
:vms_scrub_help:
|
||||
|
||||
@@ -305,7 +328,9 @@ _(btrfs scrub status)_:
|
||||
<input type="hidden" name="#arg[1]" value="cancel">
|
||||
<input type="hidden" name="#arg[2]" value="/etc/libvirt">
|
||||
|
||||
: <input type="submit" value="_(Cancel)_">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Cancel)_">
|
||||
</span>
|
||||
|
||||
:vms_cancel_help:
|
||||
|
||||
@@ -482,7 +507,7 @@ $(function(){
|
||||
$("#IMAGE_FILE").on("input change", function(){
|
||||
$("#IMAGE_ERROR").fadeOut();
|
||||
$("#applyBtn").prop("disabled", false);
|
||||
<? if (file_exists($domain_cfg['IMAGE_FILE'])) { ?>
|
||||
<?php if (file_exists($domain_cfg['IMAGE_FILE'])) { ?>
|
||||
if ($(this).val() != "<?=$domain_cfg['IMAGE_FILE']?>") {
|
||||
$("#deleteCheckbox").prop("disabled", true).attr("checked", false);
|
||||
$("#deletePanel").fadeOut();
|
||||
@@ -490,7 +515,7 @@ $(function(){
|
||||
$("#deleteCheckbox").attr("checked", false).prop("disabled", false);
|
||||
$("#deletePanel").fadeIn();
|
||||
}
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
});
|
||||
$("#deleteCheckbox").change(function(){
|
||||
var checked = $(this).is(":checked");
|
||||
|
||||
@@ -105,7 +105,7 @@ if (strpos($strSelectedTemplate,"User-") !== false) {
|
||||
<link type="text/css" rel="stylesheet" href="<?autov('/plugins/dynamix.vm.manager/styles/dynamix.vm.manager.css')?>">
|
||||
<link type="text/css" rel="stylesheet" href="<?autov('/plugins/dynamix.vm.manager/styles/edit.css')?>">
|
||||
|
||||
<span class="status advancedview_panel" style="margin-top:<?=$top?>px;"><input type="checkbox" class="inlineview"><input type="checkbox" class="advancedview"></span>
|
||||
<span class="status advancedview_panel"><input type="checkbox" class="inlineview"><input type="checkbox" class="advancedview"></span>
|
||||
<div class="domain">
|
||||
<form id="vmform" method="POST">
|
||||
<input type="hidden" name="domain[type]" value="kvm" />
|
||||
|
||||
@@ -26,5 +26,7 @@ function installPlugin(file) {
|
||||
<input type="hidden" name="file" value="https://ca.unraid.net/dl/https://raw.githubusercontent.com/unraid/community.applications/master/plugins/community.applications.plg">
|
||||
|
||||
|
||||
: <input type="button" value="_(Install)_" onclick="installPlugin(this.form.file.value)">
|
||||
: <span class="inline-block">
|
||||
<input type="button" value="_(Install)_" onclick="installPlugin(this.form.file.value)">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -14,8 +14,6 @@ Cond="(_var($var,'SYS_ARRAY_SLOTS') > 0 || $var['fsState']=='Stopped')"
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$power = _var($display,'power') && in_array('nvme',array_column(main_filter($disks),'transport')) ? _('Power').' / ' : '';
|
||||
?>
|
||||
<script>
|
||||
@@ -23,20 +21,36 @@ $power = _var($display,'power') && in_array('nvme',array_column(main_filter($dis
|
||||
$('#tab1').bind({click:function() {$('i.toggle').show('slow');}});
|
||||
<?endif;?>
|
||||
</script>
|
||||
|
||||
<table class="unraid disk_status">
|
||||
<thead><tr><td>_(Device)_</td><td>_(Identification)_</td><td><?=$power?>_(Temp)_</td><td>_(Reads)_</td><td>_(Writes)_</td><td>_(Errors)_</td><td>_(FS)_</td><td>_(Size)_</td><td>_(Used)_</td><td>_(Free)_</td></tr></thead>
|
||||
<tbody id="array_devices">
|
||||
<?
|
||||
foreach (main_filter($disks) as $disk) if (substr($disk['status'],0,7)!='DISK_NP') echo "<tr><td colspan='10'></td></tr>";
|
||||
if (_var($display,'total') && _var($var,'mdNumDisks',0)>1) echo "<tr class='tr_last'><td colspan='10'></td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="TableContainer">
|
||||
<table class="unraid disk_status">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>_(Device)_</td>
|
||||
<td>_(Identification)_</td>
|
||||
<td><?=$power?>_(Temp)_</td>
|
||||
<td>_(Reads)_</td>
|
||||
<td>_(Writes)_</td>
|
||||
<td>_(Errors)_</td>
|
||||
<td>_(FS)_</td>
|
||||
<td>_(Size)_</td>
|
||||
<td>_(Used)_</td>
|
||||
<td>_(Free)_</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="array_devices">
|
||||
<? foreach (main_filter($disks) as $disk) :?>
|
||||
<? if (substr($disk['status'],0,7) != 'DISK_NP') :?>
|
||||
<tr><td colspan='10'></td></tr>
|
||||
<? endif;?>
|
||||
<? endforeach;?>
|
||||
<? if (_var($display,'total') && _var($var,'mdNumDisks',0) > 1) :?>
|
||||
<tr class='tr_last'><td colspan='10'></td></tr>
|
||||
<? endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
:main_array_devices_help:
|
||||
|
||||
<?if (_var($var,'fsState')=="Stopped"):?>
|
||||
<div></div>
|
||||
:main_slots_help:
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
@@ -84,7 +84,7 @@ function print_error($error) {
|
||||
}
|
||||
?>
|
||||
<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"><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 recall = null;
|
||||
var recover = null;
|
||||
|
||||
@@ -314,7 +314,7 @@ $('.tabs').append(ctrl);
|
||||
if ($.cookie('tab')=='tab0') $('i.toggle').hide();
|
||||
$('#tab'+$('input[name$="tabs"]').length).click(function(){tab0(); $('i.toggle').hide('slow');});
|
||||
<?else:?>
|
||||
$('div[class=title]:not(":last, .disable_diskio")').each(function(){$(this).append(ctrl);});
|
||||
$('div[class=title]:not(":last, .disable_diskio") .right').each(function(){$(this).append(ctrl);});
|
||||
<?endif;?>
|
||||
$('.tooltip_diskio').tooltipster({delay:100,trigger:'custom',triggerOpen:{mouseenter:true},triggerClose:{click:false,scroll:true,mouseleave:true}});
|
||||
|
||||
|
||||
@@ -19,12 +19,27 @@ Tag="paw"
|
||||
$('#tab3').bind({click:function() {$('i.toggle').show('slow');}});
|
||||
<?endif;?>
|
||||
</script>
|
||||
|
||||
<table class="unraid disk_status">
|
||||
<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></tr></thead>
|
||||
<tbody id="boot_device">
|
||||
<?if (isset($disks['flash'])) echo "<tr><td colspan='10'></td></tr>";?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="TableContainer">
|
||||
<table class="unraid disk_status">
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="boot_device">
|
||||
<?if (isset($disks['flash'])) :?>
|
||||
<tr><td colspan='10'></td></tr>
|
||||
<?endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
:boot_device_help:
|
||||
|
||||
@@ -1017,7 +1017,23 @@ $(function(){
|
||||
</script>
|
||||
|
||||
<div class="autoheight">
|
||||
<table class="indexer tablesorter shift"><thead><tr><th><?if($dir){?><i id="check_0" class="fa fa-fw fa-square-o" onclick="selectAll()"></i><?}?></th><th>_(Type)_</th><th class='sorter-text'>_(Name)_</th><th>_(Owner)_</th><th>_(Permission)_</th><th>_(Size)_</th><th>_(Last Modified)_</th><th style="width:200px">_(Location)_</th><th>_(Action)_</th></tr></thead></table>
|
||||
<div class="TableContainer">
|
||||
<table class="indexer tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?if($dir){?><i id="check_0" class="fa fa-fw fa-square-o" onclick="selectAll()"></i><?}?></th>
|
||||
<th>_(Type)_</th>
|
||||
<th class='sorter-text'>_(Name)_</th>
|
||||
<th>_(Owner)_</th>
|
||||
<th>_(Permission)_</th>
|
||||
<th>_(Size)_</th>
|
||||
<th>_(Last Modified)_</th>
|
||||
<th style="width:200px">_(Location)_</th>
|
||||
<th>_(Action)_</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="buttons">
|
||||
<input type="button" value="_(Done)_" onclick="done('Browse')">
|
||||
|
||||
@@ -16,10 +16,18 @@ 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>
|
||||
<tbody id="table-is"><?=$spinner?></tbody>
|
||||
</table>
|
||||
|
||||
<div class="TableContainer">
|
||||
<table class='tablesorter shift' style='width:auto'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><i class="fa fa-list"></i> _(Isolation)_</th>
|
||||
<?create()?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table-is"><?=$spinner?></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<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):?>
|
||||
|
||||
@@ -17,10 +17,19 @@ Tag="icon-cpu"
|
||||
<?if ($dockerd):?>
|
||||
<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>
|
||||
<tbody id="table-ct"><?=$spinner?></tbody>
|
||||
</table>
|
||||
<div class="TableContainer">
|
||||
<table class='tablesorter shift' style='width:auto'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><i class="fa fa-list"></i> _(Container)_</th>
|
||||
<?create()?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table-ct">
|
||||
<?=$spinner?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<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:?>
|
||||
|
||||
@@ -311,10 +311,17 @@ $(function() {
|
||||
<?if ($libvirtd):?>
|
||||
<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("vm")?></tr></thead>
|
||||
<tbody id="table-vm"><?=$spinner?></tbody>
|
||||
</table>
|
||||
<div class="TableContainer">
|
||||
<table class='tablesorter shift' style='width:auto'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><i class="fa fa-list"></i> _(VM)_</th>
|
||||
<?create("vm")?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table-vm"><?=$spinner?></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<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:?>
|
||||
|
||||
@@ -129,6 +129,7 @@ $('#tab2').bind({click:function() {$('i.toggle').show('slow');}});
|
||||
<?endif;?>
|
||||
</script>
|
||||
|
||||
<div class="TableContainer">
|
||||
<table class="unraid disk_status">
|
||||
<?$i = 0?>
|
||||
<?foreach ($pools as $pool):?>
|
||||
@@ -139,9 +140,26 @@ $power = _var($display,'power') && in_array('nvme',array_column($cache,'transpor
|
||||
$root = explode($_tilde_,$pool)[0];
|
||||
?>
|
||||
<?if ($i==0):?>
|
||||
<thead><tr><td>_(Device)_</td><td>_(Identification)_</td><td><?=$power?>_(Temp)_</td><td>_(Reads)_</td><td>_(Writes)_</td><td>_(Errors)_</td><td>_(FS)_</td><td>_(Size)_</td><td>_(Used)_</td><td>_(Free)_</td></tr></thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>_(Device)_</td>
|
||||
<td>_(Identification)_</td>
|
||||
<td><?=$power?>_(Temp)_</td>
|
||||
<td>_(Reads)_</td>
|
||||
<td>_(Writes)_</td>
|
||||
<td>_(Errors)_</td>
|
||||
<td>_(FS)_</td>
|
||||
<td>_(Size)_</td>
|
||||
<td>_(Used)_</td>
|
||||
<td>_(Free)_</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?else:?>
|
||||
<thead><tr><td class="divider" colspan="10"></td></td></tr></thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="divider" colspan="10"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
<tbody id="pool_device<?=$i++?>">
|
||||
@@ -151,6 +169,7 @@ $root = explode($_tilde_,$pool)[0];
|
||||
<?endif;?>
|
||||
<?endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
:cache_devices_help:
|
||||
|
||||
@@ -167,6 +186,7 @@ $root = explode($_tilde_,$pool)[0];
|
||||
<div id="templatePopupPool" class="template">
|
||||
<form markdown="1" method="POST" action="/update.htm" target="progressFrame" onsubmit="return validate(this.poolName.value)">
|
||||
<input type="hidden" name="changeSlots" value="apply">
|
||||
|
||||
_(Name)_:
|
||||
: <input type="text" name="poolName" maxlength="40" value="<?=count($pools)==0?'cache':''?>">
|
||||
|
||||
@@ -184,6 +204,7 @@ _(Slots)_:
|
||||
<form markdown="1" method="POST" action="/update.htm" target="progressFrame">
|
||||
<input type="hidden" name="changeSlots" value="apply">
|
||||
<input type="hidden" name="poolName" value="">
|
||||
|
||||
_(Name)_:
|
||||
: <select name="subpool">
|
||||
<?=mk_option("","special",_("special - Metadata storage"))?>
|
||||
|
||||
@@ -19,6 +19,7 @@ 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">
|
||||
<?=mk_option($confirm['down'], "0", _('No'))?>
|
||||
@@ -42,7 +43,10 @@ _(Confirm sleep command)_:
|
||||
<?=mk_option($confirm['sleep'], "1", _('Yes'))?>
|
||||
</select>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="#apply" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -114,5 +114,8 @@ _(Persistent Bash History)_:
|
||||
:console_bash_help:
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="#apply" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -3,7 +3,7 @@ Title="Date and Time"
|
||||
Icon="icon-clock"
|
||||
Tag="clock-o"
|
||||
---
|
||||
<?PHP
|
||||
<?php
|
||||
/* Copyright 2005-2025, Lime Technology
|
||||
* Copyright 2012-2025, Bergware International.
|
||||
*
|
||||
@@ -15,35 +15,42 @@ Tag="clock-o"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
<?php
|
||||
$validIP4 = "^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$";
|
||||
$validIP6 = "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|(:|([0-9a-fA-F]{1,4}:)+):(([0-9a-fA-F]{1,4}:)*[0-9a-fA-F]{1,4})?)$";
|
||||
$validMAC = "^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$";
|
||||
$tmzones = file("$docroot/webGui/include/timezones.key",FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
|
||||
$tmzones = file("$docroot/webGui/include/timezones.key", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
$system = "/sys/class/net";
|
||||
$hwclock = $ports = $member = [];
|
||||
|
||||
exec("ls --indicator-style=none $system|grep -P '^(bond|br|eth)[0-9]*$'",$net);
|
||||
exec("ls --indicator-style=none $system|grep -P '^(bond|br|eth)[0-9]*$'", $net);
|
||||
foreach ($net as $port) {
|
||||
switch (preg_replace('/[0-9]+$/','',$port)) {
|
||||
case 'bond':
|
||||
if (!file_exists($system.'/'.str_replace('bond','br',$port))) $ports[] = $port;
|
||||
$member = array_merge($member,explode(' ',exec("cat $system/$port/bonding/slaves")));
|
||||
break;
|
||||
case 'br':
|
||||
$member = array_merge($member,explode(' ',exec("ls --indicator-style=none $system/$port/brif")));
|
||||
break;
|
||||
case 'eth':
|
||||
if (!in_array($port,$member)) $ports[] = $port;
|
||||
break;
|
||||
}
|
||||
switch (preg_replace('/[0-9]+$/', '', $port)) {
|
||||
case 'bond':
|
||||
if (!file_exists($system.'/'.str_replace('bond', 'br', $port))) {
|
||||
$ports[] = $port;
|
||||
}
|
||||
$member = array_merge($member, explode(' ', exec("cat $system/$port/bonding/slaves")));
|
||||
break;
|
||||
case 'br':
|
||||
$member = array_merge($member, explode(' ', exec("ls --indicator-style=none $system/$port/brif")));
|
||||
break;
|
||||
case 'eth':
|
||||
if (!in_array($port, $member)) {
|
||||
$ports[] = $port;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach ($ports as $port) {
|
||||
$hwclock[$port] = exec("ethtool -T $port|grep -Pom1 '^PTP Hardware Clock: \K.+'") == 'none' ? 'disabled' : '';
|
||||
}
|
||||
foreach ($ports as $port) $hwclock[$port] = exec("ethtool -T $port|grep -Pom1 '^PTP Hardware Clock: \K.+'")=='none' ? 'disabled' : '';
|
||||
?>
|
||||
<form markdown="1" name="datetime_settings" method="POST" action="/update.htm" target="progressFrame" onchange="signal(this)">
|
||||
<input type="hidden" name="setDateTime" value="apply">
|
||||
|
||||
_(Current date and time)_:
|
||||
: <?=_(my_time(time()),0)?>
|
||||
: <?=_(my_time(time()), 0)?>
|
||||
|
||||
_(Date format)_:
|
||||
: <select name="display_date" onchange="presetTime(this.form)">
|
||||
@@ -64,10 +71,10 @@ _(Time format)_:
|
||||
</select>
|
||||
|
||||
_(Time zone)_:
|
||||
: <select name="timeZone"><?
|
||||
: <select name="timeZone"><?php
|
||||
foreach ($tmzones as $zone) {
|
||||
[$timezone, $city] = my_explode('|', $zone);
|
||||
echo mk_option($var['timeZone'], $timezone, $city);
|
||||
[$timezone, $city] = my_explode('|', $zone);
|
||||
echo mk_option($var['timeZone'], $timezone, $city);
|
||||
}
|
||||
?></select>
|
||||
|
||||
@@ -87,25 +94,25 @@ _(Time sync)_:
|
||||
<div markdown="1" id="ntp-setup" class="extra">
|
||||
_(NTP interval)_:
|
||||
: <select name="NTP_POLL">
|
||||
<?=mk_option(_var($NTP,'POLL'), "", _('Default'))?>
|
||||
<?=mk_option(_var($NTP,'POLL'), "8", _('Slow'))?>
|
||||
<?=mk_option(_var($NTP,'POLL'), "5", _('Medium'))?>
|
||||
<?=mk_option(_var($NTP,'POLL'), "3", _('Fast'))?>
|
||||
<?=mk_option(_var($NTP, 'POLL'), "", _('Default'))?>
|
||||
<?=mk_option(_var($NTP, 'POLL'), "8", _('Slow'))?>
|
||||
<?=mk_option(_var($NTP, 'POLL'), "5", _('Medium'))?>
|
||||
<?=mk_option(_var($NTP, 'POLL'), "3", _('Fast'))?>
|
||||
</select>
|
||||
<span class="orange-text">_(Use DEFAULT setting when public NTP servers are defined)_</span>
|
||||
<span class="input-instructions orange-text">_(Use DEFAULT setting when public NTP servers are defined)_</span>
|
||||
|
||||
_(NTP server)_ 1:
|
||||
: <input type="text" name="NTP_SERVER1" maxlength="40" class="narrow" value="<?=htmlspecialchars($var['NTP_SERVER1'])?>">
|
||||
<span class="orange-text">_(Input a NTP server name, NTP pool name or IP address)_</span>
|
||||
: <input type="text" name="NTP_SERVER1" maxlength="40" value="<?=htmlspecialchars($var['NTP_SERVER1'])?>">
|
||||
<span class="input-instructions orange-text">_(Input a NTP server name, NTP pool name or IP address)_</span>
|
||||
|
||||
_(NTP server)_ 2:
|
||||
: <input type="text" name="NTP_SERVER2" maxlength="40" class="narrow" value="<?=htmlspecialchars($var['NTP_SERVER2'])?>">
|
||||
: <input type="text" name="NTP_SERVER2" maxlength="40" value="<?=htmlspecialchars($var['NTP_SERVER2'])?>">
|
||||
|
||||
_(NTP server)_ 3:
|
||||
: <input type="text" name="NTP_SERVER3" maxlength="40" class="narrow" value="<?=htmlspecialchars($var['NTP_SERVER3'])?>">
|
||||
: <input type="text" name="NTP_SERVER3" maxlength="40" value="<?=htmlspecialchars($var['NTP_SERVER3'])?>">
|
||||
|
||||
_(NTP server)_ 4:
|
||||
: <input type="text" name="NTP_SERVER4" maxlength="40" class="narrow" value="<?=htmlspecialchars($var['NTP_SERVER4'])?>">
|
||||
: <input type="text" name="NTP_SERVER4" maxlength="40" value="<?=htmlspecialchars($var['NTP_SERVER4'])?>">
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="ptp-setup" class="extra">
|
||||
@@ -114,57 +121,60 @@ _(PTP profile)_:
|
||||
|
||||
_(PTP transport)_:
|
||||
: <select name="PTP_TRANSPORT" onchange="updatePage(this.form,'slow')">
|
||||
<?=mk_option(_var($PTP,'TRANSPORT'), "UDPv4", _('UDPv4'))?>
|
||||
<?=mk_option(_var($PTP,'TRANSPORT'), "UDPv6", _('UDPv6'))?>
|
||||
<?=mk_option(_var($PTP,'TRANSPORT'), "L2", _('IEEE 802.3'))?>
|
||||
<?=mk_option(_var($PTP, 'TRANSPORT'), "UDPv4", _('UDPv4'))?>
|
||||
<?=mk_option(_var($PTP, 'TRANSPORT'), "UDPv6", _('UDPv6'))?>
|
||||
<?=mk_option(_var($PTP, 'TRANSPORT'), "L2", _('IEEE 802.3'))?>
|
||||
</select>
|
||||
|
||||
_(PTP mode)_:
|
||||
: <select name="PTP_MODE" onchange="updatePage(this.form,'slow')">
|
||||
<?=mk_option(_var($PTP,'MODE'), "multicast", _('Multicast'))?>
|
||||
<?=mk_option(_var($PTP,'MODE'), "unicast", _('Unicast'))?>
|
||||
<?=mk_option(_var($PTP, 'MODE'), "multicast", _('Multicast'))?>
|
||||
<?=mk_option(_var($PTP, 'MODE'), "unicast", _('Unicast'))?>
|
||||
</select>
|
||||
|
||||
<div markdown="1" id="unicast" class="extra">
|
||||
_(PTP server)_ 1:
|
||||
: <input type="text" name="PTP_SERVER1" maxlength="40" class="narrow" value="<?=htmlspecialchars(_var($PTP,'SERVER1'))?>">
|
||||
: <input type="text" name="PTP_SERVER1" maxlength="40" value="<?=htmlspecialchars(_var($PTP, 'SERVER1'))?>">
|
||||
<span class="ipv4 orange-text">_(Input a IPv4 address)_</span><span class="ipv6 orange-text">_(Input a IPv6 address)_</span><span class="mac orange-text">_(Input a MAC address)_</span>
|
||||
|
||||
_(PTP server)_ 2:
|
||||
: <input type="text" name="PTP_SERVER2" maxlength="40" class="narrow" value="<?=htmlspecialchars(_var($PTP,'SERVER2'))?>">
|
||||
: <input type="text" name="PTP_SERVER2" maxlength="40" value="<?=htmlspecialchars(_var($PTP, 'SERVER2'))?>">
|
||||
|
||||
_(PTP server)_ 3:
|
||||
: <input type="text" name="PTP_SERVER3" maxlength="40" class="narrow" value="<?=htmlspecialchars(_var($PTP,'SERVER3'))?>">
|
||||
: <input type="text" name="PTP_SERVER3" maxlength="40" value="<?=htmlspecialchars(_var($PTP, 'SERVER3'))?>">
|
||||
|
||||
_(PTP server)_ 4:
|
||||
: <input type="text" name="PTP_SERVER4" maxlength="40" class="narrow" value="<?=htmlspecialchars(_var($PTP,'SERVER4'))?>">
|
||||
: <input type="text" name="PTP_SERVER4" maxlength="40" value="<?=htmlspecialchars(_var($PTP, 'SERVER4'))?>">
|
||||
|
||||
</div>
|
||||
_(PTP interface)_:
|
||||
: <select name="PTP_PORT" onchange="hwclock(this.form,this.value)">
|
||||
<?if (empty($ports)) echo mk_option(0, '', '---');?>
|
||||
<?foreach($ports as $port):?>
|
||||
<?=mk_option(_var($PTP,'PORT','eth0'), $port, $port)?>
|
||||
<?=mk_option(_var($PTP, 'PORT', 'eth0'), $port, $port)?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
|
||||
_(PTP clock)_:
|
||||
: <select name="PTP_CLOCK">
|
||||
<?=mk_option(_var($PTP,'CLOCK'), "hardware", _('Hardware'), empty($ports) ? 'disabled' : _var($hwclock,_var($PTP,'PORT')))?>
|
||||
<?=mk_option(_var($PTP,'CLOCK'), "software", _('Software'))?>
|
||||
<?=mk_option(_var($PTP, 'CLOCK'), "hardware", _('Hardware'), empty($ports) ? 'disabled' : _var($hwclock, _var($PTP, 'PORT')))?>
|
||||
<?=mk_option(_var($PTP, 'CLOCK'), "software", _('Software'))?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="manual-setup" class="extra">
|
||||
_(New date and time)_:
|
||||
: <input type="text" name="newDateTime" maxlength="20" class="narrow" value="<?=my_time(time(),"%F %T")?>">
|
||||
: <input type="text" name="newDateTime" maxlength="20" value="<?=my_time(time(), "%F %T")?>">
|
||||
<span class="orange-text">_(Input the correct date and time manually)_</span>
|
||||
|
||||
:current_time_help:
|
||||
|
||||
</div>
|
||||
|
||||
: <input type="button" value="_(Apply)_" onclick="dispatch(this.form)" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="button" value="_(Apply)_" onclick="dispatch(this.form)" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
@@ -313,7 +323,7 @@ $(function() {
|
||||
oldDate = form.display_date.selectedIndex;
|
||||
oldTime = form.display_time.selectedIndex;
|
||||
oldZone = form.timeZone.selectedIndex;
|
||||
form.USE_NTP.selectedIndex = <?=_var($PTP,'SYNC')=='yes' ? 1 : ($var['USE_NTP']=='yes' ? 0 : 2)?>;
|
||||
form.USE_NTP.selectedIndex = <?=_var($PTP,'SYNC') == 'yes' ? 1 : ($var['USE_NTP'] == 'yes' ? 0 : 2)?>;
|
||||
<?if (empty($ports)):?>
|
||||
if (form.USE_NTP.selectedIndex==1) $('#noports').show();
|
||||
<?endif;?>
|
||||
|
||||
@@ -22,10 +22,27 @@ $(function() {
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="unraid">
|
||||
<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>
|
||||
<div class="TableContainer">
|
||||
<table class="unraid">
|
||||
<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>
|
||||
</div>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
:smart_attributes_help:
|
||||
|
||||
@@ -26,10 +26,19 @@ $(function() {
|
||||
});
|
||||
</script>
|
||||
|
||||
<table class="unraid">
|
||||
<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>
|
||||
<div class="TableContainer">
|
||||
<table class="unraid">
|
||||
<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>
|
||||
</div>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
:smart_identity_help:
|
||||
|
||||
@@ -822,7 +822,7 @@ _(Enable user share assignment)_:
|
||||
:info_share_assignment_help:
|
||||
|
||||
_(Minimum free space)_:
|
||||
: <input type="text" id="shareFloor" name="diskShareFloor.<?=_var($disk,'idx',0)?>" maxlength="16" autocomplete="off" spellcheck="false" value="<?=presetSpace(_var($disk,'shareFloor',0))?>" class="narrow" placeholder="0" <?if ($var['mdState']=='STARTED'):?>disabled<?endif;?>>
|
||||
: <input type="text" id="shareFloor" name="diskShareFloor.<?=_var($disk,'idx',0)?>" maxlength="16" autocomplete="off" spellcheck="false" value="<?=presetSpace(_var($disk,'shareFloor',0))?>" placeholder="0" <?if ($var['mdState']=='STARTED'):?>disabled<?endif;?>>
|
||||
<span id="autosize"><i class="fa fa-info i"></i>_(Calculated free space value)_</span>
|
||||
|
||||
:info_free_space_help:
|
||||
@@ -830,18 +830,20 @@ _(Minimum free space)_:
|
||||
<?endif;?>
|
||||
<?if (diskType('Data') || (isPool($tag) && !isSubpool($tag))):?>
|
||||
_(Warning disk utilization threshold)_ (%):
|
||||
: <input type="number" min="0" max="100" name="diskWarning.<?=_var($disk,'idx',0)?>" autocomplete="off" spellcheck="false" class="narrow" value="<?=_var($disk,'warning')?>" placeholder="<?=_var($display,'warning')?>">
|
||||
: <input type="number" min="0" max="100" name="diskWarning.<?=_var($disk,'idx',0)?>" autocomplete="off" spellcheck="false" value="<?=_var($disk,'warning')?>" placeholder="<?=_var($display,'warning')?>">
|
||||
|
||||
:info_warning_utilization_help:
|
||||
|
||||
_(Critical disk utilization threshold)_ (%):
|
||||
: <input type="number" min="0" max="100" name="diskCritical.<?=_var($disk,'idx',0)?>" autocomplete="off" spellcheck="false" class="narrow" value="<?=_var($disk,'critical')?>" placeholder="<?=_var($display,'critical')?>")>
|
||||
: <input type="number" min="0" max="100" name="diskCritical.<?=_var($disk,'idx',0)?>" autocomplete="off" spellcheck="false" value="<?=_var($disk,'critical')?>" placeholder="<?=_var($display,'critical')?>")>
|
||||
|
||||
:info_critical_utilization_help:
|
||||
|
||||
<?endif;?>
|
||||
|
||||
: <input type="submit" name="changeDisk" value="_(Apply)_" disabled><input type="button" id="doneButton" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeDisk" value="_(Apply)_" disabled>
|
||||
<input type="button" id="doneButton" value="_(Done)_" onclick="done()">
|
||||
<?$erasable=false?>
|
||||
<?$removeable=false?>
|
||||
<?if (diskType('Parity','Data')):?>
|
||||
@@ -855,6 +857,7 @@ _(Critical disk utilization threshold)_ (%):
|
||||
<?if (_var($var,'fsState')=="Stopped"): $removeable=true; endif;?>
|
||||
<input type="button" id="removeButton" value="_(Remove Pool)_" onclick="removePool()"<?=$removeable?'':' disabled'?>>
|
||||
<?endif;?>
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<?if (fsType('btrfs')):?>
|
||||
@@ -929,7 +932,10 @@ _(btrfs balance status)_:
|
||||
<?else:?>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Balance)_" disabled><b>_(Balance)_</b> _(is only available when the filesyestem is mounted)_
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Balance)_" disabled>
|
||||
<span class="inline-block"><b>_(Balance)_</b> _(is only available when the filesyestem is mounted)_</span>
|
||||
</span>
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
@@ -965,12 +971,12 @@ _(Day of the month)_:
|
||||
</select>
|
||||
|
||||
_(Time of the day)_:
|
||||
: <span id="balance-hour1" style="display:none"><select name="hour1" class="narrow">
|
||||
: <span id="balance-hour1" style="display:none"><select name="hour1">
|
||||
<?for ($d=0; $d<=23; $d++):?>
|
||||
<?=mk_option(_var($$balance,'hour'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select>
|
||||
<select name="min" class="narrow">
|
||||
<select name="min">
|
||||
<?for ($d=0; $d<=55; $d+=5):?>
|
||||
<?=mk_option(_var($$balance,'min'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
@@ -985,7 +991,7 @@ _(Time of the day)_:
|
||||
</select></span>
|
||||
|
||||
_(Block group usage)_ (%):
|
||||
: <input type="number" name="usage" class="narrow" min="0" max="100" value="<?=_var($$balance,'usage')?>" placeholder="50">
|
||||
: <input type="number" name="usage" min="0" max="100" value="<?=_var($$balance,'usage')?>" placeholder="50">
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="_(Apply)_"><input type="button" value="_(Done)_" onclick="done()">
|
||||
@@ -1061,12 +1067,12 @@ _(Day of the month)_:
|
||||
</select>
|
||||
|
||||
_(Time of the day)_:
|
||||
: <span id="scrub-hour1" style="display:none"><select name="hour1" class="narrow">
|
||||
: <span id="scrub-hour1" style="display:none"><select name="hour1">
|
||||
<?for ($d=0; $d<=23; $d++):?>
|
||||
<?=mk_option(_var($$scrub,'hour'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select>
|
||||
<select name="min" class="narrow">
|
||||
<select name="min">
|
||||
<?for ($d=0; $d<=55; $d+=5):?>
|
||||
<?=mk_option(_var($$scrub,'min'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
@@ -1099,7 +1105,7 @@ _(btrfs check status)_:
|
||||
<input type="hidden" name="#arg[3]" value="<?=_var($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]" maxlength="256" value="--readonly"> _(Options (see Help))_
|
||||
|
||||
:info_btrfs_check_help:
|
||||
|
||||
@@ -1118,7 +1124,10 @@ _(btrfs check status)_:
|
||||
<?else:?>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Check)_" disabled> **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Check)_" disabled>
|
||||
<span class="inline-block">**_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
</span>
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
@@ -1206,12 +1215,12 @@ _(Day of the month)_:
|
||||
</select>
|
||||
|
||||
_(Time of the day)_:
|
||||
: <span id="scrub-hour1" style="display:none"><select name="hour1" class="narrow">
|
||||
: <span id="scrub-hour1" style="display:none"><select name="hour1">
|
||||
<?for ($d=0; $d<=23; $d++):?>
|
||||
<?=mk_option(_var($$scrub,'hour'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select>
|
||||
<select name="min" class="narrow">
|
||||
<select name="min">
|
||||
<?for ($d=0; $d<=55; $d+=5):?>
|
||||
<?=mk_option(_var($$scrub,'min'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
@@ -1245,7 +1254,11 @@ _(reiserfsck status)_:
|
||||
<input type="hidden" name="#arg[3]" value="<?=_var($disk,'id')?>">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Check)_"><input type="text" name="#arg[4]" class="narrow" maxlength="256" value=""> _(Options (see Help))_
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Check)_">
|
||||
<input type="text" name="#arg[4]" maxlength="256" value="">
|
||||
<span class="inline-block">_(Options (see Help))_</span>
|
||||
</span>
|
||||
|
||||
:info_reiserfs_check_help:
|
||||
|
||||
@@ -1256,7 +1269,10 @@ _(reiserfsck status)_:
|
||||
<input type="hidden" name="#arg[3]" value="<?=_var($disk,'id')?>">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Cancel)_"> *_(Running)_*
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Cancel)_">
|
||||
<span class="inline-block">*_(Running)_*</span>
|
||||
</span>
|
||||
|
||||
:info_reiserfs_cancel_help:
|
||||
|
||||
@@ -1264,7 +1280,10 @@ _(reiserfsck status)_:
|
||||
<?else:?>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Check)_" disabled> **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Check)_" disabled>
|
||||
<span class="inline-block">**_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
</span>
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
@@ -1342,7 +1361,10 @@ _(xfs_repair status)_:
|
||||
<?else:?>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Check)_" disabled> **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Check)_" disabled>
|
||||
<span class="inline-block">**_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
</span>
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
@@ -1365,7 +1387,7 @@ _(Warning NVME temperature threshold)_ (°<?=_var($display,'unit','C')?>):
|
||||
<?else:?>
|
||||
_(Warning SSD temperature threshold)_ (°<?=_var($display,'unit','C')?>):
|
||||
<?endif;?>
|
||||
: <input type="number" min="0" max="300" name="hotTemp" class="narrow" value="<?=displayTemp(_var($disk,'hotTemp'))?>" placeholder="<?=displayTemp(makeTemp($disk,'hot'))?>">
|
||||
: <input type="number" min="0" max="300" name="hotTemp" value="<?=displayTemp(_var($disk,'hotTemp'))?>" placeholder="<?=displayTemp(makeTemp($disk,'hot'))?>">
|
||||
|
||||
:info_warning_temp_help:
|
||||
|
||||
@@ -1376,7 +1398,7 @@ _(Critical NVME temperature threshold)_ (°<?=_var($display,'unit','C')?>):
|
||||
<?else:?>
|
||||
_(Critical SSD temperature threshold)_ (°<?=_var($display,'unit','C')?>):
|
||||
<?endif;?>
|
||||
: <input type="number" min="0" max="300" name="maxTemp" class="narrow" value="<?=displayTemp(_var($disk,'maxTemp'))?>" placeholder="<?=displayTemp(makeTemp($disk,'max'))?>">
|
||||
: <input type="number" min="0" max="300" name="maxTemp" value="<?=displayTemp(_var($disk,'maxTemp'))?>" placeholder="<?=displayTemp(makeTemp($disk,'max'))?>">
|
||||
|
||||
:info_critical_temp_help:
|
||||
|
||||
@@ -1426,25 +1448,41 @@ _(SMART controller type)_:
|
||||
<?=mk_option(_var($disk,'smType'), "-d sntjmicron", "JMicron NVMe pass-through")?>
|
||||
<?=mk_option(_var($disk,'smType'), "-d sntrealtek", "Realtek NVMe pass-through")?>
|
||||
</select>
|
||||
<input type="text" name="smPort1" value="<?=_var($disk,'smPort1')?>" class="option"><select name="smPort1" class="narrow option" disabled></select>
|
||||
<input type="text" name="smPort2" value="<?=_var($disk,'smPort2')?>" class="option"><select name="smPort2" class="narrow option" disabled></select>
|
||||
<input type="text" name="smPort3" value="<?=_var($disk,'smPort3')?>" class="option"><select name="smPort3" class="narrow option" disabled></select><span id="devtext">/dev/</span>
|
||||
<input type="text" name="smDevice" value="<?=_var($disk,'smDevice')?>" class="option" placeholder="<?=$dev?>"><span id="helptext">_(enter disk index and device name as applicable to your controller)_</span>
|
||||
<span class="inline-block">
|
||||
<input type="text" name="smPort1" value="<?=_var($disk,'smPort1')?>" class="option">
|
||||
<select name="smPort1" class="narrow option" disabled></select>
|
||||
<input type="text" name="smPort2" value="<?=_var($disk,'smPort2')?>" class="option">
|
||||
<select name="smPort2" class="narrow option" disabled></select>
|
||||
<input type="text" name="smPort3" value="<?=_var($disk,'smPort3')?>" class="option">
|
||||
<select name="smPort3" class="narrow option" disabled></select><span id="devtext">/dev/</span>
|
||||
<input type="text" name="smDevice" value="<?=_var($disk,'smDevice')?>" class="option" placeholder="<?=$dev?>">
|
||||
</span>
|
||||
<span id="helptext">_(enter disk index and device name as applicable to your controller)_</span>
|
||||
|
||||
:info_controller_type_help:
|
||||
|
||||
_(SMART attribute notifications)_:
|
||||
: <input type="text" name="smCustom" value="<?=$disk['smCustom']??$var['smCustom']??''?>" class="narrow">_(Custom attributes (use comma to separate numbers))_
|
||||
: <input type="text" name="smCustom" value="<?=$disk['smCustom']??$var['smCustom']??''?>">
|
||||
<span class="input-instructions">_(Custom attributes (use comma to separate numbers))_</span>
|
||||
|
||||
<?for ($x=0; $x<count($preselect); $x++):?>
|
||||
|
||||
: <input type="checkbox" name="at<?=$x?>" value="<?=_var($preselect[$x],'code')?>"<?=in_array(_var($preselect[$x],'code'),$events)?' checked':''?>><span class="code">_(Attribute)_ = <?=_var($preselect[$x],'code')?></span><?=_var($preselect[$x],'text')?>
|
||||
: <span class="inline-block">
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="at<?=$x?>" value="<?=_var($preselect[$x],'code')?>"<?=in_array(_var($preselect[$x],'code'),$events)?' checked':''?>>
|
||||
<span class="code">_(Attribute)_ = <?=_var($preselect[$x],'code')?></span>
|
||||
</label>
|
||||
<span class="inline-block"><?=_var($preselect[$x],'text')?></span>
|
||||
</span>
|
||||
<?endfor;?>
|
||||
|
||||
:info_attribute_notifications_help:
|
||||
|
||||
<input type="submit" name="#default" value="_(Default)_">
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="#apply" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
<?endif?>
|
||||
|
||||
@@ -1454,6 +1492,7 @@ _(SMART attribute notifications)_:
|
||||
<form markdown="1" method="POST" action="/update.htm" target="progressFrame" onsubmit="return validate(this.poolName.value)">
|
||||
<input type="hidden" name="poolNameOrig" value="<?=$name?>">
|
||||
<input type="hidden" name="changeSlots" value="apply">
|
||||
|
||||
<p>_(Caution)_: _(Renaming the pool will change the share storage allocations)_. _(After renaming the pool, check that your shares are assigned to the proper primary and secondary storage locations)_.</p>
|
||||
_(Name)_:
|
||||
: <input type="text" name="poolName" maxlength="40" value="<?=htmlspecialchars($name)?>">
|
||||
@@ -1464,13 +1503,13 @@ _(Name)_:
|
||||
<script>
|
||||
$(function() {
|
||||
<?if (count($sheets)>1):?>
|
||||
var ctrl = "<span class='status <?=$tabbed?'vhshift':'vshift'?>'><span class='waitmsg fa fa-circle-o-notch fa-span fa-fw' style='display:none;margin-right:8px'></span><a href='/<?=$path?>?name=<?=$prev?>' title='_(previous device)_'>";
|
||||
ctrl += "<button type='button' style='margin-right:4px' onclick='this.disabled=true;$(\".waitmsg\").show();'><i class='fa fa-chevron-left fa-fw'></i></button></a>";
|
||||
var ctrl = "<span class='inline-flex flex-row items-center gap-2'><span class='waitmsg fa fa-circle-o-notch fa-span fa-fw' style='display:none;'></span><a href='/<?=$path?>?name=<?=$prev?>' title='_(previous device)_'>";
|
||||
ctrl += "<button type='button' onclick='this.disabled=true;$(\".waitmsg\").show();'><i class='fa fa-chevron-left fa-fw'></i></button></a>";
|
||||
ctrl += "<a href='/<?=$path?>?name=<?=$next?>' title='_(next device)_'><button type='button' onclick='this.disabled=true;$(\".waitmsg\").show();'><i class='fa fa-chevron-right fa-fw'></i></button></a></span>";
|
||||
<?if ($tabbed):?>
|
||||
$('.tabs').append(ctrl);
|
||||
<?else:?>
|
||||
$('div[class=title]:first').append(ctrl);
|
||||
$('div[class=title]:first .right').append(ctrl);
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
<?if (!diskStatus('_NP')):?>
|
||||
|
||||
@@ -17,6 +17,7 @@ Tag="tv"
|
||||
?>
|
||||
<?
|
||||
$zip = htmlspecialchars(str_replace(' ','_',strtolower($var['NAME'])));
|
||||
$zip .= (_var($var,'safeMode') == 'yes') ? '-safemode' : '';
|
||||
?>
|
||||
<script>
|
||||
var diagnosticsFile = "";
|
||||
@@ -109,4 +110,15 @@ 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 id='download' type="button" value="_(Download)_" onclick="$(this).attr('disabled',true);diagnostics(zipfile())"><input type="button" value="_(Done)_" onclick="done()"><input type="checkbox" id="anonymize" checked>_(Anonymize diagnostics)_
|
||||
<br>
|
||||
|
||||
<label for="anonymize">
|
||||
<input type="checkbox" id="anonymize" checked>
|
||||
_(Anonymize diagnostics)_
|
||||
</label>
|
||||
|
||||
<span class="inline-block">
|
||||
<input id='download' type="button" value="_(Download)_" onclick="$(this).attr('disabled',true);diagnostics(zipfile())">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ $prev = urlencode($i>0 ? $refs[$i-1] : $refs[$end]);
|
||||
$next = urlencode($i<$end ? $refs[$i+1] : $refs[0]);
|
||||
?>
|
||||
<script>
|
||||
var ctrl = "<span class='ctrl2 status <?=$tabbed?'vhshift':'vshift'?>'><a href='/Shares/Disk?name=<?=$prev?>' title='previous disk share'><button type='button' style='margin-right:4px'><i class='fa fa-chevron-left fa-fw'></i></button></a><a href='/Shares/Disk?name=<?=$next?>' title='next disk share'><button type='button'><i class='fa fa-chevron-right fa-fw'></i></button></a></span>";
|
||||
var ctrl = "<span class='ctrl2 status'><a href='/Shares/Disk?name=<?=$prev?>' title='previous disk share'><button type='button' style='margin-right:4px'><i class='fa fa-chevron-left fa-fw'></i></button></a><a href='/Shares/Disk?name=<?=$next?>' title='next disk share'><button type='button'><i class='fa fa-chevron-right fa-fw'></i></button></a></span>";
|
||||
|
||||
function toggleButton(button,id) {
|
||||
var disabled = true;
|
||||
@@ -51,7 +51,7 @@ $(function() {
|
||||
<?if ($tabbed):?>
|
||||
$('.tabs').append(ctrl);
|
||||
<?else:?>
|
||||
$('div[class=title]:first').append(ctrl);
|
||||
$('div[class=title]:first .right').append(ctrl);
|
||||
<?endif;?>
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -15,10 +15,22 @@ Cond="_var($var,'fsState')!='Stopped' && _var($var,'shareDisk')!='no'"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<table class="unraid share_status">
|
||||
<thead><tr><td>_(Name)_</td><td>_(Comment)_</td><td>_(SMB)_</td><td>_(NFS)_</td><td>_(Type)_</td><td>_(Size)_</td><td>_(Free)_</td></tr></thead>
|
||||
<tbody id="disk_list"></tbody>
|
||||
</table>
|
||||
<div class="TableContainer">
|
||||
<table class="unraid share_status">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>_(Name)_</td>
|
||||
<td>_(Comment)_</td>
|
||||
<td>_(SMB)_</td>
|
||||
<td>_(NFS)_</td>
|
||||
<td>_(Type)_</td>
|
||||
<td>_(Size)_</td>
|
||||
<td>_(Free)_</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="disk_list"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<input id="compute-disks" type="button" value="_(Compute All)_" onclick="$(this).prop('disabled',true);diskList('',-1)">
|
||||
|
||||
|
||||
@@ -263,7 +263,10 @@ _(Default critical SSD temperature threshold)_ (°<?=_var($display,'unit','C'
|
||||
:ssd_default_critical_temperature_help:
|
||||
|
||||
|
||||
: <input type="submit" name="changeDisk" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeDisk" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<?if ($encrypt && $var['fsState']=='Started'):?>
|
||||
@@ -317,7 +320,10 @@ _(Select new keyfile)_:
|
||||
|
||||
</div>
|
||||
|
||||
: <input type="submit" name="newkey" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="newkey" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
@@ -376,15 +382,18 @@ _(Default SMART controller type)_:
|
||||
:disk_default_smart_controller_help:
|
||||
|
||||
_(Default SMART attribute notifications)_:
|
||||
: <input type="text" name="smCustom" value="<?=htmlspecialchars(_var($var,'smCustom'))?>" class="narrow">_(Custom attributes (use comma to separate numbers))_
|
||||
: <input type="text" name="smCustom" value="<?=htmlspecialchars(_var($var,'smCustom'))?>" class="narrow"><span class="input-instructions">_(Custom attributes (use comma to separate numbers))_</span>
|
||||
|
||||
<?for ($x = 0; $x < count($preselect); $x++):?>
|
||||
|
||||
: <input type="checkbox" name="at<?=$x?>" value="<?=_var($preselect[$x],'code')?>"<?=in_array(_var($preselect[$x],'code'),$events)?' checked':''?>><span class="code">_(Attribute)_ = <?=_var($preselect[$x],'code')?></span><?=_var($preselect[$x],'text')?>
|
||||
: <span><input type="checkbox" name="at<?=$x?>" value="<?=_var($preselect[$x],'code')?>"<?=in_array(_var($preselect[$x],'code'),$events)?' checked':''?>><span class="code">_(Attribute)_ = <?=_var($preselect[$x],'code')?></span><?=_var($preselect[$x],'text')?></span>
|
||||
<?endfor;?>
|
||||
|
||||
:disk_default_smart_attribute_help:
|
||||
|
||||
<input type="submit" name="#default" value="_(Default)_">
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="#apply" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -298,14 +298,15 @@ _(Show banner)_:
|
||||
|
||||
<div class="js-bannerSettings" markdown="1" style="display:none">
|
||||
_(Custom banner)_:
|
||||
<input type="hidden" name="#custom" value="">
|
||||
: <span id="dropbox">
|
||||
: <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?>
|
||||
<?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="image/*" 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="image/*" style="display:none">
|
||||
|
||||
:display_custom_banner_help:
|
||||
</div>
|
||||
@@ -333,5 +334,8 @@ _(Allow realtime updates on inactive browsers)_:
|
||||
</select>
|
||||
|
||||
<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()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="#apply" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -2,7 +2,7 @@ Menu="NetworkSettings:100"
|
||||
Title="_(Interface)_ eth0"
|
||||
Tag="icon-ethernet"
|
||||
---
|
||||
<?PHP
|
||||
<?php
|
||||
/* Copyright 2005-2025, Lime Technology
|
||||
* Copyright 2012-2025, Bergware International.
|
||||
*
|
||||
@@ -14,8 +14,8 @@ Tag="icon-ethernet"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$members = parse_ini_file('state/network.ini',true);
|
||||
<?php
|
||||
$members = parse_ini_file('state/network.ini', true);
|
||||
$build = false;
|
||||
$template = "$docroot/webGui/EthX.page";
|
||||
$ini = '/var/local/emhttp/network.ini';
|
||||
@@ -35,24 +35,33 @@ $masks = [
|
||||
];
|
||||
|
||||
// get available ethernet ports (excluding eth0)
|
||||
exec("ls --indicator-style=none /sys/class/net|grep -P '^eth[1-9][0-9]*$'",$ports);
|
||||
exec("ls --indicator-style=none /sys/class/net|grep -P '^eth[1-9][0-9]*$'", $ports);
|
||||
|
||||
function locked($source, $port) {
|
||||
global $members;
|
||||
foreach ($members as $member => $value) {
|
||||
if ($member == $source) continue;
|
||||
if ($value['BONDING']=='yes' && in_array($port,explode(',',$value['BONDNICS']))) return $value['BONDNAME'].' '.$member;
|
||||
if ($value['BRIDGING']=='yes' && in_array($port,explode(',',$value['BRNICS']))) return $value['BRNAME'].' '.$member;
|
||||
}
|
||||
return false;
|
||||
function locked($source, $port)
|
||||
{
|
||||
global $members;
|
||||
foreach ($members as $member => $value) {
|
||||
if ($member == $source) {
|
||||
continue;
|
||||
}
|
||||
if ($value['BONDING'] == 'yes' && in_array($port, explode(',', $value['BONDNICS']))) {
|
||||
return $value['BONDNAME'].' '.$member;
|
||||
}
|
||||
if ($value['BRIDGING'] == 'yes' && in_array($port, explode(',', $value['BRNICS']))) {
|
||||
return $value['BRNAME'].' '.$member;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function vlanID($cfg) {
|
||||
return array_filter($cfg, function($key){return strpos($key, 'VLANID:')===0;}, ARRAY_FILTER_USE_KEY);
|
||||
function vlanID($cfg)
|
||||
{
|
||||
return array_filter($cfg, function ($key) {return strpos($key, 'VLANID:') === 0;}, ARRAY_FILTER_USE_KEY);
|
||||
}
|
||||
|
||||
function index($key) {
|
||||
return filter_var($key, FILTER_SANITIZE_NUMBER_INT);
|
||||
function index($key)
|
||||
{
|
||||
return filter_var($key, FILTER_SANITIZE_NUMBER_INT);
|
||||
}
|
||||
|
||||
function metric($eth) {
|
||||
@@ -66,31 +75,36 @@ function metric($eth) {
|
||||
|
||||
// remove non-existing ethernet ports
|
||||
foreach (glob("$docroot/webGui/Eth[1-9]*.page", GLOB_NOSORT) as $port) {
|
||||
if (!in_array(strtolower(basename($port, '.page')), $ports)) {
|
||||
@unlink($port);
|
||||
$build = true;
|
||||
}
|
||||
if (!in_array(strtolower(basename($port, '.page')), $ports)) {
|
||||
@unlink($port);
|
||||
$build = true;
|
||||
}
|
||||
}
|
||||
|
||||
// add new ethernet ports
|
||||
foreach ($ports as $ethX) {
|
||||
$file = "$docroot/webGui/".ucfirst($ethX).".page";
|
||||
if (!file_exists($file)) {
|
||||
$X = filter_var($ethX, FILTER_SANITIZE_NUMBER_INT);
|
||||
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;
|
||||
}
|
||||
$file = "$docroot/webGui/".ucfirst($ethX).".page";
|
||||
if (!file_exists($file)) {
|
||||
$X = filter_var($ethX, FILTER_SANITIZE_NUMBER_INT);
|
||||
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 --ns $$ libvirt') ? _('VM manager') : '';
|
||||
$service .= exec('pgrep --ns $$ docker') ? ($service ? ' '._('and').' ' : '')._('Docker service') : '';
|
||||
|
||||
// eth0 port status
|
||||
$no_eth0 = exec("ip -br link show eth0 | awk '{print \$2;exit}'")=='DOWN';
|
||||
$no_eth0 = exec("ip -br link show eth0 | awk '{print \$2;exit}'") == 'DOWN';
|
||||
|
||||
// get VLAN interfaces
|
||||
$vlan_eth0 = $sort_eth0 = [];
|
||||
if (isset($eth0)) foreach (vlanID($eth0) as $key => $val) {$vlan_eth0[] = index($key); $sort_eth0[] = (int)$val;}
|
||||
if (isset($eth0)) {
|
||||
foreach (vlanID($eth0) as $key => $val) {
|
||||
$vlan_eth0[] = index($key);
|
||||
$sort_eth0[] = (int)$val;
|
||||
}
|
||||
}
|
||||
array_multisort($sort_eth0, $vlan_eth0);
|
||||
?>
|
||||
|
||||
@@ -554,31 +568,30 @@ function networkInfo(port, vlan) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="title nocontrol shift"> </div>
|
||||
<div class="shade uplift">
|
||||
<div class="shade">
|
||||
<form name="dns_settings" onchange="signalRun(this,1)">
|
||||
<div markdown="1" id="dns4" class="hide">
|
||||
_(IPv4 DNS server assignment)_:
|
||||
: <select name="DHCP_KEEPRESOLV" onchange="checkDNSsettings(eth0,'slow')">
|
||||
<?=mk_option(_var($eth0,'DHCP_KEEPRESOLV'), "no", _("Automatic"))?>
|
||||
<?=mk_option(_var($eth0,'DHCP_KEEPRESOLV'), "yes", _("Static"))?>
|
||||
<?=mk_option(_var($eth0, 'DHCP_KEEPRESOLV'), "no", _("Automatic"))?>
|
||||
<?=mk_option(_var($eth0, 'DHCP_KEEPRESOLV'), "yes", _("Static"))?>
|
||||
</select>
|
||||
|
||||
:eth_ipv4_dns_server_assignment_help:
|
||||
|
||||
<div markdown="1" id="dns4server" class="hide">
|
||||
_(IPv4 DNS server)_ 1:
|
||||
: <input type="text" name="DNS_SERVER1" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($eth0,'DNS_SERVER1')?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
: <input type="text" name="DNS_SERVER1" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($eth0, 'DNS_SERVER1')?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
|
||||
:eth_ipv4_dns_server_help:
|
||||
|
||||
_(IPv4 DNS server)_ 2:
|
||||
: <input type="text" name="DNS_SERVER2" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($eth0,'DNS_SERVER2')?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
: <input type="text" name="DNS_SERVER2" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($eth0, 'DNS_SERVER2')?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
|
||||
:eth_ipv4_dns_server2_help:
|
||||
|
||||
_(IPv4 DNS server)_ 3:
|
||||
: <input type="text" name="DNS_SERVER3" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($eth0,'DNS_SERVER3')?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
: <input type="text" name="DNS_SERVER3" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($eth0, 'DNS_SERVER3')?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">
|
||||
|
||||
:eth_ipv4_dns_server3_help:
|
||||
|
||||
@@ -587,25 +600,25 @@ _(IPv4 DNS server)_ 3:
|
||||
<div markdown="1" id="dns6" class="hide">
|
||||
_(IPv6 DNS server assignment)_:
|
||||
: <select name="DHCP6_KEEPRESOLV" onchange="checkDNS6settings(eth0,'slow')">
|
||||
<?=mk_option(_var($eth0,'DHCP6_KEEPRESOLV'), "no", _("Automatic"))?>
|
||||
<?=mk_option(_var($eth0,'DHCP6_KEEPRESOLV'), "yes", _("Static"))?>
|
||||
<?=mk_option(_var($eth0, 'DHCP6_KEEPRESOLV'), "no", _("Automatic"))?>
|
||||
<?=mk_option(_var($eth0, 'DHCP6_KEEPRESOLV'), "yes", _("Static"))?>
|
||||
</select>
|
||||
|
||||
:eth_ipv6_dns_server_assignment_help:
|
||||
|
||||
<div markdown="1" id="dns6server" class="hide">
|
||||
_(IPv6 DNS server)_ 1:
|
||||
: <input type="text" name="DNS6_SERVER1" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($eth0,'DNS6_SERVER1')?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
: <input type="text" name="DNS6_SERVER1" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($eth0, 'DNS6_SERVER1')?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
|
||||
:eth_ipv6_dns_server_help:
|
||||
|
||||
_(IPv6 DNS server)_ 2:
|
||||
: <input type="text" name="DNS6_SERVER2" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($eth0,'DNS6_SERVER2')?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
: <input type="text" name="DNS6_SERVER2" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($eth0, 'DNS6_SERVER2')?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
|
||||
:eth_ipv6_dns_server2_help:
|
||||
|
||||
_(IPv6 DNS server)_ 3:
|
||||
: <input type="text" name="DNS6_SERVER3" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($eth0,'DNS6_SERVER3')?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
: <input type="text" name="DNS6_SERVER3" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($eth0, 'DNS6_SERVER3')?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">
|
||||
|
||||
:eth_ipv6_dns_server3_help:
|
||||
|
||||
@@ -635,8 +648,12 @@ _(IPv6 DNS server)_ 3:
|
||||
<input type="hidden" name="DNS6_SERVER3" value="">
|
||||
|
||||
_(Interface description)_:
|
||||
: <input type="text" name="DESCRIPTION:0" maxlength="80" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars(_var($eth0,"DESCRIPTION:0"))?>">
|
||||
<input type="button" class="form" value="_(Info)_" onclick="networkInfo('eth0')">
|
||||
: <input type="text" name="DESCRIPTION:0" maxlength="80" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars(_var($eth0, "DESCRIPTION:0"))?>">
|
||||
|
||||
|
||||
: <span class="inline-block">
|
||||
<input type="button" class="form" value="_(Info)_" onclick="networkInfo('eth0')">
|
||||
</span>
|
||||
|
||||
:eth_interface_description_help:
|
||||
|
||||
@@ -647,8 +664,8 @@ _(MAC address)_:
|
||||
|
||||
_(Enable bonding)_:
|
||||
: <select name="BONDING" onchange="checkBondingSettings(this.form,1)">
|
||||
<?=mk_option(_var($eth0,'BONDING'), "no", _("No"))?>
|
||||
<?=mk_option(_var($eth0,'BONDING'), "yes", _("Yes"))?>
|
||||
<?=mk_option(_var($eth0, 'BONDING'), "no", _("No"))?>
|
||||
<?=mk_option(_var($eth0, 'BONDING'), "yes", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:eth_enable_bonding_help:
|
||||
@@ -656,13 +673,13 @@ _(Enable bonding)_:
|
||||
<div markdown="1" id="bond-members-eth0" class="'hide">
|
||||
_(Bonding mode)_:
|
||||
: <select name="BONDING_MODE" onchange="checkBondingSettings(this.form,-1)">
|
||||
<?=mk_option(_var($eth0,'BONDING_MODE'), "0", _("balance-rr")." (0)")?>
|
||||
<?=mk_option(_var($eth0,'BONDING_MODE'), "1", _("active-backup")." (1)",isset($eth0['BONDING_MODE'])?'':'selected')?>
|
||||
<?=mk_option(_var($eth0,'BONDING_MODE'), "2", _("balance-xor")." (2)")?>
|
||||
<?=mk_option(_var($eth0,'BONDING_MODE'), "3", _("broadcast")." (3)")?>
|
||||
<?=mk_option(_var($eth0,'BONDING_MODE'), "4", _("802.3ad")." (4)")?>
|
||||
<?=mk_option(_var($eth0,'BONDING_MODE'), "5", _("balance-tlb")." (5)")?>
|
||||
<?=mk_option(_var($eth0,'BONDING_MODE'), "6", _("balance-alb")." (6)")?>
|
||||
<?=mk_option(_var($eth0, 'BONDING_MODE'), "0", _("balance-rr")." (0)")?>
|
||||
<?=mk_option(_var($eth0, 'BONDING_MODE'), "1", _("active-backup")." (1)", isset($eth0['BONDING_MODE']) ? '' : 'selected')?>
|
||||
<?=mk_option(_var($eth0, 'BONDING_MODE'), "2", _("balance-xor")." (2)")?>
|
||||
<?=mk_option(_var($eth0, 'BONDING_MODE'), "3", _("broadcast")." (3)")?>
|
||||
<?=mk_option(_var($eth0, 'BONDING_MODE'), "4", _("802.3ad")." (4)")?>
|
||||
<?=mk_option(_var($eth0, 'BONDING_MODE'), "5", _("balance-tlb")." (5)")?>
|
||||
<?=mk_option(_var($eth0, 'BONDING_MODE'), "6", _("balance-alb")." (6)")?>
|
||||
</select>
|
||||
<span id="attention0" class="hide">**_(Attention)_:** _(this mode requires a network switch with proper setup and support)_...</span>
|
||||
|
||||
@@ -670,7 +687,7 @@ _(Bonding mode)_:
|
||||
|
||||
_(Bonding members of)_ bond0:
|
||||
: <select id="bond-eth0" name="BONDNICS" multiple="multiple" class="'hide">
|
||||
<?=mk_option(_var($eth0,'BONDNICS'),'eth0','eth0','selected disabled')?>
|
||||
<?=mk_option(_var($eth0, 'BONDNICS'), 'eth0', 'eth0', 'selected disabled')?>
|
||||
<?foreach ($ports as $port):?>
|
||||
<?if (!locked('eth0',$port)) echo mk_option_check(_var($eth0,'BONDNICS'),$port,$port)?>
|
||||
<?endforeach;?>
|
||||
@@ -681,8 +698,8 @@ _(Bonding members of)_ bond0:
|
||||
</div>
|
||||
_(Enable bridging)_:
|
||||
: <select name="BRIDGING" onchange="checkBridgingSettings(this.form,1)">
|
||||
<?=mk_option(_var($eth0,'BRIDGING'), "no", _("No"))?>
|
||||
<?=mk_option(_var($eth0,'BRIDGING'), "yes", _("Yes"))?>
|
||||
<?=mk_option(_var($eth0, 'BRIDGING'), "no", _("No"))?>
|
||||
<?=mk_option(_var($eth0, 'BRIDGING'), "yes", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
:eth_enable_bridging_help:
|
||||
@@ -690,7 +707,7 @@ _(Enable bridging)_:
|
||||
<div markdown="1" id="bridge-members-eth0" class="'hide">
|
||||
_(Bridging members of)_ br0:
|
||||
: <select id="bridge-eth0" name="BRNICS" multiple="multiple" class="'hide">
|
||||
<?=mk_option(_var($eth0,'BRNICS'),'eth0','eth0','selected disabled')?>
|
||||
<?=mk_option(_var($eth0, 'BRNICS'), 'eth0', 'eth0', 'selected disabled')?>
|
||||
<?foreach ($ports as $port):?>
|
||||
<?if (!locked('eth0',$port)) echo mk_option_check(_var($eth0,'BRNICS'),$port,$port)?>
|
||||
<?endforeach;?>
|
||||
@@ -701,9 +718,9 @@ _(Bridging members of)_ br0:
|
||||
</div>
|
||||
_(Network protocol)_:
|
||||
: <select name="PROTOCOL:0" onchange="selectProtocol(this.form,0,'slow')">
|
||||
<?=mk_option(_var($eth0,"PROTOCOL:0"), 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option(_var($eth0,"PROTOCOL:0"), 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option(_var($eth0,"PROTOCOL:0"), 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
<?=mk_option(_var($eth0, "PROTOCOL:0"), 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option(_var($eth0, "PROTOCOL:0"), 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option(_var($eth0, "PROTOCOL:0"), 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
</select>
|
||||
|
||||
:eth_network_protocol_help:
|
||||
@@ -711,15 +728,15 @@ _(Network protocol)_:
|
||||
<div markdown="1" class="ipv4-eth0-0 hide">
|
||||
_(IPv4 address assignment)_:
|
||||
: <select name="USE_DHCP:0" onchange="selectProtocol(this.form,0,'slow')">
|
||||
<?=mk_option(_var($eth0,"USE_DHCP:0"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0,"USE_DHCP:0"), 'no', _('Static'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP:0"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP:0"), 'no', _('Static'))?>
|
||||
</select>
|
||||
|
||||
:eth_ipv4_address_assignment_help:
|
||||
|
||||
<div markdown="1" class="more-ipv4-eth0-0 hide">
|
||||
_(IPv4 address)_:
|
||||
: <input type="text" name="IPADDR:0" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($eth0,"IPADDR:0")?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:0" class="slim">
|
||||
: <input type="text" name="IPADDR:0" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($eth0, "IPADDR:0")?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:0" class="slim">
|
||||
<?foreach ($masks as $mask => $prefix) echo mk_option(_var($eth0,"NETMASK:0"), $mask, $prefix, _var($eth0,"NETMASK:0")=='' && $prefix=='24'?'selected':'');?>
|
||||
</select>
|
||||
|
||||
@@ -736,15 +753,15 @@ _(IPv4 default gateway)_:
|
||||
<div markdown="1" class="ipv6-eth0-0 hide">
|
||||
_(IPv6 address assignment)_:
|
||||
: <select name="USE_DHCP6:0" onchange="selectProtocol(this.form,0,'slow')">
|
||||
<?=mk_option(_var($eth0,"USE_DHCP6:0"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0,"USE_DHCP6:0"), 'no', _('Static'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP6:0"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP6:0"), 'no', _('Static'))?>
|
||||
</select>
|
||||
|
||||
:eth_ipv6_address_assignment_help:
|
||||
|
||||
<div markdown="1" class="more-ipv6-eth0-0 hide">
|
||||
_(IPv6 address)_:
|
||||
: <input type="text" name="IPADDR6:0" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($eth0,"IPADDR6:0")?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:0" min="7" max="128" autocomplete="off" spellcheck="false" value="<?=_var($eth0,"NETMASK6:0","64")?>" class="slim">
|
||||
: <input type="text" name="IPADDR6:0" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($eth0, "IPADDR6:0")?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:0" min="7" max="128" autocomplete="off" spellcheck="false" value="<?=_var($eth0, "NETMASK6:0", "64")?>" class="slim">
|
||||
|
||||
:eth_ipv6_address_help:
|
||||
|
||||
@@ -758,8 +775,8 @@ _(IPv6 default gateway)_:
|
||||
<div markdown="1" class="priv-ipv6-eth0-0 hide">
|
||||
_(IPv6 privacy extensions)_:
|
||||
: <select name="PRIVACY6:0">
|
||||
<?=mk_option(_var($eth0,"PRIVACY6:0"), "0", _("Disabled"))?>
|
||||
<?=mk_option(_var($eth0,"PRIVACY6:0"), "2", _("Enabled"))?>
|
||||
<?=mk_option(_var($eth0, "PRIVACY6:0"), "0", _("Disabled"))?>
|
||||
<?=mk_option(_var($eth0, "PRIVACY6:0"), "2", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
:eth_ipv6_privacy_extensions_help:
|
||||
@@ -767,15 +784,15 @@ _(IPv6 privacy extensions)_:
|
||||
</div>
|
||||
</div>
|
||||
_(Desired MTU)_:
|
||||
: <input type="number" name="MTU" min="68" max="9198" autocomplete="off" spellcheck="false" value="<?=_var($eth0,'MTU')?>" class="narrow" placeholder="1500" <?=(_var($eth0,'MTU')!='' || _var($eth0,'USE_MTU'))?'':'disabled'?>>
|
||||
<input type="checkbox" name="USE_MTU" onchange="selectMTU(this.form)" <?=_var($eth0,'USE_MTU')?'checked':''?>><?=$jumbo?> <i class="fa fa-info-circle blue-text hand" title="<?=$jumbo_1?>. <?=$jumbo_2?>. <?=$jumbo_3?>!"></i>
|
||||
: <input type="number" name="MTU" min="68" max="9198" autocomplete="off" spellcheck="false" value="<?=_var($eth0, 'MTU')?>" class="narrow" placeholder="1500" <?=(_var($eth0, 'MTU') != '' || _var($eth0, 'USE_MTU')) ? '' : 'disabled'?>>
|
||||
<span><input type="checkbox" name="USE_MTU" onchange="selectMTU(this.form)" <?=_var($eth0, 'USE_MTU') ? 'checked' : ''?>><?=$jumbo?> <i class="fa fa-info-circle blue-text hand" title="<?=$jumbo_1?>. <?=$jumbo_2?>. <?=$jumbo_3?>!"></i></span>
|
||||
|
||||
:eth_desired_mtu_help:
|
||||
|
||||
_(Enable VLANs)_:
|
||||
: <select name="TYPE" onchange="checkNetworkAccess(this.form)">
|
||||
<?=mk_option(_var($eth0,'TYPE'), 'access', _('No'))?>
|
||||
<?=mk_option(_var($eth0,'TYPE'), 'trunk', _('Yes'))?>
|
||||
<?=mk_option(_var($eth0, 'TYPE'), 'access', _('No'))?>
|
||||
<?=mk_option(_var($eth0, 'TYPE'), 'trunk', _('Yes'))?>
|
||||
</select>
|
||||
<input type="button" id="button-vlan-eth0" class="form hide" value="_(Show)_" onclick="showVLAN('eth0')">
|
||||
|
||||
@@ -786,22 +803,28 @@ _(Enable VLANs)_:
|
||||
<?foreach ($vlan_eth0 as $i):?>
|
||||
<div markdown="1" id="index-eth0-<?=$i?>" class="access-eth0 shade hide">
|
||||
_(Interface description)_:
|
||||
: <input type="text" name="DESCRIPTION:<?=$i?>" maxlength="80" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars(_var($eth0,"DESCRIPTION:$i"))?>">
|
||||
<input type="button" class="form" value="_(Info)_" onclick="networkInfo('eth0',<?=_var($eth0,"VLANID:$i")?>)">
|
||||
: <input type="text" name="DESCRIPTION:<?=$i?>" maxlength="80" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars(_var($eth0, "DESCRIPTION:$i"))?>">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Info)_" onclick="networkInfo('eth0',<?=_var($eth0, "VLANID:$i")?>)">
|
||||
</span>
|
||||
|
||||
:eth_interface_description_help:
|
||||
|
||||
_(VLAN number)_:
|
||||
: <input type="number" name="VLANID:<?=$i?>" min="1" max="4095" autocomplete="off" spellcheck="false" value="<?=_var($eth0,"VLANID:$i")?>" class="narrow gap" required>
|
||||
<?if (!$service):?><input type="button" class="form" value="_(Delete VLAN)_" onclick="removeVLAN($('#index-eth0-<?=$i?>'))"><?endif;?>
|
||||
: <input type="number" name="VLANID:<?=$i?>" min="1" max="4095" autocomplete="off" spellcheck="false" value="<?=_var($eth0, "VLANID:$i")?>" class="narrow gap" required>
|
||||
<?if (!$service):?>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Delete VLAN)_" onclick="removeVLAN($('#index-eth0-<?=$i?>'))">
|
||||
</span>
|
||||
<?endif;?>
|
||||
|
||||
:eth_vlan_number_help:
|
||||
|
||||
_(Network protocol)_:
|
||||
: <select name="PROTOCOL:<?=$i?>" onchange="selectProtocol(this.form,<?=$i?>,'slow')">
|
||||
<?=mk_option(_var($eth0,"PROTOCOL:$i"), 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option(_var($eth0,"PROTOCOL:$i"), 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option(_var($eth0,"PROTOCOL:$i"), 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
<?=mk_option(_var($eth0, "PROTOCOL:$i"), 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option(_var($eth0, "PROTOCOL:$i"), 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option(_var($eth0, "PROTOCOL:$i"), 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
</select>
|
||||
|
||||
:eth_network_protocol_help:
|
||||
@@ -809,17 +832,17 @@ _(Network protocol)_:
|
||||
<div markdown="1" class="ipv4-eth0-<?=$i?> hide">
|
||||
_(IPv4 address assignment)_:
|
||||
: <select name="USE_DHCP:<?=$i?>" class="ctrl" onchange="selectProtocol(this.form,<?=$i?>,'slow')">
|
||||
<?=mk_option(_var($eth0,"USE_DHCP:$i"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0,"USE_DHCP:$i"), 'no', _('Static'))?>
|
||||
<?=mk_option(_var($eth0,"USE_DHCP:$i"), '', _('None'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP:$i"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP:$i"), 'no', _('Static'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP:$i"), '', _('None'))?>
|
||||
</select>
|
||||
<span class="gw4-eth0-<?=$i?> hide"><input type="checkbox" name="USE_GW4:<?=$i?>" onchange="selectGW(this.form,4,<?=$i?>,'slow')" <?=_var($eth0,"USE_GW:$i")?'checked':''?>><?=$enable?></span>
|
||||
<span class="gw4-eth0-<?=$i?> hide"><input type="checkbox" name="USE_GW4:<?=$i?>" onchange="selectGW(this.form,4,<?=$i?>,'slow')" <?=_var($eth0, "USE_GW:$i") ? 'checked' : ''?>><?=$enable?></span>
|
||||
|
||||
:eth_ipv4_address_assignment_help:
|
||||
|
||||
<div markdown="1" class="more-ipv4-eth0-<?=$i?> hide">
|
||||
_(IPv4 address)_:
|
||||
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($eth0,"IPADDR:$i")?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:<?=$i?>" class="slim">
|
||||
: <input type="text" name="IPADDR:<?=$i?>" maxlength="15" autocomplete="off" spellcheck="false" value="<?=_var($eth0, "IPADDR:$i")?>" class="narrow" pattern="<?=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/<select name="NETMASK:<?=$i?>" class="slim">
|
||||
<?foreach ($masks as $mask => $prefix) echo mk_option(_var($eth0,"NETMASK:$i"), $mask, $prefix, _var($eth0,"NETMASK:$i")=='' && $prefix=='24'?'selected':'');?>
|
||||
</select>
|
||||
|
||||
@@ -838,19 +861,19 @@ _(IPv4 default gateway)_:
|
||||
<div markdown="1" class="ipv6-eth0-<?=$i?> hide">
|
||||
_(IPv6 address assignment)_:
|
||||
: <select name="USE_DHCP6:<?=$i?>" class="ctrl" onchange="selectProtocol(this.form,<?=$i?>,'slow')">
|
||||
<?=mk_option(_var($eth0,"USE_DHCP6:$i"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0,"USE_DHCP6:$i"), 'no', _('Static'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP6:$i"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP6:$i"), 'no', _('Static'))?>
|
||||
<?if ($i>0):?>
|
||||
<?=mk_option(_var($eth0,"USE_DHCP6:$i"), '', _('None'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP6:$i"), '', _('None'))?>
|
||||
<?endif;?>
|
||||
</select>
|
||||
<span class="gw6-eth0-<?=$i?> hide"><input type="checkbox" name="USE_GW6:<?=$i?>" onchange="selectGW(this.form,6,<?=$i?>,'slow')" <?=_var($eth0,"USE_GW6:$i")?'checked':''?>><?=$enable?></span>
|
||||
<span class="gw6-eth0-<?=$i?> hide"><input type="checkbox" name="USE_GW6:<?=$i?>" onchange="selectGW(this.form,6,<?=$i?>,'slow')" <?=_var($eth0, "USE_GW6:$i") ? 'checked' : ''?>><?=$enable?></span>
|
||||
|
||||
:eth_ipv6_address_assignment_help:
|
||||
|
||||
<div markdown="1" class="more-ipv6-eth0-<?=$i?> hide">
|
||||
_(IPv6 address)_:
|
||||
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($eth0,"IPADDR6:$i")?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:<?=$i?>" min="7" max="128" autocomplete="off" spellcheck="false" value="<?=_var($eth0,"NETMASK6:$i","64")?>" class="slim">
|
||||
: <input type="text" name="IPADDR6:<?=$i?>" maxlength="39" autocomplete="off" spellcheck="false" value="<?=_var($eth0, "IPADDR6:$i")?>" pattern="<?=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/<input type="number" name="NETMASK6:<?=$i?>" min="7" max="128" autocomplete="off" spellcheck="false" value="<?=_var($eth0, "NETMASK6:$i", "64")?>" class="slim">
|
||||
|
||||
:eth_ipv6_address_help:
|
||||
|
||||
@@ -866,8 +889,8 @@ _(IPv6 default gateway)_:
|
||||
<div markdown="1" class="priv-ipv6-eth0-<?=$i?> hide">
|
||||
_(IPv6 privacy extensions)_:
|
||||
: <select name="PRIVACY6:<?=$i?>">
|
||||
<?=mk_option(_var($eth0,"PRIVACY6:$i"), "0", _("Disabled"))?>
|
||||
<?=mk_option(_var($eth0,"PRIVACY6:$i"), "2", _("Enabled"))?>
|
||||
<?=mk_option(_var($eth0, "PRIVACY6:$i"), "0", _("Disabled"))?>
|
||||
<?=mk_option(_var($eth0, "PRIVACY6:$i"), "2", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
:eth_ipv6_privacy_extensions_help:
|
||||
@@ -879,34 +902,41 @@ _(IPv6 privacy extensions)_:
|
||||
</div>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Apply)_" onclick="$('#wait_eth0').show()" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" onclick="$('#wait_eth0').show()" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
<?if (!$service):?>
|
||||
<input type="button" id="button-add-eth0" class="hide" value="_(Add VLAN)_" onclick="addVLAN('eth0')">
|
||||
<?else:?><?=sprintf(_('Stop **%s** to make changes, see'),$service).' (<a href="/Settings">'._('Settings').'</a>)'?><?endif;?>
|
||||
<span class="inline-block">
|
||||
<input type="button" id="button-add-eth0" class="hide" value="_(Add VLAN)_" onclick="addVLAN('eth0')">
|
||||
</span>
|
||||
<?else:?><span><?=sprintf(_('Stop **%s** to make changes, see'), $service).' (<a href="/Settings">'._('Settings').'</a>)'?></span><?endif;?>
|
||||
</form>
|
||||
|
||||
<script markdown="1" type="text/html" id="network-template-eth0">
|
||||
<div markdown="1" id="index-eth0-INDEX" class="access-eth0 shade">
|
||||
_(Interface description)_:
|
||||
: <input type="text" name="DESCRIPTION:INDEX" maxlength="80" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars(_var($eth0,"DESCRIPTION:INDEX"))?>">
|
||||
: <input type="text" name="DESCRIPTION:INDEX" maxlength="80" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars(_var($eth0, "DESCRIPTION:INDEX"))?>">
|
||||
|
||||
_(VLAN number)_:
|
||||
: <input type="number" name="VLANID:INDEX" min="1" max="4095" autocomplete="off" spellcheck="false" value="<?=_var($eth0,"VLANID:INDEX")?>" class="narrow gap" required>
|
||||
<input type="button" class="form" value="_(Delete VLAN)_" onclick="removeVLAN($('#index-eth0-INDEX'))">
|
||||
: <input type="number" name="VLANID:INDEX" min="1" max="4095" autocomplete="off" spellcheck="false" value="<?=_var($eth0, "VLANID:INDEX")?>" class="narrow gap" required>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Delete VLAN)_" onclick="removeVLAN($('#index-eth0-INDEX'))">
|
||||
</span>
|
||||
|
||||
_(Network protocol)_:
|
||||
: <select name="PROTOCOL:INDEX" onchange="selectProtocol(this.form,INDEX,'slow')">
|
||||
<?=mk_option(_var($eth0,"PROTOCOL:INDEX"), 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option(_var($eth0,"PROTOCOL:INDEX"), 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option(_var($eth0,"PROTOCOL:INDEX"), 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
<?=mk_option(_var($eth0, "PROTOCOL:INDEX"), 'ipv4', _('IPv4 only'))?>
|
||||
<?=mk_option(_var($eth0, "PROTOCOL:INDEX"), 'ipv6', _('IPv6 only'))?>
|
||||
<?=mk_option(_var($eth0, "PROTOCOL:INDEX"), 'ipv4+ipv6', _('IPv4 + IPv6'))?>
|
||||
</select>
|
||||
|
||||
<div markdown="1" class="ipv4-eth0-INDEX">
|
||||
_(IPv4 address assignment)_:
|
||||
: <select name="USE_DHCP:INDEX" class="ctrl" onchange="selectProtocol(this.form,INDEX,'slow')">
|
||||
<?=mk_option(_var($eth0,"USE_DHCP:INDEX"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0,"USE_DHCP:INDEX"), 'no', _('Static'))?>
|
||||
<?=mk_option(_var($eth0,"USE_DHCP:INDEX"), '', _('None'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP:INDEX"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP:INDEX"), 'no', _('Static'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP:INDEX"), '', _('None'))?>
|
||||
</select>
|
||||
<span class="gw4-eth0-INDEX hide"><input type="checkbox" name="USE_GW4:INDEX" onchange="selectGW(this.form,4,INDEX,'slow')"><?=$enable?></span>
|
||||
|
||||
@@ -927,9 +957,9 @@ _(IPv4 default gateway)_:
|
||||
<div markdown="1" class="ipv6-eth0-INDEX hide">
|
||||
_(IPv6 address assignment)_:
|
||||
: <select name="USE_DHCP6:INDEX" class="ctrl" onchange="selectProtocol(this.form,INDEX,'slow')">
|
||||
<?=mk_option(_var($eth0,"USE_DHCP6:INDEX"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0,"USE_DHCP6:INDEX"), 'no', _('Static'))?>
|
||||
<?=mk_option(_var($eth0,"USE_DHCP6:INDEX"), '', _('None'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP6:INDEX"), 'yes', _('Automatic'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP6:INDEX"), 'no', _('Static'))?>
|
||||
<?=mk_option(_var($eth0, "USE_DHCP6:INDEX"), '', _('None'))?>
|
||||
</select>
|
||||
<span class="gw6-eth0-INDEX hide"><input type="checkbox" name="USE_GW6:INDEX" onchange="selectGW(this.form,6,INDEX,'slow')"><?=$enable?></span>
|
||||
|
||||
@@ -947,8 +977,8 @@ _(IPv6 default gateway)_:
|
||||
<div markdown="1" class="priv-ipv6-eth0-INDEX hide">
|
||||
_(IPv6 privacy extensions)_:
|
||||
: <select name="PRIVACY6:INDEX">
|
||||
<?=mk_option(_var($eth0,'PRIVACY6:INDEX'), "0", _("Disabled"))?>
|
||||
<?=mk_option(_var($eth0,'PRIVACY6:INDEX'), "2", _("Enabled"))?>
|
||||
<?=mk_option(_var($eth0, 'PRIVACY6:INDEX'), "0", _("Disabled"))?>
|
||||
<?=mk_option(_var($eth0, 'PRIVACY6:INDEX'), "2", _("Enabled"))?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -342,7 +342,10 @@ _(IPv6 privacy extensions)_:
|
||||
</div>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Apply)_" onclick="$('#wait_<?=$tabbed?'eth0':'ethX'?>').show()" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" onclick="$('#wait_<?=$tabbed?'eth0':'ethX'?>').show()" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
<input type="button" name="#shut_ethX" value="<?=_('Port '.$cmd)?>" onclick="portToggle('ethX','<?=$cmd?>')">
|
||||
<?if (!$service):?>
|
||||
<input type="button" id="button-add-ethX" class="hide" value="_(Add VLAN)_" onclick="addVLAN('ethX')">
|
||||
|
||||
@@ -47,7 +47,10 @@ _(FTP user(s))_:
|
||||
:ftp_users_help:
|
||||
|
||||
|
||||
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
@@ -68,4 +68,7 @@ _(Flash GUID)_:
|
||||
:flash_backup_help:
|
||||
|
||||
|
||||
: <input type="button" value="_(Flash backup)_" onclick="backup()"><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="button" value="_(Flash backup)_" onclick="backup()">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
|
||||
@@ -60,7 +60,10 @@ _(Permit UEFI boot mode)_ <input type="checkbox" name="boot" checked disabled>
|
||||
: *_(By default UEFI and Legacy boot mode are both enabled when GRUB is used to boot the machine)_.*
|
||||
|
||||
<input type="button" value="_(Default)_" onclick="setDefault(this.form)">
|
||||
: <input type="submit" value="_(Apply)_"><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
|
||||
:grub_button_help:
|
||||
|
||||
|
||||
@@ -42,7 +42,11 @@ _(Model)_:
|
||||
:id_model_help:
|
||||
|
||||
|
||||
: <input type="submit" name="changeNames" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"><?if ($disabled):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeNames" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
<?if ($disabled):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -25,6 +25,10 @@ function installKey(file) {
|
||||
<span class="info">_(To install a registration key, paste the key file URL in the box below and click **Install Key**)_.</span>
|
||||
|
||||
_(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="text" name="file" id="key_file" maxlength="1024" value="">
|
||||
|
||||
|
||||
: <span class="inline-block">
|
||||
<input type="button" value="_(Install Key)_" onclick="installKey(this.form.file.value.trim())">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -82,7 +82,11 @@ $(function() {
|
||||
$('input.view').change(function(){$('.user,.developer').toggle('slow');});
|
||||
});
|
||||
</script>
|
||||
<span class="status vhshift"><input type="checkbox" class="view"></span>
|
||||
|
||||
|
||||
: <span class="inline-block">
|
||||
<input type="checkbox" class="view">
|
||||
</span>
|
||||
|
||||
<div markdown="1" class="user">
|
||||
<div class="notice">_(Use this to install official language packs)_</div>
|
||||
@@ -90,7 +94,10 @@ _(Installed languages)_:
|
||||
: <span class="installed"><?=implode(', ',$installed)?></span>
|
||||
|
||||
_(Enter URL of language pack XML file)_:
|
||||
: <input type="text" id="xml_file" maxlength="1024" value=""><input type="button" id="install" value="_(Install)_" onclick="installXML($('#xml_file').val())">
|
||||
: <input type="text" id="xml_file" maxlength="1024" value="">
|
||||
<span class="inline-block">
|
||||
<input type="button" id="install" value="_(Install)_" onclick="installXML($('#xml_file').val())">
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -114,6 +121,9 @@ _(Select language file)_:
|
||||
|
||||
</div>
|
||||
|
||||
: <input id="uploadbutton" type="button" value="_(Upload)_" onclick="upload(this.form)" disabled><input type="button" value="_(Done)_" class="lock" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input id="uploadbutton" type="button" value="_(Upload)_" onclick="upload(this.form)" disabled>
|
||||
<input type="button" value="_(Done)_" class="lock" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ Title="Management Access"
|
||||
Icon="icon-key"
|
||||
Tag="expeditedssl"
|
||||
---
|
||||
<?PHP
|
||||
<?php
|
||||
/* Copyright 2005-2024, Lime Technology
|
||||
* Copyright 2012-2024, Bergware International.
|
||||
*
|
||||
@@ -16,130 +16,146 @@ Tag="expeditedssl"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
function find_tasks() {
|
||||
global $site;
|
||||
$tasks = [];
|
||||
foreach ($site as $page) {
|
||||
if (empty($page['Menu'])) continue;
|
||||
$menu = strtok($page['Menu'], ' ');
|
||||
switch ($menu[0]) {
|
||||
case '$': $menu = get_ini_key($menu,strtok(' ')); break;
|
||||
case '/': $menu = get_file_key($menu,strtok(' ')); break;
|
||||
<?php
|
||||
function find_tasks()
|
||||
{
|
||||
global $site;
|
||||
$tasks = [];
|
||||
foreach ($site as $page) {
|
||||
if (empty($page['Menu'])) {
|
||||
continue;
|
||||
}
|
||||
$menu = strtok($page['Menu'], ' ');
|
||||
switch ($menu[0]) {
|
||||
case '$': $menu = get_ini_key($menu, strtok(' '));
|
||||
break;
|
||||
case '/': $menu = get_file_key($menu, strtok(' '));
|
||||
break;
|
||||
}
|
||||
while ($menu !== false) {
|
||||
if (substr($menu, 0, 5) == 'Tasks') {
|
||||
if (empty($page['Cond'])) {
|
||||
$tasks[] = $page['name'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
$menu = strtok(' ');
|
||||
}
|
||||
}
|
||||
while ($menu !== false) {
|
||||
if (substr($menu,0,5) == 'Tasks') {
|
||||
if (empty($page['Cond'])) $tasks[] = $page['name'];
|
||||
break;
|
||||
}
|
||||
$menu = strtok(' ');
|
||||
}
|
||||
}
|
||||
sort($tasks);
|
||||
return $tasks;
|
||||
sort($tasks);
|
||||
return $tasks;
|
||||
}
|
||||
function acceptableCert($certFile, $hostname, $expectedURL) {
|
||||
if (!file_exists($certFile)) return false;
|
||||
$certURLs=null;
|
||||
// get Subject URL and all SAN URLs from cert
|
||||
exec("openssl x509 -noout -subject -nameopt multiline -in $certFile | sed -n 's/ *commonName *= //p' ; openssl x509 -noout -ext subjectAltName -in $certFile | grep -Eo \"DNS:[a-zA-Z 0-9.*-]*\" | sed \"s/DNS://g\"", $certURLs);
|
||||
foreach($certURLs as $certURL) {
|
||||
// adjust for wildcard certs
|
||||
$certURL = str_replace('*', $hostname, $certURL);
|
||||
// case-insensitive compare
|
||||
if (strcasecmp($certURL, $expectedURL) == 0) return true;
|
||||
}
|
||||
return false;
|
||||
function acceptableCert($certFile, $hostname, $expectedURL)
|
||||
{
|
||||
if (!file_exists($certFile)) {
|
||||
return false;
|
||||
}
|
||||
$certURLs = null;
|
||||
// get Subject URL and all SAN URLs from cert
|
||||
exec("openssl x509 -noout -subject -nameopt multiline -in $certFile | sed -n 's/ *commonName *= //p' ; openssl x509 -noout -ext subjectAltName -in $certFile | grep -Eo \"DNS:[a-zA-Z 0-9.*-]*\" | sed \"s/DNS://g\"", $certURLs);
|
||||
foreach ($certURLs as $certURL) {
|
||||
// adjust for wildcard certs
|
||||
$certURL = str_replace('*', $hostname, $certURL);
|
||||
// case-insensitive compare
|
||||
if (strcasecmp($certURL, $expectedURL) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
$tasks = find_tasks();
|
||||
$nginx = (array)@parse_ini_file('/var/local/emhttp/nginx.ini');
|
||||
$addr = _var($nginx,'NGINX_LANIP') ?: _var($nginx,'NGINX_LANIP6');
|
||||
$keyfile = empty(_var($var,'regFILE')) ? false : @file_get_contents(_var($var,'regFILE'));
|
||||
$addr = _var($nginx, 'NGINX_LANIP') ?: _var($nginx, 'NGINX_LANIP6');
|
||||
$keyfile = empty(_var($var, 'regFILE')) ? false : @file_get_contents(_var($var, 'regFILE'));
|
||||
$cert2Issuer = '';
|
||||
$isWildcardCert = false;
|
||||
if ($keyfile !== false) $keyfile = base64_encode($keyfile);
|
||||
if ($keyfile !== false) {
|
||||
$keyfile = base64_encode($keyfile);
|
||||
}
|
||||
|
||||
// self-signed or user-provided cert
|
||||
$cert1File = "/boot/config/ssl/certs/"._var($var,'NAME','tower')."_unraid_bundle.pem";
|
||||
$cert1File = "/boot/config/ssl/certs/"._var($var, 'NAME', 'tower')."_unraid_bundle.pem";
|
||||
$cert1Present = file_exists("$cert1File");
|
||||
$cert1SelfSigned = $cert1URLvalid = false;
|
||||
$cert1Issuer = ' ';
|
||||
|
||||
if ($cert1Present) {
|
||||
$cert1URL = _var($var,'NAME','tower').(_var($var,'LOCAL_TLD') ? '.'._var($var,'LOCAL_TLD') : '');
|
||||
// if user replaced cert without reloading nginx, the cert on the flash could be invalid
|
||||
$cert1URLvalid = acceptableCert($cert1File, _var($var,'NAME','tower'), $cert1URL);
|
||||
$cert1Subject = exec("/usr/bin/openssl x509 -in $cert1File -noout -text | sed -n 's/^.*Subject: //p'");
|
||||
$cert1Issuer = exec("/usr/bin/openssl x509 -in $cert1File -noout -text | sed -n -e 's/^.*Issuer: //p'");
|
||||
$cert1Expires = exec("/usr/bin/openssl x509 -in $cert1File -noout -text | sed -n -e 's/^.*Not After : //p'");
|
||||
$cert1SelfSigned = ($cert1Subject == $cert1Issuer);
|
||||
$cert1URL = _var($var, 'NAME', 'tower').(_var($var, 'LOCAL_TLD') ? '.'._var($var, 'LOCAL_TLD') : '');
|
||||
// if user replaced cert without reloading nginx, the cert on the flash could be invalid
|
||||
$cert1URLvalid = acceptableCert($cert1File, _var($var, 'NAME', 'tower'), $cert1URL);
|
||||
$cert1Subject = exec("/usr/bin/openssl x509 -in $cert1File -noout -text | sed -n 's/^.*Subject: //p'");
|
||||
$cert1Issuer = exec("/usr/bin/openssl x509 -in $cert1File -noout -text | sed -n -e 's/^.*Issuer: //p'");
|
||||
$cert1Expires = exec("/usr/bin/openssl x509 -in $cert1File -noout -text | sed -n -e 's/^.*Not After : //p'");
|
||||
$cert1SelfSigned = ($cert1Subject == $cert1Issuer);
|
||||
}
|
||||
|
||||
// myunraid.net LE cert. could potentially be user provided as well
|
||||
$cert2File = "/boot/config/ssl/certs/certificate_bundle.pem";
|
||||
$cert2Present = file_exists("$cert2File");
|
||||
if ($cert2Present) {
|
||||
$cert2Subject = exec("/usr/bin/openssl x509 -in $cert2File -noout -subject -nameopt multiline 2>/dev/null|sed -n 's/ *commonName *= //p'");
|
||||
$cert2Issuer = exec("/usr/bin/openssl x509 -in $cert2File -noout -text | sed -n -e 's/^.*Issuer: //p'");
|
||||
$cert2Expires = exec("/usr/bin/openssl x509 -in $cert2File -noout -text | sed -n -e 's/^.*Not After : //p'");
|
||||
$isWildcardCert = preg_match('/.*\.myunraid\.net$/', $cert2Subject);
|
||||
$subject2URL = $cert2Subject;
|
||||
$dnsValid = false;
|
||||
$dnsRebindingProtection = false;
|
||||
if ($isWildcardCert) {
|
||||
exec("openssl x509 -checkend 2592000 -noout -in $cert2File 2>/dev/null", $arrout, $retval_expired);
|
||||
if (!$addr) {
|
||||
// if eth0 doesn't have an IP address, then show noip.hash.myunraid.net as a placeholder url
|
||||
$subject2URL = str_replace("*", 'noip', $subject2URL);
|
||||
$dnsValid = false;
|
||||
$dnsRebindingProtection = false;
|
||||
} elseif (strpos($addr, ":") === false) {
|
||||
// eth0 is IPv4
|
||||
$subject2URL = str_replace("*", str_replace(".", "-", $addr), $subject2URL);
|
||||
$rebindtest_ip = exec("host -4 -t A rebindtest4.myunraid.net 2>/dev/null|awk '{print \$4}'");
|
||||
$dnsRebindingProtection = ($rebindtest_ip != "192.168.42.42");
|
||||
if (!$dnsRebindingProtection) {
|
||||
$cert_ip = exec("host -4 -t A $subject2URL 2>/dev/null|awk '{print \$4}'");
|
||||
$dnsValid = $cert_ip==$addr;
|
||||
}
|
||||
} else {
|
||||
// eth0 is IPv6
|
||||
$subject2URL = str_replace("*", str_replace(":", "-", $addr), $subject2URL);
|
||||
$rebindtest_ip = exec("host -6 -t AAAA rebindtest6.myunraid.net 2>/dev/null|awk '{print \$4}'");
|
||||
// more: restore this after TTL expires
|
||||
// $dnsRebindingProtection = ($rebindtest_ip != "fd42::42");
|
||||
$dnsRebindingProtection = ($rebindtest_ip != "fd42::42") && ($rebindtest_ip != "fd42::");
|
||||
if (!$dnsRebindingProtection) {
|
||||
$cert_ip = exec("host -6 -t AAAA $subject2URL 2>/dev/null|awk '{print \$4}'");
|
||||
$dnsValid = $cert_ip==$addr;
|
||||
}
|
||||
$cert2Subject = exec("/usr/bin/openssl x509 -in $cert2File -noout -subject -nameopt multiline 2>/dev/null|sed -n 's/ *commonName *= //p'");
|
||||
$cert2Issuer = exec("/usr/bin/openssl x509 -in $cert2File -noout -text | sed -n -e 's/^.*Issuer: //p'");
|
||||
$cert2Expires = exec("/usr/bin/openssl x509 -in $cert2File -noout -text | sed -n -e 's/^.*Not After : //p'");
|
||||
$isWildcardCert = preg_match('/.*\.myunraid\.net$/', $cert2Subject);
|
||||
$subject2URL = $cert2Subject;
|
||||
$dnsValid = false;
|
||||
$dnsRebindingProtection = false;
|
||||
if ($isWildcardCert) {
|
||||
exec("openssl x509 -checkend 2592000 -noout -in $cert2File 2>/dev/null", $arrout, $retval_expired);
|
||||
if (!$addr) {
|
||||
// if eth0 doesn't have an IP address, then show noip.hash.myunraid.net as a placeholder url
|
||||
$subject2URL = str_replace("*", 'noip', $subject2URL);
|
||||
$dnsValid = false;
|
||||
$dnsRebindingProtection = false;
|
||||
} elseif (strpos($addr, ":") === false) {
|
||||
// eth0 is IPv4
|
||||
$subject2URL = str_replace("*", str_replace(".", "-", $addr), $subject2URL);
|
||||
$rebindtest_ip = exec("host -4 -t A rebindtest4.myunraid.net 2>/dev/null|awk '{print \$4}'");
|
||||
$dnsRebindingProtection = ($rebindtest_ip != "192.168.42.42");
|
||||
if (!$dnsRebindingProtection) {
|
||||
$cert_ip = exec("host -4 -t A $subject2URL 2>/dev/null|awk '{print \$4}'");
|
||||
$dnsValid = $cert_ip == $addr;
|
||||
}
|
||||
} else {
|
||||
// eth0 is IPv6
|
||||
$subject2URL = str_replace("*", str_replace(":", "-", $addr), $subject2URL);
|
||||
$rebindtest_ip = exec("host -6 -t AAAA rebindtest6.myunraid.net 2>/dev/null|awk '{print \$4}'");
|
||||
// more: restore this after TTL expires
|
||||
// $dnsRebindingProtection = ($rebindtest_ip != "fd42::42");
|
||||
$dnsRebindingProtection = ($rebindtest_ip != "fd42::42") && ($rebindtest_ip != "fd42::");
|
||||
if (!$dnsRebindingProtection) {
|
||||
$cert_ip = exec("host -6 -t AAAA $subject2URL 2>/dev/null|awk '{print \$4}'");
|
||||
$dnsValid = $cert_ip == $addr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Tailscale LE cert
|
||||
$cert3File = "/boot/config/ssl/certs/ts_bundle.pem";
|
||||
$cert3Present = file_exists("$cert3File");
|
||||
if ($cert3Present) {
|
||||
$cert3Subject = exec("/usr/bin/openssl x509 -in $cert3File -noout -subject -nameopt multiline 2>/dev/null|sed -n 's/ *commonName *= //p'");
|
||||
$cert3Issuer = exec("/usr/bin/openssl x509 -in $cert3File -noout -text | sed -n -e 's/^.*Issuer: //p'");
|
||||
$cert3Expires = exec("/usr/bin/openssl x509 -in $cert3File -noout -text | sed -n -e 's/^.*Not After : //p'");
|
||||
$cert3Subject = exec("/usr/bin/openssl x509 -in $cert3File -noout -subject -nameopt multiline 2>/dev/null|sed -n 's/ *commonName *= //p'");
|
||||
$cert3Issuer = exec("/usr/bin/openssl x509 -in $cert3File -noout -text | sed -n -e 's/^.*Issuer: //p'");
|
||||
$cert3Expires = exec("/usr/bin/openssl x509 -in $cert3File -noout -text | sed -n -e 's/^.*Not After : //p'");
|
||||
}
|
||||
|
||||
// Note: this disables FQDN6 urls since they are not supported by myunraid.net DNS currently
|
||||
if (!empty($nginx['NGINX_LANFQDN6'])) unset($nginx['NGINX_LANFQDN6']);
|
||||
if (!empty($nginx['NGINX_LANFQDN6'])) {
|
||||
unset($nginx['NGINX_LANFQDN6']);
|
||||
}
|
||||
|
||||
$http_port = _var($var,'PORT','80') != '80' ? ":{$var['PORT']}" : '';
|
||||
$https_port = _var($var,'PORTSSL','443') != '443' ? ":{$var['PORTSSL']}" : '';
|
||||
$http_ip_url = 'http://'._var($nginx,'NGINX_LANIP').$http_port.'/';
|
||||
$https_ip_url = 'https://'._var($nginx,'NGINX_LANIP').$https_port.'/';
|
||||
$http_port = _var($var, 'PORT', '80') != '80' ? ":{$var['PORT']}" : '';
|
||||
$https_port = _var($var, 'PORTSSL', '443') != '443' ? ":{$var['PORTSSL']}" : '';
|
||||
$http_ip_url = 'http://'._var($nginx, 'NGINX_LANIP').$http_port.'/';
|
||||
$https_ip_url = 'https://'._var($nginx, 'NGINX_LANIP').$https_port.'/';
|
||||
// bare IPv6 addresses need to be surrounded in brackets
|
||||
$http_ip6_url = 'http://'.'['._var($nginx,'NGINX_LANIP6').']'.$http_port.'/';
|
||||
$https_ip6_url = 'https://'.'['._var($nginx,'NGINX_LANIP6').']'.$https_port.'/';
|
||||
$http_mdns_url = 'http://'._var($nginx,'NGINX_LANMDNS').$http_port.'/';
|
||||
$https_mdns_url = 'https://'._var($nginx,'NGINX_LANMDNS').$https_port.'/';
|
||||
$https_fqdn_url = 'https://'._var($nginx,'NGINX_LANFQDN').$https_port.'/';
|
||||
$https_fqdn6_url = 'https://'._var($nginx,'NGINX_LANFQDN6').$https_port.'/';
|
||||
$http_ip6_url = 'http://'.'['._var($nginx, 'NGINX_LANIP6').']'.$http_port.'/';
|
||||
$https_ip6_url = 'https://'.'['._var($nginx, 'NGINX_LANIP6').']'.$https_port.'/';
|
||||
$http_mdns_url = 'http://'._var($nginx, 'NGINX_LANMDNS').$http_port.'/';
|
||||
$https_mdns_url = 'https://'._var($nginx, 'NGINX_LANMDNS').$https_port.'/';
|
||||
$https_fqdn_url = 'https://'._var($nginx, 'NGINX_LANFQDN').$https_port.'/';
|
||||
$https_fqdn6_url = 'https://'._var($nginx, 'NGINX_LANFQDN6').$https_port.'/';
|
||||
|
||||
$urls = [];
|
||||
// push an array of five values into the $urls array:
|
||||
@@ -150,94 +166,138 @@ $urls = [];
|
||||
// 5 - self-signed certificate, or false
|
||||
|
||||
// define LAN access urls and redirects that change based on USE_SSL setting
|
||||
switch(_var($var,'USE_SSL','no')) {
|
||||
case 'no':
|
||||
if (!empty($nginx['NGINX_LANIP'])) $urls[] = ['LAN', $http_ip_url, null, null, false];
|
||||
if (!empty($nginx['NGINX_LANIP6'])) $urls[] = ['LAN', $http_ip6_url, null, null, false];
|
||||
if (!empty($nginx['NGINX_LANMDNS'])) $urls[] = ['LAN', $http_mdns_url, null, null, false];
|
||||
break;
|
||||
case 'yes':
|
||||
if (!empty($nginx['NGINX_LANIP'])) $urls[] = ['LAN', $http_ip_url, $https_ip_url, null, false];
|
||||
if (!empty($nginx['NGINX_LANIP'])) $urls[] = ['LAN', $https_ip_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
|
||||
if (!empty($nginx['NGINX_LANIP6'])) $urls[] = ['LAN', $http_ip6_url, $https_ip6_url, null, false];
|
||||
if (!empty($nginx['NGINX_LANIP6'])) $urls[] = ['LAN', $https_ip6_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
|
||||
if (!empty($nginx['NGINX_LANMDNS'])) $urls[] = ['LAN', $http_mdns_url, $https_mdns_url, null, false];
|
||||
if (!empty($nginx['NGINX_LANMDNS'])) $urls[] = ['LAN', $https_mdns_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
|
||||
break;
|
||||
case 'auto': // aka strict
|
||||
if (!empty($nginx['NGINX_LANIP']) && !empty($nginx['NGINX_LANFQDN'])) $urls[] = ['LAN', $http_ip_url, $https_fqdn_url, null, false];
|
||||
if (!empty($nginx['NGINX_LANIP6']) && !empty($nginx['NGINX_LANFQDN6'])) $urls[] = ['LAN', $http_ip6_url, $https_fqdn6_url, null, false];
|
||||
if (!empty($nginx['NGINX_LANMDNS']) && !empty($nginx['NGINX_LANFQDN'])) $urls[] = ['LAN', $http_mdns_url, $https_fqdn_url, null, false];
|
||||
break;
|
||||
switch (_var($var, 'USE_SSL', 'no')) {
|
||||
case 'no':
|
||||
if (!empty($nginx['NGINX_LANIP'])) {
|
||||
$urls[] = ['LAN', $http_ip_url, null, null, false];
|
||||
}
|
||||
if (!empty($nginx['NGINX_LANIP6'])) {
|
||||
$urls[] = ['LAN', $http_ip6_url, null, null, false];
|
||||
}
|
||||
if (!empty($nginx['NGINX_LANMDNS'])) {
|
||||
$urls[] = ['LAN', $http_mdns_url, null, null, false];
|
||||
}
|
||||
break;
|
||||
case 'yes':
|
||||
if (!empty($nginx['NGINX_LANIP'])) {
|
||||
$urls[] = ['LAN', $http_ip_url, $https_ip_url, null, false];
|
||||
}
|
||||
if (!empty($nginx['NGINX_LANIP'])) {
|
||||
$urls[] = ['LAN', $https_ip_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
|
||||
}
|
||||
if (!empty($nginx['NGINX_LANIP6'])) {
|
||||
$urls[] = ['LAN', $http_ip6_url, $https_ip6_url, null, false];
|
||||
}
|
||||
if (!empty($nginx['NGINX_LANIP6'])) {
|
||||
$urls[] = ['LAN', $https_ip6_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
|
||||
}
|
||||
if (!empty($nginx['NGINX_LANMDNS'])) {
|
||||
$urls[] = ['LAN', $http_mdns_url, $https_mdns_url, null, false];
|
||||
}
|
||||
if (!empty($nginx['NGINX_LANMDNS'])) {
|
||||
$urls[] = ['LAN', $https_mdns_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
|
||||
}
|
||||
break;
|
||||
case 'auto': // aka strict
|
||||
if (!empty($nginx['NGINX_LANIP']) && !empty($nginx['NGINX_LANFQDN'])) {
|
||||
$urls[] = ['LAN', $http_ip_url, $https_fqdn_url, null, false];
|
||||
}
|
||||
if (!empty($nginx['NGINX_LANIP6']) && !empty($nginx['NGINX_LANFQDN6'])) {
|
||||
$urls[] = ['LAN', $http_ip6_url, $https_fqdn6_url, null, false];
|
||||
}
|
||||
if (!empty($nginx['NGINX_LANMDNS']) && !empty($nginx['NGINX_LANFQDN'])) {
|
||||
$urls[] = ['LAN', $http_mdns_url, $https_fqdn_url, null, false];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// define FQDN urls for each interface
|
||||
// when multiple FQDN urls are available for a given interface, make sure they are sorted
|
||||
asort($nginx);
|
||||
foreach ($nginx as $key => $host) {
|
||||
if (!$host) continue;
|
||||
// Only process keys that include 'FQDN'
|
||||
if (strpos($key, 'FQDN') === false) continue;
|
||||
// Extract the interface from the key, e.g., 'NGINX_LANFQDN' -> 'LAN', 'NGINX_WANFQDN' -> 'WAN', NGINX_WG0FQDN -> WG, NGINX_TAILSCALE1FQDN -> TAILSCALE
|
||||
// Note: this specifically excludes FQDN6 urls since they are not supported by myunraid.net DNS currently
|
||||
if (preg_match('/^NGINX_([A-Z]+)(\d*)FQDN$/', $key, $matches)) {
|
||||
$interface = $matches[1]; // Interface type (LAN, WAN, WG, TAILSCALE, etc.)
|
||||
// ignore the WAN interface because we don't have access to the WANPORT here
|
||||
if ($interface == "WAN") continue;
|
||||
$pem = null;
|
||||
if (str_ends_with($host, '.myunraid.net')) $pem = 'certificate_bundle.pem';
|
||||
elseif (str_ends_with($host, '.ts.net')) $pem = 'ts_bundle.pem';
|
||||
$url = 'https://'.$host.$https_port."/";
|
||||
$urls[] = [$interface, $url, null, $pem, false];
|
||||
}
|
||||
if (!$host) {
|
||||
continue;
|
||||
}
|
||||
// Only process keys that include 'FQDN'
|
||||
if (strpos($key, 'FQDN') === false) {
|
||||
continue;
|
||||
}
|
||||
// Extract the interface from the key, e.g., 'NGINX_LANFQDN' -> 'LAN', 'NGINX_WANFQDN' -> 'WAN', NGINX_WG0FQDN -> WG, NGINX_TAILSCALE1FQDN -> TAILSCALE
|
||||
// Note: this specifically excludes FQDN6 urls since they are not supported by myunraid.net DNS currently
|
||||
if (preg_match('/^NGINX_([A-Z]+)(\d*)FQDN$/', $key, $matches)) {
|
||||
$interface = $matches[1]; // Interface type (LAN, WAN, WG, TAILSCALE, etc.)
|
||||
// ignore the WAN interface because we don't have access to the WANPORT here
|
||||
if ($interface == "WAN") {
|
||||
continue;
|
||||
}
|
||||
$pem = null;
|
||||
if (str_ends_with($host, '.myunraid.net')) {
|
||||
$pem = 'certificate_bundle.pem';
|
||||
} elseif (str_ends_with($host, '.ts.net')) {
|
||||
$pem = 'ts_bundle.pem';
|
||||
}
|
||||
$url = 'https://'.$host.$https_port."/";
|
||||
$urls[] = [$interface, $url, null, $pem, false];
|
||||
}
|
||||
}
|
||||
|
||||
// determine whether there are urls for a given list of interfaces
|
||||
function has_urls(array $interfaces) {
|
||||
global $urls;
|
||||
foreach($urls as $url) {
|
||||
if (in_array($url[0], $interfaces)) return true;
|
||||
}
|
||||
return false;
|
||||
function has_urls(array $interfaces)
|
||||
{
|
||||
global $urls;
|
||||
foreach ($urls as $url) {
|
||||
if (in_array($url[0], $interfaces)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// show all urls for a given list of interface
|
||||
function show_urls(array $interfaces) {
|
||||
global $urls;
|
||||
// 0 - type of url ['LAN','WLAN','WAN','WG','TAILSCALE']
|
||||
// 1 - the url
|
||||
// 3 - the url it redirects to, or null
|
||||
// 4 - the certificate file used, or null
|
||||
// 5 - self-signed certificate, or false
|
||||
$output = "";
|
||||
$linestart = "<dt> </dt><dd>";
|
||||
$lineend = "</dd>\n";
|
||||
$first = true;
|
||||
foreach($urls as $url) {
|
||||
if (in_array($url[0], $interfaces)) {
|
||||
$msg = "<a class='localURL' href='$url[1]'>$url[1]</a>";
|
||||
if ($url[2]) $msg .= " "._("redirects to")." <a class='localURL' href='$url[2]'>$url[2]</a>";
|
||||
if ($url[3]) $msg .= " "._("uses")." ".$url[3];
|
||||
if ($url[4]) $msg .= "<span class='warning'> <i class='fa fa-warning fa-fw'></i> "._("is a self-signed certificate, ignore the browser's warning and proceed to the GUI")."</span>";
|
||||
// 2nd+ urls need leading $linestart
|
||||
$output .= ($first ? "" : $linestart).$msg.$lineend;
|
||||
$first = false;
|
||||
function show_urls(array $interfaces)
|
||||
{
|
||||
global $urls;
|
||||
// 0 - type of url ['LAN','WLAN','WAN','WG','TAILSCALE']
|
||||
// 1 - the url
|
||||
// 3 - the url it redirects to, or null
|
||||
// 4 - the certificate file used, or null
|
||||
// 5 - self-signed certificate, or false
|
||||
$output = "";
|
||||
$linestart = "<dt> </dt><dd>";
|
||||
$lineend = "</dd>\n";
|
||||
$first = true;
|
||||
foreach ($urls as $url) {
|
||||
if (in_array($url[0], $interfaces)) {
|
||||
$msg = "<span class='inline-block'><a class='localURL' href='$url[1]'>$url[1]</a>";
|
||||
if ($url[2]) {
|
||||
$msg .= " "._("redirects to")." <a class='localURL' href='$url[2]'>$url[2]</a>";
|
||||
}
|
||||
if ($url[3]) {
|
||||
$msg .= " "._("uses")." ".$url[3];
|
||||
}
|
||||
$msg .= "</span>";
|
||||
if ($url[4]) {
|
||||
$msg .= "<span class='warning'> <i class='fa fa-warning fa-fw'></i> "._("is a self-signed certificate, ignore the browser's warning and proceed to the GUI")."</span>";
|
||||
}
|
||||
// 2nd+ urls need leading $linestart
|
||||
$output .= ($first ? "" : $linestart).$msg.$lineend;
|
||||
$first = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($first) {
|
||||
$output = "none";
|
||||
} else {
|
||||
// strip final trailing $lineend as it will be added by markdown
|
||||
$output = substr($output, 0, strlen($lineend)*-1);
|
||||
}
|
||||
echo $output;
|
||||
if ($first) {
|
||||
$output = "none";
|
||||
} else {
|
||||
// strip final trailing $lineend as it will be added by markdown
|
||||
$output = substr($output, 0, strlen($lineend) * -1);
|
||||
}
|
||||
echo $output;
|
||||
}
|
||||
|
||||
$cert_time_format = $display['date'].($display['date']!='%c' ? ', '.str_replace(['%M','%R'],['%M:%S','%R:%S'],$display['time']):'');
|
||||
$cert_time_format = $display['date'].($display['date'] != '%c' ? ', '.str_replace(['%M','%R'], ['%M:%S','%R:%S'], $display['time']) : '');
|
||||
$provisionlabel = $isWildcardCert ? _('Renew') : _('Provision');
|
||||
$disabled_provision = $keyfile===false || ($isWildcardCert && $retval_expired===0) || !$addr ? 'disabled' : '';
|
||||
$disabled_provision = $keyfile === false || ($isWildcardCert && $retval_expired === 0) || !$addr ? 'disabled' : '';
|
||||
$disabled_provision_msg = !$addr ? _('Ensure the primary network card eth0 has an IP address.') : '';
|
||||
$disabled_delete = $cert2Present && $var['USE_SSL']!='auto' ? '' : 'disabled';
|
||||
$disabled_delete = $cert2Present && $var['USE_SSL'] != 'auto' ? '' : 'disabled';
|
||||
$disabled_auto = $isWildcardCert && !$dnsRebindingProtection && $dnsValid ? '' : 'disabled';
|
||||
|
||||
// Get ports in use
|
||||
@@ -246,14 +306,20 @@ exec("lsof -Pni|awk '/LISTEN/ && \$9!~/127.0.0.1/ && \$9!~/\\[::1\\]/{print \$9}
|
||||
|
||||
$bind = false; //= $var['BIND_MGT']=='yes'; - not used in 6.10
|
||||
$list = ['*'];
|
||||
if ($addr) array_push($list, $addr);
|
||||
if ($addr) {
|
||||
array_push($list, $addr);
|
||||
}
|
||||
|
||||
foreach ($output as $line) {
|
||||
[$ip, $port] = my_explode($line[0]=='[' ? ']:' : ':',$line);
|
||||
if ($ip[0]=='[') $ip = substr($ip,1); // ipv6 address
|
||||
if (!in_array($port,$portsInUse) && (!$bind || in_array($ip,$list))) $portsInUse[] = $port;
|
||||
[$ip, $port] = my_explode($line[0] == '[' ? ']:' : ':', $line);
|
||||
if ($ip[0] == '[') {
|
||||
$ip = substr($ip, 1);
|
||||
} // ipv6 address
|
||||
if (!in_array($port, $portsInUse) && (!$bind || in_array($ip, $list))) {
|
||||
$portsInUse[] = $port;
|
||||
}
|
||||
}
|
||||
sort($portsInUse,SORT_NUMERIC);
|
||||
sort($portsInUse, SORT_NUMERIC);
|
||||
?>
|
||||
<script>
|
||||
function provisionHandler(event, form) { // provisions and renewals require being Signed In to Unraid.net
|
||||
@@ -262,13 +328,13 @@ function provisionHandler(event, form) { // provisions and renewals require bein
|
||||
};
|
||||
|
||||
function checkPorts(form) {
|
||||
var portsInUse = [<?=implode(',',$portsInUse)?>];
|
||||
var portsInUse = [<?=implode(',', $portsInUse)?>];
|
||||
var range = [], list = [], duplicates = [];
|
||||
var checks = [
|
||||
{'key':"PORTTELNET", 'used':"<?=$var['USE_TELNET']=='yes'?>", 'port':"<?=$var['PORTTELNET']?>", 'default':"23" , 'name':"_(TELNET port)_"},
|
||||
{'key':"PORTSSH" , 'used':"<?=$var['USE_SSH']=='yes'?>" , 'port':"<?=$var['PORTSSH']?>" , 'default':"22" , 'name':"_(SSH port)_"},
|
||||
{'key':"PORT" , 'used':"<?=$var['USE_SSL']=='no'?>" , 'port':"<?=$var['PORT']?>" , 'default':"80" , 'name':"_(HTTP port)_"},
|
||||
{'key':"PORTSSL" , 'used':"<?=$var['USE_SSL']!='no'?>" , 'port':"<?=$var['PORTSSL']?>" , 'default':"443", 'name':"_(HTTPS port)_"}
|
||||
{'key':"PORTTELNET", 'used':"<?=$var['USE_TELNET'] == 'yes'?>", 'port':"<?=$var['PORTTELNET']?>", 'default':"23" , 'name':"_(TELNET port)_"},
|
||||
{'key':"PORTSSH" , 'used':"<?=$var['USE_SSH'] == 'yes'?>" , 'port':"<?=$var['PORTSSH']?>" , 'default':"22" , 'name':"_(SSH port)_"},
|
||||
{'key':"PORT" , 'used':"<?=$var['USE_SSL'] == 'no'?>" , 'port':"<?=$var['PORT']?>" , 'default':"80" , 'name':"_(HTTP port)_"},
|
||||
{'key':"PORTSSL" , 'used':"<?=$var['USE_SSL'] != 'no'?>" , 'port':"<?=$var['PORTSSL']?>" , 'default':"443", 'name':"_(HTTPS port)_"}
|
||||
];
|
||||
for (var i=0,check; check=checks[i]; i++) {
|
||||
var item = $(form).find('input[name="'+check['key']+'"]');
|
||||
@@ -318,8 +384,9 @@ $(function(){
|
||||
</script>
|
||||
<form markdown="1" name="SSLSettings" method="POST" action="/update.htm" target="progressFrame">
|
||||
<input type="hidden" name="changePorts" value="Apply">
|
||||
<input type="hidden" name="server_name" value="<?=strtok(_var($_SERVER,'HTTP_HOST'),":")?>">
|
||||
<input type="hidden" name="server_addr" value="<?=_var($_SERVER,'SERVER_ADDR')?>">
|
||||
<input type="hidden" name="server_name" value="<?=strtok(_var($_SERVER, 'HTTP_HOST'), ":")?>">
|
||||
<input type="hidden" name="server_addr" value="<?=_var($_SERVER, 'SERVER_ADDR')?>">
|
||||
|
||||
_(User 'root')_:
|
||||
: [_(Manage)_](/Settings/Users/ManagementAccess/UserEdit?name=root)
|
||||
|
||||
@@ -401,21 +468,24 @@ _(Local TLD)_:
|
||||
:mgmt_local_tld_help:
|
||||
|
||||
|
||||
: <input type="button" value="_(Apply)_" onclick="checkPorts(this.form)" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="button" value="_(Apply)_" onclick="checkPorts(this.form)" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
|
||||
_(Local access URLs)_:
|
||||
: <? show_urls(['LAN','WLAN']); ?>
|
||||
: <?php show_urls(['LAN','WLAN']); ?>
|
||||
|
||||
:mgmt_local_access_urls_help:
|
||||
|
||||
<?if (has_urls(['WG'])): ?>
|
||||
|
||||
_(WireGuard URLs)_:
|
||||
: <? show_urls(['WG']); ?>
|
||||
: <?php show_urls(['WG']); ?>
|
||||
|
||||
:mgmt_wg_access_urls_help:
|
||||
|
||||
@@ -424,7 +494,7 @@ _(WireGuard URLs)_:
|
||||
<?if (has_urls(['TAILSCALE'])): ?>
|
||||
|
||||
_(Tailscale URLs)_:
|
||||
: <? show_urls(['TAILSCALE']); ?>
|
||||
: <?php show_urls(['TAILSCALE']); ?>
|
||||
|
||||
:mgmt_tailscale_access_urls_help:
|
||||
|
||||
@@ -439,11 +509,9 @@ _(Self-signed or user-provided certificate)_:
|
||||
<?if ($cert1URLvalid && _var($var,'USE_SSL')=='yes'):?>
|
||||
_(Certificate URL)_:
|
||||
: <?="<a class='localURL' href='https://$cert1URL$https_port'>$cert1URL</a>"?>
|
||||
|
||||
<?elseif ($cert1URLvalid):?>
|
||||
_(Certificate URL)_:
|
||||
: <?=$cert1URL?>
|
||||
|
||||
<?else:?>
|
||||
_(Certificate URL)_:
|
||||
: _(Certificate not valid for)_ <?=$cert1URL?>
|
||||
@@ -456,7 +524,7 @@ _(Certificate issuer)_:
|
||||
<?endif;?>
|
||||
|
||||
_(Certificate expiration)_:
|
||||
: <?=_(my_date($cert_time_format, strtotime($cert1Expires)),0)?>
|
||||
: <?=_(my_date($cert_time_format, strtotime($cert1Expires)), 0)?>
|
||||
|
||||
<?else:?>
|
||||
_(Self-signed certificate file)_:
|
||||
@@ -464,8 +532,9 @@ _(Self-signed certificate file)_:
|
||||
<?endif;?>
|
||||
|
||||
<form markdown="1" name="Provision" method="POST" target="progressFrame" action="/update.htm" onsubmit="provisionHandler(event, this)">
|
||||
<input type="hidden" name="server_name" value="<?=strtok(_var($_SERVER,'HTTP_HOST'),":")?>">
|
||||
<input type="hidden" name="server_addr" value="<?=_var($_SERVER,'SERVER_ADDR')?>">
|
||||
<input type="hidden" name="server_name" value="<?=strtok(_var($_SERVER, 'HTTP_HOST'), ":")?>">
|
||||
<input type="hidden" name="server_addr" value="<?=_var($_SERVER, 'SERVER_ADDR')?>">
|
||||
|
||||
<?if ($cert2Present):?>
|
||||
|
||||
<hr>
|
||||
@@ -480,7 +549,7 @@ _(Certificate issuer)_:
|
||||
: <?=$cert2Issuer?>
|
||||
|
||||
_(Certificate expiration)_:
|
||||
: <?=_(my_date($cert_time_format, strtotime($cert2Expires)),0)?>
|
||||
: <?=_(my_date($cert_time_format, strtotime($cert2Expires)), 0)?>
|
||||
|
||||
<?if ($dnsRebindingProtection):?>
|
||||
|
||||
@@ -492,13 +561,17 @@ _(Certificate expiration)_:
|
||||
|
||||
<?endif;?>
|
||||
<?else:?>
|
||||
|
||||
_(CA-signed certificate file)_:
|
||||
: _(Not present)_
|
||||
|
||||
<?endif;?>
|
||||
|
||||
: <button type="submit" name="changePorts" value="Provision" <?=$disabled_provision?>><?=$provisionlabel?></button><button type="submit" name="changePorts" value="Delete" <?=$disabled_delete?> >_(Delete)_</button><?=$disabled_provision_msg?>
|
||||
|
||||
: <span class="inline-block">
|
||||
<button type="submit" name="changePorts" value="Provision" <?=$disabled_provision?>><?=$provisionlabel?></button>
|
||||
<button type="submit" name="changePorts" value="Delete" <?=$disabled_delete?> >_(Delete)_</button>
|
||||
</span>
|
||||
<span class="inline-block"><?=$disabled_provision_msg?></span>
|
||||
|
||||
<?if ($cert3Present):?>
|
||||
|
||||
@@ -514,7 +587,7 @@ _(Certificate issuer)_:
|
||||
: <?=$cert3Issuer?>
|
||||
|
||||
_(Certificate expiration)_:
|
||||
: <?=_(my_date($cert_time_format, strtotime($cert3Expires)),0)?>
|
||||
: <?=_(my_date($cert_time_format, strtotime($cert3Expires)), 0)?>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
|
||||
@@ -119,7 +119,10 @@ _(Mover logging)_:
|
||||
|
||||
<?endif;?>
|
||||
|
||||
: <input type="submit" name="changeMover" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeMover" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
<?if ($setup):?>
|
||||
<?if ($pool_devices):?>
|
||||
<?if (file_exists('/var/run/mover.pid')):?>
|
||||
|
||||
@@ -41,12 +41,16 @@ _(Enable NFS)_:
|
||||
:nfs_enable_help:
|
||||
|
||||
_(Tunable (fuse_remember))_:
|
||||
: <input type="number" name="fuse_remember" maxlength="10" value="<?=$var['fuse_remember']?>" class="narrow"><?=_($var['fuse_remember_status'])?>
|
||||
: <input type="number" name="fuse_remember" maxlength="10" value="<?=$var['fuse_remember']?>" class="narrow">
|
||||
<span><?=_($var['fuse_remember_status'])?></span>
|
||||
|
||||
:nfs_tunable_fuse_remember_help:
|
||||
|
||||
|
||||
: <input type="submit" name="changeShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeShare" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<form markdown="1" name="nfs_settings" method="POST" action="/update.php" target="progressFrame">
|
||||
@@ -75,7 +79,10 @@ _(Number of Threads)_:
|
||||
:nfs_threads_help:
|
||||
|
||||
|
||||
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,7 +2,7 @@ Menu="NetworkSettings"
|
||||
Title="Interface Extra"
|
||||
Tag="icon-custom"
|
||||
---
|
||||
<?PHP
|
||||
<?php
|
||||
/* Copyright 2005-2025, Lime Technology
|
||||
* Copyright 2012-2025, Bergware International.
|
||||
*
|
||||
@@ -14,16 +14,16 @@ Tag="icon-custom"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
<?php
|
||||
$cfg = '/boot/config/network-extra.cfg';
|
||||
|
||||
if (file_exists($cfg)) {
|
||||
extract(parse_ini_file($cfg));
|
||||
$include_interfaces = str_replace(" ","\n",$include_interfaces);
|
||||
$exclude_interfaces = str_replace(" ","\n",$exclude_interfaces);
|
||||
extract(parse_ini_file($cfg));
|
||||
$include_interfaces = str_replace(" ", "\n", $include_interfaces);
|
||||
$exclude_interfaces = str_replace(" ", "\n", $exclude_interfaces);
|
||||
} else {
|
||||
$include_interfaces = "";
|
||||
$exclude_interfaces = "";
|
||||
$include_interfaces = "";
|
||||
$exclude_interfaces = "";
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
@@ -60,7 +60,6 @@ $(function(){
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="title nocontrol shift"> </div>
|
||||
<form markdown="1" name="network_extra" method="POST" action="/update.php" target="progressFrame" onsubmit="return prepareText(this)">
|
||||
<input type="hidden" name="#file" value="<?=$cfg?>">
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/update_services">
|
||||
@@ -68,19 +67,22 @@ $(function(){
|
||||
<input type="hidden" name="exclude_interfaces" value="">
|
||||
|
||||
_(Current listening interfaces)_:
|
||||
: <span id="listen"><?=exec("$docroot/webGui/scripts/show_interfaces")?:_('Any')?></span><span class="red-text" style="margin-left:30px"><?=exec("$docroot/webGui/scripts/error_interfaces")?></span>
|
||||
: <span id="listen"><?=exec("$docroot/webGui/scripts/show_interfaces") ?: _('Any')?></span><span class="red-text" style="margin-left:30px"><?=exec("$docroot/webGui/scripts/error_interfaces")?></span>
|
||||
<hr>
|
||||
|
||||
_(Include listening interfaces)_:
|
||||
: <textarea name="include" spellcheck="false" cols="80" rows="<?=substr_count($include_interfaces,"\n")+1?>" maxlength="2048" name="text" style="resize:none;width:200px"><?=htmlspecialchars($include_interfaces)?></textarea>
|
||||
: <textarea name="include" spellcheck="false" cols="80" rows="<?=substr_count($include_interfaces, "\n") + 1?>" maxlength="2048" name="text" class="resize-none"><?=htmlspecialchars($include_interfaces)?></textarea>
|
||||
|
||||
:eth_network_extra_include_help:
|
||||
|
||||
_(Exclude listening interfaces)_:
|
||||
: <textarea name="exclude" spellcheck="false" cols="80" rows="<?=substr_count($exclude_interfaces,"\n")+1?>" maxlength="2048" name="text" style="resize:none;width:200px"><?=htmlspecialchars($exclude_interfaces)?></textarea>
|
||||
: <textarea name="exclude" spellcheck="false" cols="80" rows="<?=substr_count($exclude_interfaces, "\n") + 1?>" maxlength="2048" name="text" class="resize-none"><?=htmlspecialchars($exclude_interfaces)?></textarea>
|
||||
|
||||
:eth_network_extra_exclude_help:
|
||||
|
||||
|
||||
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -71,7 +71,10 @@ _(Interface)_ <?=$eth?>:
|
||||
<?endforeach;?>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
:eth_network_rules_help:
|
||||
|
||||
@@ -58,23 +58,34 @@ effect of making it ***impossible*** to rebuild an existing failed drive - you h
|
||||
:end
|
||||
|
||||
<hr>
|
||||
<form name="newConfig" method="POST" action="/update.htm" target="progressFrame" onsubmit="prepareNewConfig(this)">
|
||||
<form markdown="1" name="newConfig" method="POST" action="/update.htm" target="progressFrame" onsubmit="prepareNewConfig(this)">
|
||||
<input type="hidden" name="preserveArray" value="yes" disabled>
|
||||
<input type="hidden" name="preserveCache" value="yes" disabled>
|
||||
|
||||
<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,'array',_('Array slots'))?>
|
||||
<?=mk_option_check(0,'cache',_('Pool 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>
|
||||
<?if ($newarray):?>
|
||||
_(Array has been **Reset**)_ (_(please configure)_)
|
||||
<?elseif ($disabled):?>
|
||||
_(Array must be **Stopped** to change)_
|
||||
<?else:?>
|
||||
<input type="checkbox" onClick="cmdInit.disabled=!this.checked"><small>_(Yes, I want to do this)_</small>
|
||||
<?endif;?>
|
||||
_(Preserve current assignments)_:
|
||||
: <select id="s1" name="preset" multiple="multiple" style="display:none">
|
||||
<option value=''>_(All)_</option>
|
||||
<?=mk_option_check(0,'array',_('Array slots'))?>
|
||||
<?=mk_option_check(0,'cache',_('Pool slots'))?>
|
||||
</select>
|
||||
|
||||
|
||||
: <span class="inline-block">
|
||||
<?if ($newarray):?>
|
||||
_(Array has been **Reset**)_ (_(please configure)_)
|
||||
<?elseif ($disabled):?>
|
||||
_(Array must be **Stopped** to change)_
|
||||
<?else:?>
|
||||
<label>
|
||||
<input type="checkbox" onClick="cmdInit.disabled=!this.checked">
|
||||
_(Yes, I want to do this)_
|
||||
</label>
|
||||
<?endif;?>
|
||||
</span>
|
||||
|
||||
|
||||
: <span class="inline-block">
|
||||
<input type="submit" class="lock" name="cmdInit" value="_(Apply)_" disabled>
|
||||
<input type="button" class="lock" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -126,7 +126,7 @@ foreach ($xml_files as $xml_file) {
|
||||
}
|
||||
}
|
||||
foreach (explode(PHP_EOL,(String) $xml->Script) as $line) if (trim($line)) $script .= trim($line)."{1}";
|
||||
echo '<div class="title 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 class="title"><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.'">';
|
||||
|
||||
@@ -111,8 +111,9 @@ $(function(){
|
||||
<input type="hidden" name="docker_notify">
|
||||
<input type="hidden" name="language_notify">
|
||||
<input type="hidden" name="report">
|
||||
|
||||
_(Notifications display)_:
|
||||
: <select class="a" name="display">
|
||||
: <select name="display">
|
||||
<?=mk_option($notify['display'], "0", _("Detailed"))?>
|
||||
<?=mk_option($notify['display'], "1", _("Summarized"))?>
|
||||
</select>
|
||||
@@ -120,7 +121,7 @@ _(Notifications display)_:
|
||||
:notifications_display_help:
|
||||
|
||||
_(Display position)_:
|
||||
: <select name="position" class="a">
|
||||
: <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"))?>
|
||||
@@ -131,12 +132,13 @@ _(Display position)_:
|
||||
:notifications_display_position_help:
|
||||
|
||||
_(Auto-close)_ (_(seconds)_):
|
||||
: <input type="number" name="life" class="a" min="0" max="60" value="<?=$notify['life']?>"> _(a value of zero means no automatic closure)_
|
||||
: <input type="number" name="life" min="0" max="60" value="<?=$notify['life']?>">
|
||||
<span class="input-instructions">_(a value of zero means no automatic closure)_</span>
|
||||
|
||||
:notifications_auto_close_help:
|
||||
|
||||
_(Date format)_:
|
||||
: <select name="date" class="a">
|
||||
: <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"))?>
|
||||
@@ -145,7 +147,7 @@ _(Date format)_:
|
||||
:notifications_date_format_help:
|
||||
|
||||
_(Time format)_:
|
||||
: <select name="time" class="a">
|
||||
: <select name="time">
|
||||
<?=mk_option($notify['time'], "h:i A", _("12 hours"))?>
|
||||
<?=mk_option($notify['time'], "H:i", _("24 hours"))?>
|
||||
</select>
|
||||
@@ -153,7 +155,7 @@ _(Time format)_:
|
||||
:notifications_time_format_help:
|
||||
|
||||
_(Store notifications to flash)_:
|
||||
: <select name="path" class="a">
|
||||
: <select name="path">
|
||||
<?=mk_option($notify['path'], "/tmp/notifications", _("No"))?>
|
||||
<?=mk_option($notify['path'], "/boot/config/plugins/dynamix/notifications", _("Yes"))?>
|
||||
</select>
|
||||
@@ -161,7 +163,7 @@ _(Store notifications to flash)_:
|
||||
:notifications_store_flash_help:
|
||||
|
||||
_(System notifications)_:
|
||||
: <select name="system" class="a" onchange="prepareSystem(this.selectedIndex)">
|
||||
: <select name="system" onchange="prepareSystem(this.selectedIndex)">
|
||||
<?=mk_option($notify['system'], "", _("Disabled"))?>
|
||||
<?=mk_option($notify['system'], "*/1 * * * *", _("Enabled"))?>
|
||||
</select>
|
||||
@@ -169,7 +171,7 @@ _(System notifications)_:
|
||||
:notifications_system_help:
|
||||
|
||||
_(Unraid OS update notification)_:
|
||||
: <select name="unraidos" class="a" onchange="prepareUnraid(this.value)">
|
||||
: <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"))?>
|
||||
@@ -181,7 +183,7 @@ _(Unraid OS update notification)_:
|
||||
:notifications_os_update_help:
|
||||
|
||||
_(Plugins update notification)_:
|
||||
: <select name="version" class="a" onchange="preparePlugin(this.value)">
|
||||
: <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"))?>
|
||||
@@ -193,7 +195,7 @@ _(Plugins update notification)_:
|
||||
:notifications_plugins_update_help:
|
||||
|
||||
_(Docker update notification)_:
|
||||
: <select name="docker_update" class="a" onchange="prepareDocker(this.value)">
|
||||
: <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"))?>
|
||||
@@ -205,7 +207,7 @@ _(Docker update notification)_:
|
||||
:notifications_docker_update_help:
|
||||
|
||||
_(Language update notification)_:
|
||||
: <select name="language_update" class="a" onchange="prepareLanguage(this.value)">
|
||||
: <select name="language_update" onchange="prepareLanguage(this.value)">
|
||||
<?=mk_option($notify['language_update'], "", _("Never check"))?>
|
||||
<?=mk_option($notify['language_update'], "10 */6 * * *", _("Check four times a day"))?>
|
||||
<?=mk_option($notify['language_update'], "10 0,12 * * *", _("Check twice a day"))?>
|
||||
@@ -215,7 +217,7 @@ _(Language update notification)_:
|
||||
</select>
|
||||
|
||||
_(Array status notification)_:
|
||||
: <select name="status" class="a" onchange="prepareReport(this.value)">
|
||||
: <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"))?>
|
||||
@@ -230,57 +232,140 @@ _(Array status notification)_:
|
||||
:notifications_array_status_help:
|
||||
|
||||
<span id="unraidTitle" class="unraid" style="display:none"> </span>
|
||||
: <span class="unraid" style="display:none"><span class="a">_(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 class="notifications-checkbox-group-title">_(Unraid OS update)_</span>
|
||||
<span class="inline-block">
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="unraid1"<?=($notify['unraid'] & 1)==1 ? ' checked' : ''?>>_(Browser)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="unraid2"<?=($notify['unraid'] & 2)==2 ? ' checked' : ''?>>_(Email)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="unraid3"<?=($notify['unraid'] & 4)==4 ? ' checked' : ''?>>_(Agents)_
|
||||
</label>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span id="pluginTitle" class="plugin" style="display:none"> </span>
|
||||
: <span class="plugin" style="display:none"><span class="a">_(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 class="notifications-checkbox-group-title">_(Plugins update)_</span>
|
||||
<span class="inline-block">
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="plugin1"<?=($notify['plugin'] & 1)==1 ? ' checked' : ''?>>_(Browser)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="plugin2"<?=($notify['plugin'] & 2)==2 ? ' checked' : ''?>>_(Email)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="plugin3"<?=($notify['plugin'] & 4)==4 ? ' checked' : ''?>>_(Agents)_
|
||||
</label>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span id="dockerTitle" class="docker" style="display:none"> </span>
|
||||
: <span class="docker" style="display:none"><span class="a">_(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 class="notifications-checkbox-group-title">_(Docker update)_</span>
|
||||
<span class="inline-block">
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="docker_notify1"<?=($notify['docker_notify'] & 1)==1 ? ' checked' : ''?>>_(Browser)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="docker_notify2"<?=($notify['docker_notify'] & 2)==2 ? ' checked' : ''?>>_(Email)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="docker_notify3"<?=($notify['docker_notify'] & 4)==4 ? ' checked' : ''?>>_(Agents)_
|
||||
</label>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span id="languageTitle" class="language" style="display:none"> </span>
|
||||
: <span class="language" style="display:none"><span class="a">_(Language update)_</span>
|
||||
<input type="checkbox" name="language_notify1"<?=($notify['language_notify'] & 1)==1 ? ' checked' : ''?>>_(Browser)_
|
||||
<input type="checkbox" name="language_notify2"<?=($notify['language_notify'] & 2)==2 ? ' checked' : ''?>>_(Email)_
|
||||
<input type="checkbox" name="language_notify3"<?=($notify['language_notify'] & 4)==4 ? ' checked' : ''?>>_(Agents)_ </span>
|
||||
: <span class="language" style="display:none">
|
||||
<span class="notifications-checkbox-group-title">_(Language update)_</span>
|
||||
<span class="inline-block">
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="language_notify1"<?=($notify['language_notify'] & 1)==1 ? ' checked' : ''?>>_(Browser)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="language_notify2"<?=($notify['language_notify'] & 2)==2 ? ' checked' : ''?>>_(Email)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" name="language_notify3"<?=($notify['language_notify'] & 4)==4 ? ' checked' : ''?>>_(Agents)_
|
||||
</label>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span id="reportTitle" class="report" style="display:none"> </span>
|
||||
: <span class="report" style="display:none"><span class="a">_(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 class="notifications-checkbox-group-title">_(Array status)_</span>
|
||||
<span>
|
||||
<span>
|
||||
<input type="checkbox" name="report1"<?=($notify['report'] & 1)==1 ? ' checked' : ''?>>_(Browser)_
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" name="report2"<?=($notify['report'] & 2)==2 ? ' checked' : ''?>>_(Email)_
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" name="report3"<?=($notify['report'] & 4)==4 ? ' checked' : ''?>>_(Agents)_
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
:notifications_agent_selection_help:
|
||||
|
||||
_(Notification entity)_:
|
||||
: <span class="a">_(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>
|
||||
<span class="notifications-checkbox-group-title">_(Notices)_</span>
|
||||
<span class="inline-block">
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" class="checkbox" name="normal1"<?=($notify['normal'] & 1)==1 ? " checked $disabled" : $disabled?>>_(Browser)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" class="checkbox" name="normal2"<?=($notify['normal'] & 2)==2 ? " checked $disabled" : $disabled?>>_(Email)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" class="checkbox" name="normal3"<?=($notify['normal'] & 4)==4 ? " checked $disabled" : $disabled?>>_(Agents)_
|
||||
</label>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
|
||||
: <span class="a">_(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>
|
||||
<span class="notifications-checkbox-group-title">_(Warnings)_</span>
|
||||
<span class="inline-block">
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" class="checkbox" name="warning1"<?=($notify['warning'] & 1)==1 ? " checked $disabled" : $disabled?>>_(Browser)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" class="checkbox" name="warning2"<?=($notify['warning'] & 2)==2 ? " checked $disabled" : $disabled?>>_(Email)_
|
||||
</label>
|
||||
<label class="inline-block">
|
||||
<input type="checkbox" class="checkbox" name="warning3"<?=($notify['warning'] & 4)==4 ? " checked $disabled" : $disabled?>>_(Agents)_
|
||||
</label>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
|
||||
: <span class="a">_(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>
|
||||
<span class="notifications-checkbox-group-title">_(Alerts)_</span>
|
||||
<span>
|
||||
<span>
|
||||
<input type="checkbox" class="checkbox" name="alert1"<?=($notify['alert'] & 1)==1 ? " checked $disabled" : $disabled?>>_(Browser)_
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" class="checkbox" name="alert2"<?=($notify['alert'] & 2)==2 ? " checked $disabled" : $disabled?>>_(Email)_
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" class="checkbox" name="alert3"<?=($notify['alert'] & 4)==4 ? " checked $disabled" : $disabled?>>_(Agents)_
|
||||
</span>
|
||||
</span>
|
||||
|
||||
:notifications_classification_help:
|
||||
|
||||
<input type="submit" name="#default" value="_(Default)_">
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="#apply" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -101,8 +101,24 @@ $(function(){
|
||||
|
||||
// Adjust the width of thead cells when window resizes
|
||||
</script>
|
||||
<table class="unraid tablesorter left shift" id="archive_table">
|
||||
<thead><tr><th>_(Time)_</th><th>_(Event)_</th><th>_(Subject)_</th><th>_(Description)_</th><th>_(Importance)_</th><th><a id="deleteAll" href="#" onclick="askConfirmation();return false" title="_(Delete all notifications)_" style="display:none"><i class="fa fa-trash-o red-text"></i></a></th></tr></thead>
|
||||
<tbody id="archive_list"><tr><td colspan="6"></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
<div class="TableContainer">
|
||||
<table class="unraid tablesorter left shift" id="archive_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>_(Time)_</th>
|
||||
<th>_(Event)_</th>
|
||||
<th>_(Subject)_</th>
|
||||
<th>_(Description)_</th>
|
||||
<th>_(Importance)_</th>
|
||||
<th><a id="deleteAll" href="#" onclick="askConfirmation();return false" title="_(Delete all notifications)_" style="display:none"><i class="fa fa-trash-o red-text"></i></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="archive_list">
|
||||
<tr>
|
||||
<td colspan="6"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
@@ -25,15 +25,30 @@ $('<?=$tabX?>').bind({click:function() {$('i.toggle').show('slow');}});
|
||||
<?endif;?>
|
||||
</script>
|
||||
|
||||
<table class="unraid disk_status">
|
||||
<thead><tr><td>_(Device)_</td><td>_(Identification)_</td><td><?=$power?>_(Temp)_</td><td>_(Reads)_</td><td>_(Writes)_</td><td>_(Errors)_</td><td>_(FS)_</td><td>_(Size)_</td><td>_(Used)_</td><td>_(Free)_</td></tr></thead>
|
||||
<tbody id="open_devices">
|
||||
<?
|
||||
foreach ($devs as $dev):
|
||||
echo "<tr><td colspan='10'></td></tr>";
|
||||
endforeach;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="TableContainer">
|
||||
<table class="unraid disk_status">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>_(Device)_</td>
|
||||
<td>_(Identification)_</td>
|
||||
<td><?=$power?>_(Temp)_</td>
|
||||
<td>_(Reads)_</td>
|
||||
<td>_(Writes)_</td>
|
||||
<td>_(Errors)_</td>
|
||||
<td>_(FS)_</td>
|
||||
<td>_(Size)_</td>
|
||||
<td>_(Used)_</td>
|
||||
<td>_(Free)_</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="open_devices">
|
||||
<?
|
||||
foreach ($devs as $dev):
|
||||
echo "<tr><td colspan='10'></td></tr>";
|
||||
endforeach;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
:open_devices_help:
|
||||
|
||||
@@ -63,9 +63,11 @@ $proxy_3_url = $url_array['full_url'];
|
||||
<input type="hidden" name="#command" value="<?= OUTGOING_PROXY_SCRIPT; ?>">
|
||||
<input type="hidden" name="#arg[1]" value="apply">
|
||||
|
||||
<p><strong>_(Enable Outgoing Proxy)_</strong></p>
|
||||
_(Enable Outgoing Proxy)_
|
||||
:
|
||||
|
||||
_(Select Proxy)_:
|
||||
: <select name="proxy_active" style="width:20%;" size="1">
|
||||
: <select name="proxy_active" size="1">
|
||||
<?=mk_option($cfg['proxy_active'], "0", "_(None)_");?>
|
||||
<?if (($cfg['proxy_url_1']) && ($cfg['proxy_name_1'])):?>
|
||||
<?=mk_option($cfg['proxy_active'], "1", htmlspecialchars($cfg['proxy_name_1']), "disabled");?>
|
||||
@@ -88,16 +90,20 @@ _(Select Proxy)_:
|
||||
> For a more comprehensive solution you might consider setting up <u><a href='https://docs.unraid.net/go/configuring-vpn-tunneled-access-for-system/' target='_blank'>_(VPN tunnel access for System)_</a></u>.
|
||||
:end
|
||||
|
||||
<p><strong>_(Outgoing Proxy)_ 1</strong></p>
|
||||
<div markdown="1" class="shade">
|
||||
_(Outgoing Proxy)_ 1
|
||||
:
|
||||
|
||||
_(Name)_:
|
||||
: <input type="text" name="proxy_name_1" style="width:20%;" maxlength="35" value="<?=$cfg['proxy_name_1'];?>" placeholder="(_(Required)_)"><span id="proxy-status-1"></span>
|
||||
: <input type="text" name="proxy_name_1" maxlength="35" value="<?=$cfg['proxy_name_1'];?>" placeholder="(_(Required)_)">
|
||||
<span id="proxy-status-1"></span>
|
||||
|
||||
:outgoing_proxy_name_plug:
|
||||
> Outgoing Proxy name for this Proxy.
|
||||
:end
|
||||
|
||||
_(URL)_:
|
||||
: <input type="text" name="proxy_url_1" style="width:30%;" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_url_1']);?>" onchange="verifyUrl(this)" placeholder="_(http://IP:port or http://host:port)_">
|
||||
: <input type="text" name="proxy_url_1" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_url_1']);?>" onchange="verifyUrl(this)" placeholder="_(http://IP:port or http://host:port)_">
|
||||
|
||||
:outgoing_proxy_url_plug:
|
||||
> Outgoing Proxy URL for this Proxy. The URL can be entered with or without credentials. The credentials will be parsed from the URL.
|
||||
@@ -106,29 +112,33 @@ _(URL)_:
|
||||
:end
|
||||
|
||||
_(User)_:
|
||||
: <input type="text" name="proxy_user_1" class="wide" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_user_1']);?>" placeholder="(_(Optional)_)">
|
||||
: <input type="text" name="proxy_user_1" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_user_1']);?>" placeholder="(_(Optional)_)">
|
||||
|
||||
:outgoing_proxy_user_plug:
|
||||
> Outgoing Proxy User Name for this Proxy.
|
||||
:end
|
||||
|
||||
_(Password)_:
|
||||
: <input type="password" name="proxy_pass_1" class="wide" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_pass_1']);?>" placeholder="(_(Optional)_)">
|
||||
: <input type="password" name="proxy_pass_1" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_pass_1']);?>" placeholder="(_(Optional)_)">
|
||||
|
||||
:outgoing_proxy_password_plug:
|
||||
> Outgoing Proxy Password for this Proxy.
|
||||
:end
|
||||
</div>
|
||||
|
||||
<div markdown="1" class="shade">
|
||||
_(Outgoing Proxy)_ 2
|
||||
:
|
||||
|
||||
<p><strong>_(Outgoing Proxy)_ 2</strong></p>
|
||||
_(Name)_:
|
||||
: <input type="text" name="proxy_name_2" style="width:20%;" maxlength="35" value="<?=$cfg['proxy_name_2'];?>" placeholder="(_(Required)_)"><span id="proxy-status-2"></span>
|
||||
: <input type="text" name="proxy_name_2" maxlength="35" value="<?=$cfg['proxy_name_2'];?>" placeholder="(_(Required)_)"><span id="proxy-status-2"></span>
|
||||
|
||||
:outgoing_proxy_name_plug:
|
||||
> Outgoing Proxy name for this Proxy.
|
||||
:end
|
||||
|
||||
_(URL)_:
|
||||
: <input type="text" name="proxy_url_2" style="width:30%;" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_url_2']);?>" onchange="verifyUrl(this)" placeholder="_(http://IP:port or http://host:port)_">
|
||||
: <input type="text" name="proxy_url_2" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_url_2']);?>" onchange="verifyUrl(this)" placeholder="_(http://IP:port or http://host:port)_">
|
||||
|
||||
:outgoing_proxy_url_plug:
|
||||
> Outgoing Proxy URL for this Proxy. The URL can be entered with or without credentials. The credentials will be parsed from the URL.
|
||||
@@ -137,29 +147,34 @@ _(URL)_:
|
||||
:end
|
||||
|
||||
_(User)_:
|
||||
: <input type="text" name="proxy_user_2" class="wide" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_user_2']);?>" placeholder="(_(Optional)_)">
|
||||
: <input type="text" name="proxy_user_2" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_user_2']);?>" placeholder="(_(Optional)_)">
|
||||
|
||||
:outgoing_proxy_user_plug:
|
||||
> Outgoing Proxy User Name for this Proxy.
|
||||
:end
|
||||
|
||||
_(Password)_:
|
||||
: <input type="password" name="proxy_pass_2" class="wide" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_pass_2']);?>" placeholder="(_(Optional)_)">
|
||||
: <input type="password" name="proxy_pass_2" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_pass_2']);?>" placeholder="(_(Optional)_)">
|
||||
|
||||
:outgoing_proxy_password_plug:
|
||||
> Outgoing Proxy Password for this Proxy.
|
||||
:end
|
||||
|
||||
<p><strong>_(Outgoing Proxy)_ 3</strong></p>
|
||||
</div>
|
||||
|
||||
<div markdown="1" class="shade">
|
||||
_(Outgoing Proxy)_ 3
|
||||
:
|
||||
|
||||
_(Name)_:
|
||||
: <input type="text" name="proxy_name_3" style="width:20%;" maxlength="35" value="<?=$cfg['proxy_name_3'];?>" placeholder="(_(Required)_)"><span id="proxy-status-3"></span>
|
||||
: <input type="text" name="proxy_name_3" maxlength="35" value="<?=$cfg['proxy_name_3'];?>" placeholder="(_(Required)_)"><span id="proxy-status-3"></span>
|
||||
|
||||
:outgoing_proxy_name_plug:
|
||||
> Outgoing Proxy name for this Proxy.
|
||||
:end
|
||||
|
||||
_(URL)_:
|
||||
: <input type="text" name="proxy_url_3" style="width:30%;" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_url_3']);?>" onchange="verifyUrl(this)" placeholder="_(http://IP:port or http://host:port)_">
|
||||
: <input type="text" name="proxy_url_3" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_url_3']);?>" onchange="verifyUrl(this)" placeholder="_(http://IP:port or http://host:port)_">
|
||||
|
||||
:outgoing_proxy_url_plug:
|
||||
> Outgoing Proxy URL for this Proxy. The URL can be entered with or without credentials. The credentials will be parsed from the URL.
|
||||
@@ -168,21 +183,26 @@ _(URL)_:
|
||||
:end
|
||||
|
||||
_(User)_:
|
||||
: <input type="text" name="proxy_user_3" class="wide" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_user_3']);?>" placeholder="(_(Optional)_)">
|
||||
: <input type="text" name="proxy_user_3" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_user_3']);?>" placeholder="(_(Optional)_)">
|
||||
|
||||
:outgoing_proxy_user_plug:
|
||||
> Outgoing Proxy User Name for this Proxy.
|
||||
:end
|
||||
|
||||
_(Password)_:
|
||||
: <input type="password" name="proxy_pass_3" class="wide" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_pass_3']);?>" placeholder="(_(Optional)_)">
|
||||
: <input type="password" name="proxy_pass_3" maxlength="100" value="<?=htmlspecialchars($cfg['proxy_pass_3']);?>" placeholder="(_(Optional)_)">
|
||||
|
||||
:outgoing_proxy_password_plug:
|
||||
> Outgoing Proxy Password for this Proxy.
|
||||
:end
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
: <input type="submit" value='_(Apply)_'><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value='_(Apply)_'>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -22,7 +22,7 @@ $conf = file_exists($ini) ? parse_ini_file($ini) : [];
|
||||
if (!file_exists($log)) touch($log);
|
||||
?>
|
||||
|
||||
<div markdown="1" style="width:43%;margin-bottom:40px;padding:5px 15px;border:solid 1px">
|
||||
<div markdown="1" class="php-settings-description">
|
||||
:php_settings_plug:
|
||||
This utility is used for development purposes only and allows Plugin Authors to verify their PHP code by enabling different levels of PHP error reporting.
|
||||
|
||||
@@ -42,6 +42,17 @@ under normal running conditions.
|
||||
<input type="hidden" name="display_startup_errors" value="0">
|
||||
<input type="hidden" name="display_errors" value="<?=_var($conf,'display_errors',0)?>">
|
||||
<input type="hidden" name="log_errors" value="1">
|
||||
|
||||
|
||||
: <div class="inline-block">
|
||||
<input type="button" value="_(PHP Info)_" onclick="PHPinfo()">
|
||||
<input type="button" id="clearlog" value="_(Clear Log)_" onclick="clearLog()" <?= filesize($log) > 0 ? '' : ' disabled'?>>
|
||||
<input type="button" id="viewlog" value="_(View Log)_" onclick="viewLog()" disabled>
|
||||
<span class="inline-block">
|
||||
_(LOG size)_: <span id="logsize"></span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
_(Error reporting level)_:
|
||||
: <select name="error_reporting" onchange="toggleScreen(this.selectedIndex)">
|
||||
<?=mk_option(_var($conf,'error_reporting'), strval(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED), "_(Default)_");?>
|
||||
@@ -53,10 +64,16 @@ _(Error reporting level)_:
|
||||
</select>
|
||||
|
||||
|
||||
: <input type="checkbox" id="screenlog" onclick="screenLog()" <?=_var($conf,'display_errors',0)?'checked':''?> disabled><span id="screentext" class="dim">_(Show errors on screen)_</span>
|
||||
: <label for="screenlog">
|
||||
<input type="checkbox" id="screenlog" onclick="screenLog()" <?=_var($conf,'display_errors',0)?'checked':''?> disabled>
|
||||
<span id="screentext" class="dim">_(Show errors on screen)_</span>
|
||||
</label>
|
||||
|
||||
<input type="button" value="_(PHP Info)_" onclick="PHPinfo()"><input type="button" id="clearlog" value="_(Clear Log)_" onclick="clearLog()"<?=filesize($log)>0?'':' disabled'?>><input type="button" id="viewlog" value="_(View Log)_" onclick="viewLog()" disabled>_(LOG size)_: <span id="logsize"></span>
|
||||
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<div id="dialogWindow"></div>
|
||||
|
||||
@@ -227,5 +227,8 @@ _(Accumulation duration)_:
|
||||
|
||||
</div>
|
||||
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"></td>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="#apply" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -53,16 +53,25 @@ $(function(){
|
||||
<input type="hidden" name="#arg[1]" value="">
|
||||
|
||||
_(Change power mode)_:
|
||||
: <input name="powermode" type="radio"<?=value('powersave')?>>_(Best power efficiency)_<span></span>
|
||||
: <span>
|
||||
<input name="powermode" type="radio"<?=value('powersave')?>>_(Best power efficiency)_
|
||||
</span>
|
||||
|
||||
|
||||
: <input name="powermode" type="radio"<?=value('ondemand','balance_power')?>>_(Balanced operation)_<span></span>
|
||||
: <span>
|
||||
<input name="powermode" type="radio"<?=value('ondemand','balance_power')?>>_(Balanced operation)_
|
||||
</span>
|
||||
|
||||
|
||||
: <input name="powermode" type="radio"<?=value('performance')?>>_(Best performance)_<span></span>
|
||||
: <span>
|
||||
<input name="powermode" type="radio"<?=value('performance')?>>_(Best performance)_
|
||||
</span>
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="#apply" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<div id="vm" class="notice">_(When running Unraid virtualized, there are no available power modes)_</div>
|
||||
|
||||
@@ -2,7 +2,7 @@ Menu="NetworkSettings"
|
||||
Title="Routing Table"
|
||||
Tag="icon-share"
|
||||
---
|
||||
<?PHP
|
||||
<?php
|
||||
/* Copyright 2005-2025, Lime Technology
|
||||
* Copyright 2012-2025, Bergware International.
|
||||
*
|
||||
@@ -14,19 +14,23 @@ Tag="icon-share"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
<?php
|
||||
unset($list,$other);
|
||||
exec("ls /sys/class/net|grep -P '^br[0-9]'",$list);
|
||||
exec("ls /sys/class/net|grep -P '^(bond|eth)[0-9]'",$other);
|
||||
exec("ls /sys/class/net|grep -P '^br[0-9]'", $list);
|
||||
exec("ls /sys/class/net|grep -P '^(bond|eth)[0-9]'", $other);
|
||||
foreach ($other as $port) {
|
||||
if (substr($port,0,4)=='bond') {
|
||||
$br = str_replace('bond','br',$port);
|
||||
if (!in_array($br,$list)) $list[] = $port;
|
||||
} else {
|
||||
$br = str_replace('eth','br',$port);
|
||||
$bond = str_replace('eth','bond',$port);
|
||||
if (!in_array($br,$list) && !in_array($bond,$list)) $list[] = $port;
|
||||
}
|
||||
if (substr($port, 0, 4) == 'bond') {
|
||||
$br = str_replace('bond', 'br', $port);
|
||||
if (!in_array($br, $list)) {
|
||||
$list[] = $port;
|
||||
}
|
||||
} else {
|
||||
$br = str_replace('eth', 'br', $port);
|
||||
$bond = str_replace('eth', 'bond', $port);
|
||||
if (!in_array($br, $list) && !in_array($bond, $list)) {
|
||||
$list[] = $port;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
@@ -52,10 +56,20 @@ $(function(){
|
||||
routeTable();
|
||||
});
|
||||
</script>
|
||||
<table class="unraid">
|
||||
<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="TableContainer">
|
||||
<table class="unraid">
|
||||
<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>
|
||||
|
||||
<div class="shade" 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)">
|
||||
@@ -63,11 +77,16 @@ _(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"><i class="fa fa-sort-numeric-asc"></i> *_(optional metric (lowest is preferred))_*
|
||||
<span class="inline-block">
|
||||
<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))_*
|
||||
</span>
|
||||
<input type="hidden" name="task" value="Add Route">
|
||||
:eth_routing_table_help:
|
||||
|
||||
|
||||
: <input type="submit" value="_(Add Route)_"><input type="button" value="_(Done)_" class="lock" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Add Route)_">
|
||||
<input type="button" value="_(Done)_" class="lock" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -48,5 +48,8 @@ _(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()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeShare" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
@@ -36,7 +36,11 @@ _(Samba extra configuration)_:
|
||||
: <textarea spellcheck="false" cols="80" rows="<?=substr_count($text,"\n")+1?>" maxlength="2048" name="text" <?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 **Stopped** to change)_*<?endif;?>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
<?if ($var['fsState']=="Started"):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
|
||||
:smb_extra_button_help:
|
||||
|
||||
|
||||
@@ -32,5 +32,9 @@ _(Local master)_:
|
||||
|
||||
<?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;?>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeShare" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
<?if ($var['fsState']=="Started"):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
</form>
|
||||
|
||||
@@ -71,7 +71,11 @@ _(WSD options [experimental])_:
|
||||
:smb_wsd_options_help:
|
||||
|
||||
|
||||
: <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;?>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeShare" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
<?if ($var['fsState']=="Started"):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -73,7 +73,10 @@ _(Security)_:
|
||||
</select>
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareSecurityNFS" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeShareSecurityNFS" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<?if ($sec_nfs[$name]['security']=='private'):?>
|
||||
@@ -85,7 +88,10 @@ _(Rule)_:
|
||||
:nfs_security_rules_help:
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareAccessNFS" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeShareAccessNFS" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
@@ -55,6 +55,9 @@ foreach ($rows as $row) echo $row;
|
||||
|
||||
<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)?>">
|
||||
<?if (($name=='flash')||($var['enableFruit']!='yes')):?>
|
||||
<input type="hidden" name="shareVolsizelimit" value="">
|
||||
<?endif;?>
|
||||
|
||||
_(Share name)_:
|
||||
: <?=htmlspecialchars($name)?>
|
||||
@@ -69,7 +72,6 @@ _(Export)_:
|
||||
|
||||
:smb_export_help:
|
||||
|
||||
<input type="hidden" name="shareVolsizelimit" value="">
|
||||
<?else:?>
|
||||
_(Export)_:
|
||||
: <select name="shareExport" onchange="checkShareSettingsSMB(this.form)">
|
||||
@@ -104,12 +106,16 @@ _(Security)_:
|
||||
<?=mk_option($sec[$name]['security'], "public", _('Public'))?>
|
||||
<?=mk_option($sec[$name]['security'], "secure", _('Secure'))?>
|
||||
<?=mk_option($sec[$name]['security'], "private", _('Private'))?>
|
||||
</select><span id="warningMessage" style="display:none; color: red;">_(Warning)_: _(Windows may require a valid User to be defined even for Public shares)_. _(See Help)_.</span>
|
||||
</select>
|
||||
<span id="warningMessage" style="display:none; color: red;">_(Warning)_: _(Windows may require a valid User to be defined even for Public shares)_. _(See Help)_.</span>
|
||||
|
||||
:smb_security_modes_help:
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareSecurity" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeShareSecurity" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<?if ($sec[$name]['security']=='secure'):?>
|
||||
@@ -151,7 +157,10 @@ foreach ($rows as $row) echo $row;
|
||||
<?input_secure_users($sec)?>
|
||||
|
||||
|
||||
: <input type="submit" name="changeShareAccess" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeShareAccess" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<?elseif ($sec[$name]['security']=='private'):?>
|
||||
@@ -190,10 +199,14 @@ foreach ($rows as $row) echo $row;
|
||||
|
||||
<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 type="submit" name="changeShareAccess" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeShareAccess" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
@@ -22,29 +22,40 @@ $zip = str_replace(' ','_',strtolower(_var($var,'NAME','tower')))."-smart-$date
|
||||
$long = !isset($disks[$name]['spindownDelay']) || _var($disks[$name],'spindownDelay')==0 || (_var($disks[$name],'spindownDelay')==-1 && _var($var,'spindownDelay')==0);
|
||||
?>
|
||||
_(Download SMART report)_:
|
||||
: <input type='button' value="_(Download)_" onclick='saveSMART()'>
|
||||
: <span class="inline-block">
|
||||
<input type='button' value="_(Download)_" onclick='saveSMART()'>
|
||||
</span>
|
||||
|
||||
_(SMART self-test history)_:
|
||||
: <input type="button" value="_(Show)_" id="toggle_log" onclick="selftestLog()">
|
||||
: <span class="inline-block">
|
||||
<input type="button" value="_(Show)_" id="toggle_log" onclick="selftestLog()">
|
||||
</span>
|
||||
|
||||
:selftest_history_help:
|
||||
|
||||
<pre id="selftest" style="display:none"></pre>
|
||||
|
||||
_(SMART error log)_:
|
||||
: <input type="button" value="_(Show)_" id="toggle_error" onclick="errorLog()">
|
||||
: <span class="inline-block">
|
||||
<input type="button" value="_(Show)_" id="toggle_error" onclick="errorLog()">
|
||||
</span>
|
||||
|
||||
:selftest_error_log_help:
|
||||
|
||||
<pre id="errorlog" style="display:none"></pre>
|
||||
|
||||
_(SMART short self-test)_:
|
||||
: <input type='button' value="_(Start)_" id='short_test' onclick="startShortTest()">
|
||||
: <span class="inline-block">
|
||||
<input type='button' value="_(Start)_" id='short_test' onclick="startShortTest()">
|
||||
</span>
|
||||
|
||||
:selftest_short_test_help:
|
||||
|
||||
_(SMART extended self-test)_:
|
||||
: <input type='button' value="_(Start)_" id='long_test' onclick="startLongTest()"<?=$long ? ">" : " disabled> _(Disable **Spin down delay** to run a SMART extended self-test)_"?>
|
||||
: <span class="inline-block">
|
||||
<input type='button' value="_(Start)_" id='long_test' onclick="startLongTest()"<?=$long ? "" : " disabled"?>>
|
||||
<?php if (!$long): ?><span>_(Disable **Spin down delay** to run a SMART extended self-test)_</span><?php endif; ?>
|
||||
</span>
|
||||
|
||||
:selftest_long_test_help:
|
||||
|
||||
|
||||
@@ -53,13 +53,13 @@ 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"><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):?>
|
||||
$('.tabs').append(ctrl);
|
||||
<?else:?>
|
||||
$('div[class=title]:first').append(ctrl);
|
||||
$('div[class=title]:first .right').append(ctrl);
|
||||
<?endif;?>
|
||||
});
|
||||
<?endif;?>
|
||||
|
||||
@@ -568,11 +568,17 @@ _(Mover action)_:
|
||||
</div>
|
||||
<?if (!$name):?>
|
||||
|
||||
: <input type="submit" name="cmdEditShare" value="_(Add Share)_" onclick="this.value='Add Share'"><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="cmdEditShare" value="_(Add Share)_" onclick="this.value='Add Share'">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
<?else:?>
|
||||
<div markdown="1">
|
||||
<label id="deleteLabel" title="">_(Delete)_</label><input type="checkbox" name="confirmDelete" onchange="chkDelete(this.form, document.getElementById('cmdEditShare'));" title="" disabled>
|
||||
: <input type="submit" id="cmdEditShare" name="cmdEditShare" value="_(Apply)_" onclick="if (this.value=='_(Delete)_') this.value='Delete'; else this.value='Apply'; return handleDeleteClick(this)" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" id="cmdEditShare" name="cmdEditShare" value="_(Apply)_" onclick="if (this.value=='_(Delete)_') this.value='Delete'; else this.value='Apply'; return handleDeleteClick(this)" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</div>
|
||||
<?endif;?>
|
||||
</form>
|
||||
|
||||
@@ -33,10 +33,22 @@ $disks = parse_ini_file('state/disks.ini',true) ?? [];
|
||||
$nodisks = checkDisks($disks) ? "" : "disabled";
|
||||
?>
|
||||
|
||||
<table class="unraid share_status">
|
||||
<thead><tr><td>_(Name)_</td><td>_(Comment)_</td><td>_(SMB)_</td><td>_(NFS)_</td><td>_(Storage)_</td><td>_(Size)_</td><td>_(Free)_</td></tr></thead>
|
||||
<tbody id="shareslist"></tbody>
|
||||
</table>
|
||||
<div class="TableContainer">
|
||||
<table class="unraid share_status">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>_(Name)_</td>
|
||||
<td>_(Comment)_</td>
|
||||
<td>_(SMB)_</td>
|
||||
<td>_(NFS)_</td>
|
||||
<td>_(Storage)_</td>
|
||||
<td>_(Size)_</td>
|
||||
<td>_(Free)_</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="shareslist"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<form name="share_form" method="POST" action="<?=htmlspecialchars($path)?>/Share?name=">
|
||||
<input type="button" id="compute-shares" value="_(Compute All)_" onclick="$(this).prop('disabled',true);shareList('',-1)">
|
||||
|
||||
@@ -154,10 +154,15 @@ _(Tunable (enable Direct IO))_:
|
||||
:shares_tunable_direct_io_help:
|
||||
|
||||
_(Number of fuse File Descriptors)_:
|
||||
: <input type="text" id="file_count" name="shareNOFILE" maxlength="10" value="<?=htmlspecialchars($var['shareNOFILE']);?>" class="narrow" placeholder="40960" <?=$disabled?>><span id="file_max_display">Maximum: <?=$fileMax;?></span>
|
||||
: <input type="text" id="file_count" name="shareNOFILE" maxlength="10" value="<?=htmlspecialchars($var['shareNOFILE']);?>" class="narrow" placeholder="40960" <?=$disabled?>>
|
||||
<span id="file_max_display" class="input-instructions">Maximum: <?=$fileMax;?></span>
|
||||
|
||||
:shares_fuse_file_descriptors_io_help:
|
||||
|
||||
|
||||
: <input type="submit" name="changeShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"><?if ($disabled):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="changeShare" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
<?if ($disabled):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
</form>
|
||||
|
||||
@@ -73,6 +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)_:
|
||||
: <select name="service" size="1" onchange="settings(this.form,this.value)">
|
||||
<?=mk_option(_var($ssmtp,'service'), "smtp.gmail.com:465:YES:NO:login", "Gmail")?>
|
||||
@@ -185,6 +186,9 @@ _(Password)_:
|
||||
:smtp_username_password_help:
|
||||
|
||||
|
||||
: <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>
|
||||
: <span class="inline-block">
|
||||
<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>
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -118,6 +118,20 @@ showDrivers("all",true);
|
||||
|
||||
:sysdrivers_intro_help:
|
||||
|
||||
<form autocomplete="off" onsubmit="return false;"><span><input class="t1 search" id="driversearch" type="search" placeholder="Search..." onchange="filterDrivers();"></span></form>
|
||||
<pre><form id="sysdrivers" class="js-confirm-leave" onsubmit="return false"><table id='t1' class="unraid t1 tablesorter"><tr><td><div class="spinner"></div></td></tr></table></form></pre><br>
|
||||
<input type="button" value="_(Done)_" onclick="done()"><input type="button" id="rebuild" value="_(Rebuild Modules)_" onclick="showDriversupdate()">
|
||||
<form autocomplete="off" onsubmit="return false;">
|
||||
<span><input class="t1 search" id="driversearch" type="search" placeholder="Search..." onchange="filterDrivers();"></span>
|
||||
</form>
|
||||
<form id="sysdrivers" class="js-confirm-leave" onsubmit="return false">
|
||||
<div class="TableContainer">
|
||||
<table id='t1' class="unraid t1 tablesorter">
|
||||
<tr>
|
||||
<td><div class="spinner"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<br>
|
||||
<div>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
<input type="button" id="rebuild" value="_(Rebuild Modules)_" onclick="showDriversupdate()">
|
||||
</div>
|
||||
|
||||
@@ -16,8 +16,6 @@ Cond="file_exists('/boot/syslinux/syslinux.cfg')"
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$top = $themes1 ? -58 : -44;
|
||||
|
||||
function strip($area) {
|
||||
return preg_replace(["/^|(\n) /","/\n$/"],["$1",""],$area);
|
||||
}
|
||||
@@ -176,7 +174,9 @@ $(function(){
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<span class="status" style="margin-top:<?=$top?>px"><input type="checkbox" class="advancedview"></span>
|
||||
|
||||
|
||||
: <span><input type="checkbox" class="advancedview"></span>
|
||||
|
||||
:syslinux_cfg_help:
|
||||
|
||||
@@ -194,25 +194,38 @@ _(Syslinux configuration)_:
|
||||
$label = ($i) ? array_shift($area):$title;
|
||||
$start = in_array($menu,$area);
|
||||
if ($start) unset($area[array_search($menu,$area)]);
|
||||
?><span id="label-<?=$i?>" class="<?=$start?'array':'system'?>"><?=htmlspecialchars($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>
|
||||
<textarea class="menu" id="menu-<?=$i++?>" spellcheck="false" cols="80" rows="<?=count($area)?>" maxlength="2048"><?=htmlspecialchars(implode("\n",$area))?></textarea>
|
||||
?><span class="config-item flex flex-col">
|
||||
<span class="<?= $start ? 'array' : 'system' ?> config-item-label-wrapper flex flex-row justify-between">
|
||||
<label id="label-<?=$i?>">
|
||||
<?if ($i):?><input type="radio" id="input-<?=$i?>" class="menu" <?=$start?'checked':''?> title="_(Set default boot menu)_" onchange="changeMenu(this.form,this.id,true)"><?endif;?>
|
||||
<?=htmlspecialchars($label)?>
|
||||
</label>
|
||||
</span>
|
||||
<textarea class="menu" id="menu-<?=$i++?>" spellcheck="false" cols="80" rows="<?=count($area)?>" maxlength="2048"><?=htmlspecialchars(implode("\n",$area))?></textarea>
|
||||
</span>
|
||||
<?endforeach;?>
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="advanced">
|
||||
_(Syslinux configuration)_:
|
||||
: <textarea class="raw" name="raw" spellcheck="false" cols="80" rows="<?=substr_count($current,"\n")+1?>" maxlength="2048"><?=htmlspecialchars($current)?></textarea>
|
||||
: <textarea class="raw config-raw" name="raw" spellcheck="false" cols="80" rows="<?=substr_count($current,"\n")+1?>" maxlength="2048"><?=htmlspecialchars($current)?></textarea>
|
||||
|
||||
</div>
|
||||
_(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)_.*
|
||||
_(Boot system in UEFI mode)_:
|
||||
: <label>
|
||||
<input type="checkbox" name="boot" <?=is_dir('/boot/EFI')?'checked':''?>>
|
||||
_(Permit UEFI boot mode)_
|
||||
</label>
|
||||
*_(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()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
|
||||
:syslinux_button_help:
|
||||
|
||||
|
||||
@@ -181,5 +181,8 @@ _(Copy syslog to flash on shutdown)_:
|
||||
:syslog_shutdown_flash_help:
|
||||
|
||||
|
||||
: <input type="button" value="_(Apply)_" onclick='validatePort(this.form)' disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="button" value="_(Apply)_" onclick='validatePort(this.form)' disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -123,5 +123,9 @@ _(Time of the day)_:
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="_(Apply)_"><input type="button" value="_(Done)_" onclick="done()"><input type="button" value="_(Trim Now)_" onclick="trimNow()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="#apply" value="_(Apply)_">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
<input type="button" value="_(Trim Now)_" onclick="trimNow()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -156,21 +156,28 @@ _(Description)_:
|
||||
:user_add_description_help:
|
||||
|
||||
_(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="image/png" style="display:none">
|
||||
: <span class="inline-block">
|
||||
<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="image/png" style="display:none">
|
||||
</span>
|
||||
|
||||
:user_add_custom_image_help:
|
||||
|
||||
_(Password)_:
|
||||
<input type="hidden" name="userPassword" value="">
|
||||
: <input type="password" name="userPasswordGUI" maxlength="129" autocomplete="new-password" onKeyUp="validatePassword(this.value);this.form.cmdUserEdit.disabled=(this.form.userName.value=='' || this.form.userPasswordGUI.value!=this.form.userPasswordConfGUI.value)">
|
||||
: <input type="hidden" name="userPassword" value="">
|
||||
<input type="password" name="userPasswordGUI" maxlength="129" autocomplete="new-password" 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>
|
||||
|
||||
:user_password_help:
|
||||
|
||||
_(Retype password)_:
|
||||
<input type="hidden" name="userPasswordConf" value="">
|
||||
: <input type="password" name="userPasswordConfGUI" maxlength="129" autocomplete="new-password" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userName.value=='' || this.form.userPasswordGUI.value!=this.form.userPasswordConfGUI.value)">
|
||||
: <input type="hidden" name="userPasswordConf" value="">
|
||||
<input type="password" name="userPasswordConfGUI" maxlength="129" autocomplete="new-password" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userName.value=='' || this.form.userPasswordGUI.value!=this.form.userPasswordConfGUI.value)">
|
||||
|
||||
|
||||
: <input type="submit" name="cmdUserEdit" value="_(Add)_" onclick="this.value='Add'" disabled><input type="button" value="_(Done)_" onclick="done('UserAdd')">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="cmdUserEdit" value="_(Add)_" onclick="this.value='Add'" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done('UserAdd')">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
@@ -169,6 +169,7 @@ $(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)_:
|
||||
: <?=htmlspecialchars($name)?>
|
||||
|
||||
@@ -178,13 +179,16 @@ _(Description)_:
|
||||
:user_edit_description_help:
|
||||
|
||||
_(Custom image)_:
|
||||
: <span id="dropbox">
|
||||
: <span>
|
||||
<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="image/png" style="display:none">
|
||||
</span>
|
||||
</span>
|
||||
<em>_(Drag-n-drop a PNG file or click the image at the left)_</em><input type="file" id="drop" accept="image/png" style="display:none">
|
||||
|
||||
:user_edit_custom_image_help:
|
||||
|
||||
@@ -193,35 +197,46 @@ _(Custom image)_:
|
||||
<?else:?>
|
||||
_(Delete)_<input type="checkbox" name="confirmDelete" onChange="chkDelete(this.form, this.form.cmdUserEdit)">
|
||||
<?endif;?>
|
||||
: <input type="submit" name="cmdUserEdit" value="_(Apply)_" onclick="if (this.value=='_(Delete)_') this.value='Delete'; else this.value='Apply';" disabled><input type="button" value="_(Done)_" onclick="done('UserEdit')">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="cmdUserEdit" value="_(Apply)_" onclick="if (this.value=='_(Delete)_') this.value='Delete'; else this.value='Apply';" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done('UserEdit')">
|
||||
</span>
|
||||
</form>
|
||||
<br><br>
|
||||
<form markdown="1" method="POST" action="/update.htm" onsubmit="return checkPassword(this)" target="progressFrame">
|
||||
<input type="hidden" name="userName" value="<?=htmlspecialchars($name)?>">
|
||||
|
||||
_(Password)_:
|
||||
<input type="hidden" name="userPassword" value="">
|
||||
: <input type="password" name="userPasswordGUI" maxlength="129" autocomplete="new-password" onKeyUp="validatePassword(this.value);this.form.cmdUserEdit.disabled=(this.form.userPasswordGUI.value != this.form.userPasswordConfGUI.value);">
|
||||
: <input type="hidden" name="userPassword" value="">
|
||||
<input type="password" name="userPasswordGUI" maxlength="129" autocomplete="new-password" 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>
|
||||
|
||||
:user_password_help:
|
||||
|
||||
_(Retype password)_:
|
||||
<input type="hidden" name="userPasswordConf" value="">
|
||||
: <input type="password" name="userPasswordConfGUI" maxlength="129" autocomplete="new-password" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userPasswordGUI.value != this.form.userPasswordConfGUI.value);">
|
||||
: <input type="hidden" name="userPasswordConf" value="">
|
||||
<input type="password" name="userPasswordConfGUI" maxlength="129" autocomplete="new-password" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userPasswordGUI.value != this.form.userPasswordConfGUI.value);">
|
||||
|
||||
|
||||
: <input type="submit" name="cmdUserEdit" value="_(Change)_" onclick="this.value='Change'" disabled><input type="button" value="_(Done)_" onclick="done('UserEdit')">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="cmdUserEdit" value="_(Change)_" onclick="this.value='Change'" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done('UserEdit')">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<?if ($name == 'root'):?>
|
||||
<form markdown="1" method="POST" action="/update.php" onsubmit="return checkKey(this)" target="progressFrame">
|
||||
<input type="hidden" name="#include" value="/webGui/include/update.file.php">
|
||||
<input type="hidden" name="#file" value="<?=$file;?>">
|
||||
|
||||
_(SSH authorized keys)_:
|
||||
: <textarea spellcheck="false" cols="80" rows="<?=max(substr_count($text,"\n")+1,10)?>" maxlength="16384" name="text" style="resize:none;white-space:normal;font-family:bitstream;width:65.5%"><?=htmlspecialchars($text)?></textarea>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Save)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Save)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
|
||||
</form>
|
||||
<?endif;?>
|
||||
@@ -318,6 +333,9 @@ echo "</table>";
|
||||
?>
|
||||
|
||||
|
||||
: <input type="button" value="_(Apply)_" onclick="updateAccess(this.form)" disabled><input type="button" value="_(Done)_" onclick="done('UserEdit')">
|
||||
: <span class="inline-block">
|
||||
<input type="button" value="_(Apply)_" onclick="updateAccess(this.form)" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done('UserEdit')">
|
||||
</span>
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
@@ -13,26 +13,48 @@ Tag="users"
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
ksort($users);
|
||||
?>
|
||||
<div id="title" class="title"><span class="left"><i class="fa fa-bell title"></i>_(Management Access)_</span></div>
|
||||
<?$img = "/boot/config/plugins/dynamix/users/root.png"?>
|
||||
<div class="user-list" style="text-align:center"><a class="<?=(!empty($users['root']['desc']) ? 'info' : '')?>" href="/<?=$path?>/UserEdit?name=root"><img src="<?=(file_exists($img) ? autov($img) : '/webGui/images/user.png')?>" class="picture" border="0" width="48" height="48"><br>root<span><?=htmlspecialchars($users['root']['desc'])?></span></a></div>
|
||||
|
||||
<div class="title"><span class="left"><i class="fa fa-cloud title"></i>_(Shares Access)_</span></div>
|
||||
<?foreach ($users as $user):?>
|
||||
<?if ($user['name'] == 'root') continue;?>
|
||||
<?$img = "/boot/config/plugins/dynamix/users/{$user['name']}.png"?>
|
||||
<div class="user-list" style="text-align:center"><a class="<?=(!empty($user['desc']) ? 'info' : '')?>" href="/<?=$path?>/UserEdit?name=<?=htmlspecialchars(urlencode($user['name']))?>"><img src="<?=(file_exists($img) ? autov($img) : '/webGui/images/user.png')?>" class="picture" border="0" width="48" height="48"><br><?=htmlspecialchars($user['name'])?><span><?=htmlspecialchars($user['desc'])?></span></a></div>
|
||||
<?endforeach;?>
|
||||
|
||||
<?if (count($users)==1):?>
|
||||
_(No users are defined)_. _(Click **Add User** to create a user for remote shares access)_
|
||||
<div id="title" class="title">
|
||||
<span class="left">
|
||||
<i class="fa fa-bell title"></i>_(Management Access)_
|
||||
</span>
|
||||
</div>
|
||||
<div class="Panels">
|
||||
<?$img = "/boot/config/plugins/dynamix/users/root.png"?>
|
||||
<div class="user-list">
|
||||
<a class="<?=(!empty($users['root']['desc']) ? 'info' : '')?>" href="/<?=$path?>/UserEdit?name=root">
|
||||
<img src="<?=(file_exists($img) ? autov($img) : '/webGui/images/user.png')?>" class="picture" border="0" width="48" height="48">
|
||||
<br>
|
||||
root
|
||||
<span><?=htmlspecialchars($users['root']['desc'])?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">
|
||||
<span class="left">
|
||||
<i class="fa fa-cloud title"></i>_(Shares Access)_
|
||||
</span>
|
||||
</div>
|
||||
<?if (count($users) == 1):?>
|
||||
<p>_(No users are defined)_. _(Click **Add User** to create a user for remote shares access)_</p>
|
||||
<?else:?>
|
||||
<div class="Panels">
|
||||
<?foreach ($users as $user):?>
|
||||
<?if ($user['name'] == 'root') continue;?>
|
||||
<?$img = "/boot/config/plugins/dynamix/users/{$user['name']}.png"?>
|
||||
<div class="user-list">
|
||||
<a class="<?=(!empty($user['desc']) ? 'info' : '')?>" href="/<?=$path?>/UserEdit?name=<?=htmlspecialchars(urlencode($user['name']))?>">
|
||||
<img src="<?=(file_exists($img) ? autov($img) : '/webGui/images/user.png')?>" class="picture" border="0" width="48" height="48">
|
||||
<br>
|
||||
<?=htmlspecialchars($user['name'])?>
|
||||
<span><?=htmlspecialchars($user['desc'])?></span>
|
||||
</a>
|
||||
</div>
|
||||
<?endforeach;?>
|
||||
</div>
|
||||
<?endif;?>
|
||||
|
||||
<div style='clear:both'></div>
|
||||
<form method="POST" action="/<?=$path?>/UserAdd">
|
||||
<input type="submit" value="_(Add User)_"><input type="button" value="_(Done)_" onclick="done()">
|
||||
<input type="submit" value="_(Add User)_">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</form>
|
||||
|
||||
@@ -503,6 +503,7 @@ function clearTunnel(vtun) {
|
||||
}
|
||||
|
||||
function addTunnel() {
|
||||
console.log('addTunnel');
|
||||
$.post('/webGui/include/update.wireguard.php',{'#cmd':'addtunnel','#name':'<?=$tower?>'},function(){refresh();});
|
||||
}
|
||||
|
||||
@@ -1048,20 +1049,20 @@ function getPublicIP(ip,wg,protocol) {
|
||||
var ext_ipv6 = ips[3];
|
||||
if ((protocol==''||protocol=='46') && ext_ipv4 && ip) {
|
||||
if (!wgx_ipv4) {
|
||||
if (!wgx_ipv6) $('#endpoint4-'+wg).html("<dt> </dt><dd><span class='input'></span> <span class='block'>_(Remark)_: _(The Local endpoint does not resolve to an IPv4 address)_. _(In most cases, this should be your public WAN IPv4)_: <b>"+ext_ipv4+"</b></span></dd>\n").show();
|
||||
if (!wgx_ipv6) $('#endpoint4-'+wg).html("<dt> </dt><dd></span> <span class='inline-block'>_(Remark)_: _(The Local endpoint does not resolve to an IPv4 address)_. _(In most cases, this should be your public WAN IPv4)_: <b>"+ext_ipv4+"</b></dd>\n").show();
|
||||
} else if (wgx_ipv4 != ext_ipv4) {
|
||||
$('#endpoint4-'+wg).html("<dt> </dt><dd><span class='input'></span> <span class='block'>_(Remark)_: _(The Local endpoint resolves to)_ <b>"+wgx_ipv4+".</b> _(In most cases, this should be your public WAN IPv4 instead)_: <b>"+ext_ipv4+"</b></span></dd>\n").show();
|
||||
$('#endpoint4-'+wg).html("<dt> </dt><dd></span> <span class='inline-block'>_(Remark)_: _(The Local endpoint resolves to)_ <b>"+wgx_ipv4+".</b> _(In most cases, this should be your public WAN IPv4 instead)_: <b>"+ext_ipv4+"</b></dd>\n").show();
|
||||
} else if (endpoints.includes(wgx_ipv4) && isPublic(wgx_ipv4)) {
|
||||
$('#endpoint4-'+wg).html("<dt> </dt><dd><span class='input'></span> <span class='block'>_(Remark)_: _(The Local endpoint resolves to)_ <b>"+wgx_ipv4+".</b> _(Your Unraid Server is reachable from the internet)_</span></dd>\n").show();
|
||||
$('#endpoint4-'+wg).html("<dt> </dt><dd></span> <span class='inline-block'>_(Remark)_: _(The Local endpoint resolves to)_ <b>"+wgx_ipv4+".</b> _(Your Unraid Server is reachable from the internet)_</dd>\n").show();
|
||||
}
|
||||
}
|
||||
if ((protocol=='6'||protocol=='46') && ext_ipv6 && ip) {
|
||||
if (!wgx_ipv6) {
|
||||
if (!wgx_ipv4) $('#endpoint6-'+wg).html("<dt> </dt><dd><span class='input'></span> <span class='block'>_(Remark)_: _(The Local endpoint does not resolve to an IPv6 address)_. _(In most cases, this should be your public WAN IPv6)_: <b>"+ext_ipv6+"</b></span></dd>\n").show();
|
||||
if (!wgx_ipv4) $('#endpoint6-'+wg).html("<dt> </dt><dd></span> <span class='inline-block'>_(Remark)_: _(The Local endpoint does not resolve to an IPv6 address)_. _(In most cases, this should be your public WAN IPv6)_: <b>"+ext_ipv6+"</b></dd>\n").show();
|
||||
} else if (wgx_ipv6 != ext_ipv6) {
|
||||
$('#endpoint6-'+wg).html("<dt> </dt><dd><span class='input'></span> <span class='block'>_(Remark)_: _(The Local endpoint resolves to)_ <b>"+wgx_ipv6+".</b> _(In most cases, this should be your public WAN IPv6 instead)_: <b>"+ext_ipv6+"</b></span></dd>\n").show();
|
||||
$('#endpoint6-'+wg).html("<dt> </dt><dd></span> <span class='inline-block'>_(Remark)_: _(The Local endpoint resolves to)_ <b>"+wgx_ipv6+".</b> _(In most cases, this should be your public WAN IPv6 instead)_: <b>"+ext_ipv6+"</b></dd>\n").show();
|
||||
} else if (endpoints.includes(wgx_ipv6)) {
|
||||
$('#endpoint6-'+wg).html("<dt> </dt><dd><span class='input'></span> <span class='block'>_(Remark)_: _(The Local endpoint resolves to)_ <b>"+wgx_ipv6+".</b> _(Your Unraid Server is reachable from the internet)_</span></dd>\n").show();
|
||||
$('#endpoint6-'+wg).html("<dt> </dt><dd></span> <span class='inline-block'>_(Remark)_: _(The Local endpoint resolves to)_ <b>"+wgx_ipv6+".</b> _(Your Unraid Server is reachable from the internet)_</dd>\n").show();
|
||||
}
|
||||
}
|
||||
<?if (!$public):?>
|
||||
@@ -1111,14 +1112,16 @@ statistics.on('message', function(data) {
|
||||
|
||||
$(function(){
|
||||
var form = $(document.wg0);
|
||||
var ctrl = "<span class='status vhshift hshift'><i id='block-wg0' class='fa fa-fw fa-chevron-up' style='cursor:pointer' onclick='blockToggle("wg0")'></i></span>";
|
||||
ctrl += "<span class='even wide'><span class='status vshift label'>_(Autostart)_</span><span class='status vhshift'><input type='checkbox' id='start-wg0' style='display:none'<?=$start_wg0?' checked':''?>></span></span>";
|
||||
ctrl += "<span class='even'><span class='status vhshift'><input type='checkbox' id='view-wg0' style='display:none'></span></span>";
|
||||
ctrl += "<span class='even'><span class='status vhshift'><input type='checkbox' id='toggle-wg0' style='display:none'></span></span>";
|
||||
var ctrl = "<span class='js-wg-ctrl inline-flex flex-row items-center gap-3'>";
|
||||
ctrl += "<span class='inline-flex flex-row items-center gap-2'><span class='label'>_(Autostart)_</span><span class=''><input type='checkbox' id='start-wg0' style='display:none'<?=$start_wg0?' checked':''?>></span></span>";
|
||||
ctrl += "<span class='inline-flex flex-row items-center gap-2'><span class=''><input type='checkbox' id='view-wg0' style='display:none'></span></span>";
|
||||
ctrl += "<span class='inline-flex flex-row items-center gap-2'><span class=''><input type='checkbox' id='toggle-wg0' style='display:none'></span></span>";
|
||||
ctrl += "<span class='inline-flex flex-row items-center gap-2'><i id='block-wg0' class='fa fa-fw fa-chevron-up' style='cursor:pointer' onclick='blockToggle("wg0")'></i></span>";
|
||||
ctrl += "</span>";
|
||||
statistics.start();
|
||||
getPublicIP($('#endpoint-wg0').val(),'wg0',$('#protocol-wg0').val());
|
||||
$('div.content').prepend('<div class="preset"><input type="button" value="_(Import Tunnel)_" onclick="$('input#file').trigger('click');"><input type="button" value="_(Add Tunnel)_" onclick="addTunnel()";<?=$this_wg0?"":" disabled"?>></div>');
|
||||
$('div.title').eq(0).find('span.left').append(ctrl);
|
||||
$('div.content').prepend('<div class="preset"><small>"WireGuard" and the "WireGuard" logo are registered trademarks of Jason A. Donenfeld</small><div class="inline-flex flex-row items-center gap-2"><input type="button" value="_(Import Tunnel)_" onclick="$('input#file').trigger('click');"><input type="button" value="_(Add Tunnel)_" onclick="addTunnel()";<?=$this_wg0?"":" disabled"?>></div></div>');
|
||||
$('div.title').eq(0).find('.right').append(ctrl);
|
||||
$.post('/webGui/include/update.wireguard.php',{'#cmd':'upnp','#gw':"<?=$$ethX['GATEWAY:0']?>",'#link':"<?=$link?>"},function(url){
|
||||
if (url) {
|
||||
$('div.upnp').show();
|
||||
@@ -1265,30 +1268,40 @@ $(function(){
|
||||
<input type="hidden" name="#shared2" value="">
|
||||
<input type="hidden" name="#deleted" value="">
|
||||
<input type="hidden" name="#locale" value="<?=$locale?>">
|
||||
|
||||
_(Local name)_:
|
||||
: <span class="input"><input type="text" name="Name:0" class="wide" maxlength="99" value="<?=_var($wg0,"Name:0")?>" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)"></span>
|
||||
<span class="pin"><i class="fa fa-fw fa-eye eye0<?=$this_wg0?'':' key-off'?>" style="cursor:pointer" onclick="WGconfig(this,'wg0','')" title="_(View Local Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zone0<?=isset($wg0['PublicKey:0'])?'':' key-off'?>" style="cursor:pointer" onclick="openClose($(document.wg0),null,'div.key0')" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wg0-0" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wg0),this,'div.zone0')" title="_(Toggle view)_"></i></span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="Name:0" class="wide" maxlength="99" value="<?=_var($wg0,"Name:0")?>" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<i class="fa fa-fw fa-eye eye0<?=$this_wg0?'':' key-off'?>" style="cursor:pointer" onclick="WGconfig(this,'wg0','')" title="_(View Local Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zone0<?=isset($wg0['PublicKey:0'])?'':' key-off'?>" style="cursor:pointer" onclick="openClose($(document.wg0),null,'div.key0')" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wg0-0" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wg0),this,'div.zone0')" title="_(Toggle view)_"></i>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
:wg_local_name_help:
|
||||
|
||||
<div markdown="1" class="keys wg0 key0"<?=isset($wg0['PublicKey:0'])?' style="display:none">':'>'?>
|
||||
<div markdown="1" class="keys wg0 key0" style="<?= isset($wgX['PublicKey:0']) ? 'display:none' : '' ?>">
|
||||
_(Local private key)_:
|
||||
: <span class="input"><input type="text" name="PrivateKey:0" class="wide private-0" maxlength="64" value="<?=_var($wg0,'PrivateKey:0')?>" onchange="highlight($(document.wg0),this,0)" placeholder="(_(mandatory)_)" required></span>
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wg0),'0')">
|
||||
: <input type="text" name="PrivateKey:0" class="wide private-0" maxlength="64" value="<?=_var($wg0,'PrivateKey:0')?>" onchange="highlight($(document.wg0),this,0)" placeholder="(_(mandatory)_)" required>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wg0),'0')">
|
||||
</span>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
_(Local public key)_:
|
||||
: <span class="input"><input type="text" name="PublicKey:0" class="wide public-0" maxlength="64" value="<?=_var($wg0,'PublicKey:0')?>" onchange="highlight($(document.wg0),this,0)" placeholder="(_(mandatory)_)" required></span>
|
||||
: <input type="text" name="PublicKey:0" class="wide public-0" maxlength="64" value="<?=_var($wg0,'PublicKey:0')?>" onchange="highlight($(document.wg0),this,0)" placeholder="(_(mandatory)_)" required>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wg0),'0')">
|
||||
</span>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="advanced wg0 zone0" style="display:none">
|
||||
_(Network protocol)_:
|
||||
: <span class="input"><select id="protocol-wg0" name="PROT:0" class="subnet" onchange="setProtocol($(document.wg0),'wg0',true)">
|
||||
: <span class="input"><select id="protocol-wg0" name="PROT:0" onchange="setProtocol($(document.wg0),'wg0',true)">
|
||||
<?=mk_option(_var($wg0,'PROT:0'), "", "_(IPv4 only)_")?>
|
||||
<?=mk_option(_var($wg0,'PROT:0'), "6", "_(IPv6 only)_")?>
|
||||
<?=mk_option(_var($wg0,'PROT:0'), "46", "_(IPv4 + IPv6)_")?>
|
||||
@@ -1296,74 +1309,94 @@ _(Network protocol)_:
|
||||
|
||||
<div markdown="1" class="ipv4 wg0" style="display:none">
|
||||
_(Local tunnel network pool)_:
|
||||
<input type="hidden" name="Network:0" value="">
|
||||
: <span class="input"><input type="text" name="gui:Network:0" class="subnet" maxlength="15" value="<?=explode('/',_var($wg0,'Network:0'))[0]?>" onchange="setPool($(document.wg0),'wg0')" pattern="<?=$validIP4?>" title="_(IPv4 network)_" placeholder="<?=_var($netpool,'wg0')?>">/
|
||||
<input type="number" name="gui:Mask:0" class="mask" min="1" max="32" value="<?=my_explode('/',_var($wg0,'Network:0'))[1]?>" onchange="if(quickValidate(this)) {setPool($(document.wg0),'wg0')}" placeholder="24"></span>
|
||||
: <input type="hidden" name="Network:0" value="">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="gui:Network:0" maxlength="15" value="<?=explode('/',_var($wg0,'Network:0'))[0]?>" onchange="setPool($(document.wg0),'wg0')" pattern="<?=$validIP4?>" title="_(IPv4 network)_" placeholder="<?=_var($netpool,'wg0')?>">
|
||||
<span>/</span>
|
||||
<input type="number" name="gui:Mask:0" class="mask" min="1" max="32" value="<?=my_explode('/',_var($wg0,'Network:0'))[1]?>" onchange="if(quickValidate(this)) {setPool($(document.wg0),'wg0')}" placeholder="24">
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="ipv6 wg0" style="display:none">
|
||||
_(Local tunnel network pool IPv6)_:
|
||||
<input type="hidden" name="Network6:0" value="">
|
||||
: <span class="input"><input type="text" name="gui:Network6:0" class="subnet" maxlength="40" value="<?=explode('/',_var($wg0,'Network6:0'))[0]?>" onchange="setPool6($(document.wg0),'wg0')" pattern="<?=$validIP6?>" title="_(IPv6 network)_" placeholder="<?=_var($netpool6,'wg0')?>">/
|
||||
<input type="number" name="gui:Mask6:0" class="mask" min="1" max="128" value="<?=my_explode('/',_var($wg0,'Network6:0'))[1]?>" onchange="if(quickValidate(this)) {setPool6($(document.wg0),'wg0')}" placeholder="64"></span>
|
||||
: <input type="hidden" name="Network6:0" value="">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="gui:Network6:0" maxlength="40" value="<?=explode('/',_var($wg0,'Network6:0'))[0]?>" onchange="setPool6($(document.wg0),'wg0')" pattern="<?=$validIP6?>" title="_(IPv6 network)_" placeholder="<?=_var($netpool6,'wg0')?>">
|
||||
<span>/</span>
|
||||
<input type="number" name="gui:Mask6:0" class="mask" min="1" max="128" value="<?=my_explode('/',_var($wg0,'Network6:0'))[1]?>" onchange="if(quickValidate(this)) {setPool6($(document.wg0),'wg0')}" placeholder="64">
|
||||
</span>
|
||||
|
||||
</div>
|
||||
:wg_local_tunnel_network_pool_help:
|
||||
|
||||
<div markdown="1" class="ipv4 wg0" style="display:none">
|
||||
_(Local tunnel address)_:
|
||||
: <span class="input"><input type="text" name="Address:0" class="subnet" maxlength="15" value="<?=_var($wg0,'Address:0')?:long2ip(_var($netbase,'wg0')+1)?>" onchange="verifyInSubnet(this)" pattern="<?=$validIP4?>" title="_(IPv4 address)_"></span>
|
||||
: <input type="text" name="Address:0" maxlength="15" value="<?=_var($wg0,'Address:0')?:long2ip(_var($netbase,'wg0')+1)?>" onchange="verifyInSubnet(this)" pattern="<?=$validIP4?>" title="_(IPv4 address)_">
|
||||
|
||||
:wg_local_tunnel_address_help:
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="ipv6 wg0" style="display:none">
|
||||
_(Local tunnel address IPv6)_:
|
||||
: <span class="input"><input type="text" name="Address6:0" class="subnet" maxlength="40" value="<?=_var($wg0,'Address6:0')?:(_var($netbase6,'wg0').'1')?>" onchange="verifyInSubnet6(this)" pattern="<?=$validIP6?>" title="_(IPv6 address)_"></span>
|
||||
: <input type="text" name="Address6:0" maxlength="40" value="<?=_var($wg0,'Address6:0')?:(_var($netbase6,'wg0').'1')?>" onchange="verifyInSubnet6(this)" pattern="<?=$validIP6?>" title="_(IPv6 address)_">
|
||||
|
||||
:wg_local_tunnel_address_help:
|
||||
|
||||
</div>
|
||||
</div>
|
||||
_(Local endpoint)_:
|
||||
: <span class="input"><input type="text" class="width:10%;" id="endpoint-wg0" name="Endpoint:0" class="subnet" value="<?=$vpn_wg0?'':_var($wg0,'Endpoint:0')?>" onchange="toLC(this);quickValidate(this);" pattern="<?=$validText?>" title="_(IP address or FQDN)_" placeholder="<?=$vpn_wg0?'(_(not used)_)':preg_replace('/^(.+?\.)[0-9a-zA-Z]+(\.(my)?unraid.net)$/','$1<hash>$2',$public)?>">:
|
||||
<input type="number" name="gui:ListenPort:0" class="port" min="1" max="65535" value="<?=$vpn_wg0?'':_var($wg0,'ListenPort:0')?>" onchange="if(quickValidate(this)) {portRemark($(document.wg0),'wg0',this.value)}" placeholder="<?=$vpn_wg0?'':_var($netport,'wg0')?>"></span>
|
||||
<span class="remark block" style="display:none">_(Remark)_: _(configure your router with port forwarding of port)_ **<span id="my-port-wg0"><?=_var($wg0,'ListenPort:0')?:_var($netport,'wg0')?></span>/_(UDP)_** _(to)_ **<?=$server?>:<?=_var($wg0,'ListenPort:0')?:_var($netport,'wg0')?>**</span><span class="upnp wg0 block"></span>
|
||||
<input type="hidden" name="ListenPort:0" value=""><dl id="endpoint4-wg0" style="display:none"></dl><dl id="endpoint6-wg0" style="display:none"></dl>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="text" class="width:10%;" id="endpoint-wg0" name="Endpoint:0" value="<?=$vpn_wg0?'':_var($wg0,'Endpoint:0')?>" onchange="toLC(this);quickValidate(this);" pattern="<?=$validText?>" title="_(IP address or FQDN)_" placeholder="<?=$vpn_wg0?'(_(not used)_)':preg_replace('/^(.+?\.)[0-9a-zA-Z]+(\.(my)?unraid.net)$/','$1<hash>$2',$public)?>">
|
||||
<span>:</span>
|
||||
<input type="number" name="gui:ListenPort:0" class="port" min="1" max="65535" value="<?=$vpn_wg0?'':_var($wg0,'ListenPort:0')?>" onchange="if(quickValidate(this)) {portRemark($(document.wg0),'wg0',this.value)}" placeholder="<?=$vpn_wg0?'':_var($netport,'wg0')?>">
|
||||
</span>
|
||||
<span class="remark inline-block" style="display:none">_(Remark)_: _(configure your router with port forwarding of port)_ **<span id="my-port-wg0"><?=_var($wg0,'ListenPort:0')?:_var($netport,'wg0')?></span>/_(UDP)_** _(to)_ **<?=$server?>:<?=_var($wg0,'ListenPort:0')?:_var($netport,'wg0')?>**</span><span class="upnp wg0 inline-block"></span>
|
||||
<input type="hidden" name="ListenPort:0" value="">
|
||||
<dl id="endpoint4-wg0" style="display:none"></dl>
|
||||
<dl id="endpoint6-wg0" style="display:none"></dl>
|
||||
|
||||
:wg_local_endpoint_help:
|
||||
|
||||
<div markdown="1" class="advanced wg0 zone0" style="display:none">
|
||||
_(Local server uses NAT)_:
|
||||
: <span class="input"><select name="NAT:0" class="narrow" onchange="showRoute($(document.wg0),'wg0',0)">
|
||||
: <select name="NAT:0" onchange="showRoute($(document.wg0),'wg0',0)">
|
||||
<?=mk_option(_var($wg0,'NAT:0'), "", _("Yes"))?>
|
||||
<?=mk_option(_var($wg0,'NAT:0'), "no", _("No"))?>
|
||||
</select></span>
|
||||
<span id="my-static1-wg0" class="block" style="display:none">_(Remark)_: _(configure your router with a static route of)_ **<?=_var($wg0,'Network:0')?>** _(to)_ **<?=$server?>**</span><span id="my-static2-wg0" class="block" style="display:none">_(Remark)_: _(docker containers on custom networks need static routing)_ **<?=_var($wg0,'Network:0')?>** _(to)_ **<?=$server?>**</span>
|
||||
</select>
|
||||
<span id="my-static1-wg0" class="inline-block" style="display:none">_(Remark)_: _(configure your router with a static route of)_ **<?=_var($wg0,'Network:0')?>** _(to)_ **<?=$server?>**</span>
|
||||
<span id="my-static2-wg0" class="inline-block" style="display:none">_(Remark)_: _(docker containers on custom networks need static routing)_ **<?=_var($wg0,'Network:0')?>** _(to)_ **<?=$server?>**</span>
|
||||
|
||||
:wg_local_server_uses_nat_help:
|
||||
|
||||
<div markdown="1" class="upnp wg0" style="display:none">
|
||||
_(Local gateway uses UPnP)_:
|
||||
: <span class="input"><select name="UPNP:0" class="narrow" onchange="showRemark($(document.wg0))">
|
||||
: <select name="UPNP:0" onchange="showRemark($(document.wg0))">
|
||||
<?=mk_option(_var($wg0,'UPNP:0'), "", _("Yes"))?>
|
||||
<?=mk_option(_var($wg0,'UPNP:0'), "no", _("No"))?>
|
||||
</select></span>
|
||||
</select>
|
||||
|
||||
:wg_local_gateway_uses_upnp_help:
|
||||
|
||||
</div>
|
||||
_(Local tunnel firewall)_:
|
||||
: <span class="input"><input type="text" name="DROP:0" class="wide" value="<?=_var($wg0,'DROP:0')?>" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(optional)_)"></span>
|
||||
_(Rule)_: <select name="RULE:0" class="auto">
|
||||
<?=mk_option(_var($wg0,'RULE:0'), "", _("Deny"))?>
|
||||
<?=mk_option(_var($wg0,'RULE:0'), "1", _("Allow"))?>
|
||||
</select>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="DROP:0" class="wide" value="<?=_var($wg0,'DROP:0')?>" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(optional)_)">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<span>_(Rule)_: </span>
|
||||
<select name="RULE:0" class="auto">
|
||||
<?=mk_option(_var($wg0,'RULE:0'), "", _("Deny"))?>
|
||||
<?=mk_option(_var($wg0,'RULE:0'), "1", _("Allow"))?>
|
||||
</select>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
:wg_local_tunnel_firewall_help:
|
||||
|
||||
_(MTU size)_:
|
||||
: <span class="input"><input type="number" name="MTU:0" class="trim" min="68" max="9198" value="<?=_var($wg0,'MTU:0')?>" onchange="quickValidate(this);" placeholder="(_(auto)_)">_(bytes)_</span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="number" name="MTU:0" class="trim" min="68" max="9198" value="<?=_var($wg0,'MTU:0')?>" onchange="quickValidate(this);" placeholder="(_(auto)_)">
|
||||
<span>_(bytes)_</span>
|
||||
</span>
|
||||
|
||||
:wg_mtu_size_help:
|
||||
|
||||
@@ -1387,16 +1420,22 @@ _(DNS servers)_:
|
||||
<?foreach ($peer_wg0 as $i):?>
|
||||
<div markdown="1" id="index-wg0-<?=$i?>" class="shade">
|
||||
_(Peer name)_:
|
||||
: <span class="input"><input type="text" name="Name:<?=$i?>" class="wide" maxlength="99" value="<?=_var($wg0,"Name:$i")?>" onchange="quickValidate(this);" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)"></span>
|
||||
<input type="button" class="form" value="_(Delete Peer)_" onclick="delPeer($(document.wg0),'#index-wg0-<?=$i?>')">
|
||||
<span class="pin"><i class="fa fa-fw fa-eye eye<?=$i?><?=(file_exists("$etc/peers/peer-$tower-wg0-$i.conf")&&isset($wg0["TYPE:$i"])&&$wg0["TYPE:$i"]<=6)?'':' key-off'?>" style="cursor:pointer" onclick="WGconfig(this,'peer-<?=$tower?>-wg0-<?=$i?>','/peers')" title="_(View Peer Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zone<?=$i?><?=isset($wg0["PublicKey:$i"])?'':' key-off'?>" style="cursor:pointer" onclick="openClose($(document.wg0),null,'div.key<?=$i?>')" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wg0-<?=$i?>" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wg0),this,'div.zone<?=$i?>')" title="_(Toggle view)_"></i></span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="Name:<?=$i?>" class="wide" maxlength="99" value="<?=_var($wg0,"Name:$i")?>" onchange="quickValidate(this);" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<i class="fa fa-fw fa-eye eye<?=$i?><?=(file_exists("$etc/peers/peer-$tower-wg0-$i.conf")&&isset($wg0["TYPE:$i"])&&$wg0["TYPE:$i"]<=6)?'':' key-off'?>" style="cursor:pointer" onclick="WGconfig(this,'peer-<?=$tower?>-wg0-<?=$i?>','/peers')" title="_(View Peer Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zone<?=$i?><?=isset($wg0["PublicKey:$i"])?'':' key-off'?>" style="cursor:pointer" onclick="openClose($(document.wg0),null,'div.key<?=$i?>')" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wg0-<?=$i?>" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wg0),this,'div.zone<?=$i?>')" title="_(Toggle view)_"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Delete Peer)_" onclick="delPeer($(document.wg0),'#index-wg0-<?=$i?>')">
|
||||
</span>
|
||||
|
||||
:wg_peer_name_help:
|
||||
|
||||
_(Peer type of access)_:
|
||||
: <span class="input"><select name="TYPE:<?=$i?>" class="auto" onchange="updatePeer($(document.wg0),<?=$i?>,this.value,'wg0')">
|
||||
: <select name="TYPE:<?=$i?>" class="auto" onchange="updatePeer($(document.wg0),<?=$i?>,this.value,'wg0')">
|
||||
<?=mk_option(_var($wg0,"TYPE:$i"), "0", _("Remote access to server"))?>
|
||||
<?=mk_option(_var($wg0,"TYPE:$i"), "1", _("Remote access to LAN"))?>
|
||||
<?=mk_option(_var($wg0,"TYPE:$i"), "2", _("Server to server access"))?>
|
||||
@@ -1406,7 +1445,7 @@ _(Peer type of access)_:
|
||||
<?=mk_option(_var($wg0,"TYPE:$i"), "6", _("Remote tunneled access"))?>
|
||||
<?=mk_option(_var($wg0,"TYPE:$i"), "7", _("VPN tunneled access for system"),count($peer_wg0)==1?'':'disabled')?>
|
||||
<?=mk_option(_var($wg0,"TYPE:$i"), "8", _("VPN tunneled access for docker"),count($peer_wg0)==1?'':'disabled')?>
|
||||
</select></span>
|
||||
</select>
|
||||
<span id="access-type-<?=$i?>"</span>
|
||||
|
||||
<?if ($i==1):?>
|
||||
@@ -1415,19 +1454,23 @@ _(Peer type of access)_:
|
||||
|
||||
<div markdown="1" class="keys wg0 key<?=$i?>"<?=isset($wg0["PublicKey:$i"])?' style="display:none">':'>'?>
|
||||
_(Peer private key)_:
|
||||
: <span class="input"><input type="text" name="PrivateKey:<?=$i?>" class="wide private-<?=$i?>" maxlength="64" value="<?=_var($wg0,"PrivateKey:$i")?>" onchange="highlight($(document.wg0),this,<?=$i?>)" placeholder="(_(optional)_)"></span>
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wg0),'<?=$i?>')">
|
||||
: <input type="text" name="PrivateKey:<?=$i?>" class="wide private-<?=$i?>" maxlength="64" value="<?=_var($wg0,"PrivateKey:$i")?>" onchange="highlight($(document.wg0),this,<?=$i?>)" placeholder="(_(optional)_)">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wg0),'<?=$i?>')">
|
||||
</span>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
_(Peer public key)_:
|
||||
: <span class="input"><input type="text" name="PublicKey:<?=$i?>" class="wide public-<?=$i?>" maxlength="64" value="<?=_var($wg0,"PublicKey:$i")?>" onchange="highlight($(document.wg0),this,<?=$i?>)" placeholder="(_(mandatory)_)" required></span>
|
||||
: <input type="text" name="PublicKey:<?=$i?>" class="wide public-<?=$i?>" maxlength="64" value="<?=_var($wg0,"PublicKey:$i")?>" onchange="highlight($(document.wg0),this,<?=$i?>)" placeholder="(_(mandatory)_)" required>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
_(Peer preshared key)_:
|
||||
: <span class="input"><input type="text" name="PresharedKey:<?=$i?>" class="wide preshared-<?=$i?>" maxlength="64" value="<?=_var($wg0,"PresharedKey:$i")?>" onchange="highlight($(document.wg0),this,<?=$i?>)" placeholder="(_(optional)_)"></span>
|
||||
<input type="button" class="form" value="_(Generate Key)_" onclick="presharedkey($(document.wg0),'<?=$i?>')">
|
||||
: <input type="text" name="PresharedKey:<?=$i?>" class="wide preshared-<?=$i?>" maxlength="64" value="<?=_var($wg0,"PresharedKey:$i")?>" onchange="highlight($(document.wg0),this,<?=$i?>)" placeholder="(_(optional)_)">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Key)_" onclick="presharedkey($(document.wg0),'<?=$i?>')">
|
||||
</span>
|
||||
|
||||
:wg_peer_preshared_key_help:
|
||||
|
||||
@@ -1435,64 +1478,89 @@ _(Peer preshared key)_:
|
||||
<div markdown="1" class="advanced wg0 zone<?=$i?>" style="display:none">
|
||||
<div markdown="1" class="ipv4 wg0" style="display:none">
|
||||
_(Peer tunnel address)_:
|
||||
: <span class="input"><input type="text" name="Address:<?=$i?>" class="subnet" maxlength="15" value="<?=_var($wg0,"Address:$i")?>" onchange="if(verifyInSubnet(this)){setAllow($(document.wg0),this.value,<?=$i?>)}" pattern="<?=$validIP4?>" title="_(IPv4 address)_"></span>
|
||||
<input type="button" class="form ping-button1-<?=$i?>" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="Address:<?=$i?>"]')"<?=isset($wg0["Address:$i"])?'':' disabled'?>>
|
||||
|
||||
: <input type="text" name="Address:<?=$i?>" maxlength="15" value="<?=_var($wg0,"Address:$i")?>" onchange="if(verifyInSubnet(this)){setAllow($(document.wg0),this.value,<?=$i?>)}" pattern="<?=$validIP4?>" title="_(IPv4 address)_">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button1-<?=$i?>" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="Address:<?=$i?>"]')"<?=isset($wg0["Address:$i"])?'':' disabled'?>>
|
||||
</span>
|
||||
</div>
|
||||
<div markdown="1" class="ipv6 wg0" style="display:none">
|
||||
_(Peer tunnel address IPv6)_:
|
||||
: <span class="input"><input type="text" name="Address6:<?=$i?>" class="subnet" maxlength="40" value="<?=_var($wg0,"Address6:$i")?>" onchange="if(verifyInSubnet6(this)){setAllow6($(document.wg0),this.value,<?=$i?>)}" pattern="<?=$validIP6?>" title="_(IPv6 address)_"></span>
|
||||
<input type="button" class="form ping-button6-<?=$i?>" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="Address6:<?=$i?>"]')"<?=isset($wg0["Address6:$i"])?'':' disabled'?>>
|
||||
|
||||
: <input type="text" name="Address6:<?=$i?>" maxlength="40" value="<?=_var($wg0,"Address6:$i")?>" onchange="if(verifyInSubnet6(this)){setAllow6($(document.wg0),this.value,<?=$i?>)}" pattern="<?=$validIP6?>" title="_(IPv6 address)_">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button6-<?=$i?>" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="Address6:<?=$i?>"]')"<?=isset($wg0["Address6:$i"])?'':' disabled'?>>
|
||||
</span>
|
||||
</div>
|
||||
:wg_peer_tunnel_address_help:
|
||||
|
||||
_(Peer endpoint)_:
|
||||
<input type="hidden" name="Endpoint:<?=$i?>" value="">
|
||||
: <span class="input"><input type="text" name="gui:Endpoint:<?=$i?>" class="subnet" value="<?=_var($wg0,"Endpoint:$i")?>" pattern="<?=$validText?>" title="_(IP address or FQDN)_" onchange="toLC(this);quickValidate(this);" <?=($vpn_wg0||(int)_var($wg0,"TYPE:$i",0)==2||(int)_var($wg0,"TYPE:$i",0)==3)?'placeholder="(_(mandatory)_)" required':'placeholder="(_(not used)_)"'?>>:
|
||||
<input type="number" name="gui:ListenPort:<?=$i?>" class="port" min="1" max="65535" value="<?=_var($wg0,"ListenPort:$i")?>" onchange="quickValidate(this);"<?=isset($wg0["Endpoint:$i"])?" placeholder=\"".(_var($wg0,'ListenPort:0')?:_var($netport,'wg0'))."\"":""?>></span>
|
||||
<input type="button" class="form ping-button2-<?=$i?>" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="gui:Endpoint:<?=$i?>"]')"<?=isset($wg0["Endpoint:$i"])?'':' disabled'?>>
|
||||
: <input type="hidden" name="Endpoint:<?=$i?>" value="">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="gui:Endpoint:<?=$i?>" value="<?=_var($wg0,"Endpoint:$i")?>" pattern="<?=$validText?>" title="_(IP address or FQDN)_" onchange="toLC(this);quickValidate(this);" <?=($vpn_wg0||(int)_var($wg0,"TYPE:$i",0)==2||(int)_var($wg0,"TYPE:$i",0)==3)?'placeholder="(_(mandatory)_)" required':'placeholder="(_(not used)_)"'?>>
|
||||
<span>:</span>
|
||||
<input type="number" name="gui:ListenPort:<?=$i?>" class="port" min="1" max="65535" value="<?=_var($wg0,"ListenPort:$i")?>" onchange="quickValidate(this);"<?=isset($wg0["Endpoint:$i"])?" placeholder=\"".(_var($wg0,'ListenPort:0')?:_var($netport,'wg0'))."\"":""?>>
|
||||
</span>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button2-<?=$i?>" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="gui:Endpoint:<?=$i?>"]')"<?=isset($wg0["Endpoint:$i"])?'':' disabled'?>>
|
||||
</span>
|
||||
|
||||
:wg_peer_endpoint_help:
|
||||
|
||||
_(Peer allowed IPs)_:
|
||||
: <span class="input"><input type="text" name="AllowedIPs:<?=$i?>" class="wide" value="<?=_var($wg0,"AllowedIPs:$i")?>" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(mandatory)_)" required></span>
|
||||
: <input type="text" name="AllowedIPs:<?=$i?>" class="wide" value="<?=_var($wg0,"AllowedIPs:$i")?>" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(mandatory)_)" required>
|
||||
|
||||
:wg_peer_allowed_ips_help:
|
||||
|
||||
_(Peer DNS server)_:
|
||||
: <span class="input"><input type="text" name="DNS:<?=$i?>" class="subnet" maxlength="60" value="<?=_var($wg0,"DNS:$i")?>" onchange="quickValidate(this);" pattern="<?=$validDNSServerList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_" <?=(int)_var($wg0,"TYPE:$i",0)!=6?'placeholder="(_(optional)_)"':'placeholder="(_(mandatory)_)" required'?>></span>
|
||||
: <input type="text" name="DNS:<?=$i?>" maxlength="60" value="<?=_var($wg0,"DNS:$i")?>" onchange="quickValidate(this);" pattern="<?=$validDNSServerList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_" <?=(int)_var($wg0,"TYPE:$i",0)!=6?'placeholder="(_(optional)_)"':'placeholder="(_(mandatory)_)" required'?>>
|
||||
|
||||
:wg_peer_dns_server_help:
|
||||
|
||||
_(Persistent keepalive)_:
|
||||
: <span class="input"><input type="number" name="PersistentKeepalive:<?=$i?>" class="trim" min="0" max="600" value="<?=_var($wg0,"PersistentKeepalive:$i")?>" onchange="quickValidate(this);" placeholder="(_(disabled)_)">_(seconds)_</span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="number" name="PersistentKeepalive:<?=$i?>" class="trim" min="0" max="600" value="<?=_var($wg0,"PersistentKeepalive:$i")?>" onchange="quickValidate(this);" placeholder="(_(disabled)_)">
|
||||
<span>_(seconds)_</span>
|
||||
</span>
|
||||
|
||||
:wg_persistent_keepalive_help:
|
||||
|
||||
</div>
|
||||
|
||||
_(Data received)_:
|
||||
: <span class="rx-wg0-<?=$i?>">0 B</span>
|
||||
|
||||
_(Data sent)_:
|
||||
: <span class="tx-wg0-<?=$i?>">0 B</span>
|
||||
|
||||
_(Last handshake)_:
|
||||
: <span class="hs-wg0-<?=$i?>">_(unknown)_</span>
|
||||
</div>
|
||||
<span class="pin">_(Data received)_: <span class="rx-wg0-<?=$i?>">0 B</span>_(Data sent)_: <span class="tx-wg0-<?=$i?>">0 B</span><br>_(Last handshake)_: <span class="hs-wg0-<?=$i?>">_(unknown)_</span></span>
|
||||
<?endforeach;?>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Apply)_" onclick="return(validateForm($(document.wg0),'wg0'))" disabled><input type="button" value="_(Done)_" onclick="done()"><input type="button" id="addpeer-wg0" value="_(Add Peer)_" onclick="addPeer($(document.wg0),'wg0')">
|
||||
<input type="button" class="advanced wg0" value="_(Delete Tunnel)_" style="float:right;display:none" onclick="delTunnel('wg0')"<?=file_exists($conf_wg0)?'':' disabled'?>>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" onclick="return(validateForm($(document.wg0),'wg0'))" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
<input type="button" id="addpeer-wg0" value="_(Add Peer)_" onclick="addPeer($(document.wg0),'wg0')">
|
||||
<input type="button" class="advanced wg0" value="_(Delete Tunnel)_" style="display:none" onclick="delTunnel('wg0')"<?=file_exists($conf_wg0)?'':' disabled'?>>
|
||||
</span>
|
||||
</form>
|
||||
<small style="position:absolute;left:10px;top:30px">"WireGuard" and the "WireGuard" logo are registered trademarks of Jason A. Donenfeld</small>
|
||||
|
||||
<script markdown="1" type="text/html" id="peer-template-wg0">
|
||||
<div markdown="1" id="index-wg0-INDEX" class="shade">
|
||||
_(Peer name)_:
|
||||
: <span class="input"><input type="text" name="Name:INDEX" class="wide" maxlength="99" value="" onchange="quickValidate(this);" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)"></span>
|
||||
<span class="pin"><i class="fa fa-fw fa-eye eyeINDEX key-off" title="_(Show Peer Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zoneINDEX key-off" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wg0-INDEX" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wg0),this,'div.zoneINDEX')" title="_(Toggle view)_"></i></span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="Name:INDEX" class="wide" maxlength="99" value="" onchange="quickValidate(this);" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<i class="fa fa-fw fa-eye eyeINDEX key-off" title="_(Show Peer Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zoneINDEX key-off" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wg0-INDEX" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wg0),this,'div.zoneINDEX')" title="_(Toggle view)_"></i>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
:wg_peer_name_help:
|
||||
|
||||
_(Peer type of access)_:
|
||||
: <span class="input"><select name="TYPE:INDEX" class="auto" onchange="updatePeer($(document.wg0),INDEX,this.value,'wg0')">
|
||||
: <select name="TYPE:INDEX" class="auto" onchange="updatePeer($(document.wg0),INDEX,this.value,'wg0')">
|
||||
<?=mk_option(0, "0", _("Remote access to server"))?>
|
||||
<?=mk_option(0, "1", _("Remote access to LAN"))?>
|
||||
<?=mk_option(0, "2", _("Server to server access"))?>
|
||||
@@ -1502,26 +1570,30 @@ _(Peer type of access)_:
|
||||
<?=mk_option(0, "6", _("Remote tunneled access"))?>
|
||||
<?=mk_option(0, "7", _("VPN tunneled access for system"),'disabled')?>
|
||||
<?=mk_option(0, "8", _("VPN tunneled access for docker"),'disabled')?>
|
||||
</select></span>
|
||||
</select>
|
||||
<span id="access-type-INDEX" class="access-type"></span>
|
||||
|
||||
> ?>)
|
||||
|
||||
<div markdown="1" class="keys wg0 keyINDEX">
|
||||
_(Peer private key)_:
|
||||
: <span class="input"><input type="text" name="PrivateKey:INDEX" class="wide private-INDEX" maxlength="64" value="" onchange="highlight($(document.wg0),this,0)" placeholder="(_(optional)_)"></span>
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wg0),'INDEX')">
|
||||
: <input type="text" name="PrivateKey:INDEX" class="wide private-INDEX" maxlength="64" value="" onchange="highlight($(document.wg0),this,0)" placeholder="(_(optional)_)">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wg0),'INDEX')">
|
||||
</span>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
_(Peer public key)_:
|
||||
: <span class="input"><input type="text" name="PublicKey:INDEX" class="wide public-INDEX" maxlength="64" onchange="highlight($(document.wg0),this,0)" placeholder="(_(mandatory)_)" value="" required></span>
|
||||
: <input type="text" name="PublicKey:INDEX" class="wide public-INDEX" maxlength="64" onchange="highlight($(document.wg0),this,0)" placeholder="(_(mandatory)_)" value="" required>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
_(Peer preshared key)_:
|
||||
: <span class="input"><input type="text" name="PresharedKey:INDEX" class="wide preshared-INDEX" maxlength="64" value="" onchange="highlight($(document.wg0),this,0)" placeholder="(_(optional)_)"></span>
|
||||
<input type="button" class="form" value="_(Generate Key)_" onclick="presharedkey($(document.wg0),'INDEX')">
|
||||
: <input type="text" name="PresharedKey:INDEX" class="wide preshared-INDEX" maxlength="64" value="" onchange="highlight($(document.wg0),this,0)" placeholder="(_(optional)_)">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Key)_" onclick="presharedkey($(document.wg0),'INDEX')">
|
||||
</span>
|
||||
|
||||
:wg_peer_preshared_key_help:
|
||||
|
||||
@@ -1529,38 +1601,48 @@ _(Peer preshared key)_:
|
||||
<div markdown="1" class="advanced wg0 zoneINDEX" style="display:none">
|
||||
<div markdown="1" class="ipv4 wg0" style="display:none">
|
||||
_(Peer tunnel address)_:
|
||||
: <span class="input"><input type="text" name="Address:INDEX" class="subnet" maxlength="15" value="" onchange="if(verifyInSubnet(this)){setAllow($(document.wg0),this.value,INDEX)}" pattern="<?=$validIP4?>" title="_(IPv4 address)_"></span>
|
||||
<input type="button" class="form ping-button1-INDEX" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="Address:INDEX"]')" disabled>
|
||||
|
||||
: <input type="text" name="Address:INDEX" maxlength="15" value="" onchange="if(verifyInSubnet(this)){setAllow($(document.wg0),this.value,INDEX)}" pattern="<?=$validIP4?>" title="_(IPv4 address)_">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button1-INDEX" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="Address:INDEX"]')" disabled>
|
||||
</span>
|
||||
</div>
|
||||
<div markdown="1" class="ipv6 wg0" style="display:none">
|
||||
_(Peer tunnel address IPv6)_:
|
||||
: <span class="input"><input type="text" name="Address6:INDEX" class="subnet" maxlength="40" value="" onchange="if(verifyInSubnet6(this)){setAllow6($(document.wg0),this.value,INDEX)}" pattern="<?=$validIP6?>" title="_(IPv6 address)_"></span>
|
||||
<input type="button" class="form ping-button6-INDEX" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="Address6:INDEX"]')" disabled>
|
||||
|
||||
: <input type="text" name="Address6:INDEX" maxlength="40" value="" onchange="if(verifyInSubnet6(this)){setAllow6($(document.wg0),this.value,INDEX)}" pattern="<?=$validIP6?>" title="_(IPv6 address)_">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button6-INDEX" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="Address6:INDEX"]')" disabled>
|
||||
</span>
|
||||
</div>
|
||||
:wg_peer_tunnel_address_help:
|
||||
|
||||
_(Peer endpoint)_:
|
||||
<input type="hidden" name="Endpoint:INDEX" value="">
|
||||
: <span class="input"><input type="text" name="gui:Endpoint:INDEX" class="subnet" value="" pattern="<?=$validText?>" title="_(IP address or FQDN)_" onchange="toLC(this);quickValidate(this);" placeholder="(_(not used)_)">:
|
||||
<input type="number" name="gui:ListenPort:INDEX" class="port" min="1" max="65535" value="" onchange="quickValidate(this);"></span>
|
||||
<input type="button" class="form ping-button2-INDEX" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="gui:Endpoint:INDEX"]')" disabled>
|
||||
: <input type="hidden" name="Endpoint:INDEX" value="">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="gui:Endpoint:INDEX" value="" pattern="<?=$validText?>" title="_(IP address or FQDN)_" onchange="toLC(this);quickValidate(this);" placeholder="(_(not used)_)">
|
||||
<span>:</span>
|
||||
<input type="number" name="gui:ListenPort:INDEX" class="port" min="1" max="65535" value="" onchange="quickValidate(this);">
|
||||
</span>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button2-INDEX" value="_(Ping)_" onclick="ping($(document.wg0),this,'input[name="gui:Endpoint:INDEX"]')" disabled>
|
||||
</span>
|
||||
|
||||
:wg_peer_endpoint_help:
|
||||
|
||||
_(Peer allowed IPs)_:
|
||||
: <span class="input"><input type="text" name="AllowedIPs:INDEX" class="wide" value="" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(mandatory)_)" required></span>
|
||||
: <input type="text" name="AllowedIPs:INDEX" class="wide" value="" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(mandatory)_)" required>
|
||||
|
||||
:wg_peer_allowed_ips_help:
|
||||
|
||||
_(Peer DNS server)_:
|
||||
: <span class="input"><input type="text" name="DNS:INDEX" class="subnet" maxlength="60" value="" onchange="quickValidate(this);" pattern="<?=$validDNSServerList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_" placeholder="(_(optional)_)"></span>
|
||||
: <input type="text" name="DNS:INDEX" maxlength="60" value="" onchange="quickValidate(this);" pattern="<?=$validDNSServerList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_" placeholder="(_(optional)_)">
|
||||
|
||||
:wg_peer_dns_server_help:
|
||||
|
||||
_(Persistent keepalive)_:
|
||||
: <span class="input"><input type="number" name="PersistentKeepalive:INDEX" class="trim" min="0" max="600" value="" onchange="quickValidate(this);" placeholder="(_(disabled)_)">_(seconds)_</span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="number" name="PersistentKeepalive:INDEX" class="trim" min="0" max="600" value="" onchange="quickValidate(this);" placeholder="(_(disabled)_)">
|
||||
<span>_(seconds)_</span>
|
||||
</span>
|
||||
|
||||
:wg_persistent_keepalive_help:
|
||||
|
||||
|
||||
@@ -35,13 +35,15 @@ netpool6['wgX'] = "<?=_var($netpool6,'wgX')?>";
|
||||
tstate['wgX'] = "<?=$check_wgX ? 'active' : 'passive'?>";
|
||||
|
||||
$(function(){
|
||||
var ctrl = "<span class='status vhshift hshift'><i id='block-wgX' class='fa fa-fw fa-chevron-up' style='cursor:pointer' onclick='blockToggle("wgX")'></i></span>";
|
||||
ctrl += "<span class='even wide'><span class='status vshift label'>_(Autostart)_</span><span class='status vhshift'><input type='checkbox' id='start-wgX' style='display:none'<?=$start_wgX?' checked':''?>></span></span>";
|
||||
ctrl += "<span class='even'><span class='status vhshift'><input type='checkbox' id='view-wgX' style='display:none'></span></span>";
|
||||
ctrl += "<span class='even'><span class='status vhshift'><input type='checkbox' id='toggle-wgX' style='display:none'></span></span>";
|
||||
var ctrl = "<span class='js-wg-ctrl inline-flex flex-row items-center gap-3'>";
|
||||
ctrl += "<span class='inline-flex flex-row items-center gap-2'><span class='label'>_(Autostart)_</span><span class=''><input type='checkbox' id='start-wgX' style='display:none'<?=$start_wgX?' checked':''?>></span></span>";
|
||||
ctrl += "<span class='inline-flex flex-row items-center gap-2'><span class=''><input type='checkbox' id='view-wgX' style='display:none'></span></span>";
|
||||
ctrl += "<span class='inline-flex flex-row items-center gap-2'><span class=''><input type='checkbox' id='toggle-wgX' style='display:none'></span></span>";
|
||||
ctrl += "<span class='inline-flex flex-row items-center gap-2'><i id='block-wgX' class='fa fa-fw fa-chevron-up' style='cursor:pointer' onclick='blockToggle("wgX")'></i></span>";
|
||||
ctrl += "</span>";
|
||||
var form = $(document.wgX);
|
||||
getPublicIP($('#endpoint-wgX').val(),'wgX',$('#protocol-wgX').val());
|
||||
$('div.title').each(function(){if ($(this).html().indexOf('status vhshift')==-1) {$(this).find('span.left').append(ctrl);return false;}});
|
||||
$('div.title').each(function(){if ($(this).html().indexOf('js-wg-ctrl')==-1) {$(this).find('span.right').append(ctrl);return false;}});
|
||||
$('#start-wgX').switchButton({labels_placement:'left',off_label:"_(Off)_",on_label:"_(On)_"});
|
||||
$('#start-wgX').change(function(){
|
||||
var start = $('#start-wgX').is(':checked') ? 'on' : 'off';
|
||||
@@ -163,105 +165,132 @@ $(function(){
|
||||
<input type="hidden" name="#shared2" value="">
|
||||
<input type="hidden" name="#deleted" value="">
|
||||
<input type="hidden" name="#locale" value="<?=$locale?>">
|
||||
<input type="hidden" name="#pooooopooooo" value="pooooopooooo">
|
||||
|
||||
_(Local name)_:
|
||||
: <span class="input"><input type="text" name="Name:0" class="wide" maxlength="99" value="<?=_var($wgX,"Name:0")?>" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)"></span>
|
||||
<span class="pin"><i class="fa fa-fw fa-eye eye0<?=$this_wgX?'':' key-off'?>" style="cursor:pointer" onclick="WGconfig(this,'wgX','')" title="_(View Local Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zone0<?=isset($wgX['PublicKey:0'])?'':' key-off'?>" style="cursor:pointer" onclick="openClose($(document.wgX),null,'div.key0')" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wgX-0" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wgX),this,'div.zone0')" title="_(Toggle view)_"></i></span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="Name:0" class="wide" maxlength="99" value="<?=_var($wgX,"Name:0")?>" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<i class="fa fa-fw fa-eye eye0<?=$this_wgX?'':' key-off'?>" style="cursor:pointer" onclick="WGconfig(this,'wgX','')" title="_(View Local Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zone0<?=isset($wgX['PublicKey:0'])?'':' key-off'?>" style="cursor:pointer" onclick="openClose($(document.wgX),null,'div.key0')" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wgX-0" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wgX),this,'div.zone0')" title="_(Toggle view)_"></i>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
:wg_local_name_help:
|
||||
|
||||
<div markdown="1" class="keys wgX key0"<?=isset($wgX['PublicKey:0'])?' style="display:none">':'>'?>
|
||||
<div markdown="1" class="keys wgX key0" style="<?= isset($wgX['PublicKey:0']) ? 'display:none' : '' ?>">
|
||||
_(Local private key)_:
|
||||
: <span class="input"><input type="text" name="PrivateKey:0" class="wide private-0" maxlength="64" value="<?=_var($wgX,'PrivateKey:0')?>" onchange="highlight($(document.wgX),this,0)" placeholder="(_(mandatory)_)" required></span>
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wgX),'0')">
|
||||
: <input type="text" name="PrivateKey:0" class="wide private-0" maxlength="64" value="<?=_var($wgX,'PrivateKey:0')?>" onchange="highlight($(document.wgX),this,0)" placeholder="(_(mandatory)_)" required>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wgX),'0')">
|
||||
</span>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
_(Local public key)_:
|
||||
: <span class="input"><input type="text" name="PublicKey:0" class="wide public-0" maxlength="64" value="<?=_var($wgX,'PublicKey:0')?>" onchange="highlight($(document.wgX),this,0)" placeholder="(_(mandatory)_)" required></span>
|
||||
: <input type="text" name="PublicKey:0" class="wide public-0" maxlength="64" value="<?=_var($wgX,'PublicKey:0')?>" onchange="highlight($(document.wgX),this,0)" placeholder="(_(mandatory)_)" required>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="advanced wgX zone0" style="display:none">
|
||||
_(Network protocol)_:
|
||||
: <span class="input"><select id="protocol-wgX" name="PROT:0" class="subnet" onchange="setProtocol($(document.wgX),'wgX',true)">
|
||||
: <select id="protocol-wgX" name="PROT:0" onchange="setProtocol($(document.wgX),'wgX',true)">
|
||||
<?=mk_option(_var($wgX,'PROT:0'), "", _("IPv4 only"))?>
|
||||
<?=mk_option(_var($wgX,'PROT:0'), "6", _("IPv6 only"))?>
|
||||
<?=mk_option(_var($wgX,'PROT:0'), "46", _("IPv4 + IPv6"))?>
|
||||
</select></span>
|
||||
</select>
|
||||
|
||||
<div markdown="1" class="ipv4 wgX" style="display:none">
|
||||
_(Local tunnel network pool)_:
|
||||
<input type="hidden" name="Network:0" value="">
|
||||
: <span class="input"><input type="text" name="gui:Network:0" class="subnet" maxlength="15" value="<?=explode('/',_var($wgX,'Network:0'))[0]?>" onchange="setPool($(document.wgX),'wgX')" pattern="<?=$validIP4?>" title="_(IPv4 network)_" placeholder="<?=_var($netpool,'wgX')?>">/
|
||||
<input type="number" name="gui:Mask:0" class="mask" min="1" max="32" value="<?=my_explode('/',_var($wgX,'Network:0'))[1]?>" onchange="if(quickValidate(this)) {setPool($(document.wgX),'wgX')}" placeholder="24"></span>
|
||||
: <input type="hidden" name="Network:0" value="">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="gui:Network:0" maxlength="15" value="<?=explode('/',_var($wgX,'Network:0'))[0]?>" onchange="setPool($(document.wgX),'wgX')" pattern="<?=$validIP4?>" title="_(IPv4 network)_" placeholder="<?=_var($netpool,'wgX')?>">
|
||||
<span>/</span>
|
||||
<input type="number" name="gui:Mask:0" class="mask" min="1" max="32" value="<?=my_explode('/',_var($wgX,'Network:0'))[1]?>" onchange="if(quickValidate(this)) {setPool($(document.wgX),'wgX')}" placeholder="24">
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="ipv6 wgX" style="display:none">
|
||||
_(Local tunnel network pool IPv6)_:
|
||||
<input type="hidden" name="Network6:0" value="">
|
||||
: <span class="input"><input type="text" name="gui:Network6:0" class="subnet" maxlength="40" value="<?=explode('/',_var($wgX,'Network6:0'))[0]?>" onchange="setPool6($(document.wgX),'wgX')" pattern="<?=$validIP6?>" title="_(IPv6 network)_" placeholder="<?=_var($netpool6,'wgX')?>">/
|
||||
<input type="number" name="gui:Mask6:0" class="mask" min="1" max="128" value="<?=my_explode('/',_var($wgX,'Network6:0'))[1]?>" onchange="if(quickValidate(this)) {setPool6($(document.wgX),'wgX')}" placeholder="64"></span>
|
||||
: <input type="hidden" name="Network6:0" value="">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="gui:Network6:0" maxlength="40" value="<?=explode('/',_var($wgX,'Network6:0'))[0]?>" onchange="setPool6($(document.wgX),'wgX')" pattern="<?=$validIP6?>" title="_(IPv6 network)_" placeholder="<?=_var($netpool6,'wgX')?>">
|
||||
<span>/</span>
|
||||
<input type="number" name="gui:Mask6:0" class="mask" min="1" max="128" value="<?=my_explode('/',_var($wgX,'Network6:0'))[1]?>" onchange="if(quickValidate(this)) {setPool6($(document.wgX),'wgX')}" placeholder="64">
|
||||
</span>
|
||||
|
||||
</div>
|
||||
:wg_local_tunnel_network_pool_X_help:
|
||||
|
||||
<div markdown="1" class="ipv4 wgX" style="display:none">
|
||||
_(Local tunnel address)_:
|
||||
: <span class="input"><input type="text" name="Address:0" class="subnet" maxlength="15" value="<?=_var($wgX,'Address:0')?:long2ip(_var($netbase,'wgX')+1)?>" onchange="verifyInSubnet(this);" pattern="<?=$validIP4?>" title="_(IPv4 address)_"></span>
|
||||
: <input type="text" name="Address:0" maxlength="15" value="<?=_var($wgX,'Address:0')?:long2ip(_var($netbase,'wgX')+1)?>" onchange="verifyInSubnet(this);" pattern="<?=$validIP4?>" title="_(IPv4 address)_">
|
||||
|
||||
:wg_local_tunnel_address_help:
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="ipv6 wgX" style="display:none">
|
||||
_(Local tunnel address IPv6)_:
|
||||
: <span class="input"><input type="text" name="Address6:0" class="subnet" maxlength="40" value="<?=_var($wgX,'Address6:0')?:(_var($netbase6,'wgX').'1')?>" onchange="verifyInSubnet6(this);" pattern="<?=$validIP6?>" title="_(IPv6 address)_"></span>
|
||||
: <input type="text" name="Address6:0" maxlength="40" value="<?=_var($wgX,'Address6:0')?:(_var($netbase6,'wgX').'1')?>" onchange="verifyInSubnet6(this);" pattern="<?=$validIP6?>" title="_(IPv6 address)_">
|
||||
|
||||
:wg_local_tunnel_address_help:
|
||||
|
||||
</div>
|
||||
</div>
|
||||
_(Local endpoint)_:
|
||||
: <span class="input"><input type="text" class="width:10%;" id="endpoint-wgX" name="Endpoint:0" class="subnet" value="<?=$vpn_wgX?'':_var($wgX,'Endpoint:0')?>" onchange="toLC(this);quickValidate(this);" pattern="<?=$validText?>" title="_(IP address or FQDN)_" placeholder="<?=$vpn_wgX?'(_(not used)_)':preg_replace('/^(www\.).+(\.unraid.net)$/','$1<hash>$2',$public)?>">:
|
||||
<input type="number" name="gui:ListenPort:0" class="port" min="1" max="65535" value="<?=$vpn_wgX?'':_var($wgX,'ListenPort:0')?>" onchange="if(quickValidate(this)) {portRemark($(document.wgX),'wgX',this.value)}" placeholder="<?=$vpn_wgX?'':_var($netport,'wgX')?>"></span>
|
||||
<span class="remark block" style="display:none">_(Remark)_: _(configure your router with port forwarding of port)_ **<span id="my-port-wgX"><?=_var($wgX,'ListenPort:0')?:_var($netport,'wgX')?></span>/_(UDP)_** _(to)_ **<?=$server?>:<?=_var($wgX,'ListenPort:0')?:_var($netport,'wgX')?>**</span><span class="upnp wgX block"></span>
|
||||
<input type="hidden" name="ListenPort:0" value=""><dl id="endpoint4-wgX" style="display:none"></dl><dl id="endpoint6-wgX" style="display:none"></dl>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="text" class="width:10%;" id="endpoint-wgX" name="Endpoint:0" value="<?=$vpn_wgX?'':_var($wgX,'Endpoint:0')?>" onchange="toLC(this);quickValidate(this);" pattern="<?=$validText?>" title="_(IP address or FQDN)_" placeholder="<?=$vpn_wgX?'(_(not used)_)':preg_replace('/^(www\.).+(\.unraid.net)$/','$1<hash>$2',$public)?>">
|
||||
<span>:</span>
|
||||
<input type="number" name="gui:ListenPort:0" class="port" min="1" max="65535" value="<?=$vpn_wgX?'':_var($wgX,'ListenPort:0')?>" onchange="if(quickValidate(this)) {portRemark($(document.wgX),'wgX',this.value)}" placeholder="<?=$vpn_wgX?'':_var($netport,'wgX')?>">
|
||||
</span>
|
||||
<span class="remark inline-block" style="display:none">_(Remark)_: _(configure your router with port forwarding of port)_ **<span id="my-port-wgX"><?=_var($wgX,'ListenPort:0')?:_var($netport,'wgX')?></span>/_(UDP)_** _(to)_ **<?=$server?>:<?=_var($wgX,'ListenPort:0')?:_var($netport,'wgX')?>**</span><span class="upnp wgX inline-block"></span>
|
||||
<input type="hidden" name="ListenPort:0" value="">
|
||||
<dl id="endpoint4-wgX" style="display:none"></dl>
|
||||
<dl id="endpoint6-wgX" style="display:none"></dl>
|
||||
|
||||
:wg_local_endpoint_X_help:
|
||||
|
||||
<div markdown="1" class="advanced wgX zone0" style="display:none">
|
||||
_(Local server uses NAT)_:
|
||||
: <span class="input"><select name="NAT:0" class="narrow" onchange="showRoute($(document.wgX),'wgX',0)">
|
||||
: <select name="NAT:0" onchange="showRoute($(document.wgX),'wgX',0)">
|
||||
<?=mk_option(_var($wgX,'NAT:0'), "", _("Yes"))?>
|
||||
<?=mk_option(_var($wgX,'NAT:0'), "no", _("No"))?>
|
||||
</select></span>
|
||||
<span id="my-static1-wgX" class="block" style="display:none">_(Remark)_: _(configure your router with a static route of)_ **<?=_var($wgX,'Network:0')?>** _(to)_ **<?=$server?>**</span><span id="my-static2-wgX" class="block" style="display:none">_(Remark)_: _(docker containers on custom networks need static routing)_ **<?=_var($wgX,'Network:0')?>** _(to)_ **<?=$server?>**</span>
|
||||
</select>
|
||||
<span id="my-static1-wgX" class="inline-block" style="display:none">_(Remark)_: _(configure your router with a static route of)_ **<?=_var($wgX,'Network:0')?>** _(to)_ **<?=$server?>**</span><span id="my-static2-wgX" class="inline-block" style="display:none">_(Remark)_: _(docker containers on custom networks need static routing)_ **<?=_var($wgX,'Network:0')?>** _(to)_ **<?=$server?>**</span>
|
||||
|
||||
:wg_local_server_uses_nat_help:
|
||||
|
||||
<div markdown="1" class="upnp wg0" style="display:none">
|
||||
_(Local gateway uses UPnP)_:
|
||||
: <span class="input"><select name="UPNP:0" class="narrow" onchange="showRemark($(document.wgX))">
|
||||
: <select name="UPNP:0" onchange="showRemark($(document.wgX))">
|
||||
<?=mk_option(_var($wgX,'UPNP:0'), "", _("Yes"))?>
|
||||
<?=mk_option(_var($wgX,'UPNP:0'), "no", _("No"))?>
|
||||
</select></span>
|
||||
</select>
|
||||
|
||||
:wg_local_gateway_uses_upnp_help:
|
||||
|
||||
</div>
|
||||
_(Local tunnel firewall)_:
|
||||
: <span class="input"><input type="text" name="DROP:0" class="wide" value="<?=_var($wgX,'DROP:0')?>" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(optional)_)"></span>
|
||||
_(Rule)_: <select name="RULE:0" class="auto">
|
||||
<?=mk_option(_var($wgX,'RULE:0'), "", _("Deny"))?>
|
||||
<?=mk_option(_var($wgX,'RULE:0'), "1", _("Allow"))?>
|
||||
</select>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="DROP:0" class="wide" value="<?=_var($wgX,'DROP:0')?>" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(optional)_)">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<span>_(Rule)_: </span>
|
||||
<select name="RULE:0" class="auto">
|
||||
<?=mk_option(_var($wgX,'RULE:0'), "", _("Deny"))?>
|
||||
<?=mk_option(_var($wgX,'RULE:0'), "1", _("Allow"))?>
|
||||
</select>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
:wg_local_tunnel_firewall_help:
|
||||
|
||||
_(MTU size)_:
|
||||
: <span class="input"><input type="number" name="MTU:0" class="trim" min="68" max="9198" value="<?=_var($wgX,'MTU:0')?>" onchange="quickValidate(this);" placeholder="(_(auto)_)">_(bytes)_</span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="number" name="MTU:0" class="trim" min="68" max="9198" value="<?=_var($wgX,'MTU:0')?>" onchange="quickValidate(this);" placeholder="(_(auto)_)">
|
||||
<span>_(bytes)_</span>
|
||||
</span>
|
||||
|
||||
:wg_mtu_size_help:
|
||||
|
||||
@@ -285,16 +314,22 @@ _(DNS servers)_:
|
||||
<?foreach ($peer_wgX as $i):?>
|
||||
<div markdown="1" id="index-wgX-<?=$i?>" class="shade">
|
||||
_(Peer name)_:
|
||||
: <span class="input"><input type="text" name="Name:<?=$i?>" class="wide" maxlength="99" value="<?=_var($wgX,"Name:$i")?>" onchange="quickValidate(this);" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)"></span>
|
||||
<input type="button" class="form" value="_(Delete Peer)_" onclick="delPeer($(document.wgX),'#index-wgX-<?=$i?>')">
|
||||
<span class="pin"><i class="fa fa-fw fa-eye eye<?=$i?><?=(file_exists("$etc/peers/peer-$tower-wgX-$i.conf")&&isset($wgX["TYPE:$i"])&&$wgX["TYPE:$i"]<=6)?'':' key-off'?>" style="cursor:pointer" onclick="WGconfig(this,'peer-<?=$tower?>-wgX-<?=$i?>','/peers')" title="_(View Peer Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zone<?=$i?><?=isset($wgX["PublicKey:$i"])?'':' key-off'?>" style="cursor:pointer" onclick="openClose($(document.wgX),null,'div.key<?=$i?>')" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wgX-<?=$i?>" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wgX),this,'div.zone<?=$i?>')" title="_(Toggle view)_"></i></span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="Name:<?=$i?>" class="wide" maxlength="99" value="<?=_var($wgX,"Name:$i")?>" onchange="quickValidate(this);" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<i class="fa fa-fw fa-eye eye<?=$i?><?=(file_exists("$etc/peers/peer-$tower-wgX-$i.conf")&&isset($wgX["TYPE:$i"])&&$wgX["TYPE:$i"]<=6)?'':' key-off'?>" style="cursor:pointer" onclick="WGconfig(this,'peer-<?=$tower?>-wgX-<?=$i?>','/peers')" title="_(View Peer Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zone<?=$i?><?=isset($wgX["PublicKey:$i"])?'':' key-off'?>" style="cursor:pointer" onclick="openClose($(document.wgX),null,'div.key<?=$i?>')" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wgX-<?=$i?>" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wgX),this,'div.zone<?=$i?>')" title="_(Toggle view)_"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Delete Peer)_" onclick="delPeer($(document.wgX),'#index-wgX-<?=$i?>')">
|
||||
</span>
|
||||
|
||||
:wg_peer_name_help:
|
||||
|
||||
_(Peer type of access)_:
|
||||
: <span class="input"><select name="TYPE:<?=$i?>" class="auto" onchange="updatePeer($(document.wgX),<?=$i?>,this.value,'wgX')">
|
||||
: <select name="TYPE:<?=$i?>" class="auto" onchange="updatePeer($(document.wgX),<?=$i?>,this.value,'wgX')">
|
||||
<?=mk_option(_var($wgX,"TYPE:$i"), "0", _("Remote access to server"))?>
|
||||
<?=mk_option(_var($wgX,"TYPE:$i"), "1", _("Remote access to LAN"))?>
|
||||
<?=mk_option(_var($wgX,"TYPE:$i"), "2", _("Server to server access"))?>
|
||||
@@ -304,7 +339,7 @@ _(Peer type of access)_:
|
||||
<?=mk_option(_var($wgX,"TYPE:$i"), "6", _("Remote tunneled access"))?>
|
||||
<?=mk_option(_var($wgX,"TYPE:$i"), "7", _("VPN tunneled access for system"),count($peer_wgX)==1?'':'disabled')?>
|
||||
<?=mk_option(_var($wgX,"TYPE:$i"), "8", _("VPN tunneled access for docker"))?>
|
||||
</select></span>
|
||||
</select>
|
||||
<span id="access-type-<?=$i?>"></span>
|
||||
|
||||
<?if ($i==1):?>
|
||||
@@ -313,19 +348,23 @@ _(Peer type of access)_:
|
||||
|
||||
<div markdown="1" class="keys wgX key<?=$i?>"<?=isset($wgX["PublicKey:$i"])?' style="display:none">':'>'?>
|
||||
_(Peer private key)_:
|
||||
: <span class="input"><input type="text" name="PrivateKey:<?=$i?>" class="wide private-<?=$i?>" maxlength="64" value="<?=_var($wgX,"PrivateKey:$i")?>" onchange="highlight($(document.wgX),this,<?=$i?>)" placeholder="(_(optional)_)"></span>
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wgX),'<?=$i?>')">
|
||||
: <input type="text" name="PrivateKey:<?=$i?>" class="wide private-<?=$i?>" maxlength="64" value="<?=_var($wgX,"PrivateKey:$i")?>" onchange="highlight($(document.wgX),this,<?=$i?>)" placeholder="(_(optional)_)">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wgX),'<?=$i?>')">
|
||||
</span>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
_(Peer public key)_:
|
||||
: <span class="input"><input type="text" name="PublicKey:<?=$i?>" class="wide public-<?=$i?>" maxlength="64" value="<?=_var($wgX,"PublicKey:$i")?>" onchange="highlight($(document.wgX),this,<?=$i?>)" placeholder="(_(mandatory)_)" required></span>
|
||||
: <input type="text" name="PublicKey:<?=$i?>" class="wide public-<?=$i?>" maxlength="64" value="<?=_var($wgX,"PublicKey:$i")?>" onchange="highlight($(document.wgX),this,<?=$i?>)" placeholder="(_(mandatory)_)" required>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
_(Peer preshared key)_:
|
||||
: <span class="input"><input type="text" name="PresharedKey:<?=$i?>" class="wide preshared-<?=$i?>" maxlength="64" value="<?=_var($wgX,"PresharedKey:$i")?>" onchange="highlight($(document.wgX),this,<?=$i?>)" placeholder="(_(optional)_)"></span>
|
||||
<input type="button" class="form" value="_(Generate Key)_" onclick="presharedkey($(document.wgX),'<?=$i?>')">
|
||||
: <input type="text" name="PresharedKey:<?=$i?>" class="wide preshared-<?=$i?>" maxlength="64" value="<?=_var($wgX,"PresharedKey:$i")?>" onchange="highlight($(document.wgX),this,<?=$i?>)" placeholder="(_(optional)_)">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Key)_" onclick="presharedkey($(document.wgX),'<?=$i?>')">
|
||||
</span>
|
||||
|
||||
:wg_peer_preshared_key_help:
|
||||
|
||||
@@ -333,62 +372,91 @@ _(Peer preshared key)_:
|
||||
<div markdown="1" class="advanced wgX zone<?=$i?>" style="display:none">
|
||||
<div markdown="1" class="ipv4 wgX" style="display:none">
|
||||
_(Peer tunnel address)_:
|
||||
: <span class="input"><input type="text" name="Address:<?=$i?>" class="subnet" maxlength="15" value="<?=_var($wgX,"Address:$i")?>" onchange="if(verifyInSubnet(this)){setAllow($(document.wgX),this.value,<?=$i?>)}" pattern="<?=$validIP4?>" title="_(IPv4 address)_"></span>
|
||||
<input type="button" class="form ping-button1-<?=$i?>" value="_(Ping)_" onclick="ping($(document.wgX),this,'input[name="Address:<?=$i?>"]')"<?=isset($wgX["Address:$i"])?'':' disabled'?>>
|
||||
: <input type="text" name="Address:<?=$i?>" maxlength="15" value="<?=_var($wgX,"Address:$i")?>" onchange="if(verifyInSubnet(this)){setAllow($(document.wgX),this.value,<?=$i?>)}" pattern="<?=$validIP4?>" title="_(IPv4 address)_">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button1-<?=$i?>" value="_(Ping)_" onclick="ping($(document.wgX),this,'input[name="Address:<?=$i?>"]')"<?=isset($wgX["Address:$i"])?'':' disabled'?>>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="ipv6 wgX" style="display:none">
|
||||
_(Peer tunnel address IPv6)_:
|
||||
: <span class="input"><input type="text" name="Address6:<?=$i?>" class="subnet" maxlength="40" value="<?=_var($wgX,"Address6:$i")?>" onchange="if(verifyInSubnet6(this)){setAllow6($(document.wgX),this.value,<?=$i?>)}" pattern="<?=$validIP6?>" title="_(IPv6 address)_"></span>
|
||||
<input type="button" class="form ping-button6-<?=$i?>" value="_(Ping)_" onclick="ping($(document.wgX),this,'input[name="Address6:<?=$i?>"]')"<?=isset($wgX["Address6:$i"])?'':' disabled'?>>
|
||||
: <input type="text" name="Address6:<?=$i?>" maxlength="40" value="<?=_var($wgX,"Address6:$i")?>" onchange="if(verifyInSubnet6(this)){setAllow6($(document.wgX),this.value,<?=$i?>)}" pattern="<?=$validIP6?>" title="_(IPv6 address)_">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button6-<?=$i?>" value="_(Ping)_" onclick="ping($(document.wgX),this,'input[name="Address6:<?=$i?>"]')"<?=isset($wgX["Address6:$i"])?'':' disabled'?>>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
:wg_peer_tunnel_address_help:
|
||||
|
||||
_(Peer endpoint)_:
|
||||
<input type="hidden" name="Endpoint:<?=$i?>" value="">
|
||||
: <span class="input"><input type="text" name="gui:Endpoint:<?=$i?>" class="subnet" value="<?=_var($wgX,"Endpoint:$i")?>" pattern="<?=$validText?>" title="_(IP address or FQDN)_" onchange="toLC(this);quickValidate(this);" <?=($vpn_wgX||(int)_var($wgX,"TYPE:$i",0)==2||(int)_var($wgX,"TYPE:$i",0)==3)?'placeholder="(_(mandatory)_)" required':'placeholder="(_(not used)_)"'?>>:
|
||||
<input type="number" name="gui:ListenPort:<?=$i?>" class="port" min="1" max="65535" value="<?=_var($wgX,"ListenPort:$i")?>" onchange="quickValidate(this);"<?=isset($wgX["Endpoint:$i"])?" placeholder=\"".(_var($wgX,'ListenPort:0')?:_var($netport,'wgX'))."\"":""?>></span>
|
||||
<input type="button" class="form ping-button2-<?=$i?>" value="Ping" onclick="ping($(document.wgX),this,'input[name="gui:Endpoint:<?=$i?>"]')"<?=isset($wgX["Endpoint:$i"])?'':' disabled'?>>
|
||||
: <input type="hidden" name="Endpoint:<?=$i?>" value="">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="gui:Endpoint:<?=$i?>" value="<?=_var($wgX,"Endpoint:$i")?>" pattern="<?=$validText?>" title="_(IP address or FQDN)_" onchange="toLC(this);quickValidate(this);" <?=($vpn_wgX||(int)_var($wgX,"TYPE:$i",0)==2||(int)_var($wgX,"TYPE:$i",0)==3)?'placeholder="(_(mandatory)_)" required':'placeholder="(_(not used)_)"'?>>:
|
||||
<span>:</span>
|
||||
<input type="number" name="gui:ListenPort:<?=$i?>" class="port" min="1" max="65535" value="<?=_var($wgX,"ListenPort:$i")?>" onchange="quickValidate(this);"<?=isset($wgX["Endpoint:$i"])?" placeholder=\"".(_var($wgX,'ListenPort:0')?:_var($netport,'wgX'))."\"":""?>>
|
||||
</span>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button2-<?=$i?>" value="Ping" onclick="ping($(document.wgX),this,'input[name="gui:Endpoint:<?=$i?>"]')"<?=isset($wgX["Endpoint:$i"])?'':' disabled'?>>
|
||||
</span>
|
||||
|
||||
:wg_peer_endpoint_help:
|
||||
|
||||
_(Peer allowed IPs)_:
|
||||
: <span class="input"><input type="text" name="AllowedIPs:<?=$i?>" class="wide" value="<?=_var($wgX,"AllowedIPs:$i")?>" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(mandatory)_)" required></span>
|
||||
: <input type="text" name="AllowedIPs:<?=$i?>" class="wide" value="<?=_var($wgX,"AllowedIPs:$i")?>" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(mandatory)_)" required>
|
||||
|
||||
:wg_peer_allowed_ips_help:
|
||||
|
||||
_(Peer DNS server)_:
|
||||
: <span class="input"><input type="text" name="DNS:<?=$i?>" class="subnet" maxlength="60" value="<?=_var($wgX,"DNS:$i")?>" onchange="quickValidate(this);" pattern="<?=$validDNSServerList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_"<?=(int)_var($wgX,"TYPE:$i",0)!=6?'placeholder="(_(optional)_)"':'placeholder="(_(mandatory)_)" required'?>></span>
|
||||
: <input type="text" name="DNS:<?=$i?>" maxlength="60" value="<?=_var($wgX,"DNS:$i")?>" onchange="quickValidate(this);" pattern="<?=$validDNSServerList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_"<?=(int)_var($wgX,"TYPE:$i",0)!=6?'placeholder="(_(optional)_)"':'placeholder="(_(mandatory)_)" required'?>>
|
||||
|
||||
:wg_peer_dns_server_help:
|
||||
|
||||
_(Persistent keepalive)_:
|
||||
: <span class="input"><input type="number" name="PersistentKeepalive:<?=$i?>" class="trim" min="0" max="600" value="<?=_var($wgX,"PersistentKeepalive:$i")?>" onchange="quickValidate(this);" placeholder="(_(disabled)_)">_(seconds)_</span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="number" name="PersistentKeepalive:<?=$i?>" class="trim" min="0" max="600" value="<?=_var($wgX,"PersistentKeepalive:$i")?>" onchange="quickValidate(this);" placeholder="(_(disabled)_)">
|
||||
<span>_(seconds)_</span>
|
||||
</span>
|
||||
|
||||
:wg_persistent_keepalive_help:
|
||||
|
||||
</div>
|
||||
|
||||
_(Data received)_:
|
||||
: <span class="rx-wgX-<?=$i?>">0 B</span>
|
||||
|
||||
_(Data sent)_:
|
||||
: <span class="tx-wgX-<?=$i?>">0 B</span>
|
||||
|
||||
_(Last handshake)_:
|
||||
: <span class="hs-wgX-<?=$i?>">_(unknown)_</span>
|
||||
</div>
|
||||
<span class="pin">_(Data received)_: <span class="rx-wgX-<?=$i?>">0 B</span>_(Data sent)_: <span class="tx-wgX-<?=$i?>">0 B</span><br>_(Last handshake)_: <span class="hs-wgX-<?=$i?>">_(unknown)_</span></span>
|
||||
<?endforeach;?>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Apply)_" onclick="return(validateForm($(document.wgX),'wgX'))" disabled><input type="button" value="_(Done)_" onclick="done()"><input type="button" id="addpeer-wgX" value="_(Add Peer)_" onclick="addPeer($(document.wgX),'wgX')"><input type="button" class="advanced wgX" value="_(Delete Tunnel)_" style="float:right;display:none" onclick="delTunnel('wgX')">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" onclick="return(validateForm($(document.wgX),'wgX'))" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
<input type="button" id="addpeer-wgX" value="_(Add Peer)_" onclick="addPeer($(document.wgX),'wgX')">
|
||||
<input type="button" class="advanced wgX" value="_(Delete Tunnel)_" style="display:none" onclick="delTunnel('wgX')">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<script markdown="1" type="text/html" id="peer-template-wgX">
|
||||
<div markdown="1" id="index-wgX-INDEX" class="shade">
|
||||
_(Peer name)_:
|
||||
: <span class="input"><input type="text" name="Name:INDEX" class="wide" maxlength="99" value="" onchange="quickValidate(this);" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)"></span>
|
||||
<span class="pin"><i class="fa fa-fw fa-eye eyeINDEX key-off" title="_(Show Peer Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zoneINDEX key-off" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wgX-INDEX" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wgX),this,'div.zoneINDEX')" title="_(Toggle view)_"></i></span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="Name:INDEX" class="wide" maxlength="99" value="" onchange="quickValidate(this);" pattern="<?=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<i class="fa fa-fw fa-eye eyeINDEX key-off" title="_(Show Peer Config)_"></i>
|
||||
<i class="fa fa-fw fa-key zoneINDEX key-off" title="_(Toggle keys)_"></i>
|
||||
<i id="chevron-wgX-INDEX" class="fa fa-fw fa-chevron-down" style="cursor:pointer" onclick="openClose($(document.wgX),this,'div.zoneINDEX')" title="_(Toggle view)_"></i>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
:wg_peer_name_help:
|
||||
|
||||
_(Peer type of access)_:
|
||||
: <span class="input"><select name="TYPE:INDEX" class="auto" onchange="updatePeer($(document.wgX),INDEX,this.value,'wgX')">
|
||||
: <select name="TYPE:INDEX" class="auto" onchange="updatePeer($(document.wgX),INDEX,this.value,'wgX')">
|
||||
<?=mk_option(0, "0", _("Remote access to server"))?>
|
||||
<?=mk_option(0, "1", _("Remote access to LAN"))?>
|
||||
<?=mk_option(0, "2", _("Server to server access"))?>
|
||||
@@ -398,26 +466,30 @@ _(Peer type of access)_:
|
||||
<?=mk_option(0, "6", _("Remote tunneled access"))?>
|
||||
<?=mk_option(0, "7", _("VPN tunneled access for system"),'disabled')?>
|
||||
<?=mk_option(0, "8", _("VPN tunneled access for docker"))?>
|
||||
</select></span>
|
||||
</select>
|
||||
<span id="access-type-INDEX" class="access-type"></span>
|
||||
|
||||
> ?>)
|
||||
|
||||
<div markdown="1" class="keys wgX keyINDEX">
|
||||
_(Peer private key)_:
|
||||
: <span class="input"><input type="text" name="PrivateKey:INDEX" class="wide private-INDEX" maxlength="64" value="" onchange="highlight($(document.wgX),this,0)" placeholder="(_(optional)_)"></span>
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wgX),'INDEX')">
|
||||
: <input type="text" name="PrivateKey:INDEX" class="wide private-INDEX" maxlength="64" value="" onchange="highlight($(document.wgX),this,0)" placeholder="(_(optional)_)">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Keypair)_" onclick="keypair($(document.wgX),'INDEX')">
|
||||
</span>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
_(Peer public key)_:
|
||||
: <span class="input"><input type="text" name="PublicKey:INDEX" class="wide public-INDEX" maxlength="64" onchange="highlight($(document.wgX),this,0)" placeholder="(_(mandatory)_)" value="" required></span>
|
||||
: <input type="text" name="PublicKey:INDEX" class="wide public-INDEX" maxlength="64" onchange="highlight($(document.wgX),this,0)" placeholder="(_(mandatory)_)" value="" required>
|
||||
|
||||
:wg_generate_keypair_help:
|
||||
|
||||
_(Peer preshared key)_:
|
||||
: <span class="input"><input type="text" name="PresharedKey:INDEX" class="wide preshared-INDEX" maxlength="64" value="" onchange="highlight($(document.wgX),this,0)" placeholder="(_(optional)_)"></span>
|
||||
<input type="button" class="form" value="_(Generate Key)_" onclick="presharedkey($(document.wgX),'INDEX')">
|
||||
: <input type="text" name="PresharedKey:INDEX" class="wide preshared-INDEX" maxlength="64" value="" onchange="highlight($(document.wgX),this,0)" placeholder="(_(optional)_)">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form" value="_(Generate Key)_" onclick="presharedkey($(document.wgX),'INDEX')">
|
||||
</span>
|
||||
|
||||
:wg_peer_preshared_key_help:
|
||||
|
||||
@@ -425,38 +497,50 @@ _(Peer preshared key)_:
|
||||
<div markdown="1" class="advanced wgX zoneINDEX" style="display:none">
|
||||
<div markdown="1" class="ipv4 wgX" style="display:none">
|
||||
_(Peer tunnel address)_:
|
||||
: <span class="input"><input type="text" name="Address:INDEX" class="subnet" maxlength="15" value="" onchange="if(verifyInSubnet(this)){setAllow($(document.wgX),this.value,INDEX)}" pattern="<?=$validIP4?>" title="_(IPv4 address)_"></span>
|
||||
<input type="button" class="form ping-button1-INDEX" value="_(Ping)_" onclick="ping($(document.wgX),this,'input[name="Address:INDEX"]')" disabled>
|
||||
: <input type="text" name="Address:INDEX" maxlength="15" value="" onchange="if(verifyInSubnet(this)){setAllow($(document.wgX),this.value,INDEX)}" pattern="<?=$validIP4?>" title="_(IPv4 address)_">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button1-INDEX" value="_(Ping)_" onclick="ping($(document.wgX),this,'input[name="Address:INDEX"]')" disabled>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="ipv6 wgX" style="display:none">
|
||||
_(Peer tunnel address IPv6)_:
|
||||
: <span class="input"><input type="text" name="Address6:INDEX" class="subnet" maxlength="40" value="" onchange="if(verifyInSubnet6(this)){setAllow6($(document.wgX),this.value,INDEX)}" pattern="<?=$validIP6?>" title="_(IPv6 address)_"></span>
|
||||
<input type="button" class="form ping-button6-INDEX" value="_(Ping)_" onclick="ping($(document.wgX),this,'input[name="Address6:INDEX"]')" disabled>
|
||||
: <input type="text" name="Address6:INDEX" maxlength="40" value="" onchange="if(verifyInSubnet6(this)){setAllow6($(document.wgX),this.value,INDEX)}" pattern="<?=$validIP6?>" title="_(IPv6 address)_">
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button6-INDEX" value="_(Ping)_" onclick="ping($(document.wgX),this,'input[name="Address6:INDEX"]')" disabled>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
:wg_peer_tunnel_address_help:
|
||||
|
||||
_(Peer endpoint)_:
|
||||
<input type="hidden" name="Endpoint:INDEX" value="">
|
||||
: <span class="input"><input type="text" name="gui:Endpoint:INDEX" class="subnet" value="" pattern="<?=$validText?>" title="_(IP address or FQDN)_" onchange="toLC(this);quickValidate(this);" placeholder="(_(not used)_)">:
|
||||
<input type="number" name="gui:ListenPort:INDEX" class="port" min="1" max="65535" value="" onchange="quickValidate(this);"></span>
|
||||
<input type="button" class="form ping-button2-INDEX" value="_(Ping)_" onclick="ping($(document.wgX),this,'input[name="gui:Endpoint:INDEX"]')" disabled>
|
||||
: <input type="hidden" name="Endpoint:INDEX" value="">
|
||||
<span class="flex flex-row items-center gap-2">
|
||||
<input type="text" name="gui:Endpoint:INDEX" value="" pattern="<?=$validText?>" title="_(IP address or FQDN)_" onchange="toLC(this);quickValidate(this);" placeholder="(_(not used)_)">
|
||||
<span>:</span>
|
||||
<input type="number" name="gui:ListenPort:INDEX" class="port" min="1" max="65535" value="" onchange="quickValidate(this);">
|
||||
</span>
|
||||
<span class="inline-block">
|
||||
<input type="button" class="form ping-button2-INDEX" value="_(Ping)_" onclick="ping($(document.wgX),this,'input[name="gui:Endpoint:INDEX"]')" disabled>
|
||||
</span>
|
||||
|
||||
:wg_peer_endpoint_help:
|
||||
|
||||
_(Peer allowed IPs)_:
|
||||
: <span class="input"><input type="text" name="AllowedIPs:INDEX" class="wide" value="" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(mandatory)_)" required></span>
|
||||
: <input type="text" name="AllowedIPs:INDEX" class="wide" value="" onchange="quickValidate(this);" pattern="<?=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(mandatory)_)" required>
|
||||
|
||||
:wg_peer_allowed_ips_help:
|
||||
|
||||
_(Peer DNS server)_:
|
||||
: <span class="input"><input type="text" name="DNS:INDEX" class="subnet" maxlength="60" value="" onchange="quickValidate(this);" pattern="<?=$validDNSServerList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_" placeholder="(_(optional)_)"></span>
|
||||
: <input type="text" name="DNS:INDEX" maxlength="60" value="" onchange="quickValidate(this);" pattern="<?=$validDNSServerList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_" placeholder="(_(optional)_)">
|
||||
|
||||
:wg_peer_dns_server_help:
|
||||
|
||||
_(Persistent keepalive)_:
|
||||
: <span class="input"><input type="number" name="PersistentKeepalive:INDEX" class="trim" min="0" max="600" value="" onchange="quickValidate(this);" placeholder="(_(disabled)_)">_(seconds)_</span>
|
||||
: <span class="flex flex-row items-center gap-2">
|
||||
<input type="number" name="PersistentKeepalive:INDEX" class="trim" min="0" max="600" value="" onchange="quickValidate(this);" placeholder="(_(disabled)_)">
|
||||
<span>_(seconds)_</span>
|
||||
</span>
|
||||
|
||||
:wg_persistent_keepalive_help:
|
||||
|
||||
|
||||
@@ -45,7 +45,10 @@ _(Regulatory region)_:
|
||||
?></select><span id="manual" class="hide">_(Manual input)_ [XX]: <input type="text" name="REGION_XX" class="wifi" value="<?=_var($wlan0,'REGION_XX')?>" minlength="2" maxlength="2" title="_(Two letter country code)_ (ISO 3166)"></span>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<div id="wifi" class="hide">
|
||||
|
||||
@@ -82,7 +82,7 @@ if (count($pages)) {
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="viewport" content="width=1300">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="referrer" content="same-origin">
|
||||
<link type="image/png" rel="shortcut icon" href="/webGui/images/<?= _var($var, 'mdColor', 'red-on') ?>.png">
|
||||
|
||||
@@ -335,14 +335,14 @@ $('body').on('click','a,.ca_href', function(e) {
|
||||
href = href.trim();
|
||||
// Sanitize href to prevent XSS
|
||||
href = href.replace(/[<>"]/g, '');
|
||||
if (href.match('https?://[^\.]*.(my)?unraid.net/') || href.indexOf('https://unraid.net/') == 0 || href == 'https://unraid.net' || href.indexOf('http://lime-technology.com') == 0) {
|
||||
if (href.match('https?://[^\.]*.(my)?unraid.net/') || href.startsWith('https://unraid.net/') || href == 'https://unraid.net' || href.startsWith('http://lime-technology.com')) {
|
||||
if (ca_href) window.open(href,target);
|
||||
return;
|
||||
}
|
||||
if (href !== '#' && href.indexOf('javascript') !== 0) {
|
||||
if (href !== '#' && !href.startsWith('javascript') && !href.startsWith('blob:')) {
|
||||
var dom = isValidURL(href);
|
||||
if (dom == false) {
|
||||
if (href.indexOf('/') == 0) return; // all internal links start with "/"
|
||||
if (href.startsWith('/')) return; // all internal links start with "/"
|
||||
var baseURLpage = href.split('/');
|
||||
if (gui_pages_available.includes(baseURLpage[0])) return;
|
||||
}
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
* This can be deleted if GUI mode authentication is enabled.
|
||||
*/
|
||||
|
||||
function is_localhost()
|
||||
function is_localhost_gui()
|
||||
{
|
||||
// Use the peer IP, not the Host header which can be spoofed
|
||||
return $_SERVER['REMOTE_ADDR'] === '127.0.0.1' || $_SERVER['REMOTE_ADDR'] === '::1';
|
||||
}
|
||||
function is_good_session()
|
||||
function is_good_session_gui()
|
||||
{
|
||||
return isset($_SESSION) && isset($_SESSION['unraid_user']) && isset($_SESSION['unraid_login']);
|
||||
}
|
||||
if (is_localhost() && !is_good_session()) {
|
||||
if (is_localhost_gui() && !is_good_session_gui()) {
|
||||
if (session_status() === PHP_SESSION_ACTIVE) {
|
||||
session_destroy();
|
||||
}
|
||||
@@ -23,4 +23,4 @@ if (is_localhost() && !is_good_session()) {
|
||||
session_write_close();
|
||||
my_logger("Unraid GUI-boot: created root session for localhost request.");
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -13,6 +13,27 @@ $tabbed = $display['tabs'] == 0 && count($pages) > 1;
|
||||
$contentInclude = $tabbed ? 'MainContentTabbed.php' : 'MainContentTabless.php';
|
||||
|
||||
$defaultIcon = "<i class=\"icon-app PanelIcon\"></i>";
|
||||
|
||||
/**
|
||||
* Safely processes page titles by replacing PHP variables with their values
|
||||
*
|
||||
* @param string $rawTitle The unprocessed title that may contain variable references
|
||||
* @return string Processed title with variables substituted
|
||||
*/
|
||||
function processTitle($rawTitle) {
|
||||
// Safely replace any variables in the title without eval
|
||||
$title = htmlspecialchars((string)$rawTitle);
|
||||
return preg_replace_callback(
|
||||
'/\$([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/',
|
||||
function($matches) {
|
||||
return isset($GLOBALS[$matches[1]]) ?
|
||||
htmlspecialchars((string)$GLOBALS[$matches[1]]) :
|
||||
'$'.$matches[1];
|
||||
},
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
function process_icon($icon, $docroot, $root) {
|
||||
global $defaultIcon;
|
||||
if (substr($icon, -4) == '.png') {
|
||||
@@ -44,7 +65,8 @@ function process_icon($icon, $docroot, $root) {
|
||||
* @return string HTML for the Panel element
|
||||
*/
|
||||
function generatePanel($pg, $path, $defaultIcon, $docroot, $useTabCookie = false) {
|
||||
$panelTitle = htmlspecialchars($pg['Title']);
|
||||
// Process title using our safe variable substitution function
|
||||
$panelTitle = processTitle($pg['Title']);
|
||||
$icon = _var($pg, 'Icon', $defaultIcon);
|
||||
$icon = process_icon($icon, $docroot, $pg['root']);
|
||||
|
||||
@@ -85,7 +107,7 @@ function generatePanels($page, $path, $defaultIcon, $docroot, $useTabCookie = fa
|
||||
foreach ($pgs as $pg) {
|
||||
$output .= generatePanel($pg, $path, $defaultIcon, $docroot, $useTabCookie);
|
||||
}
|
||||
return $output;
|
||||
return '<div class="Panels">'.$output.'</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<? $i = 0; ?>
|
||||
<? foreach ($pages as $page): ?>
|
||||
<? if (!isset($page['Title'])) continue; ?>
|
||||
<? $title = htmlspecialchars((string)$page['Title']); ?>
|
||||
<? $title = processTitle($page['Title']); ?>
|
||||
<? $tabId = "tab" . ($i+1); ?>
|
||||
<button
|
||||
role="tab"
|
||||
@@ -32,7 +32,7 @@
|
||||
if (!isset($page['Title'])) {
|
||||
continue;
|
||||
}
|
||||
$title = htmlspecialchars((string)$page['Title']);
|
||||
$title = processTitle($page['Title']);
|
||||
$tabId = "tab" . ($i+1);
|
||||
annotate($page['file']);
|
||||
?>
|
||||
@@ -40,9 +40,8 @@
|
||||
id="<?= $tabId ?>-panel"
|
||||
role="tabpanel"
|
||||
aria-labelledby="<?= $tabId ?>"
|
||||
class="content"
|
||||
class="tab-content content"
|
||||
tabindex="0"
|
||||
style="display:none;"
|
||||
>
|
||||
<?= generatePanels($page, $path, $defaultIcon, $docroot) ?>
|
||||
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
<div class="content">
|
||||
<? foreach ($pages as $page): ?>
|
||||
<? annotate($page['file']); ?>
|
||||
<? includePageStylesheets($page); ?>
|
||||
|
||||
<? if (isset($page['Title'])): ?>
|
||||
<div class="title">
|
||||
<?= tab_title($page['Title'], $page['root'], _var($page, 'Tag', false)) ?>
|
||||
<? $title = processTitle($page['Title']); ?>
|
||||
<?= tab_title($title, $page['root'], _var($page, 'Tag', false)) ?>
|
||||
<span class="right inline-flex flex-row items-center gap-1"></span>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
|
||||
|
||||
@@ -82,18 +82,19 @@ function tab_title($title,$path,$tag) {
|
||||
$title = str_replace($device,_(my_disk($device),3),$title);
|
||||
}
|
||||
$title = _(parse_text($title));
|
||||
$wrapperClasses = 'left inline-flex flex-row items-center gap-1';
|
||||
if (!$tag || substr($tag,-4)=='.png') {
|
||||
$file = "$path/icons/".($tag ?: strtolower(str_replace(' ','',$title)).".png");
|
||||
if (file_exists("$docroot/$file")) {
|
||||
return "<img src='/$file' class='icon' style='max-width: 18px; max-height: 18px; width: auto; height: auto; object-fit: contain;'>$title";
|
||||
return "<span class='$wrapperClasses'><img src='/$file' class='icon' style='max-width: 18px; max-height: 18px; width: auto; height: auto; object-fit: contain;'>$title</span>";
|
||||
} else {
|
||||
return "<i class='fa fa-th title'></i>$title";
|
||||
return "<span class='$wrapperClasses'><i class='fa fa-th title'></i>$title</span>";
|
||||
}
|
||||
} elseif (substr($tag,0,5)=='icon-') {
|
||||
return "<i class='$tag title'></i>$title";
|
||||
return "<span class='$wrapperClasses'><i class='$tag title'></i>$title</span>";
|
||||
} else {
|
||||
if (substr($tag,0,3)!='fa-') $tag = "fa-$tag";
|
||||
return "<i class='fa $tag title'></i>$title";
|
||||
return "<span class='$wrapperClasses'><i class='fa $tag title'></i>$title</span>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ case "attributes":
|
||||
if ($empty) echo "<tr><td colspan='10' style='text-align:center;padding-top:12px'>"._('Attributes not available')."</td></tr>";
|
||||
break;
|
||||
case "capabilities":
|
||||
echo '<table id="disk_capabilities_table" class="unraid"><thead><td style="width:33%">'._('Feature').'</td><td>'._('Value').'</td><td>'._('Information').'</td></thead><tbody>' ;
|
||||
echo '<div class="TableContainer"><table id="disk_capabilities_table" class="unraid"><thead><td style="width:33%">'._('Feature').'</td><td>'._('Value').'</td><td>'._('Information').'</td></thead><tbody>' ;
|
||||
exec("smartctl -n standby -c $type ".escapeshellarg("/dev/$port")."|awk 'NR>5'",$output);
|
||||
$row = ['','',''];
|
||||
$empty = true;
|
||||
@@ -154,7 +154,7 @@ case "capabilities":
|
||||
$info = array_map('trim', explode('_', preg_replace('/_( +)_ /','__',$line), 3));
|
||||
if ($nvme && $info[0]=="Supported Power States" ) { $nvme_section="psheading" ;echo "</body></table><div class='title'><span>{$line}</span></div>"; $row = ['','',''] ; continue ;}
|
||||
if ($nvme && $info[0]=="Supported LBA Sizes" ) {
|
||||
echo "</body></table><div class='title'>{$info[0]} {$info[1]} {$info[2]}</span></div>";
|
||||
echo "</body></table></div><div class='title'>{$info[0]} {$info[1]} {$info[2]}</span></div>";
|
||||
$row = ['','',''];
|
||||
$nvme_section="lbaheading" ;
|
||||
continue ;
|
||||
|
||||
@@ -18,10 +18,10 @@ class ThemeHelper {
|
||||
private const LIGHT_THEMES = [self::THEME_WHITE, self::THEME_AZURE];
|
||||
|
||||
private const FGCOLORS = [
|
||||
self::THEME_BLACK => self::COLOR_BLACK,
|
||||
self::THEME_AZURE => self::COLOR_BLACK,
|
||||
self::THEME_WHITE => self::COLOR_BLACK,
|
||||
self::THEME_BLACK => self::COLOR_WHITE,
|
||||
self::THEME_GRAY => self::COLOR_WHITE,
|
||||
self::THEME_AZURE => self::COLOR_WHITE
|
||||
];
|
||||
|
||||
private const INIT_ERROR = 'ThemeHelper not initialized. Call initWithCurrentThemeSetting() first.';
|
||||
|
||||
@@ -354,7 +354,7 @@ function array_slots() {
|
||||
$echo[] = "<form method='POST' action='/update.htm' target='progressFrame'>";
|
||||
$echo[] = "<input type='hidden' name='csrf_token' value='"._var($var,'csrf_token')."'>";
|
||||
$echo[] = "<input type='hidden' name='changeSlots' value='apply'>";
|
||||
$echo[] = "<select class='narrow' name='SYS_ARRAY_SLOTS' onChange='devices.start();this.form.submit()'>";
|
||||
$echo[] = "<select class='slots-amount' name='SYS_ARRAY_SLOTS' onChange='devices.start();this.form.submit()'>";
|
||||
if (_var($var,'mdNumDisks')=='0')
|
||||
$echo[] = "<option value='0'>none</option>";
|
||||
for ($n=$min; $n<=$max; $n++) {
|
||||
@@ -374,7 +374,7 @@ function cache_slots($off,$pool,$min,$slots) {
|
||||
$echo[] = "<input type='hidden' name='csrf_token' value='"._var($var,'csrf_token')."'>";
|
||||
$echo[] = "<input type='hidden' name='changeSlots' value='apply'>";
|
||||
$echo[] = "<input type='hidden' name='poolName' value='$pool'>";
|
||||
$echo[] = "<select class='narrow' name='poolSlots' onChange='devices.start();this.form.submit()'{$off}>";
|
||||
$echo[] = "<select class='slots-amount' name='poolSlots' onChange='devices.start();this.form.submit()'{$off}>";
|
||||
// if (_var($disks[$pool],'state')=='NEW_ARRAY' || str_contains(_var($diks[$pool],'state'),'NO_DEVICES')) {
|
||||
// $option = _('none');
|
||||
// $echo[] = "<option value='0'>$option</option>";
|
||||
|
||||
@@ -361,7 +361,9 @@ if ($cli) {
|
||||
echo "Starting diagnostics collection... ";
|
||||
$server = isset($var['NAME']) ? str_replace(' ','_',strtolower($var['NAME'])) : 'tower';
|
||||
$date = date('Ymd-Hi');
|
||||
$diag = "$server-diagnostics-$date";
|
||||
|
||||
$safeMode = (_var($var,'safeMode') == 'yes') ? "-safemode" : "";
|
||||
$diag = "$server$safeMode-diagnostics-$date";
|
||||
$zip = "/boot/logs/$diag.zip";
|
||||
} else {
|
||||
// script is called from GUI
|
||||
@@ -430,11 +432,6 @@ foreach (glob("$path/*.ini") as $file) {
|
||||
if ($all || $ini != "users") file_put_contents("/$diag/system/vars.txt",preg_replace(["/\n/","/^Array/"],["\r\n",$ini],anonymize(print_r(parse_ini_file($file,true),true),1)),FILE_APPEND);
|
||||
}
|
||||
|
||||
// check for safe mode
|
||||
if (_var($var,'safeMode') == 'yes') {
|
||||
file_put_contents("/$diag/system/safemode.txt", "Unraid safe mode enabled\r\n");
|
||||
}
|
||||
|
||||
// Create loads.txt
|
||||
$cpuload = run("uptime")." Cores: ".run("nproc")."\r\n".(string)@file_get_contents("$path/cpuload.ini")."\r\n";
|
||||
$loadTxt = [];
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
div.notice {
|
||||
margin: 150px 0 20px 0;
|
||||
}
|
||||
@@ -104,7 +104,6 @@ div#buttons {
|
||||
div.autoheight {
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
margin-top: -30px;
|
||||
}
|
||||
|
||||
table.tablesorter.indexer tbody tr:hover td {
|
||||
@@ -122,9 +121,3 @@ table.tablesorter.indexer tbody tr:hover td {
|
||||
color: var(--browse-text-color);
|
||||
}
|
||||
}
|
||||
|
||||
.Theme--sidebar {
|
||||
div.autoheight {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +210,6 @@ i.dfm_filter {
|
||||
div.autoheight {
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
margin-top: -30px;
|
||||
}
|
||||
|
||||
.Theme--sidebar {
|
||||
@@ -224,7 +223,4 @@ div.autoheight {
|
||||
i.dfm_filter {
|
||||
margin-top: -4px;
|
||||
}
|
||||
div.autoheight {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,11 +10,6 @@
|
||||
.Theme--white:root {
|
||||
--dashstats-pie-after-bg-color: #f7f9f9;
|
||||
}
|
||||
|
||||
div.frame {
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 5rem;
|
||||
}
|
||||
div.tile,
|
||||
i.tile {
|
||||
display: none;
|
||||
@@ -23,9 +18,9 @@ div#iframe-popup {
|
||||
display: none;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
div.last {
|
||||
/* div.last {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
} */
|
||||
div.leftside {
|
||||
float: left;
|
||||
width: 66%;
|
||||
@@ -366,8 +361,18 @@ table.snapshot {
|
||||
}
|
||||
div.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(580px, 1fr));
|
||||
column-gap: 20px;
|
||||
grid-template-columns: 1fr; /* 1 column by default (mobile) */
|
||||
gap: 20px;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
div.grid {
|
||||
grid-template-columns: repeat(2, 1fr); /* 2 columns for medium screens */
|
||||
}
|
||||
}
|
||||
@media (min-width: 1600px) {
|
||||
div.grid {
|
||||
grid-template-columns: repeat(3, 1fr); /* 3 columns for big screens */
|
||||
}
|
||||
}
|
||||
div.pie {
|
||||
height: 92px;
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
div.extra,span.ipv4,span.ipv6,span.mac,span#noports{display:none}
|
||||
select,input[type=text]{margin-right:40px}
|
||||
div.extra,
|
||||
span.ipv4,
|
||||
span.ipv6,
|
||||
span.mac,
|
||||
span#noports {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,3 @@ i.top {
|
||||
padding-left: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
select.fixed {
|
||||
max-width: 166px;
|
||||
}
|
||||
|
||||
@@ -87,8 +87,4 @@ input[type="text"].narrow {
|
||||
input[type="text"].narrow {
|
||||
border-bottom: 1px solid var(--eth0-narrow-input-border-color);
|
||||
}
|
||||
|
||||
.uplift {
|
||||
margin-top: -30px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
span.warning {
|
||||
margin-left: 20px;
|
||||
}
|
||||
@@ -1,10 +1,3 @@
|
||||
span[id^="info-"] {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.Theme--black,
|
||||
.Theme--white {
|
||||
span.status.vhshift {
|
||||
margin-right: -10px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
span.indent {
|
||||
display: inline-block;
|
||||
width: 240px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
@@ -1,11 +1,5 @@
|
||||
select.a {
|
||||
min-width: 220px;
|
||||
}
|
||||
input.a {
|
||||
width: 220px;
|
||||
}
|
||||
span.a {
|
||||
.notifications-checkbox-group-title {
|
||||
display: inline-block;
|
||||
width: 220px;
|
||||
width: 150px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,12 @@ div#templateWindow,
|
||||
div#dialogWindow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
span.dim {
|
||||
opacity: 0.2;
|
||||
}
|
||||
#screenlog {
|
||||
margin-left: 0;
|
||||
|
||||
.php-settings-description {
|
||||
max-width: 100ch;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -1,61 +1,34 @@
|
||||
:root {
|
||||
--syslinux-span-array-border-color: #f2f2f2;
|
||||
--syslinux-textarea-menu-border-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.Theme--sidebar:root {
|
||||
--syslinux-span-array-border-color: #606e7f;
|
||||
--syslinux-textarea-menu-border-color: transparent;
|
||||
}
|
||||
.Theme--white:root {
|
||||
--syslinux-span-array-border-color: #1c1c1c;
|
||||
--syslinux-textarea-menu-border-color: #1c1b1b;
|
||||
}
|
||||
|
||||
div.basic {
|
||||
.basic {
|
||||
display: block;
|
||||
}
|
||||
div.advanced {
|
||||
.advanced {
|
||||
display: none;
|
||||
}
|
||||
textarea.raw {
|
||||
resize: none;
|
||||
font-family: bitstream;
|
||||
width: 63%;
|
||||
}
|
||||
|
||||
span.array,
|
||||
span.system {
|
||||
margin-left: 33.33%;
|
||||
width: 63% !important;
|
||||
padding: 2px 10px;
|
||||
.config-item-label-wrapper {
|
||||
font-weight: bold;
|
||||
border: 1px solid var(--syslinux-span-array-border-color);
|
||||
border-bottom: none;
|
||||
padding: .25rem .5rem;
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
textarea.menu {
|
||||
margin-left: 33.33%;
|
||||
width: 63% !important;
|
||||
margin-bottom: 12px;
|
||||
padding: 4px 10px;
|
||||
|
||||
.config-raw,
|
||||
.config-item textarea {
|
||||
font-family: bitstream;
|
||||
}
|
||||
|
||||
dd {
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.Theme--black,
|
||||
.Theme--white {
|
||||
textarea.menu {
|
||||
border: 1px solid var(--syslinux-textarea-menu-border-color);
|
||||
border-top: none;
|
||||
}
|
||||
}
|
||||
|
||||
.Theme--azure,
|
||||
.Theme--gray {
|
||||
textarea.menu {
|
||||
border-top: none;
|
||||
}
|
||||
margin-bottom: 1rem;
|
||||
padding: .5rem 1rem;
|
||||
border: 1px solid var(--syslinux-textarea-menu-border-color);
|
||||
max-width: 100%;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user