From fbfe1256a5c8be6dfb2fbae7e6130eb5f6c6d946 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Sat, 15 Aug 2026 22:38:29 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=96=B0=E5=A2=9E=E5=AE=98=E6=96=B9?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AFCertd=20Client=E7=9A=84=E5=A4=9A?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E9=85=8D=E7=BD=AE=E4=B8=8E=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增官方客户端Certd Client的多语言配置与页面入口 2. 更新文档生态部分,将官方客户端与第三方客户端区分开 3. 移除旧的菜单组件与相关冗余代码,简化路由配置 4. 修复证书统计接口,按证书状态active进行计数 --- README.md | 9 +- README_en.md | 9 +- docs/guide/open/index.md | 8 +- .../src/layout/components/menu/index.less | 15 - .../src/layout/components/menu/index.vue | 124 ------- .../src/layout/components/menu/index1.tsx | 183 ----------- .../certd-client/src/layout/layout-basic.vue | 6 + .../src/layout/layout-framework.vue | 303 ------------------ .../locales/langs/en-US/certd/navigation.ts | 1 + .../locales/langs/zh-CN/certd/navigation.ts | 1 + .../ui/certd-client/src/router/resolve.ts | 5 +- .../certd-client/src/router/source/header.ts | 35 -- .../pipeline/component/task-form/index.vue | 8 + .../user/dashboard/statistic-controller.ts | 4 +- .../monitor/service/cert-info-service.ts | 5 +- 15 files changed, 46 insertions(+), 670 deletions(-) delete mode 100644 packages/ui/certd-client/src/layout/components/menu/index.less delete mode 100644 packages/ui/certd-client/src/layout/components/menu/index.vue delete mode 100644 packages/ui/certd-client/src/layout/components/menu/index1.tsx delete mode 100644 packages/ui/certd-client/src/layout/layout-framework.vue delete mode 100644 packages/ui/certd-client/src/router/source/header.ts diff --git a/README.md b/README.md index f253c3add..9a09765bd 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,14 @@ https://certd.handfree.work/ ## 五、生态 -### 1. 客户端工具 SSL-Assistant +### 1. 官方客户端 Certd Client + +`Certd Client` 是 Certd 官方证书部署客户端,运行于应用服务器上。自动发现本机 Nginx、Apache 和 IIS 站点,从 Certd 获取新证书并部署到本机。适用于不希望服务器开放 SSH、无法由 Certd 直接访问目标服务器的场景。 + +项目主页:[AtomGit](https://atomgit.com/certd/certd-client/) | [GitHub](https://github.com/certd/certd-client/) +下载地址:[AtomGit Releases](https://atomgit.com/certd/certd-client/releases) | [GitHub Releases](https://github.com/certd/certd-client/releases) + +### 2. 第三方客户端 SSL-Assistant `SSL Assistant` 是一个运行于主机上的证书部署管理助手客户端。 支持自动扫描主机`Nginx`配置,然后从`Certd`拉取证书并部署。 diff --git a/README_en.md b/README_en.md index 230a13b4b..d0a6ea1b2 100644 --- a/README_en.md +++ b/README_en.md @@ -123,7 +123,14 @@ You can choose one of the following deployment methods based on your needs: ## 5. Ecosystem -### 1. Client Tool: SSL-Assistant +### 1. Official Client: Certd Client + +`Certd Client` is the official Certd certificate deployment client that runs on application servers. It automatically discovers local Nginx, Apache, and IIS sites, retrieves new certificates from Certd, and deploys them locally. It is designed for servers that should not expose SSH or cannot be accessed directly by Certd. + +Project Home: [AtomGit](https://atomgit.com/certd/certd-client/) | [GitHub](https://github.com/certd/certd-client/) +Downloads: [AtomGit Releases](https://atomgit.com/certd/certd-client/releases) | [GitHub Releases](https://github.com/certd/certd-client/releases) + +### 2. Third-Party Client: SSL-Assistant `SSL Assistant` is a certificate deployment and management assistant client that runs on hosts. It supports automatic scanning of the host's `Nginx` configuration and pulling certificates from `Certd` for deployment. This tool is very useful when you don't want to expose your SSH host password. diff --git a/docs/guide/open/index.md b/docs/guide/open/index.md index 1aeb92a37..36559ca48 100644 --- a/docs/guide/open/index.md +++ b/docs/guide/open/index.md @@ -47,7 +47,13 @@ header中传入x-certd-token即可调用开放接口 ## 客户端工具 -### SSL-Assistant +### 官方客户端:Certd Client +`Certd Client` 是 Certd 的官方证书部署客户端。运行在应用服务器上,自动发现本机 Nginx、Apache 和 IIS 站点,然后从 Certd 获取新证书并部署到本机。适用于不希望服务器开放 SSH、无法由 Certd 直接访问目标服务器的场景。 + +项目主页:[AtomGit](https://atomgit.com/certd/certd-client/) | [GitHub](https://github.com/certd/certd-client/) +下载地址:[AtomGit Releases](https://atomgit.com/certd/certd-client/releases) | [GitHub Releases](https://github.com/certd/certd-client/releases) + +### 第三方客户端:SSL-Assistant `SSL Assistant` 是一个基于 Go 语言开发的跨平台证书部署管理助手。 支持自动扫描主机`Nginx`配置,然后从Certd拉取证书并部署。 在不想暴露ssh主机密码情况下,该工具非常好用。 diff --git a/packages/ui/certd-client/src/layout/components/menu/index.less b/packages/ui/certd-client/src/layout/components/menu/index.less deleted file mode 100644 index 80d2be846..000000000 --- a/packages/ui/certd-client/src/layout/components/menu/index.less +++ /dev/null @@ -1,15 +0,0 @@ -.fs-menu-wrapper { - height: 100%; - overflow-y: auto; - &.fs-menu-better-scroll { - overflow-y: hidden; - } - .menu-item-title { - display: flex; - align-items: center; - .fs-icon { - font-size: 16px !important; - min-width: 16px !important; - } - } -} diff --git a/packages/ui/certd-client/src/layout/components/menu/index.vue b/packages/ui/certd-client/src/layout/components/menu/index.vue deleted file mode 100644 index 4605f5704..000000000 --- a/packages/ui/certd-client/src/layout/components/menu/index.vue +++ /dev/null @@ -1,124 +0,0 @@ - - - - diff --git a/packages/ui/certd-client/src/layout/components/menu/index1.tsx b/packages/ui/certd-client/src/layout/components/menu/index1.tsx deleted file mode 100644 index e21c7d1ca..000000000 --- a/packages/ui/certd-client/src/layout/components/menu/index1.tsx +++ /dev/null @@ -1,183 +0,0 @@ -import { useRoute, useRouter } from "vue-router"; -import { ref, watch, onMounted, onUnmounted, resolveComponent, nextTick, defineComponent } from "vue"; -import * as _ from "lodash-es"; -import BScroll from "better-scroll"; -import "./index.less"; -import { utils } from "@fast-crud/fast-crud"; -import { routerUtils } from "/@/utils/util.router"; - -defineOptions(); - -export default defineComponent({ - name: "FsMenu", - inheritAttrs: true, - props: { - menus: {}, - expandSelected: { - default: false, - }, - scroll: {}, - }, - setup(props, ctx) { - async function onSelect(item: any) { - await routerUtils.open(item.key); - } - - const items = ref([]); - - function buildItemMenus(menus: any) { - if (menus == null) { - return; - } - const list: any = []; - for (const sub of menus) { - const item: any = { - key: sub.path, - label: sub.title, - title: sub.title, - icon: () => { - return ; - }, - }; - list.push(item); - if (sub.children && sub.children.length > 0) { - item.children = buildItemMenus(sub.children); - } - } - return list; - } - items.value = buildItemMenus(props.menus); - console.log("items", items.value); - const fsIcon = resolveComponent("FsIcon"); - - const buildMenus = (children: any) => { - const slots: any = []; - if (children == null) { - return slots; - } - for (const sub of children) { - if (sub.meta?.show != null) { - if (sub.meta.show === false || (typeof sub.meta.show === "function" && !sub.meta.show())) { - continue; - } - } - const title: any = () => { - const icon = sub.icon || sub?.meta?.icon; - if (icon) { - // @ts-ignore , anticon必须要有,不然不能折叠 - return ( -
- - {sub.title} -
- ); - } - return sub.title; - }; - if (sub.children && sub.children.length > 0) { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const subSlots = { - default: () => { - return buildMenus(sub.children); - }, - title, - }; - function onTitleClick() { - if (sub.path && ctx.attrs.mode === "horizontal") { - open(sub.path); - } - } - slots.push(); - } else { - slots.push( - - {title} - - ); - } - } - return slots; - }; - const slots = { - default() { - return buildMenus(props.menus); - }, - }; - const selectedKeys = ref([]); - const openKeys = ref([]); - - const route = useRoute(); - const router = useRouter(); - - function openSelectedParents(fullPath: any) { - if (!props.expandSelected) { - return; - } - if (props.menus == null) { - return; - } - const keys: any = []; - let changed = false; - utils.deepdash.forEachDeep(props.menus, (value: any, key: any, parent: any, context: any) => { - if (value == null) { - return; - } - if (value.path === fullPath) { - _.forEach(context.parents, item => { - if (item.value instanceof Array) { - return; - } - keys.push(item.value.path); - }); - } - }); - if (keys.length > 0) { - for (const key of keys) { - if (openKeys.value.indexOf(key) === -1) { - openKeys.value.push(key); - changed = true; - } - } - } - return changed; - } - - // const { asideMenuRef, onOpenChange } = useBetterScroll(props.scroll as any); - - watch( - () => { - return route.fullPath; - }, - path => { - // path = route.fullPath; - selectedKeys.value = [path]; - const changed = openSelectedParents(path); - if (changed) { - // onOpenChange(); - } - }, - { - immediate: true, - } - ); - return () => { - const menu = ( - - ); - const classNames = { "fs-menu-wrapper": true, "fs-menu-better-scroll": props.scroll }; - return
{menu}
; - }; - }, -}); diff --git a/packages/ui/certd-client/src/layout/layout-basic.vue b/packages/ui/certd-client/src/layout/layout-basic.vue index 39a2f3f78..944802f79 100644 --- a/packages/ui/certd-client/src/layout/layout-basic.vue +++ b/packages/ui/certd-client/src/layout/layout-basic.vue @@ -75,6 +75,9 @@ onMounted(async () => { function goGithub() { window.open("https://github.com/certd/certd"); } +function goCertdClient() { + window.open("https://github.com/certd/certd-client"); +} const settingsStore = useSettingStore(); const chatBox = ref(); const openChat = (q: string) => { @@ -105,6 +108,9 @@ const projectStore = useProjectStore();
+ diff --git a/packages/ui/certd-client/src/layout/layout-framework.vue b/packages/ui/certd-client/src/layout/layout-framework.vue deleted file mode 100644 index 2776975e6..000000000 --- a/packages/ui/certd-client/src/layout/layout-framework.vue +++ /dev/null @@ -1,303 +0,0 @@ - - - - diff --git a/packages/ui/certd-client/src/locales/langs/en-US/certd/navigation.ts b/packages/ui/certd-client/src/locales/langs/en-US/certd/navigation.ts index 52bbdbcbd..3b0c6beab 100644 --- a/packages/ui/certd-client/src/locales/langs/en-US/certd/navigation.ts +++ b/packages/ui/certd-client/src/locales/langs/en-US/certd/navigation.ts @@ -26,6 +26,7 @@ export default { myTrade: "My Orders", inviteCommission: "Incentive Plan", paymentReturn: "Payment Return", + client: "Certd Client", source: "Source Code", github: "GitHub", gitee: "Gitee", diff --git a/packages/ui/certd-client/src/locales/langs/zh-CN/certd/navigation.ts b/packages/ui/certd-client/src/locales/langs/zh-CN/certd/navigation.ts index ef5583df6..470934352 100644 --- a/packages/ui/certd-client/src/locales/langs/zh-CN/certd/navigation.ts +++ b/packages/ui/certd-client/src/locales/langs/zh-CN/certd/navigation.ts @@ -27,6 +27,7 @@ export default { myWallet: "我的钱包", inviteCommission: "激励计划", paymentReturn: "支付返回", + client: "主机自动拉取证书客户端", source: "源码", github: "github", gitee: "gitee", diff --git a/packages/ui/certd-client/src/router/resolve.ts b/packages/ui/certd-client/src/router/resolve.ts index 0169e2cef..c611edd88 100644 --- a/packages/ui/certd-client/src/router/resolve.ts +++ b/packages/ui/certd-client/src/router/resolve.ts @@ -1,7 +1,6 @@ import LayoutPass from "/src/layout/layout-pass.vue"; import { cloneDeep } from "lodash-es"; import { outsideResource } from "./source/outside"; -import { headerResource } from "./source/header"; import { frameworkResource } from "./source/framework"; const modules = import.meta.glob("/src/views/**/*.vue"); @@ -144,11 +143,9 @@ function flatSubRouters(routers: any) { const frameworkRet = buildMenusAndRouters(frameworkResource); const outsideRet = buildMenusAndRouters(outsideResource); -const headerRet = buildMenusAndRouters(headerResource); const outsideRoutes = outsideRet.routes; const frameworkRoutes = frameworkRet.routes; const routes = [...outsideRoutes, ...frameworkRoutes]; const frameworkMenus = frameworkRet.menus; -const headerMenus = headerRet.menus; -export { routes, outsideRoutes, frameworkRoutes, frameworkMenus, headerMenus, findMenus, filterMenus }; +export { routes, outsideRoutes, frameworkRoutes, frameworkMenus, findMenus, filterMenus }; diff --git a/packages/ui/certd-client/src/router/source/header.ts b/packages/ui/certd-client/src/router/source/header.ts deleted file mode 100644 index 0debcd8c6..000000000 --- a/packages/ui/certd-client/src/router/source/header.ts +++ /dev/null @@ -1,35 +0,0 @@ -import i18n from "/@/locales/i18n"; - -export const headerResource = [ - { - title: "certd.helpDoc", - path: "https://certd.docmirror.cn", - meta: { - icon: "ion:document-text-outline", - }, - }, - { - title: "certd.source", - name: "source", - key: "source", - meta: { - icon: "ion:git-branch-outline", - }, - children: [ - { - title: "certd.github", - path: "https://github.com/certd/certd", - meta: { - icon: "ion:logo-github", - }, - }, - { - title: "certd.gitee", - path: "https://gitee.com/certd/certd", - meta: { - icon: "ion:logo-octocat", - }, - }, - ], - }, -]; diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue index d3e35db90..b62cdc116 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue @@ -8,6 +8,9 @@ +