http://modulesgarden.com * CONTACT -> contact@modulesgarden.com * * * This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the * inclusion of the above copyright notice. This software or any other * copies thereof may not be provided or otherwise made available to any * other person. No title to and ownership of the software is hereby * transferred. * * * ******************************************************************** */ namespace ModulesGarden\ProxmoxAddon\App\UI\Servers\Pages; use ModulesGarden\ProxmoxAddon\Core\UI\Interfaces\AdminArea; use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Others\AjaxFieldForDataTable; /** * Description of ResourcesRow * * @author Pawel Kopec */ class SuspendedRow extends AjaxFieldForDataTable implements AdminArea { use ServerResources; public function prepareAjaxData() { session_write_close(); try { session_write_close(); $serverId = $this->getRequestValue('index', '0'); $this->setServerId($serverId); $this->setHostingStatus(["Suspended"]); if ($this->getServer()->disabled != 1) { $this->getApi()->setInstance(); $this->ramDetails(); } if ($this->errors) { throw new \Exception(implode("
", $this->errors)); } $this->ajaxData = "{$this->ramAssignedToSring()} / {$this->ramSuspendedToSring()}"; } catch (\Exception $ex) { $this->ajaxData = sprintf('%s', $ex->getMessage()); } } }