mirror of
https://github.com/unraid/webgui.git
synced 2026-03-06 00:18:57 -06:00
Merge pull request #54 from bergware/master
Suppress non-present disks in disk include/exclude list
This commit is contained in:
@@ -47,6 +47,7 @@ function globalInclude($name) {
|
||||
}
|
||||
|
||||
// global shares include/exclude
|
||||
$disks = array_filter($disks,'my_disks');
|
||||
$myDisks = array_filter(array_diff(array_keys($disks), explode(',',$var['shareUserExclude'])), 'globalInclude');
|
||||
?>
|
||||
|
||||
|
||||
@@ -16,7 +16,10 @@ Icon="share-settings.png"
|
||||
*/
|
||||
?>
|
||||
|
||||
<? $disabled = $var['fsState']!='Stopped' ? 'disabled' : ''; ?>
|
||||
<?
|
||||
$disabled = $var['fsState']!='Stopped' ? 'disabled' : '';
|
||||
$disks = array_filter($disks,'my_disks');
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
@@ -55,6 +55,9 @@ function my_temp($value) {
|
||||
function my_disk($name) {
|
||||
return ucfirst(preg_replace(array('/^(parity|disk|cache)([0-9]+)/','/^parity,cache,disk/'),array('$1 $2','Parity, Cache, Disk '),$name));
|
||||
}
|
||||
function my_disks($disk) {
|
||||
return strpos($disk['status'],'_NP')===false;
|
||||
}
|
||||
function my_word($num) {
|
||||
$words = array('zero','one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen','twenty');
|
||||
return $num<count($words) ? $words[$num] : $num;
|
||||
|
||||
Reference in New Issue
Block a user