|
|
@@ -32,19 +32,18 @@ class ConsoleButton extends ButtonDataTableModalAction implements ClientArea
|
|
|
|
|
|
public function initContent()
|
|
|
{
|
|
|
-// $this->vmModel = \ModulesGarden\ProxmoxAddon\Core\Helper\sl('Vm')->getVmModel();
|
|
|
+ //noVNC
|
|
|
$this->initIds('consoleButton');
|
|
|
$this->setDisableByColumnValue("vmid", 0);
|
|
|
-// $url = (new UrlServiceHelper())->getNoVncConsoleUrl();
|
|
|
- $url ="clientarea.php?action=productdetails&id={$this->getWhmcsParamByKey('serviceid')}&modop=custom&a=management&mg-page=vm";
|
|
|
+ $url ="#";
|
|
|
$this->setRawUrl($url)
|
|
|
->setRedirectParams(['vm' => ':id']);
|
|
|
}
|
|
|
|
|
|
public function afterInitContent()
|
|
|
{
|
|
|
- $this->htmlAttributes['@click.middle'] = 'redirect($event, ' . $this->parseCustomParams() . ', true)';
|
|
|
- $this->htmlAttributes['@click'] = 'redirect($event, ' . $this->parseCustomParams() . ')';
|
|
|
+ $serviceUrl = new UrlServiceHelper();
|
|
|
+ $this->htmlAttributes['@click'] = "window.open('{$serviceUrl->getNoVncConsoleUrl()}', '', 'width=900,height=700'); return false;";
|
|
|
}
|
|
|
|
|
|
public function setRawUrl($url)
|