andre 4 лет назад
Родитель
Сommit
db8deec810
2 измененных файлов с 27 добавлено и 5 удалено
  1. 26 0
      app/UI/Vm/Pages/SnapshotTab.php
  2. 1 5
      app/UI/Vm/Pages/VmTabs.php

+ 26 - 0
app/UI/Vm/Pages/SnapshotTab.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Vm\Pages;
+
+use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\ClientArea;
+use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\TabsWidget\TabsWidget;
+use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Snapshot\Pages\SnapshotRawDataTable;
+use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Snapshot\Pages\JobRawDataTable;
+
+class SnapshotTab extends TabsWidget implements ClientArea
+{
+    use ProductService;
+
+    protected $id   = 'SnapshotTab';
+    protected $name = 'SnapshotTabName';
+    protected $title = 'SnapshotTabTitle';
+
+
+    public function initContent()
+    {
+        $this->unsetShowTitle();
+        $this->addElement(new SnapshotRawDataTable());
+        $this->addElement(new JobRawDataTable());
+
+    }
+}

+ 1 - 5
app/UI/Vm/Pages/VmTabs.php

@@ -12,14 +12,11 @@ use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Reinstall\Pages\GraphsTab;
 use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Reinstall\Pages\IsoDataTable;
 use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Reinstall\Pages\ReinstallTab;
 use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Reinstall\Pages\TemplateDataTable;
-use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Snapshot\Pages\SnapshotTab;
 use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\TaskHistory\Pages\TaskHistoryDataTable;
 use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\VirtualInterface\Pages\VirtualInterfaceDataTable;
 use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\ClientArea;
 use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\TabsWidget\TabsWidget;
 use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Network\Pages\NetworkTab;
-use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Snapshot\Pages\JobRawDataTable;
-use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Snapshot\Pages\SnapshotDataTable;
 
 class VmTabs extends TabsWidget implements ClientArea
 {
@@ -48,8 +45,7 @@ class VmTabs extends TabsWidget implements ClientArea
         //snapshot
         if ($this->configuration()->isPermissionSnapshot())
         {
-            $this->addElement(new SnapshotDataTable());
-            $this->addElement(new JobRawDataTable());
+            $this->addElement(new SnapshotTab());
         }
         //backup
         if ($this->configuration()->isPermissionBackupJob())