diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php index 93d98dac2..314901baa 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php @@ -1801,7 +1801,7 @@ } function domain_define($xml, $autostart=false) { - if (strpos($xml,'')) { + if (strpos($xml,'') || strpos($xml,'')) { $tmp = explode("\n", $xml); for ($i = 0; $i < sizeof($tmp); $i++) if (strpos('.'.$tmp[$i], "", 0) ; + if ($x === false) return null ; + $y = strpos($xml,"", 0) ; + $z=$y ; + while ($y!=false) { + $y = strpos($xml,"", $z +16) ; + if ($y != false) $z =$y ; + } + return substr($xml,$x, ($z + 16) -$x) ; + } + function getchannels($res) { global $lv ; $xml = $lv->domain_get_xml($res) ; diff --git a/emhttp/plugins/dynamix/DeviceInfo.page b/emhttp/plugins/dynamix/DeviceInfo.page index 5d0a43802..85c2cc576 100755 --- a/emhttp/plugins/dynamix/DeviceInfo.page +++ b/emhttp/plugins/dynamix/DeviceInfo.page @@ -45,6 +45,9 @@ $prev = $i>0 ? $sheets[$i-1] : $sheets[$end]; $next = $i<$end ? $sheets[$i+1] : $sheets[0]; $text = isPool($name) ? _('This will ERASE content of ALL devices in the pool') : _('This will ERASE ALL device content'); +function disabled_if($condition) { + if ($condition !== false) echo ' disabled'; +} function sanitize(&$val) { $data = explode('.',str_replace([' ',','],['','.'],$val)); $last = array_pop($data); @@ -610,10 +613,10 @@ _(Spin down delay)_: _(File system status)_: :   - + _(File system type)_: -: > @@ -629,14 +632,14 @@ _(File system type)_: 1):?> _(File system type)_: -: > - > =2) echo mk_option(_var($disk,'fsProfile'),"raid0", _('raid0'))?> =2) echo mk_option(_var($disk,'fsProfile'),"raid1", _('raid1'))?> @@ -646,7 +649,7 @@ _(File system type)_: =3) echo mk_option(_var($disk,'fsProfile'),"raid5", _('raid5'))?> =4) echo mk_option(_var($disk,'fsProfile'),"raid6", _('raid6'))?> - > =2) echo mk_option(_var($disk,'fsProfile'),"", _('raid0'))?> @@ -654,34 +657,34 @@ _(File system type)_: =3) echo mk_option(_var($disk,'fsProfile'),"raidz2", _('raidz2'))?> =4) echo mk_option(_var($disk,'fsProfile'),"raidz3", _('raidz3'))?> - > _(File system type)_: -: > - > =2) echo mk_option(_var($disk,'fsProfile'),"", _('raid0'))?> - > _(File system type)_: -: > - > =2) echo mk_option(_var($disk,'fsProfile'),"", _('raid0'))?> - > _(File system type)_: -: > @@ -689,8 +692,7 @@ _(File system type)_: