feat(vm): hoàn tiền khi cấp VM lỗi, theo dõi job queue, uuid dịch vụ cho ticket, chuẩn hoá RAM addon
- VmProvisionException/VmProvisionRefund xử lý lỗi cấp phát VM - QueueJobInspector + QueueMonitorController xem chi tiết job - Thêm service uuid cho ticket, thời lượng cho activity_logs - Migration chuẩn hoá RAM addon sang MB, trạng thái deleting cho snapshot Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
7136bec265
commit
62596d9063
@@ -14,6 +14,18 @@ class VmVcenterErrorTranslator
|
||||
'TIMED_OUT' => 'Yêu cầu khởi tạo máy chủ hết thời gian chờ. Vui lòng thử lại sau.',
|
||||
];
|
||||
|
||||
public function detail(array $result): string
|
||||
{
|
||||
$data = $result['data'] ?? [];
|
||||
$messages = is_array($data) ? collect($data['messages'] ?? [])->pluck('default_message')->filter() : collect();
|
||||
|
||||
if ($messages->isNotEmpty()) {
|
||||
return ($data['error_type'] ?? 'vCenter') . ': ' . $messages->implode(' | ');
|
||||
}
|
||||
|
||||
return is_string($data) ? $data : (string) json_encode($data, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
public function translate(array $result, ?string $serverName = null): string
|
||||
{
|
||||
$data = $result['data'] ?? [];
|
||||
|
||||
Reference in New Issue
Block a user