feat: Implement vCenter management APIs, console ticket retrieval, password encryption, and background synchronization.

This commit is contained in:
pbao9
2026-03-06 17:29:52 +07:00
parent cb8510cf56
commit 23a496f511
10 changed files with 332 additions and 52 deletions
+9 -11
View File
@@ -77,17 +77,15 @@ class SyncHost implements ShouldQueue
// Use TemplateService
$template = $templateService->getAllTemplate();
if ($host) {
foreach ($host as $_subItem) {
if (!ModuleHost::where('host_id', $_subItem['host'])->exists()) {
ModuleHost::create([
'name' => $_subItem['name'],
'host_id' => $_subItem['host'],
'module_datacenter_id' => $_item['id'],
'template' => $template[0] ?? null,
]);
}
}
foreach ($host as $_subItem) {
ModuleHost::updateOrCreate(
['host_id' => $_subItem['host']],
[
'name' => $_subItem['name'],
'module_datacenter_id' => $_item['id'],
'template' => $template[0] ?? null,
]
);
}
}
}