Browse Source

try to change edit action to console

andre 4 years ago
parent
commit
8db3dab0de
1 changed files with 9 additions and 12 deletions
  1. 9 12
      app/UI/Vms/Buttons/ManageButton.php

+ 9 - 12
app/UI/Vms/Buttons/ManageButton.php

@@ -20,7 +20,6 @@
 namespace ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Vms\Buttons;
 
 use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Vms\Modals\MigrateModal;
-use ModulesGarden\Servers\ProxmoxCloudVps\Core\Helper\BuildUrl;
 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;
@@ -41,6 +40,15 @@ class ManageButton extends ButtonDataTableModalAction implements ClientArea
 
     public function afterInitContent()
     {
+        
+        logModuleCall(
+            'proxmoxCloud',
+            __FUNCTION__,
+            $this->parseCustomParams(),
+            'Debug',
+            $this->htmlAttributes
+        );
+
         $this->htmlAttributes['@click.middle'] = 'redirect($event, ' . $this->parseCustomParams() . ', true)';
         $this->htmlAttributes['@click'] = 'redirect($event, ' . $this->parseCustomParams() . ')';
     }
@@ -92,20 +100,9 @@ class ManageButton extends ButtonDataTableModalAction implements ClientArea
 
     protected function updateHtmlAttributesByRedirectParams()
     {
-        $serviceUrl = new UrlServiceHelper();
         foreach ($this->redirectParams as $key => $value)
         {
             $this->updateHtmlAttribute($key, $value);
-
-            logModuleCall(
-                'proxmoxCloud',
-                __FUNCTION__,
-                $this->redirectParams,
-                'Debug',
-                $serviceUrl
-            );
-
-//            $this->addHtmlAttribute("onclick", "window.open('{$serviceUrl->getNoVncConsoleUrl()}', '', 'width=900,height=700'); return false;");
         }
     }