|
|
@@ -38,13 +38,7 @@ use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\DataTable\DataProviders
|
|
|
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\DataTable\DataTable;
|
|
|
use ModulesGarden\ProxmoxAddon\App\Services\Cloud\ResourceManager;
|
|
|
use ModulesGarden\Servers\ProxmoxCloudVps\App\Helpers\BuildUrl;
|
|
|
-use ModulesGarden\ProxmoxAddon\App\Models\Job;
|
|
|
-use ModulesGarden\ProxmoxAddon\App\Jobs\Cloud\CloneQemuJob;
|
|
|
-use ModulesGarden\ProxmoxAddon\App\Jobs\Cloud\CreateLxcJob;
|
|
|
-use ModulesGarden\ProxmoxAddon\App\Jobs\Cloud\CreateQemuJob;
|
|
|
-use ModulesGarden\ProxmoxAddon\App\Jobs\Cloud\RestoreVm;
|
|
|
-use ModulesGarden\Servers\ProxmoxCloudVps\Core\DependencyInjection\Builder;
|
|
|
-
|
|
|
+use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Home\Pages\VmBuild;
|
|
|
use function ModulesGarden\Servers\ProxmoxCloudVps\Core\Helper\isAdmin;
|
|
|
use function ModulesGarden\Servers\ProxmoxCloudVps\Core\Helper\sl;
|
|
|
|
|
|
@@ -117,28 +111,6 @@ class VmsDataTable extends DataTable implements ClientArea, AdminArea
|
|
|
public function replaceFieldStatus($key, $row)
|
|
|
{
|
|
|
|
|
|
- $buildJobs = [
|
|
|
- CloneQemuJob::class,
|
|
|
- CreateQemuJob::class,
|
|
|
- CreateLxcJob::class,
|
|
|
- ];
|
|
|
- if(Job::waiting()->ofHostingId($this->getWhmcsParamByKey("serviceid"))->ofJobs($buildJobs)->count()) {
|
|
|
- return '<span class="lu-label lu-label--danger lu-label--status">' . sl('lang')->abtr( "Build") . '</span>';
|
|
|
- }
|
|
|
- $reinstallJobs = [
|
|
|
- CreateVmJob::class
|
|
|
- ];
|
|
|
- if(Job::waiting()->ofHostingId($this->getWhmcsParamByKey("serviceid"))->ofJobs($reinstallJobs)->count()) {
|
|
|
- return '<span class="lu-label lu-label--danger lu-label--status">' . sl('lang')->abtr( "Reinstall") . '</span>';
|
|
|
- }
|
|
|
- $upgradeJobs = [
|
|
|
- MigrateVmJob::class,
|
|
|
- RestoreVm::class,
|
|
|
- UpgradeVmJob::class
|
|
|
- ];
|
|
|
- if(Job::waiting()->ofHostingId($this->getWhmcsParamByKey("serviceid"))->ofJobs($upgradeJobs)->count()) {
|
|
|
- return '<span class="lu-label lu-label--danger lu-label--status">' . sl('lang')->abtr( "Upgrade") . '</span>';
|
|
|
- }
|
|
|
try{
|
|
|
//current
|
|
|
if($row->vmid==0){
|