mirror of
https://github.com/unraid/webgui.git
synced 2026-02-25 11:49:12 -06:00
Merge branch 'master' into master
This commit is contained in:
@@ -18,19 +18,6 @@ $guiSearchBoxSpan = "<span id='guiSearchBoxSpan'><input type='text' id='guiSear
|
||||
var languageVisible;
|
||||
var guiSearchSuggestions;
|
||||
|
||||
var browserName = (function(agent){
|
||||
switch (true) {
|
||||
case agent.indexOf('edge') >= 0: return 'Edge'; // Edge
|
||||
case agent.indexOf('edg/') >= 0: return 'Edge'; // Edge Chromium Based
|
||||
case agent.indexOf('opr') >= 0 && !!window.opr: return 'Opera';
|
||||
case agent.indexOf('chrome') >= 0 && !!window.chrome: return 'Chrome';
|
||||
case agent.indexOf('trident') >= 0: return 'MS IE';
|
||||
case agent.indexOf('firefox') >= 0: return 'Mozilla Firefox';
|
||||
case agent.indexOf('safari') >= 0: return 'Safari';
|
||||
default: return 'other';
|
||||
}
|
||||
})(window.navigator.userAgent.toLowerCase());
|
||||
|
||||
$(function(){
|
||||
<?if ($themeHelper->isSidebarTheme()):?>
|
||||
$('.nav-item.gui_search').hover(function(){gui_search();},function(e){closeSearchBox(e);});
|
||||
@@ -56,10 +43,6 @@ function setupGUIsearch() {
|
||||
<?endif;?>
|
||||
}
|
||||
});
|
||||
if (browserName != 'Chrome' && browserName != 'Edge') {
|
||||
var hashTag = (window.location.hash||'').substr(1).replace('%20',' ').replace('%2d','-');
|
||||
if (hashTag.length) $('body').mark(hashTag,{'accuracy': {'value': 'exactly','limiters': ['.',':','?']},'separateWordSearch': false});
|
||||
}
|
||||
}
|
||||
|
||||
function gui_search() {
|
||||
@@ -97,19 +80,21 @@ function closeSearchBox(e) {
|
||||
|
||||
function guiSearch() {
|
||||
var searchInfo = $('#guiSearchBox').val().split('**');
|
||||
var separator = (browserName == 'Chrome' || browserName == 'Edge') ? '#:~:text=' : '#';
|
||||
var separator = ('fragmentDirective' in document) ? '#:~:text=' : '#';
|
||||
var scrollText = (typeof searchInfo[1] != 'undefined') ? separator+searchInfo[1].replace(' ','%20').replace('-','%2d') : '';
|
||||
var newPage = "<?=$currentUnraidPage?>/Settings/Tools".replace(searchInfo[0]+'/','');
|
||||
|
||||
closeSearchBox(event);
|
||||
if (newPage == 'Dashboard/Settings/Tools') newPage = 'Settings';
|
||||
location.replace('/'+newPage+'/'+searchInfo[0]+scrollText);
|
||||
}
|
||||
|
||||
if (browserName != 'Chrome' && browserName != 'Edge') {
|
||||
var script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = '<?autov('/plugins/dynamix.gui.search/javascript/jquery.mark.js')?>';
|
||||
document.getElementsByTagName('head')[0].appendChild(script);
|
||||
|
||||
/**
|
||||
* Prevents Community Apps from crashing
|
||||
* Hook script provided by CA - https://github.com/unraid/community.applications/blob/master/source/community.applications/usr/local/emhttp/plugins/community.applications/javascript/helpers.js
|
||||
*/
|
||||
if ( typeof guiSearchOnUnload === "function" ) {
|
||||
guiSearchOnUnload();
|
||||
}
|
||||
|
||||
location.assign('/'+newPage+'/'+searchInfo[0]+scrollText);
|
||||
}
|
||||
</script>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
padding: 0 1rem;
|
||||
text-align: left;
|
||||
height: auto;
|
||||
line-height: normal;
|
||||
@@ -15,12 +15,12 @@
|
||||
}
|
||||
|
||||
#guiSearchBox {
|
||||
width: 50rem;
|
||||
width: 40rem;
|
||||
border: none;
|
||||
border-radius: 20px;
|
||||
color: var(--gui-search-search-box-text-color);
|
||||
background-color: var(--gui-search-search-box-background-color);
|
||||
padding-left: 4rem;
|
||||
padding-left: 2.4rem;
|
||||
}
|
||||
|
||||
.Theme--black,
|
||||
@@ -34,6 +34,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#guiSearchBoxSpan {
|
||||
min-width: 40rem;
|
||||
}
|
||||
}
|
||||
|
||||
#guiSearchBoxSpan:after {
|
||||
font-family: unraid;
|
||||
content: "\e956";
|
||||
@@ -50,7 +56,8 @@
|
||||
--gui-search-search-box-background-color: var(--yellow-200);
|
||||
|
||||
#guiSearchBoxSpan {
|
||||
margin: 0 0 0 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#guiSearchBox {
|
||||
position: relative;
|
||||
|
||||
@@ -24,7 +24,7 @@ Tag="download"
|
||||
return;
|
||||
}
|
||||
file = file.trim();
|
||||
if (!file) return;
|
||||
if (!file) return console.warn('No plugin file selected');
|
||||
$.get('/plugins/dynamix.plugin.manager/include/ShowPlugins.php', {
|
||||
cmd: 'alert'
|
||||
}, function(data) {
|
||||
@@ -47,11 +47,19 @@ Tag="download"
|
||||
e.preventDefault();
|
||||
installPlugin($('#plugin_file').val());
|
||||
});
|
||||
|
||||
$('#plugin_tree').fileTree({
|
||||
root: '/boot/',
|
||||
top: '/boot/',
|
||||
filter:'plg',
|
||||
}, function(file) {
|
||||
$('#plugin_file').val(file);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<form name="plugin_install" method="POST" target="progressFrame">
|
||||
<form class="max-w-20 mx-auto" name="plugin_install" method="POST" target="progressFrame">
|
||||
<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="">
|
||||
|
||||
@@ -145,7 +145,6 @@ function loadlist(id,check) {
|
||||
}
|
||||
$(function() {
|
||||
initlist();
|
||||
$('#plugin_tree').fileTree({root:'/boot/',top:'/boot/',filter:'plg'}, function(file) {$('#plugin_file').val(file);});
|
||||
$('.tabs').append("<span id='checkall' class='status vhshift'><input type='button' value=\"_(Check For Updates)_\" onclick='openPlugin(\"checkall\",\"_(Plugin Update Check)_\",\":return\")' disabled></span>");
|
||||
$('.tabs').append("<span id='updateall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value=\"_(Update All Plugins)_\" onclick='updateList()'></span>");
|
||||
$('.tabs').append("<span id='removeall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value=\"_(Remove Selected Plugins)_\" onclick='removeList()'></span>");
|
||||
|
||||
@@ -780,7 +780,8 @@ _(File system type)_:
|
||||
<?=mk_option(_var($disk,'fsType'), "luks:zfs", _('zfs')." - "._('encrypted'))?>
|
||||
<?=mk_option(_var($disk,'fsType'), "luks:btrfs", _('btrfs')." - "._('encrypted'))?>
|
||||
<?if (_var($disk,'slots',1) == 1) echo mk_option(_var($disk,'fsType'), "luks:reiserfs", _('reiserfs')." - "._('encrypted'), "disabled")?>
|
||||
</select><span id="reiserfs" class="warning"<?if (!fsType('reiserfs')):?> style="display:none"<?endif;?>><i class="fa fa-warning"></i> _(ReiserFS is deprecated, please use another file system)_!</span>
|
||||
</select>
|
||||
<span id="reiserfs" class="warning"<?if (!fsType('reiserfs')):?> style="display:none"<?endif;?>><i class="fa fa-warning"></i> _(ReiserFS is deprecated, please use another file system)_!</span>
|
||||
<?endif;?>
|
||||
|
||||
<?if (diskType('Data') || isPool($tag)):?>
|
||||
@@ -862,32 +863,42 @@ _(Critical disk utilization threshold)_ (%):
|
||||
|
||||
<?if (fsType('btrfs')):?>
|
||||
<?if (!maintenance_mode()):?>
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-hdd-o"></i>_(Pool Device Status)_</span></div>
|
||||
<div class="title nocontrol">
|
||||
<span class="left">
|
||||
<i class="title fa fa-hdd-o"></i> _(Pool Device Status)_
|
||||
</span>
|
||||
</div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||||
|
||||
_(pool device stats)_:
|
||||
: <?echo "<pre>" . htmlspecialchars(shell_exec("/sbin/btrfs dev stats -T ".escapeshellarg("/mnt/$tag")), ENT_QUOTES, 'UTF-8') . "</pre>"; ?>
|
||||
: <pre><?= htmlspecialchars(shell_exec("/sbin/btrfs dev stats -T ".escapeshellarg("/mnt/$tag")) ?? '', ENT_QUOTES, 'UTF-8') ?></pre>
|
||||
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_check">
|
||||
<input type="hidden" name="#arg[1]" value="reset">
|
||||
<input type="hidden" name="#arg[2]" value="/mnt/<?=$tag?>">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Reset)_">
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" value="_(Reset)_">
|
||||
</span>
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-balance-scale"></i>_(Balance Status)_</span></div>
|
||||
<div class="title nocontrol">
|
||||
<span class="left">
|
||||
<i class="title fa fa-balance-scale"></i>_(Balance Status)_
|
||||
</span>
|
||||
</div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'btrfs-balance-<?=$tag?>','/mnt/<?=$tag?>')">
|
||||
<?if (_var($disk,'fsStatus')=="Mounted"):?>
|
||||
<?exec("$docroot/webGui/scripts/btrfs_balance status ".escapeshellarg("/mnt/$tag"), $balance_status, $retval)?>
|
||||
<?$usage = exec("/sbin/btrfs fi usage ".escapeshellarg("/mnt/$tag")." | grep -Pom1 '^Data,.+ \\(\\K[^%]+'");?>
|
||||
|
||||
_(btrfs filesystem usage)_:
|
||||
: <?echo "<pre>" . htmlspecialchars(shell_exec("/sbin/btrfs fi usage -T ".escapeshellarg("/mnt/$tag")), ENT_QUOTES, 'UTF-8') . "</pre>"; ?>
|
||||
: <pre><?= htmlspecialchars(shell_exec("/sbin/btrfs fi usage -T ".escapeshellarg("/mnt/$tag")) ?? '', ENT_QUOTES, 'UTF-8') ?></pre>
|
||||
|
||||
_(btrfs balance status)_:
|
||||
: <?echo "<pre id='btrfs-balance'>".implode("\n", $balance_status)."</pre>"?>
|
||||
: <pre id='btrfs-balance'><?= implode("\n", $balance_status) ?></pre>
|
||||
|
||||
<?if ($retval != 0):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_balance">
|
||||
@@ -947,6 +958,7 @@ _(btrfs balance status)_:
|
||||
<input type="hidden" name="#include" value="/webGui/include/update.btrfs.php">
|
||||
<input type="hidden" name="#job" value="balance_<?=$tag?>;<?=$docroot?>/plugins/dynamix/scripts/btrfs_balance start /mnt/<?=$tag?> -dusage=50">
|
||||
<input type="hidden" name="hour" value="">
|
||||
|
||||
_(Balance schedule)_:
|
||||
: <select name="mode" onchange="presetBTRFS(this.form,'#balance-hour')">
|
||||
<?for ($m=0; $m<count($mode); $m++):?>
|
||||
@@ -971,39 +983,51 @@ _(Day of the month)_:
|
||||
</select>
|
||||
|
||||
_(Time of the day)_:
|
||||
: <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">
|
||||
<?for ($d=0; $d<=55; $d+=5):?>
|
||||
<?=mk_option(_var($$balance,'min'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select> _(HH:MM)_</span>
|
||||
: <span id="balance-hour2" style="display:none"><select name="hour2">
|
||||
<?=mk_option(_var($$balance,'hour'), "*/1", _("Every hour"))?>
|
||||
<?=mk_option(_var($$balance,'hour'), "*/2", _("Every 2 hours"))?>
|
||||
<?=mk_option(_var($$balance,'hour'), "*/3", _("Every 3 hours"))?>
|
||||
<?=mk_option(_var($$balance,'hour'), "*/4", _("Every 4 hours"))?>
|
||||
<?=mk_option(_var($$balance,'hour'), "*/6", _("Every 6 hours"))?>
|
||||
<?=mk_option(_var($$balance,'hour'), "*/8", _("Every 8 hours"))?>
|
||||
</select></span>
|
||||
: <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">
|
||||
<?for ($d=0; $d<=55; $d+=5):?>
|
||||
<?=mk_option(_var($$balance,'min'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select>
|
||||
_(HH:MM)_
|
||||
</span>
|
||||
<span id="balance-hour2" style="display:none">
|
||||
<select name="hour2">
|
||||
<?=mk_option(_var($$balance,'hour'), "*/1", _("Every hour"))?>
|
||||
<?=mk_option(_var($$balance,'hour'), "*/2", _("Every 2 hours"))?>
|
||||
<?=mk_option(_var($$balance,'hour'), "*/3", _("Every 3 hours"))?>
|
||||
<?=mk_option(_var($$balance,'hour'), "*/4", _("Every 4 hours"))?>
|
||||
<?=mk_option(_var($$balance,'hour'), "*/6", _("Every 6 hours"))?>
|
||||
<?=mk_option(_var($$balance,'hour'), "*/8", _("Every 8 hours"))?>
|
||||
</select>
|
||||
</span>
|
||||
|
||||
_(Block group usage)_ (%):
|
||||
: <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()">
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" name="#apply" value="_(Apply)_">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-paint-brush"></i>_(Scrub Status)_</span></div>
|
||||
<div class="title nocontrol">
|
||||
<span class="left">
|
||||
<i class="title fa fa-paint-brush"></i>_(Scrub Status)_
|
||||
</span>
|
||||
</div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'btrfs-scrub-<?=$tag?>','/mnt/<?=$tag?>')">
|
||||
<?if (_var($disk,'fsStatus')=="Mounted"):?>
|
||||
<?exec("$docroot/webGui/scripts/btrfs_scrub status ".escapeshellarg("/mnt/$tag"), $scrub_status, $retval)?>
|
||||
|
||||
_(btrfs scrub status)_:
|
||||
: <?echo "<pre id='btrfs-scrub'>".implode("\n", $scrub_status)."</pre>"?>
|
||||
: <pre id='btrfs-scrub'><?=implode("\n", $scrub_status)?></pre>
|
||||
|
||||
<?if ($retval != 0):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_scrub">
|
||||
@@ -1012,7 +1036,9 @@ _(btrfs scrub status)_:
|
||||
<input type="hidden" name="#arg[3]" value="">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Scrub)_">
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" value="_(Scrub)_">
|
||||
</span>
|
||||
|
||||
:info_btrfs_scrub_help:
|
||||
|
||||
@@ -1022,7 +1048,9 @@ _(btrfs scrub status)_:
|
||||
<input type="hidden" name="#arg[2]" value="/mnt/<?=$tag?>">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Cancel)_"> *_(Running)_*
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" value="_(Cancel)_"> *_(Running)_*
|
||||
</span>
|
||||
|
||||
:info_scrub_cancel_help:
|
||||
|
||||
@@ -1030,7 +1058,10 @@ _(btrfs scrub status)_:
|
||||
<?else:?>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Scrub)_" disabled><b>_(Scrub)_</b> _(is only available when the filesyestem is mounted)_
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Scrub)_" disabled>
|
||||
<span class="inline-block"><b>_(Scrub)_</b> _(is only available when the filesyestem is mounted)_</span>
|
||||
</span>
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
@@ -1067,36 +1098,48 @@ _(Day of the month)_:
|
||||
</select>
|
||||
|
||||
_(Time of the day)_:
|
||||
: <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">
|
||||
<?for ($d=0; $d<=55; $d+=5):?>
|
||||
<?=mk_option(_var($$scrub,'min'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select> _(HH:MM)_</span>
|
||||
: <span id="scrub-hour2" style="display:none"><select name="hour2">
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/1", _("Every hour"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/2", _("Every 2 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/3", _("Every 3 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/4", _("Every 4 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/6", _("Every 6 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/8", _("Every 8 hours"))?>
|
||||
</select></span>
|
||||
: <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">
|
||||
<?for ($d=0; $d<=55; $d+=5):?>
|
||||
<?=mk_option(_var($$scrub,'min'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select>
|
||||
_(HH:MM)_
|
||||
</span>
|
||||
<span id="scrub-hour2" style="display:none">
|
||||
<select name="hour2">
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/1", _("Every hour"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/2", _("Every 2 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/3", _("Every 3 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/4", _("Every 4 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/6", _("Every 6 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/8", _("Every 8 hours"))?>
|
||||
</select>
|
||||
</span>
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="_(Apply)_"><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" name="#apply" value="_(Apply)_">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-shield"></i>_(Check Filesystem Status)_</span></div>
|
||||
<div class="title nocontrol">
|
||||
<span class="left">
|
||||
<i class="title fa fa-shield"></i>_(Check Filesystem Status)_
|
||||
</span>
|
||||
</div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'btrfs-check-<?=$tag?>','/dev/<?=_var($disk,'deviceSb')?> <?=_var($disk,'id')?>')">
|
||||
<?if (maintenance_mode()):?>
|
||||
<?exec("$docroot/webGui/scripts/btrfs_check status /dev/"._var($disk,'deviceSb')." "._var($disk,'id'), $check_status, $retval)?>
|
||||
|
||||
_(btrfs check status)_:
|
||||
: <?echo "<pre id='btrfs-check'>".implode("\n", $check_status)."</pre>"?>
|
||||
: <pre id='btrfs-check'><?=implode("\n", $check_status)?></pre>
|
||||
|
||||
<?if ($retval == 0):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_check">
|
||||
@@ -1105,7 +1148,11 @@ _(btrfs check status)_:
|
||||
<input type="hidden" name="#arg[3]" value="<?=_var($disk,'id')?>">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Check)_"><input type="text" name="#arg[4]" maxlength="256" value="--readonly"> _(Options (see Help))_
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" value="_(Check)_">
|
||||
<input type="text" name="#arg[4]" maxlength="256" value="--readonly">
|
||||
<span>_(Options (see Help))_</span>
|
||||
</span>
|
||||
|
||||
:info_btrfs_check_help:
|
||||
|
||||
@@ -1133,7 +1180,11 @@ _(btrfs check status)_:
|
||||
</form>
|
||||
<?endif;?>
|
||||
<?if (fsType('zfs') && !isSubpool($name)):?>
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-hdd-o"></i>_(Pool Status)_</span></div>
|
||||
<div class="title nocontrol">
|
||||
<span class="left">
|
||||
<i class="title fa fa-hdd-o"></i>_(Pool Status)_
|
||||
</span>
|
||||
</div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'zfs-scrub-<?=$tag?>','<?=$tag?>')">
|
||||
<?if (_var($disk,'fsStatus')=="Mounted"):?>
|
||||
<?exec("$docroot/webGui/scripts/zfs_scrub status ".escapeshellarg($tag), $zfs_status, $retval); $zfs_status = implode("\n",$zfs_status)?>
|
||||
@@ -1148,10 +1199,12 @@ _(zfs pool status)_:
|
||||
<input type="hidden" name="#arg[2]" value="<?=$tag?>">
|
||||
|
||||
|
||||
: <input type="submit" id="zfs-button" value="<?=$zfs_cmd=='start' ? _('Scrub') : _('Clear')?>">
|
||||
<?if (! is_upgraded_ZFS_pool($name)):?>
|
||||
<input type="button" id="upgradeButton" value="_(Upgrade Pool)_" onclick="upgradeZpool()">
|
||||
<?endif;?>
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" id="zfs-button" value="<?=$zfs_cmd=='start' ? _('Scrub') : _('Clear')?>">
|
||||
<?if (! is_upgraded_ZFS_pool($name)):?>
|
||||
<input type="button" id="upgradeButton" value="_(Upgrade Pool)_" onclick="upgradeZpool()">
|
||||
<?endif;?>
|
||||
</span>
|
||||
|
||||
:info_zfs_scrub_help:
|
||||
|
||||
@@ -1169,11 +1222,20 @@ _(zfs pool status)_:
|
||||
<?else:?>
|
||||
|
||||
|
||||
: <input type="submit" value="_(Scrub)_" disabled><?=!$tag||$tag==prefix($tag) ? "<b>"._('Scrub')."</b> "._('is only available when the filesyestem is mounted') : sprintf(_('See %s Settings'),ucfirst(prefix($tag)))?>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Scrub)_" disabled>
|
||||
<span class="inline-block">
|
||||
<?=!$tag||$tag==prefix($tag) ? "<b>"._('Scrub')."</b> "._('is only available when the filesyestem is mounted') : sprintf(_('See %s Settings'),ucfirst(prefix($tag)))?>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<?endif;?>
|
||||
<?if (_var($disk,'fsStatus')=="Mounted"):?>
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-info"></i>_(Pool Information)_</span></div>
|
||||
<div class="title nocontrol">
|
||||
<span class="left">
|
||||
<i class="title fa fa-info"></i>_(Pool Information)_
|
||||
</span>
|
||||
</div>
|
||||
<?exec("/usr/sbin/zpool list -v ".escapeshellarg($tag), $zfs_info_status, $info_retval); $zfs_info_status = implode("\n",$zfs_info_status)?>
|
||||
|
||||
_(zfs pool information)_:
|
||||
@@ -1183,7 +1245,11 @@ _(zfs pool information)_:
|
||||
</form>
|
||||
<hr>
|
||||
<?$scrub = str_replace('-','_',"scrub_$tag")?>
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-paint-brush"></i>_(Scrub Schedule)_</span></div>
|
||||
<div class="title nocontrol">
|
||||
<span class="left">
|
||||
<i class="title fa fa-paint-brush"></i>_(Scrub Schedule)_
|
||||
</span>
|
||||
</div>
|
||||
<form markdown="1" name="scrub_schedule" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareZFS(this)">
|
||||
<input type="hidden" name="#file" value="dynamix/dynamix.cfg">
|
||||
<input type="hidden" name="#section" value="<?=$scrub?>">
|
||||
@@ -1215,37 +1281,49 @@ _(Day of the month)_:
|
||||
</select>
|
||||
|
||||
_(Time of the day)_:
|
||||
: <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">
|
||||
<?for ($d=0; $d<=55; $d+=5):?>
|
||||
<?=mk_option(_var($$scrub,'min'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select> _(HH:MM)_</span>
|
||||
: <span id="scrub-hour2" style="display:none"><select name="hour2">
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/1", _("Every hour"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/2", _("Every 2 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/3", _("Every 3 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/4", _("Every 4 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/6", _("Every 6 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/8", _("Every 8 hours"))?>
|
||||
</select></span>
|
||||
: <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">
|
||||
<?for ($d=0; $d<=55; $d+=5):?>
|
||||
<?=mk_option(_var($$scrub,'min'), strval($d), sprintf("%02d", $d))?>
|
||||
<?endfor;?>
|
||||
</select>
|
||||
_(HH:MM)_
|
||||
</span>
|
||||
<span id="scrub-hour2" style="display:none">
|
||||
<select name="hour2">
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/1", _("Every hour"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/2", _("Every 2 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/3", _("Every 3 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/4", _("Every 4 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/6", _("Every 6 hours"))?>
|
||||
<?=mk_option(_var($$scrub,'hour'), "*/8", _("Every 8 hours"))?>
|
||||
</select>
|
||||
</span>
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="_(Apply)_"><input type="button" value="_(Done)_" onclick="done()">
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" name="#apply" value="_(Apply)_">
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
<?endif;?>
|
||||
<?if (fsType('reiserfs')):?>
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-shield"></i>_(Check Filesystem Status)_</span></div>
|
||||
<div class="title nocontrol">
|
||||
<span class="left">
|
||||
<i class="title fa fa-shield"></i>_(Check Filesystem Status)_
|
||||
</span>
|
||||
</div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'rfs-check-<?=$tag?>','/dev/<?=_var($disk,'deviceSb')?> <?=_var($disk,'id')?>')">
|
||||
<?if (maintenance_mode()):?>
|
||||
<?exec("$docroot/webGui/scripts/reiserfs_check status /dev/"._var($disk,'deviceSb')." "._var($disk,'id'), $check_status, $retval)?>
|
||||
|
||||
_(reiserfsck status)_:
|
||||
: <?echo "<pre id='rfs-check'>".implode("\n", $check_status)."</pre>"?>
|
||||
: <pre id='rfs-check'><?=implode("\n", $check_status)?></pre>
|
||||
|
||||
<?if ($retval != 0):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/reiserfs_check">
|
||||
@@ -1257,7 +1335,7 @@ _(reiserfsck status)_:
|
||||
: <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>_(Options (see Help))_</span>
|
||||
</span>
|
||||
|
||||
:info_reiserfs_check_help:
|
||||
@@ -1271,7 +1349,7 @@ _(reiserfsck status)_:
|
||||
|
||||
: <span class="inline-block">
|
||||
<input type="submit" value="_(Cancel)_">
|
||||
<span class="inline-block">*_(Running)_*</span>
|
||||
<span>*_(Running)_*</span>
|
||||
</span>
|
||||
|
||||
:info_reiserfs_cancel_help:
|
||||
@@ -1282,20 +1360,24 @@ _(reiserfsck status)_:
|
||||
|
||||
: <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>**_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
</span>
|
||||
|
||||
<?endif;?>
|
||||
</form>
|
||||
<?endif;?>
|
||||
<?if (fsType('xfs')):?>
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-shield"></i>_(Check Filesystem Status)_</span></div>
|
||||
<div class="title nocontrol">
|
||||
<span class="left">
|
||||
<i class="title fa fa-shield"></i>_(Check Filesystem Status)_
|
||||
</span>
|
||||
</div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareFS(this,'xfs-check-<?=$tag?>','/dev/<?=_var($disk,'deviceSb')?> <?=_var($disk,'id')?>')">
|
||||
<?if (maintenance_mode()):?>
|
||||
<?exec("$docroot/webGui/scripts/xfs_check status /dev/"._var($disk,'deviceSb')." "._var($disk,'id'), $check_status, $retval)?>
|
||||
|
||||
_(xfs_repair status)_:
|
||||
: <?echo "<pre id='xfs-check'>".implode("\n", $check_status)."</pre>"?>
|
||||
: <pre id='xfs-check'><?=implode("\n", $check_status)?></pre>
|
||||
|
||||
<?if ($retval == 0 || $retval == 8):?>
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/xfs_check">
|
||||
@@ -1305,7 +1387,10 @@ _(xfs_repair status)_:
|
||||
<input type="hidden" name="#arg[4]" value="-n">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Check)_"><?if ($retval == 0): ?> _(No file system corruption detected)_.<?endif; ?>
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" value="_(Check)_">
|
||||
<?if ($retval == 0): ?> _(No file system corruption detected)_.<?endif; ?>
|
||||
</span>
|
||||
|
||||
:info_xfs_check_help:
|
||||
|
||||
@@ -1317,7 +1402,10 @@ _(xfs_repair status)_:
|
||||
<input type="hidden" name="#arg[4]" value="-e">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Fix)_"><span style="color: red;">_(File system corruption detected)_.</span>
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" value="_(Fix)_">
|
||||
<span style="color: red;">_(File system corruption detected)_.</span>
|
||||
</span>
|
||||
|
||||
:info_xfs_check_help:
|
||||
|
||||
@@ -1329,7 +1417,10 @@ _(xfs_repair status)_:
|
||||
<input type="hidden" name="#arg[4]" value="-eL">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Zero Log)_"><span style="color: red;">_(Dirty log detected)_.</span>
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" value="_(Zero Log)_">
|
||||
<span style="color: red;">_(Dirty log detected)_.</span>
|
||||
</span>
|
||||
|
||||
<p>_(Note)_: _(While there is some risk, if it is not possible to first mount the filesystem to clear the log, zeroing it is the only option to try and repair the filesystem, and in most cases it results in little or no data loss)_.</p>
|
||||
|
||||
@@ -1343,7 +1434,10 @@ _(xfs_repair status)_:
|
||||
<input type="hidden" name="#arg[4]" value="-n">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Check)_">_(File system corruption fixed)_
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" value="_(Check)_">
|
||||
_(File system corruption fixed)_
|
||||
</span>
|
||||
|
||||
:info_xfs_check_help:
|
||||
|
||||
@@ -1353,7 +1447,10 @@ _(xfs_repair status)_:
|
||||
<input type="hidden" name="#arg[2]" value="/dev/<?=_var($disk,'deviceSb')?>">
|
||||
|
||||
|
||||
: <input type="submit" value="_(Cancel)_"> *_(Running)_*
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" value="_(Cancel)_">
|
||||
*_(Running)_*
|
||||
</span>
|
||||
|
||||
:info_xfs_cancel_help:
|
||||
|
||||
@@ -1363,7 +1460,7 @@ _(xfs_repair status)_:
|
||||
|
||||
: <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>**_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
|
||||
</span>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
@@ -299,7 +299,11 @@ _(Default critical SSD temperature threshold)_ (°<?=_var($display,'unit','C'
|
||||
</form>
|
||||
|
||||
<?if ($encrypt && $var['fsState']=='Started'):?>
|
||||
<div class="title"><span class="left"><i class="title fa fa-key"></i>_(Change encryption key)_</span></div>
|
||||
<div class="title">
|
||||
<span class="left">
|
||||
<i class="title fa fa-key"></i>_(Change encryption key)_
|
||||
</span>
|
||||
</div>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="return prepareForm(this)">
|
||||
<input type="hidden" name="#file" value="">
|
||||
<input type="hidden" name="#include" value="/webGui/include/update.encryption.php">
|
||||
@@ -315,7 +319,7 @@ _(Existing encryption key)_:
|
||||
: <select name="oldinput" class="lock" onchange='selectInput(this.value,true)' <?=$keyfile?'disabled':''?>>
|
||||
<?=mk_option(1,'text',_('Passphrase'))?>
|
||||
<?=mk_option(1,'file',_('Keyfile'),$keyfile ? 'selected' : '')?>
|
||||
</select><br>
|
||||
</select>
|
||||
|
||||
<?if (!$keyfile):?>
|
||||
<div markdown="1" id="oldtext">
|
||||
@@ -340,7 +344,7 @@ _(Change encryption key)_:
|
||||
: <select name="newinput" class="lock" onchange='selectInput(this.value,false)'>
|
||||
<?=mk_option(1,'text',_('Passphrase'))?>
|
||||
<?=mk_option(1,'file',_('Keyfile'))?>
|
||||
</select><br>
|
||||
</select>
|
||||
|
||||
<div markdown="1" id="newtext">
|
||||
_(Type new passphrase)_:
|
||||
@@ -369,7 +373,11 @@ _(Select new keyfile)_:
|
||||
</form>
|
||||
<?endif;?>
|
||||
|
||||
<div class="title"><span class="left"><i class="title fa fa-plus-square"></i>_(Global SMART Settings)_</span></div>
|
||||
<div class="title">
|
||||
<span class="left">
|
||||
<i class="title fa fa-plus-square"></i>_(Global SMART Settings)_
|
||||
</span>
|
||||
</div>
|
||||
<form markdown="1" name="smart_settings" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareDiskSettings(this)">
|
||||
<input type="hidden" name="#file" value="/boot/config/smart-all.cfg">
|
||||
<input type="hidden" name="#include" value="webGui/include/update.smart.php">
|
||||
@@ -429,7 +437,13 @@ _(Default SMART attribute notifications)_:
|
||||
|
||||
<?for ($x = 0; $x < count($preselect); $x++):?>
|
||||
|
||||
: <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>
|
||||
: <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:
|
||||
|
||||
@@ -174,6 +174,12 @@ _(Terminal font size)_:
|
||||
|
||||
:display_tty_size_help:
|
||||
|
||||
_(Show Terminal Button in header)_:
|
||||
: <select name="terminalButton">
|
||||
<?=mk_option($display['terminalButton'],"no",_("No"))?>
|
||||
<?=mk_option($display['terminalButton'],"yes",_("Yes"))?>
|
||||
</select>
|
||||
|
||||
_(Number format)_:
|
||||
: <select name="number">
|
||||
<?=mk_option($display['number'], ".,", _('[D] dot : [G] comma'))?>
|
||||
@@ -203,12 +209,6 @@ _(Page view)_:
|
||||
|
||||
:display_page_view_help:
|
||||
|
||||
_(Show Terminal Button in header)_:
|
||||
: <select name="terminalButton">
|
||||
<?=mk_option($display['terminalButton'],"no",_("No"))?>
|
||||
<?=mk_option($display['terminalButton'],"yes",_("Yes"))?>
|
||||
</select>
|
||||
|
||||
_(Placement of Users menu)_:
|
||||
: <select name="users">
|
||||
<?=mk_option($display['users'], "Tasks:3", _('Header menu'))?>
|
||||
|
||||
@@ -15,37 +15,39 @@ Cond="($var['shareSMBEnabled']=='ads')"
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
$adJoined = $var['joinStatus'] == "Joined";
|
||||
?>
|
||||
<form markdown="1" name="JoinOps" method="POST" action="/update.htm" target="progressFrame">
|
||||
_(AD join status)_:
|
||||
: <?=$var['joinStatus'];?>
|
||||
|
||||
_(AD domain name)_ (FQDN):
|
||||
: <input type="text" name="DOMAIN" maxlength="80" value="<?=htmlspecialchars($var['DOMAIN'])?>">
|
||||
: <input type="text" name="DOMAIN" maxlength="80" value="<?=htmlspecialchars(_var($var['DOMAIN']))?>">
|
||||
|
||||
_(AD short domain name)_:
|
||||
: <input type="text" name="DOMAIN_SHORT" maxlength="40" value="<?=htmlspecialchars($var['DOMAIN_SHORT'])?>">
|
||||
: <input type="text" name="DOMAIN_SHORT" maxlength="40" value="<?=htmlspecialchars(_var($var['DOMAIN_SHORT']))?>">
|
||||
|
||||
_(AD account login)_:
|
||||
: <input type="text" name="DOMAIN_LOGIN" maxlength="40" value="<?=htmlspecialchars($var['DOMAIN_LOGIN'])?>">
|
||||
: <input type="text" name="DOMAIN_LOGIN" maxlength="40" value="<?=htmlspecialchars(_var($var['DOMAIN_LOGIN']))?>">
|
||||
|
||||
_(AD account password)_:
|
||||
: <input type="password" name="DOMAIN_PASSWD" maxlength="40" value="<?=htmlspecialchars($var['DOMAIN_PASSWD'])?>">
|
||||
: <input type="password" name="DOMAIN_PASSWD" maxlength="40" value="<?=htmlspecialchars(_var($var['DOMAIN_PASSWD']))?>">
|
||||
|
||||
|
||||
: <?if ($var['joinStatus']=="Joined"):?>
|
||||
<input type="submit" name="cmdJoinDomain" value="_(Join)_" disabled><input type="submit" name="cmdLeaveDomain" value="_(Leave)_">
|
||||
<?else:?>
|
||||
<input type="submit" name="cmdJoinDomain" value="_(Join)_"><input type="submit" name="cmdLeaveDomain" value="_(Leave)_" disabled>
|
||||
<?endif;?>
|
||||
: <span class="inline-block">
|
||||
<input type="submit" name="cmdJoinDomain" value="_(Join)_" <?=$adJoined ? "disabled" : "";?>>
|
||||
<input type="submit" name="cmdLeaveDomain" value="_(Leave)_" <?=$adJoined ? "" : "disabled";?>>
|
||||
</span>
|
||||
</form>
|
||||
<br>
|
||||
|
||||
|
||||
<form markdown="1" name="shareOwnership" method="POST" action="/update.htm" target="progressFrame">
|
||||
_(AD initial owner)_:
|
||||
: <input type="text" name="shareInitialOwner" maxlength="40" value="<?=htmlspecialchars($var['shareInitialOwner'])?>">
|
||||
: <input type="text" name="shareInitialOwner" maxlength="40" value="<?=htmlspecialchars(_var($var['shareInitialOwner']))?>">
|
||||
|
||||
_(AD initial group)_:
|
||||
: <input type="text" name="shareInitialGroup" maxlength="40" value="<?=htmlspecialchars($var['shareInitialGroup'])?>">
|
||||
: <input type="text" name="shareInitialGroup" maxlength="40" value="<?=htmlspecialchars(_var($var['shareInitialGroup']))?>">
|
||||
|
||||
|
||||
: <span class="inline-block">
|
||||
|
||||
@@ -14,45 +14,53 @@ Cond="(($var['shareNFSEnabled']!='no') && (isset($name)?array_key_exists($name,$
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$width = [123,300];
|
||||
|
||||
$width = [123,300];
|
||||
/* Replace spaces in NFS rule with new lines for multi line textarea. */
|
||||
$sec_nfs[$name]['hostList'] = str_replace(" ", "\n", $sec_nfs[$name]['hostList']);
|
||||
|
||||
?>
|
||||
:nfs_security_help:
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readnfs" class="clone" onchange="toggleButton('readnfs',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readnfs" value="_(Read)_" class="clone" onclick="readNFS()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="nfs1" name="writenfs" multiple="multiple" style="display:none" onchange="toggleButton('writenfs',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writenfs" value="_(Write)_" class="clone" onclick="writeNFS()" disabled>
|
||||
<div markdown="1" class="relative">
|
||||
<div markdown="1" class="clone-settings clone-settings-less-padding shade">
|
||||
_(Read settings from)_ <i class="fa fa-arrow-left fa-fw"></i>
|
||||
: <span class="flex flex-row items-center gap-4">
|
||||
<select name="readnfs" onchange="toggleButton('readnfs',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<span class="buttons-spaced">
|
||||
<input type="button" id="readnfs" value="_(Read)_" class="clone" onclick="readNFS()" disabled>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
_(Write settings to)_ <i class="fa fa-arrow-right fa-fw"></i>
|
||||
: <span class="flex flex-row items-center gap-4">
|
||||
<select id="nfs1" name="writenfs" multiple onchange="toggleButton('writenfs',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select>
|
||||
<span class="buttons-spaced">
|
||||
<input type="button" id="writenfs" value="_(Write)_" class="clone" onclick="writeNFS()" disabled>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div markdown="1" class="shade">
|
||||
<form markdown="1" name="nfs_edit" method="POST" action="/update.htm" target="progressFrame" onchange="toggleButton('writenfs',true);$('#nfs1').dropdownchecklist('disable')">
|
||||
<input type="hidden" name="shareName" value="<?=htmlspecialchars($name)?>">
|
||||
|
||||
@@ -73,27 +81,30 @@ _(Security)_:
|
||||
</select>
|
||||
|
||||
|
||||
: <span class="inline-block">
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" name="changeShareSecurityNFS" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<?if ($sec_nfs[$name]['security']=='private'):?>
|
||||
<form id="nfsHostListForm" markdown="1" method="POST" name="otherForm" action="/update.htm" target="progressFrame">
|
||||
<form class="shade" id="nfsHostListForm" markdown="1" method="POST" name="otherForm" action="/update.htm" target="progressFrame">
|
||||
<input type="hidden" name="shareName" value="<?=htmlspecialchars($name)?>">
|
||||
|
||||
_(Rule)_:
|
||||
: <textarea name="shareHostListNFS" cols="40" rows="5" style="width:45%" placeholder="Example: *(rw,sec=sys,insecure,anongid=100,anonuid=99,no_root_squash,lock)"><?= htmlspecialchars($sec_nfs[$name]['hostList']) ?></textarea>
|
||||
|
||||
:nfs_security_rules_help:
|
||||
|
||||
|
||||
: <span class="inline-block">
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" name="changeShareAccessNFS" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
<?endif;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
@@ -24,35 +24,45 @@ uksort($users, 'strnatcmp');
|
||||
?>
|
||||
:smb_security_help:
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readsmb" class="clone" onchange="toggleButton('readsmb',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readsmb" value="_(Read)_" class="clone" onclick="readSMB()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="smb1" name="writesmb" multiple="multiple" style="display:none" onchange="toggleButton('writesmb',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writesmb" value="_(Write)_" class="clone" onclick="writeSMB()" disabled>
|
||||
<div markdown="1" class="clone-settings shade">
|
||||
_(Read settings from)_ <i class="fa fa-arrow-left fa-fw"></i>
|
||||
: <span class="flex flex-row items-center gap-4">
|
||||
<select name="readsmb" onchange="toggleButton('readsmb',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) echo mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<span class="buttons-spaced">
|
||||
<input type="button" id="readsmb" value="_(Read)_" class="clone" onclick="readSMB()" disabled>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
_(Write settings to)_ <i class="fa fa-arrow-right fa-fw"></i>
|
||||
: <span class="flex flex-row items-center gap-4">
|
||||
<select id="smb1" name="writesmb" multiple onchange="toggleButton('writesmb',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select>
|
||||
<span class="buttons-spaced">
|
||||
<input type="button" id="writesmb" value="_(Write)_" class="clone" onclick="writeSMB()" disabled>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div markdown="1" class="shade">
|
||||
<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')):?>
|
||||
@@ -85,7 +95,9 @@ _(Export)_:
|
||||
:smb_export_help:
|
||||
|
||||
_(Time Machine volume size limit)_:
|
||||
: <input type="text" name="shareVolsizelimit" maxlen="20" value="<?=$sec[$name]['volsizelimit']?>"> MB
|
||||
: <span class="inline-flex flex-row items-center gap-2">
|
||||
<input type="text" name="shareVolsizelimit" maxlen="20" value="<?=$sec[$name]['volsizelimit']?>"> MB
|
||||
</span>
|
||||
|
||||
:smb_time_machine_volume_help:
|
||||
|
||||
@@ -117,41 +129,59 @@ _(Security)_:
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?if ($sec[$name]['security']=='secure'):?>
|
||||
<div class="title nocontrol"><dt>_(SMB)_ _(User Access)_</dt><i>_(Guests have **read-only** access)_.</i></div>
|
||||
|
||||
<div class="title nocontrol">
|
||||
<span class="left">_(SMB)_ _(User Access)_</span>
|
||||
<span class="right">
|
||||
<i>_(Guests have **read-only** access)_.</i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
:smb_secure_access_help:
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readusersmb" class="clone" onchange="toggleButton('readusersmb',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') echo mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') echo mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readusersmb" value="_(Read)_" class="clone" onclick="readUserSMB()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="smb2" name="writeusersmb" multiple="multiple" style="display:none" onchange="toggleButton('writeusersmb',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') $rows[] = mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') $rows[] = mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writeusersmb" value="_(Write)_" class="clone" onclick="writeUserSMB()" disabled>
|
||||
<div markdown="1" class="relative">
|
||||
<div markdown="1" class="clone-settings clone-settings-less-padding shade">
|
||||
_(Read settings from)_ <i class="fa fa-arrow-left fa-fw"></i>
|
||||
: <span class="flex flex-row items-center gap-4">
|
||||
<select name="readusersmb" onchange="toggleButton('readusersmb',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') echo mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') echo mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<span class="buttons-spaced">
|
||||
<input type="button" id="readusersmb" value="_(Read)_" class="clone" onclick="readUserSMB()" disabled>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
_(Write settings to)_ <i class="fa fa-arrow-right fa-fw"></i>
|
||||
: <span class="flex flex-row items-center gap-4">
|
||||
<select id="smb2" name="writeusersmb" multiple onchange="toggleButton('writeusersmb',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') $rows[] = mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='secure') $rows[] = mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select>
|
||||
<span class="buttons-spaced">
|
||||
<input type="button" id="writeusersmb" value="_(Write)_" class="clone" onclick="writeUserSMB()" disabled>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div markdown="1" class="shade">
|
||||
<form markdown="1" name="smb_user_edit" method="POST" action="/update.htm" target="progressFrame" onchange="toggleButton('writeusersmb',true);$('#smb2').dropdownchecklist('disable')">
|
||||
<input type="hidden" name="shareName" value="<?=htmlspecialchars($name)?>">
|
||||
<?input_secure_users($sec)?>
|
||||
@@ -162,52 +192,72 @@ foreach ($rows as $row) echo $row;
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?elseif ($sec[$name]['security']=='private'):?>
|
||||
<div class="title nocontrol"><dt>_(SMB)_ _(User Access)_</dt><i>_(Guests have **no** access)_.</i></div>
|
||||
<div class="title nocontrol">
|
||||
<span class="left">_(SMB)_ _(User Access)_</span>
|
||||
<span class="right">
|
||||
<i>_(Guests have **no** access)_.</i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
:smb_private_access_help:
|
||||
|
||||
<div class="clone1">
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readusersmb" class="clone" onchange="toggleButton('readusersmb',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') echo mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') echo mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
?>
|
||||
</select></span><input type="button" id="readusersmb" value="_(Read)_" class="clone" onclick="readUserSMB()" disabled>
|
||||
</div>
|
||||
<div class="clone2">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="smb2" name="writeusersmb" multiple="multiple" style="display:none" onchange="toggleButton('writeusersmb',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') $rows[] = mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') $rows[] = mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writeusersmb" value="_(Write)_" class="clone" onclick="writeUserSMB()" disabled>
|
||||
<div markdown="1" class="relative">
|
||||
<div markdown="1" class="clone-settings clone-settings-less-padding shade">
|
||||
_(Read settings from)_ <i class="fa fa-arrow-left fa-fw"></i>
|
||||
: <span class="flex flex-row items-center gap-4">
|
||||
<select name="readusersmb" onchange="toggleButton('readusersmb',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') echo mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') echo mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<span class="buttons-spaced">
|
||||
<input type="button" id="readusersmb" value="_(Read)_" class="clone" onclick="readUserSMB()" disabled>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
_(Write settings to)_ <i class="fa fa-arrow-right fa-fw"></i>
|
||||
: <span class="flex flex-row items-center gap-4">
|
||||
<select id="smb2" name="writeusersmb" multiple onchange="toggleButton('writeusersmb',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
if (isset($disks[$name])) {
|
||||
foreach (array_filter($disks,'clone_list') as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') $rows[] = mk_option("", $list['name'], _(my_disk($list['name']),3));
|
||||
} else {
|
||||
foreach ($shares as $list) if ($list['name']!=$name && $sec[$list['name']]['security']=='private') $rows[] = mk_option("", $list['name'], compress($list['name']));
|
||||
}
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select>
|
||||
<span class="buttons-spaced">
|
||||
<input type="button" id="writeusersmb" value="_(Write)_" class="clone" onclick="writeUserSMB()" disabled>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div markdown="1" class="shade">
|
||||
<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)?>
|
||||
|
||||
|
||||
: <span class="inline-block">
|
||||
: <span class="buttons-spaced">
|
||||
<input type="submit" name="changeShareAccess" value="_(Apply)_" disabled>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?endif;?>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -11,8 +11,6 @@ Type="xmenu"
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
if ($name) {
|
||||
$refs = []; $n = $i = 0;
|
||||
// Natural sorting of share names
|
||||
@@ -49,14 +47,20 @@ function toggleButton(button,id) {
|
||||
}
|
||||
|
||||
<?if ($name):?>
|
||||
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>';
|
||||
const prevNextButtons = `
|
||||
<div class="buttons-spaced flex-shrink-0">
|
||||
<a class="button" href="/Shares/Share?name=<?=$prev?>" title="_(previous user share)_">
|
||||
<i class="fa fa-chevron-left fa-fw"></i>
|
||||
</a>
|
||||
<a class="button" href="/Shares/Share?name=<?=$next?>" title="_(next user share)_">
|
||||
<i class="fa fa-chevron-right fa-fw"></i>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
$(function() {
|
||||
<?if ($tabbed):?>
|
||||
$('.tabs').append(ctrl);
|
||||
<?else:?>
|
||||
$('div[class=title]:first .right').append(ctrl);
|
||||
<?endif;?>
|
||||
const target = <?= $tabbed ? '".tabs"' : '".title:first .right"' ?>;
|
||||
$(target).append(prevNextButtons);
|
||||
});
|
||||
<?endif;?>
|
||||
</script>
|
||||
|
||||
@@ -13,8 +13,7 @@ Tag="share-alt-square"
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
|
||||
if (!empty($name) && !array_key_exists($name, $shares)) {
|
||||
echo "<script>done()</script>";
|
||||
exit;
|
||||
@@ -326,37 +325,16 @@ function direction() {
|
||||
|
||||
/* global shares include/exclude. */
|
||||
$myDisks = array_filter(array_diff(array_keys(array_filter($disks,'my_disks')), explode(',',$var['shareUserExclude'])), 'globalInclude');
|
||||
|
||||
$filteredShares = array_filter($shares, function($list) use ($name) {
|
||||
return $list['name'] != $name || !$name;
|
||||
});
|
||||
?>
|
||||
:share_edit_global1_help:
|
||||
<?if ($name):?>
|
||||
:share_edit_global2_help:
|
||||
<?endif;?>
|
||||
|
||||
<br>
|
||||
<div class="clone1">
|
||||
<span class="clone">_(Read settings from)_</span><i class="fa fa-arrow-left fa-fw"></i>
|
||||
<span class="wrap"><select name="readshare" class="clone" onchange="toggleButton('readshare',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<?
|
||||
foreach ($shares as $list) if ($list['name']!=$name || !$name) echo mk_option("", $list['name'], compress($list['name']));
|
||||
?>
|
||||
</select></span><input type="button" id="readshare" value="_(Read)_" class="clone" onclick="readShare()" disabled>
|
||||
</div>
|
||||
|
||||
<?if ($name):?>
|
||||
<div class="clone2">
|
||||
<span class="clone">_(Write settings to)_</span><i class="fa fa-arrow-right fa-fw"></i>
|
||||
<span class="wrap"><select id="s5" name="writeshare" multiple onchange="toggleButton('writeshare',this.id)">
|
||||
<?
|
||||
$rows = [];
|
||||
foreach ($shares as $list) if ($list['name']!=$name) $rows[] = mk_option("", $list['name'], compress($list['name']));
|
||||
if ($rows) echo "<option>("._('All').")</option>";
|
||||
foreach ($rows as $row) echo $row;
|
||||
?>
|
||||
</select></span><input type="button" id="writeshare" value="_(Write)_" class="clone" onclick="writeShare()" disabled>
|
||||
</div>
|
||||
<?endif;?>
|
||||
|
||||
<form markdown="1" name="share_edit" method="POST" action="/update.htm" target="progressFrame" onsubmit="return prepareEdit()"<?=$name?" onchange=\"toggleButton('writeshare',true);$('#s5').dropdownchecklist('disable')\">":">"?>
|
||||
<input type="hidden" name="shareNameOrig" value="<?=htmlspecialchars($share['nameOrig'])?>">
|
||||
<input type="hidden" name="shareUseCache" value="<?=$share['useCache']?>">
|
||||
@@ -366,6 +344,40 @@ foreach ($rows as $row) echo $row;
|
||||
<input type="hidden" name="shareInclude" value="">
|
||||
<input type="hidden" name="shareExclude" value="">
|
||||
|
||||
<?if (!empty($filteredShares)):?>
|
||||
<div markdown="1" class="clone-settings shade">
|
||||
_(Read settings from)_ <i class="fa fa-arrow-left fa-fw"></i>
|
||||
: <span class="flex flex-row items-center gap-4">
|
||||
<select name="readshare" onchange="toggleButton('readshare',false)">
|
||||
<option disabled selected>_(select)_...</option>
|
||||
<? foreach ($filteredShares as $list):?>
|
||||
<?=mk_option("", $list['name'], compress($list['name']))?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
<span class="buttons-spaced">
|
||||
<input type="button" id="readshare" value="_(Read)_" class="clone" onclick="readShare()" disabled>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<?if ($name):?>
|
||||
_(Write settings to)_ <i class="fa fa-arrow-right fa-fw"></i>
|
||||
: <span class="flex flex-row items-center gap-4">
|
||||
<select id="s5" name="writeshare" multiple onchange="toggleButton('writeshare',this.id)">
|
||||
<?if (!empty($filteredShares)):?>
|
||||
<option>(<?=_('All')?>)</option>
|
||||
<?endif;?>
|
||||
<? foreach ($filteredShares as $list):?>
|
||||
<?=mk_option("", $list['name'], compress($list['name']))?>
|
||||
<?endforeach;?>
|
||||
</select>
|
||||
<span class="buttons-spaced">
|
||||
<input type="button" id="writeshare" value="_(Write)_" class="clone" onclick="writeShare()" disabled>
|
||||
</span>
|
||||
</span>
|
||||
<?endif; // $name ?>
|
||||
</div>
|
||||
<?endif; // $filteredShares ?>
|
||||
|
||||
<div markdown="1" class="shade">
|
||||
_(Share name)_:
|
||||
: <input type="text" id="shareName" name="shareName" maxlength="40" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars($name)?>" oninput="checkName(this.value)" title="_(Hidden share names are not allowed)_" pattern="^[^\.].*"><span id="zfs-name" class="orange-text"><i class="fa fa-warning"></i> _(Share name contains invalid characters for ZFS use)_</span>
|
||||
@@ -376,21 +388,20 @@ _(Comments)_:
|
||||
: <input type="text" name="shareComment" maxlength="256" autocomplete="off" spellcheck="false" value="<?=htmlspecialchars($share['comment'])?>">
|
||||
|
||||
:share_edit_comments_help:
|
||||
</div>
|
||||
|
||||
<div markdown="1">
|
||||
<div markdown="1" class="shade">
|
||||
_(Minimum free space)_:
|
||||
: <span class="input"><input type="text" name="shareFloor" maxlength="16" autocomplete="off" spellcheck="false" class="wide" value="<?=presetSpace($share['floor'])?>" placeholder="_(Free Space will be calculated)_">
|
||||
: <input type="text" name="shareFloor" maxlength="16" autocomplete="off" spellcheck="false" class="wide" value="<?=presetSpace($share['floor'])?>" placeholder="_(Free Space will be calculated)_">
|
||||
|
||||
:share_edit_free_space_help:
|
||||
|
||||
</div>
|
||||
<?if ($name):?>
|
||||
<div markdown="1" class="empty">
|
||||
_(Share status)_:
|
||||
: _(Share is empty)_
|
||||
|
||||
:share_edit_status_help:
|
||||
|
||||
</div>
|
||||
|
||||
<div markdown="1" class="full">
|
||||
@@ -398,7 +409,6 @@ _(Share status)_:
|
||||
: <span class="full1"> </span><span class="full2">_(Share contains data)_</span>
|
||||
|
||||
:share_edit_delete_help:
|
||||
|
||||
</div>
|
||||
|
||||
<?if (_var($share,'exclusive')=="yes"):?>
|
||||
@@ -574,8 +584,11 @@ _(Mover action)_:
|
||||
</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>
|
||||
: <span class="inline-block">
|
||||
<label id="deleteLabel" title="" class="inline-flex flex-row items-center justify-end gap-2">
|
||||
_(Delete)_
|
||||
<input type="checkbox" name="confirmDelete" onchange="chkDelete(this.form, document.getElementById('cmdEditShare'));" title="" disabled>
|
||||
</label>
|
||||
: <span class="inline-flex flex-row items-center gap-2">
|
||||
<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>
|
||||
|
||||
@@ -30,7 +30,7 @@ function newTerminalOpen() {
|
||||
var referer = '<?= htmlspecialchars($_SERVER['HTTP_REFERER'] ?? '', ENT_QUOTES) ?>';
|
||||
setTimeout(function(){
|
||||
// Only redirect to same origin or fallback to home
|
||||
if (referer && referer.indexOf(window.location.origin) === 0 && basename(referer) != "Terminal") {
|
||||
if (referer && referer.indexOf(window.location.origin) === 0 && basename(referer.split('?')[0].replace(/\/$/, '')) != "Terminal") {
|
||||
window.location.href = referer;
|
||||
} else {
|
||||
window.location.href = '/';
|
||||
|
||||
@@ -17,7 +17,7 @@ banner=""
|
||||
header=""
|
||||
background=""
|
||||
tabs="1"
|
||||
terminalButton="no"
|
||||
terminalButton="yes"
|
||||
users="Tasks:3"
|
||||
usage="0"
|
||||
text="1"
|
||||
|
||||
@@ -27,8 +27,8 @@ function processTitle($rawTitle) {
|
||||
'/\$([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];
|
||||
htmlspecialchars((string)$GLOBALS[$matches[1]]) :
|
||||
'$'.$matches[1];
|
||||
},
|
||||
$title
|
||||
);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Accessible, modern, and decoupled from non-tabbed logic.
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="displaybox">
|
||||
<nav class="tabs" role="tablist" aria-label="Page Tabs">
|
||||
<div class="tabs-container">
|
||||
@@ -26,10 +27,24 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<? $i = 0; ?>
|
||||
<?
|
||||
$i = 0;
|
||||
$skipIndexIncrement = false; // used if the page has no title but has text
|
||||
?>
|
||||
<? foreach ($pages as $page): ?>
|
||||
<?
|
||||
if (!isset($page['Title'])) {
|
||||
/**
|
||||
* If the page has no title but has text, we need to eval the content to ensure the page is "rendered".
|
||||
* For instance Share.page is a parent page that has no title but has text aka content.
|
||||
* The content consists of some PHP and JS code that needs to be evaluated to ensure it's rendered.
|
||||
* We'll use the $skipIndexIncrement to skip the index increment. To ensure the tabs are properly rendered.
|
||||
*/
|
||||
if (isset($page['text'])) {
|
||||
$skipIndexIncrement = true;
|
||||
annotate($page['file']);
|
||||
eval('?>'.generateContent($page));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
$title = processTitle($page['Title']);
|
||||
@@ -47,7 +62,13 @@
|
||||
|
||||
<? eval('?>'.generateContent($page)); ?>
|
||||
</section>
|
||||
<? $i++; ?>
|
||||
<?
|
||||
if ($skipIndexIncrement) {
|
||||
$skipIndexIncrement = false;
|
||||
} else {
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<? endforeach; ?>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -8,10 +8,6 @@ span.blue {
|
||||
span.green {
|
||||
color: var(--green-800);
|
||||
}
|
||||
span.vshift {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
/* Input styles */
|
||||
input.gap {
|
||||
margin-right: 6px;
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
div.clone1 {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
margin-top: 0;
|
||||
}
|
||||
div.clone2 {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
margin-top: 48px;
|
||||
}
|
||||
span.input {
|
||||
display: inline-block;
|
||||
width: 330px;
|
||||
}
|
||||
input.clone {
|
||||
margin-left: 8px;
|
||||
margin-right: 0;
|
||||
}
|
||||
span.clone {
|
||||
margin-right: 4px;
|
||||
}
|
||||
span.wrap {
|
||||
display: inline-block;
|
||||
width: 128px;
|
||||
}
|
||||
select.clone {
|
||||
min-width: 123px;
|
||||
max-width: 123px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
|
||||
.Theme--sidebar {
|
||||
span.wrap {
|
||||
width: 150px;
|
||||
}
|
||||
select.clone {
|
||||
min-width: 145px;
|
||||
max-width: 145px;
|
||||
}
|
||||
}
|
||||
@@ -504,9 +504,6 @@ div.title {
|
||||
div.title span img {
|
||||
padding-right: 4px;
|
||||
}
|
||||
div.title.shift {
|
||||
margin-top: -30px;
|
||||
}
|
||||
#menu {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
@@ -554,7 +551,6 @@ div.title.shift {
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.nav-tile.right {
|
||||
text-align: right;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
@@ -1170,17 +1166,6 @@ span.status {
|
||||
display: inline-block;
|
||||
margin-left: auto;
|
||||
}
|
||||
span.status.vhshift {
|
||||
margin-top: 0;
|
||||
/* leaving for reference, but should likely not be needed anymore */
|
||||
/* margin-right: -9px; */
|
||||
}
|
||||
span.status.vshift {
|
||||
margin-top: -16px;
|
||||
}
|
||||
span.status.hshift {
|
||||
margin-right: -20px;
|
||||
}
|
||||
span.diskinfo {
|
||||
float: left;
|
||||
clear: both;
|
||||
@@ -1305,19 +1290,19 @@ a.list {
|
||||
}
|
||||
}
|
||||
}
|
||||
.tabs,
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: .5rem;
|
||||
}
|
||||
|
||||
.tabs-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.tabs-container {
|
||||
overflow-x: auto;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -1373,6 +1358,13 @@ a.list {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
/* Remove padding for forms inside TableContainer elements */
|
||||
.TableContainer form:first-of-type,
|
||||
.TableContainer--widest form:first-of-type,
|
||||
.TableContainer--no-min-width form:first-of-type {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.shade form {
|
||||
padding-top: 0;
|
||||
}
|
||||
@@ -1754,12 +1746,23 @@ span#wlan0 {
|
||||
|
||||
.shade {
|
||||
margin-top: 1rem;
|
||||
padding: 1rem 0;
|
||||
padding: 1rem;
|
||||
background-color: var(--shade-bg-color);
|
||||
border-radius: .25rem;
|
||||
}
|
||||
|
||||
@media (min-width: 769px) {
|
||||
.shade {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* TailwindCSS inspired utility classes */
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.font-mono {
|
||||
font-family: bitstream, monospace;
|
||||
}
|
||||
@@ -1966,6 +1969,35 @@ span#wlan0 {
|
||||
.scrollbar-thin {
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
@media (min-width: 1330px) {
|
||||
.clone-settings {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 40rem;
|
||||
margin: 0;
|
||||
padding: 3rem 1rem 0 0;
|
||||
background-color: transparent;
|
||||
|
||||
dl {
|
||||
align-items: center;
|
||||
gap: 1.5rem 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.clone-settings-less-padding {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* plugin overrides */
|
||||
/* fix UD title margin-top from overlapping tabs */
|
||||
div.title.ud,
|
||||
div#title.ud {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* Using CSS Nesting, to narrow down the scope of the styles to the .Theme--sidebar class.
|
||||
* This allows us to have default-azure & default-gray set css variables
|
||||
@@ -2373,9 +2405,6 @@ span#wlan0 {
|
||||
div.title:first-of-type {
|
||||
margin-top: 0;
|
||||
}
|
||||
div.title.shift {
|
||||
margin-top: -12px;
|
||||
}
|
||||
|
||||
.usage-bar {
|
||||
position: relative;
|
||||
|
||||
@@ -1585,12 +1585,27 @@ div.icon-zip {
|
||||
outline: none;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
padding: 1px 0;
|
||||
}
|
||||
|
||||
.ui-dropdownchecklist-selector-wrapper {
|
||||
vertical-align: middle;
|
||||
font-size: 0;
|
||||
width: 100%;
|
||||
|
||||
/**
|
||||
* override the defined with set by the jquery library
|
||||
*
|
||||
* @note - commented out b/c it causes overflow issues if too many items are selected
|
||||
*/
|
||||
/* .ui-dropdownchecklist-selector {
|
||||
width: 100% !important;
|
||||
} */
|
||||
|
||||
.ui-dropdownchecklist-text {
|
||||
padding-left: .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ui-dropdownchecklist-dropcontainer {
|
||||
|
||||
Reference in New Issue
Block a user