CL3.6b instance overview and CL3.7 domain status badges

This commit is contained in:
2026-03-05 09:41:46 +00:00
parent 0dba5d2ebf
commit 0b7a95947f
2 changed files with 42 additions and 13 deletions

View File

@@ -117,6 +117,9 @@ export async function syncPleskInstance(
.map((item: any) => {
const domainId = item?.id ?? item?.guid ?? item?.name;
const domainName = item?.name ?? item?.domain_name ?? item?.domain;
const status =
item?.status ??
(item?.hosting_type === "virtual" ? "active" : "inactive");
const externalSubscriptionId =
item?.subscription?.id ?? item?.subscription_id ?? item?.webspace_id;
const rawCreated = item?.created_at ?? item?.created;
@@ -141,12 +144,8 @@ export async function syncPleskInstance(
: null,
plesk_domain_id: String(domainId),
domain_name: String(domainName),
status: item?.status ? String(item.status) : null,
hosting_type: item?.hosting_type
? String(item.hosting_type)
: item?.hosting?.type
? String(item.hosting.type)
: null,
status: status ? String(status) : "unknown",
hosting_type: item?.hosting_type ? String(item.hosting_type) : null,
source_created_at: sourceCreatedAt,
aliases_count: aliasesCount,
};