mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 02:58:57 -05:00
Add configurable display of WWN in device ID
This commit is contained in:
@@ -54,6 +54,12 @@ function my_disk($name) {
|
||||
function my_disks($disk) {
|
||||
return strpos($disk['status'],'_NP')===false;
|
||||
}
|
||||
function my_id($id) {
|
||||
global $display;
|
||||
$len = strlen($id);
|
||||
$wwn = substr($id,-18);
|
||||
return ($display['wwn'] || substr($wwn,0,2)!='_3' || preg_match('/.[_-]/',$wwn)) ? $id : substr($id,0,$len-18);
|
||||
}
|
||||
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