From 0b7a95947f86e3155bb8e1e362f623b285593d2b Mon Sep 17 00:00:00 2001
From: robbond
Date: Thu, 5 Mar 2026 09:41:46 +0000
Subject: [PATCH 1/2] CL3.6b instance overview and CL3.7 domain status badges
---
components/dashboard/dashboard-controls.tsx | 44 +++++++++++++++++----
lib/plesk/sync.ts | 11 +++---
2 files changed, 42 insertions(+), 13 deletions(-)
diff --git a/components/dashboard/dashboard-controls.tsx b/components/dashboard/dashboard-controls.tsx
index 4fd0512..1e0b565 100644
--- a/components/dashboard/dashboard-controls.tsx
+++ b/components/dashboard/dashboard-controls.tsx
@@ -49,6 +49,18 @@ type Props = {
>;
};
+function getDomainStatusBadge(status: string | null) {
+ const normalized = (status ?? "unknown").toLowerCase();
+
+ if (normalized === "active") return "bg-emerald-100 text-emerald-700";
+
+ if (normalized === "suspended") return "bg-rose-100 text-rose-700";
+
+ if (normalized === "inactive") return "bg-amber-100 text-amber-700";
+
+ return "bg-slate-100 text-slate-600";
+}
+
export function DashboardControls({
instances,
subscriptions,
@@ -351,14 +363,28 @@ export function DashboardControls({
{instance.status}
- Last sync: {formatDateTime(instance.last_sync_at)}
- {instance.last_sync_status
- ? ` (${instance.last_sync_status})`
- : ""}
+ Subscriptions: {instance.last_sync_subscriptions ?? 0}
- Last counts: {instance.last_sync_subscriptions ?? 0}{" "}
- subscriptions, {instance.last_sync_domains ?? 0} domains
+ Domains: {instance.last_sync_domains ?? 0}
+
+
+ Last sync status:{" "}
+
+ {instance.last_sync_status ?? "unknown"}
+
+
+
+ Last sync time: {formatDateTime(instance.last_sync_at)}
Last connected:{" "}
@@ -525,7 +551,11 @@ export function DashboardControls({
{domain.domain_name}
- {domain.status ?? "unknown"}
+
+ {domain.status ?? "unknown"}
+
|
{domain.hosting_type ?? "unknown"}
diff --git a/lib/plesk/sync.ts b/lib/plesk/sync.ts
index 01dec75..d68df80 100644
--- a/lib/plesk/sync.ts
+++ b/lib/plesk/sync.ts
@@ -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,
};
--
2.39.5
From 736cee870cc4fc039fa16d94f709be0df0a3bf06 Mon Sep 17 00:00:00 2001
From: robbond
Date: Thu, 5 Mar 2026 09:44:01 +0000
Subject: [PATCH 2/2] Refine domain table name cell styling
---
components/dashboard/dashboard-controls.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/dashboard/dashboard-controls.tsx b/components/dashboard/dashboard-controls.tsx
index 1e0b565..8e8a0a2 100644
--- a/components/dashboard/dashboard-controls.tsx
+++ b/components/dashboard/dashboard-controls.tsx
@@ -547,7 +547,7 @@ export function DashboardControls({
) : (
filteredDomains.map((domain) => (
- |
+ |
{domain.domain_name}
|
--
2.39.5
| |