|
|
@@ -38,6 +38,9 @@ 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\Servers\ProxmoxCloudVps\App\UI\Home\Pages\VmBuild;
|
|
|
+use ModulesGarden\Servers\ProxmoxCloudVps\Core\DependencyInjection\Builder;
|
|
|
+
|
|
|
use function ModulesGarden\Servers\ProxmoxCloudVps\Core\Helper\isAdmin;
|
|
|
use function ModulesGarden\Servers\ProxmoxCloudVps\Core\Helper\sl;
|
|
|
|
|
|
@@ -117,6 +120,18 @@ class VmsDataTable extends DataTable implements ClientArea, AdminArea
|
|
|
}
|
|
|
$vmModel = VmModel::ofId($row->id)->firstOrFail();
|
|
|
$this->api();
|
|
|
+ $buildStatus = new VmBuild();
|
|
|
+ if ($buildStatus->isVmCreate()) {
|
|
|
+
|
|
|
+ logModuleCall(
|
|
|
+ 'proxmoxCloud',
|
|
|
+ __FUNCTION__,
|
|
|
+ $buildStatus->isVmCreate(),
|
|
|
+ 'Debug',
|
|
|
+ $buildStatus
|
|
|
+ );
|
|
|
+
|
|
|
+ }
|
|
|
$status = (new VmFactory())->fromVmModel($vmModel)->status()['status'];
|
|
|
if ($status=='running')
|
|
|
{
|
|
|
@@ -124,9 +139,10 @@ class VmsDataTable extends DataTable implements ClientArea, AdminArea
|
|
|
}
|
|
|
return '<span class="lu-label lu-label--danger lu-label--status">' . sl('lang')->abtr($status) . '</span>';
|
|
|
}catch (\Exception $ex){
|
|
|
- return '<span class="lu-label lu-label--danger lu-label--status">' . sl('lang')->abtr( "Build") . '</span>';
|
|
|
- // return '<span class="lu-label lu-label--danger lu-label--status">' . $ex->getMessage() . '</span>';
|
|
|
+ return '<span class="lu-label lu-label--danger lu-label--status">' . $ex->getMessage() . '</span>';
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public function replaceFieldOsTemplate($key, $row)
|