diff --git a/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php b/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php
index 6ff87184c..0fd847a86 100644
--- a/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php
+++ b/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php
@@ -88,7 +88,7 @@ foreach ($vms as $vm) {
if ($autoport == "yes") $auto = "auto"; else $auto="manual";
$graphics = strtoupper($vmrcprotocol).':'._($auto)."\n";
$virtual = true ;
- }
+ }
if (!empty($arrConfig['gpu'])) {
$arrValidGPUDevices = getValidGPUDevices();
foreach ($arrConfig['gpu'] as $arrGPU) {
@@ -130,10 +130,9 @@ foreach ($vms as $vm) {
}
/* VM information */
-
- if ($snapshots != null) $snapshotstr = _("(Snapshots :").count($snapshots).')' ; else $snapshotstr = _("(Snapshots :None)") ;
- $cdbus = $cdbus2 = $cdfile = $cdfile2 = "" ;
- $cdromcount = 0 ;
+ if ($snapshots != null) $snapshotstr = _("(Snapshots :").count($snapshots).')'; else $snapshotstr = _("(Snapshots :None)");
+ $cdbus = $cdbus2 = $cdfile = $cdfile2 = "";
+ $cdromcount = 0;
foreach ($cdroms as $arrCD) {
$disk = $arrCD['file'] ?? $arrCD['partition'];
$dev = $arrCD['device'];
@@ -141,12 +140,12 @@ foreach ($vms as $vm) {
if ($dev == "hda") {
$cdbus = $arrValidDiskBuses[$arrCD['bus']] ?? 'VirtIO';
$cdfile = $arrCD['file'] ?? $arrCD['partition'];
- if ($cdfile != "") $cdromcount++ ;
+ if ($cdfile != "") $cdromcount++;
}
if ($dev == "hdb") {
$cdbus2 = $arrValidDiskBuses[$arrCD['bus']] ?? 'VirtIO';
$cdfile2 = $arrCD['file'] ?? $arrCD['partition'];
- if ($cdfile2 != "") $cdromcount++ ;
+ if ($cdfile2 != "") $cdromcount++;
}
}
@@ -159,7 +158,7 @@ foreach ($vms as $vm) {
foreach ($ip as $arrIP) {
$ipname = $arrIP["name"];
if (preg_match('/^(lo|Loopback)/',$ipname)) continue; // omit loopback interface
- $iphdwadr = $arrIP["hwaddr"] == "" ? _("N/A") : $arrIP["hwaddr"];
+ $iphdwadr = $arrIP["hwaddr"] == "" ? _("N/A") : $arrIP["hwaddr"];
$iplist = $arrIP["addrs"];
foreach ($iplist as $arraddr) {
$ipaddrval = $arraddr["addr"];
@@ -174,13 +173,19 @@ foreach ($vms as $vm) {
}
}
} else {
- if ($gastate == "disconnected") { $ipliststr .= "
"; $iptablestr = _('Requires guest agent installed') ; }
- else { $ipliststr = "
"; $iptablestr = _('Requires guest running') ; }
+ if ($gastate == "disconnected") {
+ $ipliststr .= "
";
+ $iptablestr = _('Requires guest agent installed');
+ } else {
+ $ipliststr = "
";
+ $iptablestr = _('Requires guest running');
+ }
}
$iptablestr = str_replace("\n", "
", trim($iptablestr));
$changemedia = "getisoimageboth(\"{$uuid}\",\"hda\",\"{$cdbus}\",\"{$cdfile}\",\"hdb\",\"{$cdbus2}\",\"{$cdfile2}\")";
- $cdstr = $cdromcount." / 2
" : "' style='display:none'>");
echo "";
echo "";
- echo "| "._('Disk devices')." | "._('Serial')." | "._('Bus')." | "._('Capacity')." | "._('Allocation')." | Boot Order | ";
+ echo "| ",_('Disk devices')," | ",_('Serial')," | ",_('Bus')," | ",_('Capacity')," | ",_('Allocation')," | Boot Order | ";
echo "";
/* Display VM disks */
@@ -231,60 +236,56 @@ foreach ($vms as $vm) {
$capacity = $lv->format_size($arrCD['capacity'], 0);
$allocation = $lv->format_size($arrCD['allocation'], 0);
$disk = $arrCD['file'] ?? $arrCD['partition'] ?? "" ;
- $dev = $arrCD['device'];
- $bus = $arrValidDiskBuses[$arrCD['bus']] ?? 'VirtIO';
- $boot= $arrCD["boot order"] ?? "" ;
- if ($boot < 1) $boot="Not set";
+ $dev = $arrCD['device'];
+ $bus = $arrValidDiskBuses[$arrCD['bus']] ?? 'VirtIO';
+ $boot = $arrCD["boot order"] ?? "" ;
+ if ($boot < 1) $boot = "Not set";
if ($disk != "" ) {
- $title = _("Eject CD Drive").".";
- $changemedia = "changemedia(\"{$uuid}\",\"{$dev}\",\"{$bus}\", \"--eject\")";
- echo "| $disk | | $bus | $capacity | $allocation | $boot | ";
+ $title = _('Eject CD Drive');
+ $changemedia = "changemedia(\"{$uuid}\",\"{$dev}\",\"{$bus}\", \"--eject\")";
+ echo "| $disk | | $bus | $capacity | $allocation | $boot | ";
} else {
- $title = _("Insert CD").".";
+ $title = _('Insert CD');
$changemedia = "changemedia(\"{$uuid}\",\"{$dev}\",\"{$bus}\",\"--select\")";
$disk = _("No CD image inserted in to drive");
- echo "| $disk | | $bus | $capacity | $allocation | $boot | ";
-
+ echo "| $disk | | $bus | $capacity | $allocation | $boot | ";
}
-
}
echo "";
/* Display VM IP Addresses "execute":"guest-network-get-interfaces" --pretty */
- echo "| "._('Interfaces')." | | | "._('Type')." | "._('IP Address')." | "._('Prefix')." | ";
+ echo "| ",_('Interfaces')." | | | ",_('Type')." | ",_('IP Address')," | ",_('Prefix')," | ";
echo "";
echo $ipliststr ;
echo "";
/* Display VM Snapshots */
if ($snapshots != null) {
- $j=0 ;
- $steps = array() ;
- foreach($snapshots as $snap) {
+ $j = 0;
+ $steps = array();
+ foreach ($snapshots as $snap) {
if ($snap['parent'] == "" || $snap['parent'] == "Base") $j++;
- $steps[$j] .= $snap['name'].';' ;
- }
- echo "| "._('Snapshots')." | | "._('Date/Time')." | "._('Type')." | "._('Parent')." | "._('Memory')." | ";
- echo "";
- foreach($steps as $stepsline)
- {
- $snapshotlist = explode(";",$stepsline) ;
- $tab = " " ;
- foreach($snapshotlist as $snapshotitem) {
- if ($snapshotitem == "") continue ;
- $snapshot = $snapshots[$snapshotitem] ;
- $snapshotstate = _(ucfirst($snapshot["state"])) ;
- $snapshotdesc = $snapshot["desc"] ;
- $snapshotmemory = _(ucfirst($snapshot["memory"]["@attributes"]["snapshot"])) ;
- $snapshotparent = $snapshot["parent"] ? $snapshot["parent"] : "None";
- $snapshotdatetime = my_time($snapshot["creationtime"],"Y-m-d" )." ".my_time($snapshot["creationtime"],"H:i:s") ;
- $snapmenu = sprintf("onclick=\"addVMSnapContext('%s','%s','%s','%s','%s','%s')\"", addslashes($vm),addslashes($uuid),addslashes($template),$state,$snapshot["name"],$vmpreview);
- echo "| $tab|__ ".$snapshot["name"]." | $snapshotdesc | $snapshotdatetime | $snapshotstate | $snapshotparent | $snapshotmemory | ";
- $tab .=" " ;
+ $steps[$j] .= $snap['name'].';';
+ }
+ echo "| ",_('Snapshots')," | | ",_('Date/Time')," | ",_('Type')," | ",_('Parent')," | ",_('Memory')," | ";
+ echo "";
+ foreach ($steps as $stepsline) {
+ $snapshotlist = explode(";",$stepsline);
+ $tab = " ";
+ foreach ($snapshotlist as $snapshotitem) {
+ if ($snapshotitem == "") continue;
+ $snapshot = $snapshots[$snapshotitem] ;
+ $snapshotstate = _(ucfirst($snapshot["state"]));
+ $snapshotdesc = $snapshot["desc"];
+ $snapshotmemory = _(ucfirst($snapshot["memory"]["@attributes"]["snapshot"]));
+ $snapshotparent = $snapshot["parent"] ? $snapshot["parent"] : "None";
+ $snapshotdatetime = my_time($snapshot["creationtime"],"Y-m-d" )." ".my_time($snapshot["creationtime"],"H:i:s");
+ $snapmenu = sprintf("onclick=\"addVMSnapContext('%s','%s','%s','%s','%s','%s')\"", addslashes($vm),addslashes($uuid),addslashes($template),$state,$snapshot["name"],$vmpreview);
+ echo "| $tab|__ ",$snapshot["name"]," | $snapshotdesc | $snapshotdatetime | $snapshotstate | $snapshotparent | $snapshotmemory | ";
+ $tab .=" ";
}
echo "";
- }
+ }
}
echo " ";
}
-
echo "\0".implode($kvm);
?>
diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css
index 0abb29c13..8ddbe8c2e 100644
--- a/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css
+++ b/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css
@@ -15,7 +15,8 @@ table.domdisk tbody tr:nth-child(even){background-color:transparent!important}
table.domdisk tbody tr:nth-child(4n-1){background-color:transparent!important}
table.snapshot{margin-top:0}
i.mover{margin-right:8px;display:none}
+i.fa-bullseye{padding-left:8px}
#resetsort{margin-left:12px;display:inline-block;width:32px}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button[disabled]{cursor:default;color:#808080;background:-webkit-gradient(linear,left top,right top,from(#404040),to(#808080)) 0 0 no-repeat,-webkit-gradient(linear,left top,right top,from(#404040),to(#808080)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#404040),to(#404040)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#808080),to(#808080)) 100% 100% no-repeat;background:linear-gradient(90deg,#404040 0,#808080) 0 0 no-repeat,linear-gradient(90deg,#404040 0,#808080) 0 100% no-repeat,linear-gradient(0deg,#404040 0,#404040) 0 100% no-repeat,linear-gradient(0deg,#808080 0,#808080) 100% 100% no-repeat;background-size:100% 2px,100% 2px,2px 100%,2px 100%}
.dropdown-menu{z-index:10001}
-span.vmgraphics{font-size:1.1rem;text-align: left}
+span.vmgraphics{font-size:1.1rem;text-align:left}
|