Browse Source

try to use console button

andre 4 years ago
parent
commit
42c6f671e3
1 changed files with 2 additions and 12 deletions
  1. 2 12
      app/UI/Vms/Pages/VmsDataTable.php

+ 2 - 12
app/UI/Vms/Pages/VmsDataTable.php

@@ -87,7 +87,7 @@ class VmsDataTable extends DataTable implements ClientArea, AdminArea
             //console
             $this->addActionButton(new ConsoleButton());
             $consoleUrl = "http://www.symbionet.de";
-            $this->actionButtons['consoleButton']->setConsoleUrl($consoleUrl);
+            $this->actionButtons['consoleButton']->setConsoleUrl($this->consoleUrl);
         }
         if(!$isAdmin){
             //edit
@@ -165,17 +165,7 @@ class VmsDataTable extends DataTable implements ClientArea, AdminArea
         $dataProv->setData($query);
         $this->setDataProvider($dataProv);
         $vmid = $dataProv->getData()->getRecords()->first()->vmid;
-        $consoleUrl = BuildUrl::isClientArea() ? BuildUrl::getUrl('console', 'novnc', ['vm'=> $vmid]) : BuildUrl::getSelfUrl().'&mg-action=novncs&vm='.$vmid;
-        $this->actionButtons['consoleButton']->setConsoleUrl($consoleUrl);
-                
-        logModuleCall(
-            'proxmoxCloud',
-            __FUNCTION__,
-            $vmid,
-            'Debug',
-            $consoleUrl
-        );
-
+        $this->consoleUrl = BuildUrl::isClientArea() ? BuildUrl::getUrl('console', 'novnc', ['vm'=> $vmid]) : BuildUrl::getSelfUrl().'&mg-action=novncs&vm='.$vmid;
     }
 
     public function isViewFooter()