|
|
@@ -23,6 +23,7 @@ use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Vms\Modals\MigrateModal;
|
|
|
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\AdminArea;
|
|
|
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\ClientArea;
|
|
|
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Buttons\ButtonDataTableModalAction;
|
|
|
+use ModulesGarden\Servers\ProxmoxCloudVps\Core\Helper\BuildUrl;
|
|
|
|
|
|
use function ModulesGarden\Servers\ProxmoxCloudVps\Core\Helper\isAdmin;
|
|
|
|
|
|
@@ -34,7 +35,11 @@ class ConsoleButton extends ButtonDataTableModalAction implements ClientArea
|
|
|
{
|
|
|
$this->initIds('consoleButton');
|
|
|
$this->setDisableByColumnValue("vmid", 0);
|
|
|
- $url = "clientarea.php?action=productdetails&id={$this->getWhmcsParamByKey('serviceid')}&modop=custom&a=management&mg-page=console&mg-action=novnc";
|
|
|
+ if(isAdmin()){
|
|
|
+ $url = BuildUrl::getSelfUrl() . '&mg-action=novnc';
|
|
|
+ } else {
|
|
|
+ $url = "clientarea.php?action=productdetails&id={$this->getWhmcsParamByKey('serviceid')}&modop=custom&a=management&mg-page=console&mg-action=novnc";
|
|
|
+ }
|
|
|
$this->setRawUrl($url)
|
|
|
->setRedirectParams(['vm' => ':id']);
|
|
|
}
|