|
|
@@ -97,26 +97,27 @@ class VmsDataTable extends DataTable implements ClientArea, AdminArea
|
|
|
->addColumn((new Column('disk')))
|
|
|
->addColumn((new Column('osTemplate')));
|
|
|
$resurceManager = new ResourceManager();
|
|
|
+ $sidebars = sl("sidebar")->getSidebar("virtualMachinesProxmoxCloudVps")->getChildren();
|
|
|
//deaktivate createVM Button in case of lack of ressources
|
|
|
if($resurceManager->disk()->free() < $resurceManager->disk()->getMin() || $resurceManager->vcpus()->free() < $resurceManager->vcpus()->getMin() || $resurceManager->memory()->free() < $resurceManager->memory()->getMin()) {
|
|
|
// $this->createButton->addHtmlAttribute("disabled",true);
|
|
|
//delete sidebar button
|
|
|
-/* if (sl("sidebar")->getSidebar("virtualMachinesProxmoxCloudVps")->getChild("vmcreate")) {
|
|
|
+ if (isset($sidebars['vmcreate'])) {
|
|
|
sl("sidebar")->getSidebar("virtualMachinesProxmoxCloudVps")->getChild("vmcreate")->delete();
|
|
|
}
|
|
|
} else {
|
|
|
- if (!sl("sidebar")->getSidebar("virtualMachinesProxmoxCloudVps")->getChild("vmcreate")) {
|
|
|
+ if (!isset($sidebars['vmcreate'])) {
|
|
|
sl("sidebar")->getSidebar("virtualMachinesProxmoxCloudVps")->add($this->createSidebar);
|
|
|
}
|
|
|
// $this->createButton->addHtmlAttribute("enabled",true); */
|
|
|
|
|
|
- logModuleCall(
|
|
|
+/* logModuleCall(
|
|
|
'proxmoxCloud',
|
|
|
__FUNCTION__,
|
|
|
sl("sidebar")->getSidebar("virtualMachinesProxmoxCloudVps")->getChildren(),
|
|
|
'Debug',
|
|
|
$this
|
|
|
- );
|
|
|
+ ); */
|
|
|
|
|
|
}
|
|
|
}
|