mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 18:48:49 -05:00
Code optimization for my_disk function
This commit is contained in:
@@ -49,7 +49,7 @@ function my_temp($value) {
|
||||
return is_numeric($value) ? (($unit=='C' ? str_replace('.', $number[0], $value) : round(9/5*$value+32))." $unit") : $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));
|
||||
return ucfirst(preg_replace('/(\d+)/',' $1',$name));
|
||||
}
|
||||
function my_disks($disk) {
|
||||
return strpos($disk['status'],'_NP')===false;
|
||||
|
||||
Reference in New Issue
Block a user