Browse Source

try to use console button

andre 4 years ago
parent
commit
c3306e020f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      app/UI/Vms/Buttons/ConsoleButton.php

+ 3 - 2
app/UI/Vms/Buttons/ConsoleButton.php

@@ -32,10 +32,11 @@ class ConsoleButton extends ButtonDataTableModalAction implements ClientArea
 
 
     public function initContent()
     public function initContent()
     {
     {
+        $this->vmModel = \ModulesGarden\ProxmoxAddon\Core\Helper\sl('Vm')->getVmModel();
         $this->initIds('consoleButton');
         $this->initIds('consoleButton');
         $this->setDisableByColumnValue("vmid", 0);
         $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 = (new UrlServiceHelper())->getNoVncConsoleUrl();
+//        $url ="clientarea.php?action=productdetails&id={$this->getWhmcsParamByKey('serviceid')}&modop=custom&a=management&mg-page=vm";
         $this->setRawUrl($url)
         $this->setRawUrl($url)
             ->setRedirectParams(['vm' => ':id']);
             ->setRedirectParams(['vm' => ':id']);
     }
     }