|
|
@@ -20,6 +20,7 @@
|
|
|
namespace ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Snapshot\Providers;
|
|
|
|
|
|
use MGProvision\Proxmox\v2\models\Snapshot;
|
|
|
+use MGProvision\Proxmox\v2\repository\SnapshotRepository;
|
|
|
use ModulesGarden\ProxmoxAddon\App\Services\ApiService;
|
|
|
use ModulesGarden\ProxmoxAddon\App\Services\Cloud\ProductService;
|
|
|
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\ClientArea;
|
|
|
@@ -46,6 +47,20 @@ class SnapshotProvider extends BaseDataProvider implements ClientArea
|
|
|
$this->acl()->snapshot();
|
|
|
$this->resourceGuard()->snapshotLimit();
|
|
|
$vm = \ModulesGarden\ProxmoxAddon\Core\Helper\sl('Vm')->getVm();
|
|
|
+
|
|
|
+ $testRepo = new SnapshotRepository();
|
|
|
+ $testRepo->setApi($this->api());
|
|
|
+ $testRepo->findByVm($vm);
|
|
|
+ $testRepo->ignoreCurrent(true);
|
|
|
+
|
|
|
+ logModuleCall(
|
|
|
+ 'ProxmoxCloudVps',
|
|
|
+ __FUNCTION__,
|
|
|
+ $testRepo,
|
|
|
+ 'Debug',
|
|
|
+ $testRepo->count()
|
|
|
+ );
|
|
|
+
|
|
|
$snapshot = new Snapshot();
|
|
|
$snapshot->setApi($this->api());
|
|
|
$snapshot->setPath($vm->getPath() . "/snapshot");
|