Fixes for ZFS subpools

ZFS subpools have a tilde in their name, which is an illegal character in PHP keys and HTML ids. A tilde is automatically replaced to avoid conflicts.

The MAIN page shows the total of a ZFS pool at end, also when subpools are part of it.
This commit is contained in:
bergware
2023-11-01 18:18:22 +01:00
parent 019a3028d6
commit f03d8a0090
9 changed files with 71 additions and 53 deletions
@@ -63,6 +63,9 @@ function my_disks($disk) {
function my_hyperlink($text, $link) {
return str_replace(['[',']'],["<a href=\"$link\">","</a>"],$text);
}
function no_tilde($name) {
return str_replace('~','_-_',$name);
}
function prefix($key) {
return preg_replace('/\d+$/','',$key);
}