Timestamp and registration checking
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { getSessionUser } from "@/lib/session";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { getTranslations, getFormatter } from "next-intl/server";
|
||||
import { redirect, notFound } from "next/navigation";
|
||||
import { getTenant } from "@/lib/k8s";
|
||||
import { StatusBadge } from "@/components/ui/status-badge";
|
||||
@@ -7,6 +7,7 @@ import { UsageDisplay } from "@/components/dashboard/usage-display";
|
||||
import { PackageList } from "@/components/packages/package-list";
|
||||
import { WorkspaceEditor } from "@/components/packages/workspace-editor";
|
||||
import { ChannelUsers } from "@/components/channel-users/channel-users";
|
||||
import { formatDateTime, formatRelative } from "@/lib/format";
|
||||
|
||||
const CHANNEL_PACKAGES = ["telegram", "discord", "email"];
|
||||
|
||||
@@ -20,6 +21,7 @@ export default async function TenantDetailPage({
|
||||
|
||||
const { name } = await params;
|
||||
const t = await getTranslations("tenantDetail");
|
||||
const f = await getFormatter();
|
||||
|
||||
const tenant = await getTenant(name);
|
||||
if (!tenant) notFound();
|
||||
@@ -60,6 +62,18 @@ export default async function TenantDetailPage({
|
||||
{t("agent")}: {tenant.spec.agentName}
|
||||
</p>
|
||||
)}
|
||||
{tenant.metadata.creationTimestamp && (
|
||||
<p
|
||||
className="text-xs text-text-muted mt-1"
|
||||
title={formatDateTime(tenant.metadata.creationTimestamp, f)}
|
||||
>
|
||||
{t("provisioned")}{" "}
|
||||
{formatRelative(tenant.metadata.creationTimestamp, f)}{" "}
|
||||
<span className="text-text-muted/60">
|
||||
({formatDateTime(tenant.metadata.creationTimestamp, f)})
|
||||
</span>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Usage */}
|
||||
|
||||
Reference in New Issue
Block a user