mirror of
https://github.com/unraid/webgui.git
synced 2026-04-29 06:19:30 -05:00
Add zfs pool information and deal with html special characters.
This commit is contained in:
@@ -761,7 +761,7 @@ _(Critical disk utilization threshold)_ (%):
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||||
|
||||
_(pool device stats)_:
|
||||
: <?echo "<pre>".shell_exec("/sbin/btrfs dev stats -T /mnt/$tag")."</pre>"?>
|
||||
: <?echo "<pre>" . htmlspecialchars(shell_exec("/sbin/btrfs dev stats -T /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">
|
||||
@@ -779,7 +779,7 @@ _(pool device stats)_:
|
||||
<?$usage = exec("/sbin/btrfs fi usage /mnt/$tag|grep -Pom1 '^Data,.+ \\(\\K[^%]+'");?>
|
||||
|
||||
_(btrfs filesystem usage)_:
|
||||
: <?echo "<pre>".shell_exec("/sbin/btrfs fi usage -T /mnt/$tag")."</pre>"?>
|
||||
: <?echo "<pre>" . htmlspecialchars(shell_exec("/sbin/btrfs fi usage -T /mnt/$tag"), ENT_QUOTES, 'UTF-8') . "</pre>"; ?>
|
||||
|
||||
_(btrfs balance status)_:
|
||||
: <?echo "<pre id='btrfs-balance'>".implode("\n", $balance_status)."</pre>"?>
|
||||
@@ -934,6 +934,7 @@ _(btrfs scrub status)_:
|
||||
<input type="hidden" name="#include" value="/webGui/include/update.btrfs.php">
|
||||
<input type="hidden" name="#job" value="scrub_<?=$tag?>;<?=$docroot?>/plugins/dynamix/scripts/btrfs_scrub start /mnt/<?=$tag?> -r">
|
||||
<input type="hidden" name="hour" value="">
|
||||
|
||||
_(Scrub schedule)_:
|
||||
: <select name="mode" onchange="presetBTRFS(this.form,'#scrub-hour')">
|
||||
<?for ($m=0; $m<count($mode); $m++):?>
|
||||
@@ -1021,7 +1022,7 @@ _(btrfs check status)_:
|
||||
</form>
|
||||
<?endif;?>
|
||||
<?if (fsType('zfs') && !isSubpool($name)):?>
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-info"></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 $tag", $zfs_status, $retval); $zfs_status = implode("\n",$zfs_status)?>
|
||||
@@ -1057,15 +1058,23 @@ _(zfs pool status)_:
|
||||
: <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)))?>
|
||||
|
||||
<?endif;?>
|
||||
<div class="title nocontrol"><span class="left"><i class="title fa fa-info"></i>_(Pool Information)_</span></div>
|
||||
<?exec("/usr/sbin/zpool list -v $tag", $zfs_info_status, $info_retval); $zfs_info_status = implode("\n",$zfs_info_status)?>
|
||||
|
||||
_(zfs pool information)_:
|
||||
: <pre id='zfs-info'><?=$zfs_info_status?></pre>
|
||||
|
||||
</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>
|
||||
<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?>">
|
||||
<input type="hidden" name="#include" value="/webGui/include/update.zfs.php">
|
||||
<input type="hidden" name="#job" value="scrub_<?=$tag?>;<?=$docroot?>/plugins/dynamix/scripts/zfs_scrub start <?=$tag?>">
|
||||
<input type="hidden" name="hour" value="">
|
||||
|
||||
_(Scrub schedule)_:
|
||||
: <select name="mode" onchange="presetZFS(this.form,'#scrub-hour')">
|
||||
<?for ($m=0; $m<count($mode); $m++):?>
|
||||
|
||||
Reference in New Issue
Block a user