VM Manager: minor code formatting cleanup (am I the only one who likes tab indentation?)

This commit is contained in:
Eric Schultz
2015-11-26 09:28:11 -06:00
parent 72b4c0746c
commit 8166978cd5
4 changed files with 14 additions and 13 deletions
@@ -352,7 +352,7 @@
case 'usb3':
$ctrl = "<controller type='usb' index='0' model='nec-xhci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</controller>";
</controller>";
break;
case 'usb2':
@@ -183,7 +183,8 @@
'Arch' => [
'form' => 'Custom.form.php',
'icon' => 'arch.png',
'os' => 'arch'],
'os' => 'arch'
],
'CentOS' => [
'form' => 'Custom.form.php',
'icon' => 'centos.png',
@@ -791,16 +792,16 @@
// libvirt xpath parser sucks, use php's xpath parser instead
$strDOMXML = $lv->domain_get_xml($res);
$xmldoc = new DOMDocument();
$xmldoc->loadXML($strDOMXML);
$xpath = new DOMXPath($xmldoc);
$objNodes = $xpath->query('//domain/metadata/*[local-name()=\'vmtemplate\']/@*');
$xmldoc->loadXML($strDOMXML);
$xpath = new DOMXPath($xmldoc);
$objNodes = $xpath->query('//domain/metadata/*[local-name()=\'vmtemplate\']/@*');
$arrTemplateValues = [];
if ($objNodes->length > 0) {
foreach ($objNodes as $objNode) {
$arrTemplateValues[$objNode->nodeName] = $objNode->nodeValue;
}
}
$arrTemplateValues = [];
if ($objNodes->length > 0) {
foreach ($objNodes as $objNode) {
$arrTemplateValues[$objNode->nodeName] = $objNode->nodeValue;
}
}
if (empty($arrTemplateValues['name'])) {
$arrTemplateValues['name'] = 'Custom';
+1 -1
View File
@@ -25,7 +25,7 @@ function detect_user_share(&$arg) {
}
}
return $match[0];
return $match[0];
}, $arg);
};
@@ -168,7 +168,7 @@ $(function() {
});
setTimeout(function() {
editor.refresh();
editor.refresh();
}, 1);
$("#vmform #btnSubmit").click(function frmSubmit() {