diff --git a/packages/ui/certd-client/src/locales/langs/en-US/certd.ts b/packages/ui/certd-client/src/locales/langs/en-US/certd.ts index a0c04c859..22cde1e8a 100644 --- a/packages/ui/certd-client/src/locales/langs/en-US/certd.ts +++ b/packages/ui/certd-client/src/locales/langs/en-US/certd.ts @@ -88,6 +88,14 @@ export default { helpDoc: "Help Docs", pipelineCount: "Number of Certificate Pipelines", noPipeline: "You have no certificate pipelines yet", + enabledCount: "Enabled", + disabledCount: "Disabled", + certCount: "Number of Certificates", + noCert: "You have no certificates yet", + manageCert: "View Certificates", + certExpiringCount: "Soon-to-Expire", + certExpiredCount: "Expired", + certNoExpireCount: "Not Expired", createNow: "Create Now", managePipeline: "Manage Pipelines", pipelineStatus: "Pipeline Status", diff --git a/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts b/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts index 3f8f046ec..e0ff0f88e 100644 --- a/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts +++ b/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts @@ -93,7 +93,16 @@ export default { alertMessage: "证书和授权为敏感信息,不要使用来历不明的在线Certd服务和镜像,以免泄露;请务必私有化部署使用,认准官方版本发布渠道:", helpDoc: "帮助文档", pipelineCount: "证书流水线数量", + enabledCount: "已启用", + disabledCount: "已禁用", noPipeline: "您还没有证书流水线", + certCount: "证书数量", + certExpiringCount: "即将过期", + certExpiredCount: "已过期", + certNoExpireCount: "未过期", + noCert: "还没有证书", + manageCert: "查看证书", + createNow: "立即创建", managePipeline: "管理流水线", pipelineStatus: "流水线状态", diff --git a/packages/ui/certd-client/src/views/framework/home/dashboard/index.vue b/packages/ui/certd-client/src/views/framework/home/dashboard/index.vue index 8f38b4eeb..62fed124b 100644 --- a/packages/ui/certd-client/src/views/framework/home/dashboard/index.vue +++ b/packages/ui/certd-client/src/views/framework/home/dashboard/index.vue @@ -67,7 +67,7 @@
- + - + + + + + + @@ -242,6 +254,19 @@ function transformStatusCount() { } } count.value.pipelineStatusCount = result; + + const pipelineEnableCount = count.value.pipelineEnableCount; + count.value.pipelineEnableCount = [ + { name: t("certd.dashboard.enabledCount"), value: pipelineEnableCount.enabled, color: "green" }, + { name: t("certd.dashboard.disabledCount"), value: pipelineEnableCount.disabled, color: "gray" }, + ]; + const certCount = count.value.certCount; + count.value.certStatusCount = [ + { name: t("certd.dashboard.certExpiredCount"), value: certCount.expired, color: "red", checkIcon: "mingcute:warning-fill:#f44336" }, + { name: t("certd.dashboard.certExpiringCount"), value: certCount.expiring, color: "yellow", checkIcon: "mingcute:alert-fill:#ff9800" }, + { name: t("certd.dashboard.certNoExpireCount"), value: certCount.notExpired, color: "green" }, + ]; + count.value.certCount = certCount.total; } async function loadCount() { count.value = await GetStatisticCount(); diff --git a/packages/ui/certd-client/src/views/framework/home/dashboard/statistic-card.vue b/packages/ui/certd-client/src/views/framework/home/dashboard/statistic-card.vue index ad8608b91..a760afe7a 100644 --- a/packages/ui/certd-client/src/views/framework/home/dashboard/statistic-card.vue +++ b/packages/ui/certd-client/src/views/framework/home/dashboard/statistic-card.vue @@ -8,7 +8,27 @@
-
{{ count }}
+
+
+ {{ count }} + {{ title }} +
+ +
+
+
+
+ {{ item.name }}: +
+
+ {{ item.value }} +
+ +
+
+
+
+
@@ -25,51 +45,103 @@ import { FsIcon } from "@fast-crud/fast-crud"; const props = defineProps<{ title: string; count?: number; + subCounts?: { + name: string; + value: number; + color: string; + checkIcon?: string; + }[]; }>(); const slots = defineSlots();