Compare commits
52 Commits
v1.38.1
...
640950d4c8
| Author | SHA1 | Date | |
|---|---|---|---|
| 640950d4c8 | |||
| 998de0f9a0 | |||
| ce6e515309 | |||
| e054c8fc55 | |||
| 9fa1c2eb3e | |||
| 64a314c19e | |||
| 40be42406c | |||
| bca0eefc83 | |||
| 662ca19f8f | |||
| 65f9d482f3 | |||
| 7058d5cb93 | |||
| f7b13c69e9 | |||
| 9f21b1a097 | |||
| 53983002b6 | |||
| d3c0914ac1 | |||
| 7eb9694221 | |||
| b8f0d37420 | |||
| 1d5b1c239c | |||
| d1ebc08478 | |||
| 5074a91669 | |||
| 40e56c4040 | |||
| 3b0ed9310a | |||
| f92dc6a1ad | |||
| 0040b76a19 | |||
| 6c6fbabf14 | |||
| 8c2d868093 | |||
| 96c9e74c6f | |||
| d947437c10 | |||
| 83df29d832 | |||
| 607afe864a | |||
| a97cee84f3 | |||
| ad64384891 | |||
| f75c73d739 | |||
| 418bcddc95 | |||
| 61192b998a | |||
| 5ea2b09dc3 | |||
| 5bfc2c4a9b | |||
| 8ec47c3894 | |||
| f4423638a2 | |||
| 7b3444308b | |||
| 5ec9916817 | |||
| be1a70299f | |||
| 8685aa371a | |||
| 0224faa184 | |||
| 8546e326cf | |||
| 9956fd2f04 | |||
| 4f669ca82f | |||
| 1cd3881aa8 | |||
| e634513f7b | |||
| 7b6cde6ae3 | |||
| 18146fdf9e | |||
| 187d04e3a1 |
@@ -1,45 +0,0 @@
|
|||||||
name: build-node-base-image
|
|
||||||
# 废弃,比默认的占用内存更多
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ['v2-dev1']
|
|
||||||
paths:
|
|
||||||
- "scripts/build/Dockerfile"
|
|
||||||
# schedule:
|
|
||||||
# - # 国际时间 19:17 执行,北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间
|
|
||||||
# - cron: '17 19 * * *'
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-node-base-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
lfs: true
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.dockerhub_username }}
|
|
||||||
password: ${{ secrets.dockerhub_password }}
|
|
||||||
|
|
||||||
- name: Build default platforms
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
||||||
push: true
|
|
||||||
context: ./scripts/build/
|
|
||||||
tags: |
|
|
||||||
greper/node-base:22-alpine-2
|
|
||||||
|
|
||||||
@@ -19,6 +19,7 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
deploy-certd-demo:
|
deploy-certd-demo:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
publish-atomgit:
|
publish-atomgit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ permissions:
|
|||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-atomgit:
|
publish-gitee:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
name: publish-github
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ['v2-dev']
|
||||||
|
paths:
|
||||||
|
- "trigger/publish.trigger"
|
||||||
|
workflow_run:
|
||||||
|
workflows: [ "build-image-for-release" ]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
# schedule:
|
||||||
|
# - # 国际时间 19:17 执行,北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间
|
||||||
|
# - cron: '17 19 * * *'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-github:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
lfs: true
|
||||||
|
|
||||||
|
- name: publish_to_github
|
||||||
|
id: publish_to_github
|
||||||
|
run: |
|
||||||
|
export GITHUB_TOKEN=${{ secrets.GH_TOKEN }}
|
||||||
|
rm -rf ./pnpm*.yaml
|
||||||
|
npm install -g pnpm
|
||||||
|
pnpm install
|
||||||
|
npm run publish_to_github
|
||||||
|
working-directory: ./
|
||||||
|
|
||||||
@@ -13,5 +13,8 @@
|
|||||||
"explorer.autoReveal": false,
|
"explorer.autoReveal": false,
|
||||||
"[javascript]": {
|
"[javascript]": {
|
||||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||||
|
},
|
||||||
|
"[less]": {
|
||||||
|
"editor.defaultFormatter": "vscode.css-language-features"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,22 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 编辑插件author不允许出现符号 ([5ea2b09](https://github.com/certd/certd/commit/5ea2b09dc30397c086a2498f958f661e7fef10fc))
|
||||||
|
* 修复插件修改名字和删除后没有注销注册的bug ([61192b9](https://github.com/certd/certd/commit/61192b998a7088a8f446fd224cc242def462a79b))
|
||||||
|
* 修复流水线复制出错的bug ([418bcdd](https://github.com/certd/certd/commit/418bcddc95bf19d2659d2a9cfe336bc059d157b0))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化流水线创建入口,各种证书申请任务类型拆分成多个按钮 ([f75c73d](https://github.com/certd/certd/commit/f75c73d739ee271fb718148416836dbe09bb3266))
|
||||||
|
* 域名导入 ([ad64384](https://github.com/certd/certd/commit/ad64384891c13342980b7559924666dcfb2796c2))
|
||||||
|
* 支持从提供商导入域名列表 ([f442363](https://github.com/certd/certd/commit/f4423638a2ee779d48fc17b3819ce3bee55b0361))
|
||||||
|
* 支持同步域名过期时间 ([a97cee8](https://github.com/certd/certd/commit/a97cee84f3bfdeeb2083d91f748cac5405fed6ae))
|
||||||
|
* cname记录支持批量导入和导出 ([607afe8](https://github.com/certd/certd/commit/607afe864a12d6f50993895a4e10f4c9a3dd8fee))
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ Certd® 是一个免费的全自动证书管理系统,让你的网站证书永
|
|||||||
* **站点证书监控**: 定时监控网站证书的过期时间
|
* **站点证书监控**: 定时监控网站证书的过期时间
|
||||||
* **多用户管理**: 用户可以管理自己的证书流水线
|
* **多用户管理**: 用户可以管理自己的证书流水线
|
||||||
* **多语言支持**: 中英双语切换
|
* **多语言支持**: 中英双语切换
|
||||||
* **一键无忧升级**: 版本向下兼容
|
* **无忧升级**: 版本向下兼容
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -108,12 +108,12 @@ export default defineConfig({
|
|||||||
text: "常见问题",
|
text: "常见问题",
|
||||||
items: [
|
items: [
|
||||||
{text: "QA", link: "/guide/qa/use.md"},
|
{text: "QA", link: "/guide/qa/use.md"},
|
||||||
|
{text: "忘记密码/无法登录", link: "/guide/use/forgotpasswd/"},
|
||||||
{text: "群晖证书部署", link: "/guide/use/synology/"},
|
{text: "群晖证书部署", link: "/guide/use/synology/"},
|
||||||
{text: "腾讯云密钥获取", link: "/guide/use/tencent/"},
|
{text: "腾讯云密钥获取", link: "/guide/use/tencent/"},
|
||||||
{text: "连接windows主机", link: "/guide/use/host/windows.md"},
|
{text: "连接windows主机", link: "/guide/use/host/windows.md"},
|
||||||
{text: "Google EAB获取", link: "/guide/use/google/"},
|
{text: "Google EAB获取", link: "/guide/use/google/"},
|
||||||
{text: "阿里云相关", link: "/guide/use/aliyun/"},
|
{text: "阿里云相关", link: "/guide/use/aliyun/"},
|
||||||
{text: "忘记密码", link: "/guide/use/forgotpasswd/"},
|
|
||||||
{text: "数据备份", link: "/guide/use/backup/"},
|
{text: "数据备份", link: "/guide/use/backup/"},
|
||||||
{text: "Certd本身的证书更新", link: "/guide/use/https/index.md"},
|
{text: "Certd本身的证书更新", link: "/guide/use/https/index.md"},
|
||||||
{text: "js脚本插件使用", link: "/guide/use/custom-script/index.md"},
|
{text: "js脚本插件使用", link: "/guide/use/custom-script/index.md"},
|
||||||
@@ -124,6 +124,7 @@ export default defineConfig({
|
|||||||
{text: "子域名托管", link: "/guide/use/cert/subdomain.md"},
|
{text: "子域名托管", link: "/guide/use/cert/subdomain.md"},
|
||||||
{text: "流水线有效期", link: "/guide/use/pipeline/valid.md"},
|
{text: "流水线有效期", link: "/guide/use/pipeline/valid.md"},
|
||||||
{text: "IP证书申请", link: "/guide/use/cert/ip.md"},
|
{text: "IP证书申请", link: "/guide/use/cert/ip.md"},
|
||||||
|
{text: "插件开发", link: "/guide/use/dev/plugin.md"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,33 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 编辑插件author不允许出现符号 ([5ea2b09](https://github.com/certd/certd/commit/5ea2b09dc30397c086a2498f958f661e7fef10fc))
|
||||||
|
* 修复插件修改名字和删除后没有注销注册的bug ([61192b9](https://github.com/certd/certd/commit/61192b998a7088a8f446fd224cc242def462a79b))
|
||||||
|
* 修复流水线复制出错的bug ([418bcdd](https://github.com/certd/certd/commit/418bcddc95bf19d2659d2a9cfe336bc059d157b0))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化流水线创建入口,各种证书申请任务类型拆分成多个按钮 ([f75c73d](https://github.com/certd/certd/commit/f75c73d739ee271fb718148416836dbe09bb3266))
|
||||||
|
* 域名导入 ([ad64384](https://github.com/certd/certd/commit/ad64384891c13342980b7559924666dcfb2796c2))
|
||||||
|
* 支持从提供商导入域名列表 ([f442363](https://github.com/certd/certd/commit/f4423638a2ee779d48fc17b3819ce3bee55b0361))
|
||||||
|
* 支持同步域名过期时间 ([a97cee8](https://github.com/certd/certd/commit/a97cee84f3bfdeeb2083d91f748cac5405fed6ae))
|
||||||
|
* cname记录支持批量导入和导出 ([607afe8](https://github.com/certd/certd/commit/607afe864a12d6f50993895a4e10f4c9a3dd8fee))
|
||||||
|
|
||||||
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复自定义插件name丢失author导致找不到插件的bug ([2fbb58e](https://github.com/certd/certd/commit/2fbb58eb2b239eab4864f90aa72b0ef2ada38e8f))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化内存占用 ([4fc8acc](https://github.com/certd/certd/commit/4fc8acce8c1beec38c24b0977b71ff6b18cb52c9))
|
||||||
|
* 自定义插件支持使用_ctx.import("/@/xxx.js")以绝对路径引用模块 ([9eace86](https://github.com/certd/certd/commit/9eace86aeeb48c23b55102fc5d42088294d9eb97))
|
||||||
|
|
||||||
# [1.38.0](https://github.com/certd/certd/compare/v1.37.17...v1.38.0) (2026-01-13)
|
# [1.38.0](https://github.com/certd/certd/compare/v1.37.17...v1.38.0) (2026-01-13)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
# 专业版赞助
|
# 专业版赞助
|
||||||
|
|
||||||
## 开源为什么要做专业版收费?
|
|
||||||
1. 纯靠为爱发电不可持续,容易烂尾(比如:我的dev-sidecar项目即便是拥有20K+star,也差点凉凉,幸亏有另外大佬接手用爱发电)
|
|
||||||
2. 没有赞助的项目,作者会比较任性,不会用心倾听用户的心声,不顾用户体验(比如:下意识拒绝需求、频繁破坏性变更升级、全盘推倒重来之类的)
|
|
||||||
3. 没有赞助的项目,交流群的戾气有时候比较重,容易起冲突
|
|
||||||
|
|
||||||
## 赞助权益:
|
|
||||||
1. 可加入专属VIP群,可以获得作者一对一技术支持,必要时可以远程协助
|
|
||||||
# 专业版赞助
|
|
||||||
|
|
||||||
## 开源为什么要做专业版收费?
|
## 开源为什么要做专业版收费?
|
||||||
1. 纯靠为爱发电不可持续,容易烂尾(比如:我的[dev-sidecar项目](https://github.com/docmirror/dev-sidecar)即便是拥有20K+star,也差点凉凉,幸亏有另外大佬接手用爱发电)
|
1. 纯靠为爱发电不可持续,容易烂尾(比如:我的[dev-sidecar项目](https://github.com/docmirror/dev-sidecar)即便是拥有20K+star,也差点凉凉,幸亏有另外大佬接手用爱发电)
|
||||||
2. 没有赞助的项目,作者会比较任性,不会用心倾听用户的心声,不顾用户体验(比如:下意识拒绝需求、频繁破坏性变更升级、全盘推倒重来之类的)
|
2. 没有赞助的项目,作者会比较任性,不会用心倾听用户的心声,不顾用户体验(比如:下意识拒绝需求、频繁破坏性变更升级、全盘推倒重来之类的)
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ Certd 是一款开源、免费、全自动申请和部署更新SSL证书的工
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 1、关于证书续期
|
## 1、关于证书续期
|
||||||
>* 实际上没有办法不改变证书文件本身情况下直接续期或者续签。
|
>* 实际上没有办法不改变证书文件本身情况下直接续期或者续签。
|
||||||
>* 我们所说的续期,其实就是按照全套流程重新申请一份新证书,然后重新部署上去。
|
>* 我们所说的续期,其实就是按照全套流程重新申请一份新证书,然后重新部署上去。
|
||||||
|
|||||||
@@ -5,12 +5,20 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
:::tip
|
||||||
|
|
||||||
|
接口key分两种权限范围:
|
||||||
|
1. 仅开放接口: 仅能访问下面`接口文档`中的接口
|
||||||
|
2. 用户级别: 可访问Certd所有接口,没有文档,可以在浏览器中F12抓取网络请求参考
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
## 接口文档
|
## 接口文档
|
||||||
|
|
||||||
https://apifox.com/apidoc/shared-2e76f8c4-7c58-413b-a32d-a1316529af44/254949529e0
|
https://apifox.com/apidoc/shared-2e76f8c4-7c58-413b-a32d-a1316529af44/254949529e0
|
||||||
|
|
||||||
|
|
||||||
## Token生成方法
|
### Token生成方法
|
||||||
|
|
||||||
header中传入x-certd-token即可调用开放接口
|
header中传入x-certd-token即可调用开放接口
|
||||||
1、首先从OpenKey页面生成keyId,keySecret;
|
1、首先从OpenKey页面生成keyId,keySecret;
|
||||||
@@ -19,10 +27,10 @@ header中传入x-certd-token即可调用开放接口
|
|||||||
4、然后将content和sign分别base64后用.号连接: x-certd-token = base64(content) +"."+base64(sign)
|
4、然后将content和sign分别base64后用.号连接: x-certd-token = base64(content) +"."+base64(sign)
|
||||||
|
|
||||||
|
|
||||||
## 参数
|
### 参数
|
||||||
支持证书id和域名两种方式获取证书。
|
支持证书id和域名两种方式获取证书。
|
||||||
|
|
||||||
## 创建新的证书申请
|
### 创建新的证书申请
|
||||||
参数autoApply=true,将在没有证书时自动触发申请证书,检查逻辑如下:
|
参数autoApply=true,将在没有证书时自动触发申请证书,检查逻辑如下:
|
||||||
1. 如果证书仓库里面有,且没有过期,就直接返回证书
|
1. 如果证书仓库里面有,且没有过期,就直接返回证书
|
||||||
2. 如果没有或者已过期,就会去找流水线,有就触发流水线执行
|
2. 如果没有或者已过期,就会去找流水线,有就触发流水线执行
|
||||||
@@ -30,7 +38,7 @@ header中传入x-certd-token即可调用开放接口
|
|||||||
4. 再次采用相同参数请求接口,如果在申请过程中,就会提示`正在申请中`,可轮循获取状态,直到证书申请成功。
|
4. 再次采用相同参数请求接口,如果在申请过程中,就会提示`正在申请中`,可轮循获取状态,直到证书申请成功。
|
||||||
|
|
||||||
|
|
||||||
## SDK
|
### SDK
|
||||||
待开发
|
待开发
|
||||||
|
|
||||||
## 客户端工具
|
## 客户端工具
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
| 3.| **IIS-部署到IIS站点** | |
|
| 3.| **IIS-部署到IIS站点** | |
|
||||||
| 4.| **上传证书到对象存储OSS** | 支持阿里云OSS、腾讯云COS、七牛云KODO、S3、MinIO、FTP、SFTP |
|
| 4.| **上传证书到对象存储OSS** | 支持阿里云OSS、腾讯云COS、七牛云KODO、S3、MinIO、FTP、SFTP |
|
||||||
| 5.| **主机-部署证书到SSH主机** | 上传证书到主机覆盖原来的证书文件,然后自动执行部署脚本命令使证书生效 |
|
| 5.| **主机-部署证书到SSH主机** | 上传证书到主机覆盖原来的证书文件,然后自动执行部署脚本命令使证书生效 |
|
||||||
| 6.| **Exsi-部署证书到Exsi** | |
|
| 6.| **ESXi-部署证书到ESXi** | |
|
||||||
| 7.| **FTP-上传证书到FTP** | 将证书上传到FTP服务器 |
|
| 7.| **FTP-上传证书到FTP** | 将证书上传到FTP服务器 |
|
||||||
| 8.| **Openwrt-部署证书到Openwrt** | |
|
| 8.| **Openwrt-部署证书到Openwrt** | |
|
||||||
## 3. CDN
|
## 3. CDN
|
||||||
|
|||||||
@@ -15,3 +15,4 @@
|
|||||||
## 2. 图文教程链接
|
## 2. 图文教程链接
|
||||||
如果不方便登录系统,您还可以直接查看 [图文教程](https://gitee.com/certd/certd/blob/v2/step.md)
|
如果不方便登录系统,您还可以直接查看 [图文教程](https://gitee.com/certd/certd/blob/v2/step.md)
|
||||||
|
|
||||||
|

|
||||||
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,19 @@
|
|||||||
|
# 插件开发
|
||||||
|
|
||||||
|
## 插件创建
|
||||||
|
点击自定义插件按钮,填写插件基本信息
|
||||||
|

|
||||||
|
|
||||||
|
创建成功后,会默认打开插件编辑页面,里面默认带有示例代码说明,可以在此基础上进行你的自定义开发
|
||||||
|

|
||||||
|
|
||||||
|
## 插件测试
|
||||||
|
|
||||||
|
在流水线中添加插件任务
|
||||||
|

|
||||||
|
|
||||||
|
配置插件任务参数
|
||||||
|

|
||||||
|
|
||||||
|
点击运行,查看插件任务运行结果
|
||||||
|

|
||||||
@@ -1,7 +1,15 @@
|
|||||||
# 忘记管理员密码
|
# 忘记密码/无法登录
|
||||||
|
|
||||||
|
无法登录的情况:
|
||||||
|
1、忘记管理员密码
|
||||||
|
2、仅有第三方登录,但第三方登录失效,导致无法登录
|
||||||
|
|
||||||
|
请查看如下方法恢复的登录
|
||||||
|
|
||||||
|
## 一、忘记管理员密码
|
||||||
解决方法如下:
|
解决方法如下:
|
||||||
|
|
||||||
## 1. 修改环境变量
|
### 1. 修改环境变量
|
||||||
|
|
||||||
docker部署的:
|
docker部署的:
|
||||||
修改docker-compose.yaml文件,将环境变量`certd_system_resetAdminPasswd`改为`true`
|
修改docker-compose.yaml文件,将环境变量`certd_system_resetAdminPasswd`改为`true`
|
||||||
@@ -18,21 +26,28 @@ services:
|
|||||||
certd_system_resetAdminPasswd=true
|
certd_system_resetAdminPasswd=true
|
||||||
```
|
```
|
||||||
|
|
||||||
## 2. 重启容器
|
### 2. 重启容器
|
||||||
```shell
|
```shell
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
docker logs -f --tail 500 certd
|
docker logs -f --tail 500 certd
|
||||||
# 观察日志,当日志中输出“重置1号管理员用户密码完成”,即可操作下一步
|
# 观察日志,当日志中输出“重置1号管理员用户密码完成”,即可操作下一步
|
||||||
# 这里会打印1号管理员记录的用户名,如果你修改过管理员用户名,请注意查看此条日志
|
# 这里会打印1号管理员记录的用户名,如果你修改过管理员用户名,请注意查看此条日志
|
||||||
```
|
```
|
||||||
## 3. 恢复环境变量
|
### 3. 恢复环境变量
|
||||||
修改docker-compose.yaml,将`certd_system_resetAdminPasswd`改回`false`
|
修改docker-compose.yaml,将`certd_system_resetAdminPasswd`改回`false`
|
||||||
|
|
||||||
## 4. 再次重启容器
|
### 4. 再次重启容器
|
||||||
```shell
|
```shell
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
## 5. 默认密码登录
|
### 5. 默认密码登录
|
||||||
使用`原管理员账号/123456`登录系统,请及时修改管理员密码
|
使用`原管理员账号/123456`登录系统,请及时修改管理员密码
|
||||||
> 默认管理员账号: admin
|
> 默认管理员账号: admin
|
||||||
> 如果忘记管理员账号,请查看修改密码时的启动日志,会打印管理员账号名
|
> 如果忘记管理员账号,请查看修改密码时的启动日志,会打印管理员账号名
|
||||||
|
|
||||||
|
|
||||||
|
## 二、仅有第三方登录,没有登录窗口
|
||||||
|
|
||||||
|
当开启仅使用第三方登录模式时,如果第三方登录未配置或已失效,则会导致无法登录
|
||||||
|
|
||||||
|
您可以通过访问 `http://你的certd地址/#/login?oauthOnly=false` 来临时关闭仅使用第三方登录模式,以使用密码登录。
|
||||||
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 58 KiB |
@@ -0,0 +1,2 @@
|
|||||||
|
# 第三方登录配置
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# 用户有效期功能
|
||||||
|
|
||||||
|
可以为用户设置有效期,超过有效期后,用户的流水线将停止运行
|
||||||
|
|
||||||
|
## 开启用户有效期功能
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 设置用户有效期
|
||||||
|
|
||||||
|

|
||||||
|
After Width: | Height: | Size: 14 KiB |
@@ -67,4 +67,31 @@
|
|||||||

|

|
||||||
|
|
||||||
## 6. 配置通知和自动运行
|
## 6. 配置通知和自动运行
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
## 三、 常见问题
|
||||||
|
|
||||||
|
### 1. 登录超时 status:ECONNABORTED
|
||||||
|
如果您的certd部署在群晖里面,可能会遇到登录超时的问题
|
||||||
|
```
|
||||||
|
httpRequest:https://dms.xxxxx.com:5001/webapi/entry.cgi, method:get
|
||||||
|
请求出错: status:ECONNABORTED, statusText:ECONNABORTED
|
||||||
|
Axio:sError: timeout of 120000ms exceeded
|
||||||
|
```
|
||||||
|
可能的原因是是您的dsm域名指向的ip地址在容器内无法访问,导致登录超时
|
||||||
|
|
||||||
|
您可以通过配置域名映射来解决
|
||||||
|
1. 获取群晖dsm内部地址
|
||||||
|
进入certd后台->系统管理->网络测试, 一般会看到 `172.xx.0.2` ,记住这个xx是多少
|
||||||
|

|
||||||
|
|
||||||
|
2. 修改容器编排 docker-compose.yaml
|
||||||
|
|
||||||
|
```
|
||||||
|
services:
|
||||||
|
certd:
|
||||||
|
...
|
||||||
|
extra_hosts: # 放开这段注释
|
||||||
|
- "你的dsm域名地址:172.xx.0.1" # 将xx替换成上面记住的数字
|
||||||
|
```
|
||||||
|
|||||||
|
After Width: | Height: | Size: 109 KiB |
@@ -9,5 +9,5 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmClient": "pnpm",
|
"npmClient": "pnpm",
|
||||||
"version": "1.38.1"
|
"version": "1.38.2"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
"start:server": "cd ./packages/ui/certd-server && npm start",
|
"start:server": "cd ./packages/ui/certd-server && npm start",
|
||||||
"devb": "lerna run dev-build",
|
"devb": "lerna run dev-build",
|
||||||
"i-all": "lerna link && lerna exec npm install ",
|
"i-all": "lerna link && lerna exec npm install ",
|
||||||
"publish": "npm run prepublishOnly2 && lerna publish --force-publish=pro/plus-core --conventional-commits --create-release github && npm run afterpublishOnly ",
|
"publish": "npm run prepublishOnly2 && lerna publish --force-publish=pro/plus-core --conventional-commits && npm run afterpublishOnly ",
|
||||||
"afterpublishOnly": "npm run copylogs && time /t >trigger/build.trigger && git add ./trigger/build.trigger && git commit -m \"build: trigger build image\" && TIMEOUT /T 10 && npm run commitAll",
|
"afterpublishOnly": "npm run copylogs && time /t >trigger/build.trigger && git add ./trigger/build.trigger && git commit -m \"build: trigger build image\" && TIMEOUT /T 10 && npm run commitAll",
|
||||||
"transform-sql": "cd ./packages/ui/certd-server/db/ && node --experimental-json-modules transform.js",
|
"transform-sql": "cd ./packages/ui/certd-server/db/ && node --experimental-json-modules transform.js",
|
||||||
"plugin-doc-gen": "cd ./packages/ui/certd-server/ && npm run export-metadata",
|
"plugin-doc-gen": "cd ./packages/ui/certd-server/ && npm run export-metadata",
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
"release": "time /t >trigger/release.trigger && git add trigger/release.trigger && git commit -m \"build: release\" && git push",
|
"release": "time /t >trigger/release.trigger && git add trigger/release.trigger && git commit -m \"build: release\" && git push",
|
||||||
"publish_to_atomgit": "node --experimental-json-modules ./scripts/publish-atomgit.js",
|
"publish_to_atomgit": "node --experimental-json-modules ./scripts/publish-atomgit.js",
|
||||||
"publish_to_gitee": "node --experimental-json-modules ./scripts/publish-gitee.js",
|
"publish_to_gitee": "node --experimental-json-modules ./scripts/publish-gitee.js",
|
||||||
|
"publish_to_github": "node --experimental-json-modules ./scripts/publish-github.js",
|
||||||
"get_version": "node --experimental-json-modules ./scripts/version.js"
|
"get_version": "node --experimental-json-modules ./scripts/version.js"
|
||||||
},
|
},
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/publishlab/node-acme-client/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
## [1.38.1](https://github.com/publishlab/node-acme-client/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/publishlab/node-acme-client/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/acme-client
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"description": "Simple and unopinionated ACME client",
|
"description": "Simple and unopinionated ACME client",
|
||||||
"private": false,
|
"private": false,
|
||||||
"author": "nmorsman",
|
"author": "nmorsman",
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"module": "scr/index.js",
|
"module": "scr/index.js",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"types"
|
"types"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.38.1",
|
"@certd/basic": "^1.38.2",
|
||||||
"@peculiar/x509": "^1.11.0",
|
"@peculiar/x509": "^1.11.0",
|
||||||
"asn1js": "^3.0.5",
|
"asn1js": "^3.0.5",
|
||||||
"axios": "^1.9.0",
|
"axios": "^1.9.0",
|
||||||
@@ -70,5 +70,5 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/basic
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
00:55
|
12:26
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/basic",
|
"name": "@certd/basic",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -47,5 +47,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,16 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复插件修改名字和删除后没有注销注册的bug ([61192b9](https://github.com/certd/certd/commit/61192b998a7088a8f446fd224cc242def462a79b))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持同步域名过期时间 ([a97cee8](https://github.com/certd/certd/commit/a97cee84f3bfdeeb2083d91f748cac5405fed6ae))
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/pipeline",
|
"name": "@certd/pipeline",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
"compile": "tsc --skipLibCheck --watch"
|
"compile": "tsc --skipLibCheck --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.38.1",
|
"@certd/basic": "^1.38.2",
|
||||||
"@certd/plus-core": "^1.38.1",
|
"@certd/plus-core": "^1.38.2",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"reflect-metadata": "^0.1.13"
|
"reflect-metadata": "^0.1.13"
|
||||||
@@ -45,5 +45,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ export type PageSearch = {
|
|||||||
// sortOrder?: "asc" | "desc";
|
// sortOrder?: "asc" | "desc";
|
||||||
};
|
};
|
||||||
|
|
||||||
export type PageRes = {
|
export type PageRes<T = any> = {
|
||||||
pageNo?: number;
|
pageNo?: number;
|
||||||
pageSize?: number;
|
pageSize?: number;
|
||||||
total?: string;
|
total?: number;
|
||||||
list: any[];
|
list: T[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export class Pager {
|
export class Pager {
|
||||||
@@ -34,3 +34,36 @@ export class Pager {
|
|||||||
this.pageNo = Math.ceil(offset / (this.pageSize ?? 50)) + 1;
|
this.pageNo = Math.ceil(offset / (this.pageSize ?? 50)) + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type PageTurnReq<T = any> = {
|
||||||
|
pager: Pager;
|
||||||
|
getPage: (pager: Pager) => Promise<PageRes<T>>;
|
||||||
|
itemHandle?: (item: T) => Promise<void>;
|
||||||
|
batchHandle?: (pageRes: PageRes<T>) => Promise<void>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function doPageTurn<T>(req: PageTurnReq<T>) {
|
||||||
|
let count = 0;
|
||||||
|
const { pager, getPage, itemHandle, batchHandle } = req;
|
||||||
|
while (true) {
|
||||||
|
const pageRes = await getPage(pager);
|
||||||
|
if (!pageRes || !pageRes.list || pageRes.list.length === 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
count += pageRes.list.length;
|
||||||
|
if (batchHandle) {
|
||||||
|
await batchHandle(pageRes);
|
||||||
|
}
|
||||||
|
if (itemHandle) {
|
||||||
|
for (const item of pageRes.list) {
|
||||||
|
await itemHandle(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pageRes.total && pageRes.total >= 0 && count >= pageRes.total) {
|
||||||
|
//遍历完成
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
pager.pageNo++;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|||||||
@@ -22,4 +22,15 @@ const onRegister = ({ key, value }: OnRegisterContext<AbstractTaskPlugin>) => {
|
|||||||
}
|
}
|
||||||
pluginGroups.other.plugins.push(value.define);
|
pluginGroups.other.plugins.push(value.define);
|
||||||
};
|
};
|
||||||
export const pluginRegistry = createRegistry<AbstractTaskPlugin>("plugin", onRegister);
|
|
||||||
|
const onUnRegister = ({ key }: OnRegisterContext<AbstractTaskPlugin>) => {
|
||||||
|
for (const group of Object.values(pluginGroups)) {
|
||||||
|
const index = group.plugins.findIndex(plugin => plugin.name === key);
|
||||||
|
if (index > -1) {
|
||||||
|
group.plugins.splice(index, 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const pluginRegistry = createRegistry<AbstractTaskPlugin>("plugin", onRegister, onUnRegister);
|
||||||
|
|||||||
@@ -27,10 +27,12 @@ export class Registry<T = any> {
|
|||||||
} = {};
|
} = {};
|
||||||
|
|
||||||
onRegister?: OnRegister<T>;
|
onRegister?: OnRegister<T>;
|
||||||
|
onUnRegister?: OnRegister<T>;
|
||||||
|
|
||||||
constructor(type: string, onRegister?: OnRegister<T>) {
|
constructor(type: string, onRegister?: OnRegister<T>, onUnRegister?: OnRegister<T>) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.onRegister = onRegister;
|
this.onRegister = onRegister;
|
||||||
|
this.onUnRegister = onUnRegister;
|
||||||
}
|
}
|
||||||
|
|
||||||
register(key: string, value: RegistryItem<T>) {
|
register(key: string, value: RegistryItem<T>) {
|
||||||
@@ -49,6 +51,13 @@ export class Registry<T = any> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unRegister(key: string) {
|
unRegister(key: string) {
|
||||||
|
if (this.onUnRegister) {
|
||||||
|
this.onUnRegister({
|
||||||
|
registry: this,
|
||||||
|
key,
|
||||||
|
value: this.storage[key],
|
||||||
|
});
|
||||||
|
}
|
||||||
delete this.storage[key];
|
delete this.storage[key];
|
||||||
logger.info(`反注册插件:${this.type}:${key}`);
|
logger.info(`反注册插件:${this.type}:${key}`);
|
||||||
}
|
}
|
||||||
@@ -108,7 +117,7 @@ export class Registry<T = any> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createRegistry<T>(type: string, onRegister?: OnRegister<T>): Registry<T> {
|
export function createRegistry<T>(type: string, onRegister?: OnRegister<T>, onUnRegister?: OnRegister<T>): Registry<T> {
|
||||||
const pipelineregistrycacheKey = "PIPELINE_REGISTRY_CACHE";
|
const pipelineregistrycacheKey = "PIPELINE_REGISTRY_CACHE";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
let cached: any = global[pipelineregistrycacheKey];
|
let cached: any = global[pipelineregistrycacheKey];
|
||||||
@@ -121,7 +130,7 @@ export function createRegistry<T>(type: string, onRegister?: OnRegister<T>): Reg
|
|||||||
if (cached[type]) {
|
if (cached[type]) {
|
||||||
return cached[type];
|
return cached[type];
|
||||||
}
|
}
|
||||||
const newRegistry = new Registry<T>(type, onRegister);
|
const newRegistry = new Registry<T>(type, onRegister, onUnRegister);
|
||||||
cached[type] = newRegistry;
|
cached[type] = newRegistry;
|
||||||
return newRegistry;
|
return newRegistry;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-huawei
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-huawei",
|
"name": "@certd/lib-huawei",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"main": "./dist/bundle.js",
|
"main": "./dist/bundle.js",
|
||||||
"module": "./dist/bundle.js",
|
"module": "./dist/bundle.js",
|
||||||
"types": "./dist/d/index.d.ts",
|
"types": "./dist/d/index.d.ts",
|
||||||
@@ -24,5 +24,5 @@
|
|||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"tslib": "^2.8.1"
|
"tslib": "^2.8.1"
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-iframe
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-iframe",
|
"name": "@certd/lib-iframe",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -31,5 +31,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/jdcloud
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/jdcloud",
|
"name": "@certd/jdcloud",
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"description": "jdcloud openApi sdk",
|
"description": "jdcloud openApi sdk",
|
||||||
"main": "./dist/bundle.js",
|
"main": "./dist/bundle.js",
|
||||||
"module": "./dist/bundle.js",
|
"module": "./dist/bundle.js",
|
||||||
@@ -56,5 +56,5 @@
|
|||||||
"fetch"
|
"fetch"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-k8s
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-k8s",
|
"name": "@certd/lib-k8s",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.38.1",
|
"@certd/basic": "^1.38.2",
|
||||||
"@kubernetes/client-node": "0.21.0"
|
"@kubernetes/client-node": "0.21.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -32,5 +32,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-server
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-server",
|
"name": "@certd/lib-server",
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -28,11 +28,11 @@
|
|||||||
],
|
],
|
||||||
"license": "AGPL",
|
"license": "AGPL",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.38.1",
|
"@certd/acme-client": "^1.38.2",
|
||||||
"@certd/basic": "^1.38.1",
|
"@certd/basic": "^1.38.2",
|
||||||
"@certd/pipeline": "^1.38.1",
|
"@certd/pipeline": "^1.38.2",
|
||||||
"@certd/plugin-lib": "^1.38.1",
|
"@certd/plugin-lib": "^1.38.2",
|
||||||
"@certd/plus-core": "^1.38.1",
|
"@certd/plus-core": "^1.38.2",
|
||||||
"@midwayjs/cache": "3.14.0",
|
"@midwayjs/cache": "3.14.0",
|
||||||
"@midwayjs/core": "3.20.11",
|
"@midwayjs/core": "3.20.11",
|
||||||
"@midwayjs/i18n": "3.20.13",
|
"@midwayjs/i18n": "3.20.13",
|
||||||
@@ -64,5 +64,5 @@
|
|||||||
"typeorm": "^0.3.11",
|
"typeorm": "^0.3.11",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,3 +255,4 @@ export class SysSafeSetting extends BaseSettings {
|
|||||||
autoHiddenTimes: 5,
|
autoHiddenTimes: 5,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/midway-flyway-js",
|
"name": "@certd/midway-flyway-js",
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -46,5 +46,5 @@
|
|||||||
"typeorm": "^0.3.11",
|
"typeorm": "^0.3.11",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-cert
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-cert",
|
"name": "@certd/plugin-cert",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
"compile": "tsc --skipLibCheck --watch"
|
"compile": "tsc --skipLibCheck --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.38.1",
|
"@certd/acme-client": "^1.38.2",
|
||||||
"@certd/basic": "^1.38.1",
|
"@certd/basic": "^1.38.2",
|
||||||
"@certd/pipeline": "^1.38.1",
|
"@certd/pipeline": "^1.38.2",
|
||||||
"@certd/plugin-lib": "^1.38.1",
|
"@certd/plugin-lib": "^1.38.2",
|
||||||
"psl": "^1.9.0",
|
"psl": "^1.9.0",
|
||||||
"punycode.js": "^2.3.1"
|
"punycode.js": "^2.3.1"
|
||||||
},
|
},
|
||||||
@@ -38,5 +38,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 域名导入 ([ad64384](https://github.com/certd/certd/commit/ad64384891c13342980b7559924666dcfb2796c2))
|
||||||
|
* 支持从提供商导入域名列表 ([f442363](https://github.com/certd/certd/commit/f4423638a2ee779d48fc17b3819ce3bee55b0361))
|
||||||
|
* 支持同步域名过期时间 ([a97cee8](https://github.com/certd/certd/commit/a97cee84f3bfdeeb2083d91f748cac5405fed6ae))
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-lib",
|
"name": "@certd/plugin-lib",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -22,10 +22,10 @@
|
|||||||
"@alicloud/pop-core": "^1.7.10",
|
"@alicloud/pop-core": "^1.7.10",
|
||||||
"@alicloud/tea-util": "^1.4.11",
|
"@alicloud/tea-util": "^1.4.11",
|
||||||
"@aws-sdk/client-s3": "^3.964.0",
|
"@aws-sdk/client-s3": "^3.964.0",
|
||||||
"@certd/acme-client": "^1.38.1",
|
"@certd/acme-client": "^1.38.2",
|
||||||
"@certd/basic": "^1.38.1",
|
"@certd/basic": "^1.38.2",
|
||||||
"@certd/pipeline": "^1.38.1",
|
"@certd/pipeline": "^1.38.2",
|
||||||
"@certd/plus-core": "^1.38.1",
|
"@certd/plus-core": "^1.38.2",
|
||||||
"@kubernetes/client-node": "0.21.0",
|
"@kubernetes/client-node": "0.21.0",
|
||||||
"ali-oss": "^6.22.0",
|
"ali-oss": "^6.22.0",
|
||||||
"basic-ftp": "^5.0.5",
|
"basic-ftp": "^5.0.5",
|
||||||
@@ -57,5 +57,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "a218cd0ffb16b658dd261e106cc0dbea63034756"
|
"gitHead": "f92dc6a1ad103de9cc184da3b84096943906cb59"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { HttpClient, ILogger, utils } from "@certd/basic";
|
import { HttpClient, ILogger, utils } from "@certd/basic";
|
||||||
import { IAccess, IServiceGetter, Registrable } from "@certd/pipeline";
|
import { IAccess, IServiceGetter, PageRes, PageSearch, Registrable } from "@certd/pipeline";
|
||||||
|
|
||||||
export type DnsProviderDefine = Registrable & {
|
export type DnsProviderDefine = Registrable & {
|
||||||
accessType: string;
|
accessType: string;
|
||||||
@@ -28,6 +28,11 @@ export type DnsProviderContext = {
|
|||||||
serviceGetter: IServiceGetter;
|
serviceGetter: IServiceGetter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type DomainRecord = {
|
||||||
|
id: string;
|
||||||
|
domain: string;
|
||||||
|
};
|
||||||
|
|
||||||
export interface IDnsProvider<T = any> {
|
export interface IDnsProvider<T = any> {
|
||||||
onInstance(): Promise<void>;
|
onInstance(): Promise<void>;
|
||||||
|
|
||||||
@@ -51,6 +56,8 @@ export interface IDnsProvider<T = any> {
|
|||||||
|
|
||||||
//中文域名是否需要punycode转码,如果返回True,则使用punycode来添加解析记录,否则使用中文域名添加解析记录
|
//中文域名是否需要punycode转码,如果返回True,则使用punycode来添加解析记录,否则使用中文域名添加解析记录
|
||||||
usePunyCode(): boolean;
|
usePunyCode(): boolean;
|
||||||
|
|
||||||
|
getDomainListPage(pager: PageSearch): Promise<PageRes<DomainRecord>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISubDomainsGetter {
|
export interface ISubDomainsGetter {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { CreateRecordOptions, DnsProviderContext, DnsProviderDefine, IDnsProvider, RemoveRecordOptions } from "./api.js";
|
|
||||||
import { dnsProviderRegistry } from "./registry.js";
|
|
||||||
import { HttpClient, ILogger } from "@certd/basic";
|
import { HttpClient, ILogger } from "@certd/basic";
|
||||||
|
import { PageRes, PageSearch } from "@certd/pipeline";
|
||||||
import punycode from "punycode.js";
|
import punycode from "punycode.js";
|
||||||
|
import { CreateRecordOptions, DnsProviderContext, DnsProviderDefine, DomainRecord, IDnsProvider, RemoveRecordOptions } from "./api.js";
|
||||||
|
import { dnsProviderRegistry } from "./registry.js";
|
||||||
export abstract class AbstractDnsProvider<T = any> implements IDnsProvider<T> {
|
export abstract class AbstractDnsProvider<T = any> implements IDnsProvider<T> {
|
||||||
ctx!: DnsProviderContext;
|
ctx!: DnsProviderContext;
|
||||||
http!: HttpClient;
|
http!: HttpClient;
|
||||||
@@ -44,6 +45,10 @@ export abstract class AbstractDnsProvider<T = any> implements IDnsProvider<T> {
|
|||||||
abstract onInstance(): Promise<void>;
|
abstract onInstance(): Promise<void>;
|
||||||
|
|
||||||
abstract removeRecord(options: RemoveRecordOptions<T>): Promise<void>;
|
abstract removeRecord(options: RemoveRecordOptions<T>): Promise<void>;
|
||||||
|
|
||||||
|
async getDomainListPage(req: PageSearch): Promise<PageRes<DomainRecord>> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createDnsProvider(opts: { dnsProviderType: string; context: DnsProviderContext }): Promise<IDnsProvider> {
|
export async function createDnsProvider(opts: { dnsProviderType: string; context: DnsProviderContext }): Promise<IDnsProvider> {
|
||||||
|
|||||||
@@ -4,6 +4,14 @@ import psl from "psl";
|
|||||||
import { ILogger, utils, logger as globalLogger } from "@certd/basic";
|
import { ILogger, utils, logger as globalLogger } from "@certd/basic";
|
||||||
import { resolveDomainBySoaRecord } from "@certd/acme-client";
|
import { resolveDomainBySoaRecord } from "@certd/acme-client";
|
||||||
|
|
||||||
|
export function parseDomainByPsl(fullDomain: string) {
|
||||||
|
const parsed = psl.parse(fullDomain) as psl.ParsedDomain;
|
||||||
|
if (parsed.error) {
|
||||||
|
throw new Error(`解析${fullDomain}域名失败:` + JSON.stringify(parsed.error));
|
||||||
|
}
|
||||||
|
return parsed;
|
||||||
|
}
|
||||||
|
|
||||||
export class DomainParser implements IDomainParser {
|
export class DomainParser implements IDomainParser {
|
||||||
subDomainsGetter: ISubDomainsGetter;
|
subDomainsGetter: ISubDomainsGetter;
|
||||||
logger: ILogger;
|
logger: ILogger;
|
||||||
@@ -13,11 +21,7 @@ export class DomainParser implements IDomainParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parseDomainByPsl(fullDomain: string) {
|
parseDomainByPsl(fullDomain: string) {
|
||||||
const parsed = psl.parse(fullDomain) as psl.ParsedDomain;
|
return parseDomainByPsl(fullDomain).domain as string;
|
||||||
if (parsed.error) {
|
|
||||||
throw new Error(`解析${fullDomain}域名失败:` + JSON.stringify(parsed.error));
|
|
||||||
}
|
|
||||||
return parsed.domain as string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async parse(fullDomain: string) {
|
async parse(fullDomain: string) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ VITE_APP_API=api
|
|||||||
VITE_APP_PM_ENABLED=true
|
VITE_APP_PM_ENABLED=true
|
||||||
VITE_APP_TITLE=Certd
|
VITE_APP_TITLE=Certd
|
||||||
VITE_APP_SLOGAN=让你的证书永不过期
|
VITE_APP_SLOGAN=让你的证书永不过期
|
||||||
VITE_APP_COPYRIGHT_YEAR=2021-2025
|
VITE_APP_COPYRIGHT_YEAR=2021-2026
|
||||||
VITE_APP_COPYRIGHT_NAME=handsfree.work
|
VITE_APP_COPYRIGHT_NAME=handsfree.work
|
||||||
VITE_APP_COPYRIGHT_URL=https://certd.handsfree.work
|
VITE_APP_COPYRIGHT_URL=https://certd.handsfree.work
|
||||||
VITE_APP_LOGO=static/images/logo/logo.svg
|
VITE_APP_LOGO=static/images/logo/logo.svg
|
||||||
|
|||||||
@@ -3,6 +3,21 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 编辑插件author不允许出现符号 ([5ea2b09](https://github.com/certd/certd/commit/5ea2b09dc30397c086a2498f958f661e7fef10fc))
|
||||||
|
* 修复流水线复制出错的bug ([418bcdd](https://github.com/certd/certd/commit/418bcddc95bf19d2659d2a9cfe336bc059d157b0))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化流水线创建入口,各种证书申请任务类型拆分成多个按钮 ([f75c73d](https://github.com/certd/certd/commit/f75c73d739ee271fb718148416836dbe09bb3266))
|
||||||
|
* 域名导入 ([ad64384](https://github.com/certd/certd/commit/ad64384891c13342980b7559924666dcfb2796c2))
|
||||||
|
* 支持从提供商导入域名列表 ([f442363](https://github.com/certd/certd/commit/f4423638a2ee779d48fc17b3819ce3bee55b0361))
|
||||||
|
* 支持同步域名过期时间 ([a97cee8](https://github.com/certd/certd/commit/a97cee84f3bfdeeb2083d91f748cac5405fed6ae))
|
||||||
|
* cname记录支持批量导入和导出 ([607afe8](https://github.com/certd/certd/commit/607afe864a12d6f50993895a4e10f4c9a3dd8fee))
|
||||||
|
|
||||||
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
## [1.38.1](https://github.com/certd/certd/compare/v1.38.0...v1.38.1) (2026-01-15)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/ui-client
|
**Note:** Version bump only for package @certd/ui-client
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-client",
|
"name": "@certd/ui-client",
|
||||||
"version": "1.38.1",
|
"version": "1.38.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --open",
|
"dev": "vite --open",
|
||||||
@@ -106,8 +106,8 @@
|
|||||||
"zod-defaults": "^0.1.3"
|
"zod-defaults": "^0.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@certd/lib-iframe": "^1.38.1",
|
"@certd/lib-iframe": "^1.38.2",
|
||||||
"@certd/pipeline": "^1.38.1",
|
"@certd/pipeline": "^1.38.2",
|
||||||
"@rollup/plugin-commonjs": "^25.0.7",
|
"@rollup/plugin-commonjs": "^25.0.7",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@types/chai": "^4.3.12",
|
"@types/chai": "^4.3.12",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-select>
|
<a-select :value="value" @update:value="onChange">
|
||||||
<a-select-option v-for="item of options" :key="item.value" :value="item.value" :label="item.label">
|
<a-select-option v-for="item of options" :key="item.value" :value="item.value" :label="item.label">
|
||||||
<span class="flex-o">
|
<span class="flex-o">
|
||||||
<fs-icon :icon="item.icon" class="fs-16 color-blue mr-5" />
|
<fs-icon :icon="item.icon" class="fs-16 color-blue mr-5" />
|
||||||
@@ -12,5 +12,11 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
options: { value: any; label: string; icon: string }[];
|
options: { value: any; label: string; icon: string }[];
|
||||||
|
value: any;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const emit = defineEmits(["update:value"]);
|
||||||
|
function onChange(value: any) {
|
||||||
|
emit("update:value", value);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<icon-select class="dns-provider-selector" :value="modelValue" :options="options" @update:value="onChanged"> </icon-select>
|
<icon-select class="dns-provider-selector" :value="modelValue" :options="options" @update:value="atChange"> </icon-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -37,7 +37,7 @@ export default {
|
|||||||
}
|
}
|
||||||
onCreate();
|
onCreate();
|
||||||
|
|
||||||
function onChanged(value: any) {
|
function atChange(value: any) {
|
||||||
ctx.emit("update:modelValue", value);
|
ctx.emit("update:modelValue", value);
|
||||||
onSelectedChange(value);
|
onSelectedChange(value);
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ export default {
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
options,
|
options,
|
||||||
onChanged,
|
atChange,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import { dict } from "@fast-crud/fast-crud";
|
|||||||
import * as api from "./api.js";
|
import * as api from "./api.js";
|
||||||
import CnameTip from "./cname-tip.vue";
|
import CnameTip from "./cname-tip.vue";
|
||||||
import { Modal } from "ant-design-vue";
|
import { Modal } from "ant-design-vue";
|
||||||
|
import { utils } from "/@/utils/index.js";
|
||||||
const statusDict = dict({
|
const statusDict = dict({
|
||||||
data: [
|
data: [
|
||||||
{ label: "待设置CNAME", value: "cname", color: "warning" },
|
{ label: "待设置CNAME", value: "cname", color: "warning" },
|
||||||
|
|||||||
@@ -0,0 +1,209 @@
|
|||||||
|
<template>
|
||||||
|
<div class="domain-select">
|
||||||
|
<div class="flex flex-row">
|
||||||
|
<a-select
|
||||||
|
class="domain-select-input"
|
||||||
|
:dropdown-style="dropdownStyle"
|
||||||
|
show-search
|
||||||
|
:filter-option="filterOption"
|
||||||
|
:options="optionsRef"
|
||||||
|
:value="value"
|
||||||
|
v-bind="attrs"
|
||||||
|
@click="onClick"
|
||||||
|
@update:value="emit('update:value', $event)"
|
||||||
|
>
|
||||||
|
<template #dropdownRender="{ menuNode }">
|
||||||
|
<template v-if="search">
|
||||||
|
<div class="flex w-full items-center justify-between flex-wrap" style="padding: 4px 8px">
|
||||||
|
<div class="flex-1 flex flex-row items-center">
|
||||||
|
<a-input ref="inputRef" v-model:value="searchKeyRef" class="flex-1" allow-clear placeholder="这里可以搜索域名(数据来自“设置->域名管理”),您也可以直接在上面输入框输入" @keydown.enter="doSearch" />
|
||||||
|
<fs-button type="primary" class="m-1" :loading="loading" icon="mingcute:search-2-line" @click="doSearch"> 查询 </fs-button>
|
||||||
|
</div>
|
||||||
|
<div class="manager flex flex-row items-center">
|
||||||
|
<fs-button type="primary" class="m-1" icon="mingcute:vip-1-line" @click="openDomainImportDialog">导入域名</fs-button>
|
||||||
|
<fs-button class="m-1" type="primary" icon="carbon:gui-management" @click="openDomainManager">管理域名</fs-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="hasError" class="helper p-2" :class="{ error: hasError }">
|
||||||
|
{{ message }}
|
||||||
|
</div>
|
||||||
|
<a-divider style="margin: 4px 0" />
|
||||||
|
</template>
|
||||||
|
<v-nodes :vnodes="menuNode" />
|
||||||
|
|
||||||
|
<div v-if="pager === true" class="pager text-center p-5" @click="paginationClick">
|
||||||
|
<a-pagination v-model:current="pagerRef.pageNo" simple :total="pagerRef.total" :page-size="pagerRef.pageSize" @change="onPageChange" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #option="scope">
|
||||||
|
<div class="flex flex-row items-center">
|
||||||
|
<span class="min-w-60">{{ scope.label }}</span>
|
||||||
|
<div>
|
||||||
|
<fs-values-format :model-value="scope.challengeType" :dict="challengeTypeDict"></fs-values-format>
|
||||||
|
<fs-values-format :model-value="scope.dnsProviderType" :dict="dnsProviderTypeDict"></fs-values-format>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</a-select>
|
||||||
|
<div class="ml-5">
|
||||||
|
<fs-button :loading="loading" title="刷新我的域名列表" icon="ion:refresh-outline" @click="refreshOptions"></fs-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="helper" :class="{ error: hasError }">
|
||||||
|
{{ message }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, defineComponent, ref, Ref, useAttrs } from "vue";
|
||||||
|
import { request } from "/@/api/service";
|
||||||
|
import { Dicts } from "../lib/dicts";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import { useDomainImport, useDomainImportManage } from "/@/views/certd/cert/domain/use";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "DomainSelector",
|
||||||
|
});
|
||||||
|
|
||||||
|
const VNodes = defineComponent({
|
||||||
|
props: {
|
||||||
|
vnodes: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
render() {
|
||||||
|
return this.vnodes;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
search?: boolean;
|
||||||
|
pager?: boolean;
|
||||||
|
value?: any[];
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
"update:value": any;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const attrs = useAttrs();
|
||||||
|
|
||||||
|
const searchKeyRef = ref("");
|
||||||
|
const optionsRef = ref([]);
|
||||||
|
const message = ref("");
|
||||||
|
const hasError = ref(false);
|
||||||
|
const loading = ref(false);
|
||||||
|
const pagerRef: Ref = ref({
|
||||||
|
pageNo: 1,
|
||||||
|
total: 0,
|
||||||
|
pageSize: 20,
|
||||||
|
});
|
||||||
|
const getOptions = async () => {
|
||||||
|
if (loading.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
message.value = "";
|
||||||
|
hasError.value = false;
|
||||||
|
loading.value = true;
|
||||||
|
const pageNo = pagerRef.value.pageNo;
|
||||||
|
const pageSize = pagerRef.value.pageSize;
|
||||||
|
try {
|
||||||
|
const res = await request({
|
||||||
|
url: "/cert/domain/page",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
query: {
|
||||||
|
domain: props.search ? searchKeyRef.value : undefined,
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
offset: (pageNo - 1) * pageSize,
|
||||||
|
limit: pageSize,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const list = res?.records || res || [];
|
||||||
|
|
||||||
|
const options = [];
|
||||||
|
for (let item of list) {
|
||||||
|
options.push({
|
||||||
|
value: item.domain,
|
||||||
|
label: item.domain,
|
||||||
|
dnsProviderType: item.dnsProviderType,
|
||||||
|
challengeType: item.challengeType,
|
||||||
|
});
|
||||||
|
options.push({
|
||||||
|
value: `*.${item.domain}`,
|
||||||
|
label: `*.${item.domain}`,
|
||||||
|
dnsProviderType: item.dnsProviderType,
|
||||||
|
challengeType: item.challengeType,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
optionsRef.value = options;
|
||||||
|
pagerRef.value.total = list.length;
|
||||||
|
if (props.pager) {
|
||||||
|
if (res.total != null) {
|
||||||
|
pagerRef.value.total = res.total;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const filterOption = (input: string, option: any) => {
|
||||||
|
return option.label.toLowerCase().includes(input.toLowerCase()) || String(option.value).toLowerCase().includes(input.toLowerCase());
|
||||||
|
};
|
||||||
|
|
||||||
|
async function onClick() {
|
||||||
|
if (optionsRef.value?.length === 0) {
|
||||||
|
await refreshOptions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function refreshOptions() {
|
||||||
|
await getOptions();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function doSearch() {
|
||||||
|
pagerRef.value.pageNo = 1;
|
||||||
|
await refreshOptions();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function onPageChange(current: any) {
|
||||||
|
await refreshOptions();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function paginationClick(e: any) {
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
const dnsProviderTypeDict = Dicts.dnsProviderTypeDict;
|
||||||
|
const challengeTypeDict = Dicts.challengeTypeDict;
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
function openDomainManager(e: any) {
|
||||||
|
e.preventDefault();
|
||||||
|
// router.push("/certd/cert/domain");
|
||||||
|
window.open(`${window.location.origin}/#/certd/cert/domain`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const openDomainImportManageDialog = useDomainImportManage();
|
||||||
|
function openDomainImportDialog() {
|
||||||
|
openDomainImportManageDialog({
|
||||||
|
afterSubmit: res => {
|
||||||
|
refreshOptions();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const dropdownStyle = ref({
|
||||||
|
zIndex: 2000,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less"></style>
|
||||||
@@ -85,7 +85,9 @@ const message = ref("");
|
|||||||
const hasError = ref(false);
|
const hasError = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const pagerRef: Ref = ref({
|
const pagerRef: Ref = ref({
|
||||||
current: 1,
|
pageNo: 1,
|
||||||
|
total: 0,
|
||||||
|
pageSize: 100,
|
||||||
});
|
});
|
||||||
const getOptions = async () => {
|
const getOptions = async () => {
|
||||||
if (loading.value) {
|
if (loading.value) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import RemoteSelect from "./common/remote-select.vue";
|
|||||||
import RemoteInput from "./common/remote-input.vue";
|
import RemoteInput from "./common/remote-input.vue";
|
||||||
import RemoteTreeSelect from "./common/remote-tree-select.vue";
|
import RemoteTreeSelect from "./common/remote-tree-select.vue";
|
||||||
import CertDomainsGetter from "./common/cert-domains-getter.vue";
|
import CertDomainsGetter from "./common/cert-domains-getter.vue";
|
||||||
|
import DomainSelector from "./common/domain-selector.vue";
|
||||||
import OutputSelector from "/@/components/plugins/common/output-selector/index.vue";
|
import OutputSelector from "/@/components/plugins/common/output-selector/index.vue";
|
||||||
import DnsProviderSelector from "/@/components/plugins/cert/dns-provider-selector/index.vue";
|
import DnsProviderSelector from "/@/components/plugins/cert/dns-provider-selector/index.vue";
|
||||||
import DomainsVerifyPlanEditor from "/@/components/plugins/cert/domains-verify-plan-editor/index.vue";
|
import DomainsVerifyPlanEditor from "/@/components/plugins/cert/domains-verify-plan-editor/index.vue";
|
||||||
@@ -29,6 +30,7 @@ export default {
|
|||||||
app.component("RemoteTreeSelect", RemoteTreeSelect);
|
app.component("RemoteTreeSelect", RemoteTreeSelect);
|
||||||
app.component("RemoteInput", RemoteInput);
|
app.component("RemoteInput", RemoteInput);
|
||||||
app.component("CertDomainsGetter", CertDomainsGetter);
|
app.component("CertDomainsGetter", CertDomainsGetter);
|
||||||
|
app.component("DomainSelector", DomainSelector);
|
||||||
app.component("InputPassword", InputPassword);
|
app.component("InputPassword", InputPassword);
|
||||||
app.component("ParamsShow", ParamsShow);
|
app.component("ParamsShow", ParamsShow);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,4 +28,10 @@ export const Dicts = {
|
|||||||
{ label: "SSH(已废弃,请选择SFTP方式)", value: "ssh", disabled: true },
|
{ label: "SSH(已废弃,请选择SFTP方式)", value: "ssh", disabled: true },
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
domainFromTypeDict: dict({
|
||||||
|
data: [
|
||||||
|
{ value: "manual", label: "手动" },
|
||||||
|
{ value: "auto", label: "自动" },
|
||||||
|
],
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="tsx" setup>
|
<script lang="tsx" setup>
|
||||||
import { defineProps, inject, ref, useAttrs } from "vue";
|
import { inject, ref, useAttrs } from "vue";
|
||||||
import { Modal } from "ant-design-vue";
|
import { Modal } from "ant-design-vue";
|
||||||
import { ComponentPropsType, doRequest } from "/@/components/plugins/lib";
|
import { ComponentPropsType, doRequest } from "/@/components/plugins/lib";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import TutorialSteps from "/@/components/tutorial/tutorial-steps.vue";
|
import TutorialSteps from "/@/components/tutorial/tutorial-steps.vue";
|
||||||
|
import { mitter } from "/@/utils/util.mitt";
|
||||||
|
import { useI18n } from "/@/locales";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "TutorialModal",
|
name: "TutorialModal",
|
||||||
@@ -8,6 +10,7 @@ defineOptions({
|
|||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
showIcon?: boolean;
|
showIcon?: boolean;
|
||||||
|
mode?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const openedRef = ref(false);
|
const openedRef = ref(false);
|
||||||
@@ -15,17 +18,26 @@ function open() {
|
|||||||
openedRef.value = true;
|
openedRef.value = true;
|
||||||
}
|
}
|
||||||
const slots = defineSlots();
|
const slots = defineSlots();
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
mitter.on("openTutorialModal", () => {
|
||||||
|
if (props.mode === "nav") {
|
||||||
|
open();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
const { t } = useI18n();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="tutorial-button pointer" @click="open">
|
<div class="tutorial-button pointer" @click="open">
|
||||||
<template v-if="!slots.default">
|
<template v-if="!slots.default">
|
||||||
<fs-icon v-if="showIcon === false" icon="ant-design:question-circle-outlined" class="mr-0.5"></fs-icon>
|
<fs-icon v-if="showIcon === false" icon="ant-design:question-circle-outlined" class="mr-0.5"></fs-icon>
|
||||||
<div class="hidden md:block">{{ $t("tutorial.title") }}</div>
|
<div class="hidden md:block">{{ t("tutorial.title") }}</div>
|
||||||
</template>
|
</template>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<a-modal v-model:open="openedRef" class="tutorial-modal" width="90%">
|
<a-modal v-model:open="openedRef" class="tutorial-modal" width="90%">
|
||||||
<template #title>{{ $t("tutorial.title") }}</template>
|
<template #title>{{ t("tutorial.title") }}</template>
|
||||||
<tutorial-steps v-if="openedRef" />
|
<tutorial-steps v-if="openedRef" />
|
||||||
<template #footer></template>
|
<template #footer></template>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-steps :current="3" class="mt-10" size="small" :items="steps" @click="goPipeline"></a-steps>
|
<a-steps :current="3" class="mt-10 simple-steps" size="small" :items="steps" @click="goPipeline"></a-steps>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="tsx" setup>
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
||||||
@@ -11,14 +11,26 @@ const { t } = useI18n();
|
|||||||
type Step = {
|
type Step = {
|
||||||
title: string;
|
title: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
icon?: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import { mitter } from "/@/utils/util.mitt";
|
||||||
|
|
||||||
const steps = ref<Step[]>([{ title: t("certd.steps.createPipeline") }, { title: t("certd.steps.addTask") }, { title: t("certd.steps.scheduledRun") }]);
|
const steps = ref<Step[]>([
|
||||||
|
{ title: t("certd.steps.createPipeline"), icon: <fs-icon icon="tabler:circle-number-1-filled"></fs-icon> },
|
||||||
|
{ title: t("certd.steps.addTask"), icon: <fs-icon icon="tabler:circle-number-2-filled"></fs-icon> },
|
||||||
|
{ title: t("certd.steps.scheduledRun"), icon: <fs-icon icon="tabler:circle-number-3-filled"></fs-icon> },
|
||||||
|
]);
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
function goPipeline() {
|
function goPipeline() {
|
||||||
router.push({ path: "/certd/pipeline" });
|
mitter.emit("openTutorialModal");
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.simple-steps {
|
||||||
|
.fs-icon {
|
||||||
|
font-size: 18px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div class="text">
|
<div class="text">
|
||||||
<h3 class="title">{{ number }} {{ currentStepItem.title }}</h3>
|
<h3 class="title">{{ number }} {{ currentStepItem.title }}</h3>
|
||||||
<div class="description mt-5">
|
<div class="description mt-5">
|
||||||
<div v-for="desc of currentStepItem.descriptions">{{ desc }}</div>
|
<div v-for="(desc, index) of currentStepItem.descriptions" :key="index">{{ desc }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="currentStepItem.body">
|
<div v-if="currentStepItem.body">
|
||||||
<fs-render :render-func="currentStepItem.body" />
|
<fs-render :render-func="currentStepItem.body" />
|
||||||
@@ -29,9 +29,12 @@
|
|||||||
<script setup lang="tsx">
|
<script setup lang="tsx">
|
||||||
import { FsRender } from "@fast-crud/fast-crud";
|
import { FsRender } from "@fast-crud/fast-crud";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
||||||
const { t } = useI18n();
|
|
||||||
import SimpleSteps from "./simple-steps.vue";
|
import SimpleSteps from "./simple-steps.vue";
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
mode?: string;
|
||||||
|
}>();
|
||||||
|
const { t } = useI18n();
|
||||||
type Step = {
|
type Step = {
|
||||||
title: string;
|
title: string;
|
||||||
subTitle?: string;
|
subTitle?: string;
|
||||||
@@ -69,10 +72,10 @@ const steps = ref<Step[]>([
|
|||||||
title: t("guide.createCertPipeline.items.successTitle"),
|
title: t("guide.createCertPipeline.items.successTitle"),
|
||||||
descriptions: [t("guide.createCertPipeline.items.successDesc")],
|
descriptions: [t("guide.createCertPipeline.items.successDesc")],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: t("guide.createCertPipeline.items.nextTitle"),
|
// title: t("guide.createCertPipeline.items.nextTitle"),
|
||||||
descriptions: [t("guide.createCertPipeline.items.nextDesc")],
|
// descriptions: [t("guide.createCertPipeline.items.nextDesc")],
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -252,7 +255,7 @@ function previewMask() {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
.text {
|
.text {
|
||||||
width: 350px;
|
width: 400px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -12,16 +12,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="tsx" setup>
|
<script lang="tsx" setup>
|
||||||
import { computed, onMounted, reactive, ref } from "vue";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { computed, onMounted, reactive, ref } from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
import * as api from "./api";
|
import * as api from "./api";
|
||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { useRouter } from "vue-router";
|
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import { mitter } from "/@/utils/util.mitt";
|
|
||||||
import { useI18n } from "vue-i18n";
|
|
||||||
import { env } from "/@/utils/util.env";
|
import { env } from "/@/utils/util.env";
|
||||||
|
import { mitter } from "/@/utils/util.mitt";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="tsx" setup>
|
<script lang="tsx" setup>
|
||||||
import { ref, watch, defineOptions } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { routerUtils } from "/@/utils/util.router";
|
import { routerUtils } from "/@/utils/util.router";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { utils } from "@fast-crud/fast-crud";
|
import { utils } from "@fast-crud/fast-crud";
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ provide("fn:ai.open", openChat);
|
|||||||
</template>
|
</template>
|
||||||
<template #header-right-0>
|
<template #header-right-0>
|
||||||
<div class="hover:bg-accent ml-1 mr-2 cursor-pointer rounded-full hidden md:block">
|
<div class="hover:bg-accent ml-1 mr-2 cursor-pointer rounded-full hidden md:block">
|
||||||
<tutorial-button class="flex-center header-btn" />
|
<tutorial-button class="flex-center header-btn" mode="nav" />
|
||||||
</div>
|
</div>
|
||||||
<div class="hover:bg-accent ml-1 mr-2 cursor-pointer rounded-full">
|
<div class="hover:bg-accent ml-1 mr-2 cursor-pointer rounded-full">
|
||||||
<vip-button class="flex-center header-btn" mode="nav" />
|
<vip-button class="flex-center header-btn" mode="nav" />
|
||||||
|
|||||||
@@ -13,6 +13,14 @@ export default {
|
|||||||
title: "Operation",
|
title: "Operation",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
pipelinePage: {
|
||||||
|
addMore: "Add More Pipelines",
|
||||||
|
aliyunSubscriptionPipeline: "Aliyun Subscription Pipeline",
|
||||||
|
legoCertPipeline: "Lego Certificate Pipeline",
|
||||||
|
customPipeline: "Custom Pipeline",
|
||||||
|
batchAddPipeline: "Add Pipeline Use Template",
|
||||||
|
myPipelinesDesc: "Pipeline Mode: Apply -> Deploy -> Schedule",
|
||||||
|
},
|
||||||
order: {
|
order: {
|
||||||
confirmTitle: "Order Confirmation",
|
confirmTitle: "Order Confirmation",
|
||||||
package: "Package",
|
package: "Package",
|
||||||
@@ -36,6 +44,7 @@ export default {
|
|||||||
title: "Framework",
|
title: "Framework",
|
||||||
home: "Home",
|
home: "Home",
|
||||||
},
|
},
|
||||||
|
helpDocLink: "Help Docs",
|
||||||
title: "Certificate Automation",
|
title: "Certificate Automation",
|
||||||
pipeline: "Pipeline",
|
pipeline: "Pipeline",
|
||||||
pipelineEdit: "Edit Pipeline",
|
pipelineEdit: "Edit Pipeline",
|
||||||
@@ -80,6 +89,14 @@ export default {
|
|||||||
helpDoc: "Help Docs",
|
helpDoc: "Help Docs",
|
||||||
pipelineCount: "Number of Certificate Pipelines",
|
pipelineCount: "Number of Certificate Pipelines",
|
||||||
noPipeline: "You have no certificate pipelines yet",
|
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",
|
createNow: "Create Now",
|
||||||
managePipeline: "Manage Pipelines",
|
managePipeline: "Manage Pipelines",
|
||||||
pipelineStatus: "Pipeline Status",
|
pipelineStatus: "Pipeline Status",
|
||||||
@@ -721,6 +738,7 @@ export default {
|
|||||||
cnameDomainPlaceholder: "cname.handsfree.work",
|
cnameDomainPlaceholder: "cname.handsfree.work",
|
||||||
cnameDomainHelper:
|
cnameDomainHelper:
|
||||||
"Requires a domain registered with a DNS provider on the right (or you can transfer other domain DNS servers here).\nOnce the CNAME domain is set, it cannot be changed. It is recommended to use a first-level subdomain.",
|
"Requires a domain registered with a DNS provider on the right (or you can transfer other domain DNS servers here).\nOnce the CNAME domain is set, it cannot be changed. It is recommended to use a first-level subdomain.",
|
||||||
|
cnameDomainPattern: "Domain name cannot contain *",
|
||||||
dnsProvider: "DNS Provider",
|
dnsProvider: "DNS Provider",
|
||||||
dnsProviderAuthorization: "DNS Provider Authorization",
|
dnsProviderAuthorization: "DNS Provider Authorization",
|
||||||
setDefault: "Set Default",
|
setDefault: "Set Default",
|
||||||
@@ -831,6 +849,8 @@ export default {
|
|||||||
disabled: "Disabled",
|
disabled: "Disabled",
|
||||||
challengeSetting: "Challenge Setting",
|
challengeSetting: "Challenge Setting",
|
||||||
gotoCnameTip: "Please go to CNAME Record Page",
|
gotoCnameTip: "Please go to CNAME Record Page",
|
||||||
|
fromType: "From Type",
|
||||||
|
expirationDate: "Expiration Date",
|
||||||
},
|
},
|
||||||
addonSelector: {
|
addonSelector: {
|
||||||
select: "Select",
|
select: "Select",
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ export default {
|
|||||||
title: "Create Certificate Application Pipeline",
|
title: "Create Certificate Application Pipeline",
|
||||||
description: "Demonstrate how to configure a certificate application task",
|
description: "Demonstrate how to configure a certificate application task",
|
||||||
items: {
|
items: {
|
||||||
tutorialTitle: "Tutorial Demo Content",
|
tutorialTitle: "This tutorial demonstrates how to automatically apply for a certificate and deploy it to Nginx",
|
||||||
tutorialDesc1: "This tutorial demonstrates how to automatically apply for a certificate and deploy it to Nginx",
|
tutorialDesc1: "Only 3 steps, fully automatic application and deployment",
|
||||||
tutorialDesc2: "Only 3 steps, fully automatic application and deployment",
|
tutorialDesc2: "",
|
||||||
createTitle: "Create Certificate Pipeline",
|
createTitle: "Create Certificate Pipeline",
|
||||||
createDesc: "Click to add a certificate pipeline and fill in the certificate application information",
|
createDesc: "Click to add a certificate pipeline and fill in the certificate application information",
|
||||||
successTitle: "Pipeline Created Successfully",
|
successTitle: "Pipeline Created Successfully",
|
||||||
|
|||||||
@@ -17,6 +17,14 @@ export default {
|
|||||||
title: "操作列",
|
title: "操作列",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
pipelinePage: {
|
||||||
|
addMore: "添加更多流水线",
|
||||||
|
aliyunSubscriptionPipeline: "阿里云订阅流水线",
|
||||||
|
legoCertPipeline: "Lego证书流水线",
|
||||||
|
customPipeline: "自定义流水线",
|
||||||
|
batchAddPipeline: "模版批量创建流水线",
|
||||||
|
myPipelinesDesc: "流水线模式:申请证书->部署证书->定时运行",
|
||||||
|
},
|
||||||
order: {
|
order: {
|
||||||
confirmTitle: "订单确认",
|
confirmTitle: "订单确认",
|
||||||
package: "套餐",
|
package: "套餐",
|
||||||
@@ -40,7 +48,7 @@ export default {
|
|||||||
title: "框架",
|
title: "框架",
|
||||||
home: "首页",
|
home: "首页",
|
||||||
},
|
},
|
||||||
|
helpDocLink: "帮助文档",
|
||||||
title: "证书自动化",
|
title: "证书自动化",
|
||||||
pipeline: "证书自动化流水线",
|
pipeline: "证书自动化流水线",
|
||||||
pipelineEdit: "编辑流水线",
|
pipelineEdit: "编辑流水线",
|
||||||
@@ -86,7 +94,16 @@ export default {
|
|||||||
alertMessage: "证书和授权为敏感信息,不要使用来历不明的在线Certd服务和镜像,以免泄露;请务必私有化部署使用,认准官方版本发布渠道:",
|
alertMessage: "证书和授权为敏感信息,不要使用来历不明的在线Certd服务和镜像,以免泄露;请务必私有化部署使用,认准官方版本发布渠道:",
|
||||||
helpDoc: "帮助文档",
|
helpDoc: "帮助文档",
|
||||||
pipelineCount: "证书流水线数量",
|
pipelineCount: "证书流水线数量",
|
||||||
|
enabledCount: "已启用",
|
||||||
|
disabledCount: "已禁用",
|
||||||
noPipeline: "您还没有证书流水线",
|
noPipeline: "您还没有证书流水线",
|
||||||
|
certCount: "证书数量",
|
||||||
|
certExpiringCount: "即将过期",
|
||||||
|
certExpiredCount: "已过期",
|
||||||
|
certNoExpireCount: "未过期",
|
||||||
|
noCert: "还没有证书",
|
||||||
|
manageCert: "查看证书",
|
||||||
|
|
||||||
createNow: "立即创建",
|
createNow: "立即创建",
|
||||||
managePipeline: "管理流水线",
|
managePipeline: "管理流水线",
|
||||||
pipelineStatus: "流水线状态",
|
pipelineStatus: "流水线状态",
|
||||||
@@ -729,6 +746,7 @@ export default {
|
|||||||
cnameDomain: "CNAME域名",
|
cnameDomain: "CNAME域名",
|
||||||
cnameDomainPlaceholder: "cname.handsfree.work",
|
cnameDomainPlaceholder: "cname.handsfree.work",
|
||||||
cnameDomainHelper: "需要一个右边DNS提供商注册的域名(也可以将其他域名的dns服务器转移到这几家来)。\nCNAME域名一旦确定不可修改,建议使用一级子域名",
|
cnameDomainHelper: "需要一个右边DNS提供商注册的域名(也可以将其他域名的dns服务器转移到这几家来)。\nCNAME域名一旦确定不可修改,建议使用一级子域名",
|
||||||
|
cnameDomainPattern: "域名不能使用星号",
|
||||||
dnsProvider: "DNS提供商",
|
dnsProvider: "DNS提供商",
|
||||||
dnsProviderAuthorization: "DNS提供商授权",
|
dnsProviderAuthorization: "DNS提供商授权",
|
||||||
setDefault: "设置默认",
|
setDefault: "设置默认",
|
||||||
@@ -810,7 +828,7 @@ export default {
|
|||||||
oauthAutoRedirect: "自动跳转第三方登录",
|
oauthAutoRedirect: "自动跳转第三方登录",
|
||||||
oauthAutoRedirectHelper: "是否自动跳转第三方登录(使用第一个已启用的第三方登录类型)",
|
oauthAutoRedirectHelper: "是否自动跳转第三方登录(使用第一个已启用的第三方登录类型)",
|
||||||
oauthOnly: "仅使用第三方登录",
|
oauthOnly: "仅使用第三方登录",
|
||||||
oauthOnlyHelper: "是否仅使用第三方登录,关闭密码登录(注意:请务必在测试第三方登录功能正常后再开启)",
|
oauthOnlyHelper: "是否仅使用第三方登录,关闭密码登录(注意:请务必在测试第三方登录功能正常后再开启,否则会导致无法登录)\n 如果无法登录,请访问 http://你的certd地址/#/login?oauthOnly=false 来临时关闭此模式",
|
||||||
|
|
||||||
email: {
|
email: {
|
||||||
templates: "邮件模板",
|
templates: "邮件模板",
|
||||||
@@ -845,6 +863,8 @@ export default {
|
|||||||
disabled: "禁用/启用",
|
disabled: "禁用/启用",
|
||||||
challengeSetting: "校验配置",
|
challengeSetting: "校验配置",
|
||||||
gotoCnameTip: "CNAME域名配置请前往CNAME记录页面添加",
|
gotoCnameTip: "CNAME域名配置请前往CNAME记录页面添加",
|
||||||
|
fromType: "来源类型",
|
||||||
|
expirationDate: "到期时间",
|
||||||
},
|
},
|
||||||
addonSelector: {
|
addonSelector: {
|
||||||
select: "选择",
|
select: "选择",
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ export default {
|
|||||||
title: "创建证书申请流水线",
|
title: "创建证书申请流水线",
|
||||||
description: "演示证书申请任务如何配置",
|
description: "演示证书申请任务如何配置",
|
||||||
items: {
|
items: {
|
||||||
tutorialTitle: "教程演示内容",
|
tutorialTitle: "本教程演示如何自动申请证书并部署到Nginx上",
|
||||||
tutorialDesc1: "本教程演示如何自动申请证书并部署到Nginx上",
|
tutorialDesc1: "仅需3步,全自动申请部署证书",
|
||||||
tutorialDesc2: "仅需3步,全自动申请部署证书",
|
tutorialDesc2: "",
|
||||||
createTitle: "创建证书流水线",
|
createTitle: "创建证书流水线",
|
||||||
createDesc: "点击添加证书流水线,填写证书申请信息",
|
createDesc: "点击添加证书流水线,填写证书申请信息",
|
||||||
successTitle: "流水线创建成功",
|
successTitle: "流水线创建成功",
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ export const useSettingStore = defineStore({
|
|||||||
notification.warn({
|
notification.warn({
|
||||||
message: $t("vip.needVipTip"),
|
message: $t("vip.needVipTip"),
|
||||||
});
|
});
|
||||||
|
mitter.emit("openVipModal");
|
||||||
throw new Error($t("vip.needVipTip"));
|
throw new Error($t("vip.needVipTip"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ div#app {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre.pre{
|
pre.pre {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
}
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
@@ -61,16 +61,20 @@ h6 {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-vc {
|
.flex-vc {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-vb {
|
.flex-vb {
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-o {
|
.flex-o {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-baseline {
|
.flex-baseline {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
@@ -82,9 +86,15 @@ h6 {
|
|||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex-evenly {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
}
|
||||||
|
|
||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-inline {
|
.flex-inline {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -93,6 +103,7 @@ h6 {
|
|||||||
.flex-1 {
|
.flex-1 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-0 {
|
.flex-0 {
|
||||||
flex: 0;
|
flex: 0;
|
||||||
}
|
}
|
||||||
@@ -101,9 +112,11 @@ h6 {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.align-left {
|
.align-left {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.align-right {
|
.align-right {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
@@ -111,18 +124,23 @@ h6 {
|
|||||||
.scroll-y {
|
.scroll-y {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-0 {
|
.m-0 {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-2 {
|
.m-2 {
|
||||||
margin: 2px !important;
|
margin: 2px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-3 {
|
.m-3 {
|
||||||
margin: 3px !important;
|
margin: 3px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-5 {
|
.m-5 {
|
||||||
margin: 5px !important;
|
margin: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-10 {
|
.m-10 {
|
||||||
margin: 10px !important;
|
margin: 10px !important;
|
||||||
}
|
}
|
||||||
@@ -130,6 +148,7 @@ h6 {
|
|||||||
.m-20 {
|
.m-20 {
|
||||||
margin: 20px !important;
|
margin: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mb-2 {
|
.mb-2 {
|
||||||
margin-bottom: 2px !important;
|
margin-bottom: 2px !important;
|
||||||
}
|
}
|
||||||
@@ -137,6 +156,7 @@ h6 {
|
|||||||
.mb-5 {
|
.mb-5 {
|
||||||
margin-bottom: 5px !important;
|
margin-bottom: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml-5 {
|
.ml-5 {
|
||||||
margin-left: 5px !important;
|
margin-left: 5px !important;
|
||||||
}
|
}
|
||||||
@@ -192,6 +212,7 @@ h6 {
|
|||||||
.p-20 {
|
.p-20 {
|
||||||
padding: 20px !important;
|
padding: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ellipsis {
|
.ellipsis {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -220,6 +241,7 @@ h6 {
|
|||||||
.color-plus {
|
.color-plus {
|
||||||
color: #c5913f;
|
color: #c5913f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-blue {
|
.color-blue {
|
||||||
color: #1890ff;
|
color: #1890ff;
|
||||||
}
|
}
|
||||||
@@ -231,6 +253,7 @@ h6 {
|
|||||||
.color-green {
|
.color-green {
|
||||||
color: green;
|
color: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-gray {
|
.color-gray {
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
@@ -274,6 +297,7 @@ h6 {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
|
|
||||||
&.error {
|
&.error {
|
||||||
color: #ff4d4f;
|
color: #ff4d4f;
|
||||||
}
|
}
|
||||||
@@ -281,6 +305,7 @@ h6 {
|
|||||||
|
|
||||||
.fs-copyable {
|
.fs-copyable {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
@@ -292,7 +317,11 @@ h6 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.fs-16 {
|
.fs-16 {
|
||||||
font-size: 16px;
|
font-size: 16px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fs-28 {
|
||||||
|
font-size: 28px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.w-50\% {
|
.w-50\% {
|
||||||
@@ -309,14 +338,121 @@ h6 {
|
|||||||
color: #6e6e6e;
|
color: #6e6e6e;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-modal-body{
|
.ant-modal-body {
|
||||||
.fs-form-body{
|
.fs-form-body {
|
||||||
max-height: 66vh;
|
max-height: 66vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-input-number{
|
.ant-input-number {
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.cd-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-spacing: 0;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
.fs-loading {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
z-index: 10000
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 1000px;
|
||||||
|
min-width: 100%;
|
||||||
|
table-layout: fixed;
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.position-sticky-right {
|
||||||
|
position: sticky;
|
||||||
|
right: 0;
|
||||||
|
z-index: 100;
|
||||||
|
border-left: 0px;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 1px;
|
||||||
|
/* 边框宽度 */
|
||||||
|
background: #eee;
|
||||||
|
/* 边框颜色 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
border-left: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
padding: 10px 5px;
|
||||||
|
background: #fbfbfb;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #000000;
|
||||||
|
font-size: 14px;
|
||||||
|
border-top: 1px solid #eee;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
td.position-sticky-right {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tr.hover-color:hover td {
|
||||||
|
background: #f9f9ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
|
padding: 5px 10px;
|
||||||
|
border-radius: 20px;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-active {
|
||||||
|
background: #e7f6e9;
|
||||||
|
color: #2e7d32;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-pending {
|
||||||
|
background: #ffecb3;
|
||||||
|
color: #f57c00;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||||
|
|
||||||
|
export type FormOptionReq = {
|
||||||
|
title: string;
|
||||||
|
columns?: any;
|
||||||
|
onSubmit?: any;
|
||||||
|
body?: any;
|
||||||
|
initialForm?: any;
|
||||||
|
zIndex?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function useFormDialog() {
|
||||||
|
const { openCrudFormDialog } = useFormWrapper();
|
||||||
|
|
||||||
|
async function openFormDialog(req: FormOptionReq) {
|
||||||
|
function createCrudOptions() {
|
||||||
|
return {
|
||||||
|
crudOptions: {
|
||||||
|
columns: req.columns,
|
||||||
|
form: {
|
||||||
|
initialForm: req.initialForm,
|
||||||
|
wrapper: {
|
||||||
|
zIndex: req.zIndex,
|
||||||
|
title: req.title,
|
||||||
|
saveRemind: false,
|
||||||
|
slots: {
|
||||||
|
"form-body-top": req.body,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async afterSubmit() {},
|
||||||
|
async doSubmit({ form }: any) {
|
||||||
|
if (req.onSubmit) {
|
||||||
|
await req.onSubmit(form);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const { crudOptions } = createCrudOptions();
|
||||||
|
await openCrudFormDialog({ crudOptions });
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
openFormDialog,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -72,7 +72,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function emitValue(value) {
|
async function emitValue(value) {
|
||||||
if (pipeline?.value && target?.value && pipeline.value.userId !== target.value.userId) {
|
if (pipeline && pipeline?.value && target?.value && pipeline.value.userId !== target.value.userId) {
|
||||||
message.error("对不起,您不能修改他人流水线的授权");
|
message.error("对不起,您不能修改他人流水线的授权");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,3 +57,45 @@ export async function DeleteBatch(ids: any[]) {
|
|||||||
data: { ids },
|
data: { ids },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function ImportTaskSave(body: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/import/save",
|
||||||
|
method: "post",
|
||||||
|
data: body,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export async function ImportTaskStatus() {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/import/status",
|
||||||
|
method: "post",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export async function ImportTaskDelete(key: string) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/import/delete",
|
||||||
|
method: "post",
|
||||||
|
data: { key },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export async function ImportTaskStart(key: string) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/import/start",
|
||||||
|
method: "post",
|
||||||
|
data: { key },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function SyncExpirationStart() {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/sync/expiration/start",
|
||||||
|
method: "post",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function SyncExpirationStatus() {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/sync/expiration/status",
|
||||||
|
method: "post",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import * as api from "./api";
|
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
import { useI18n } from "/src/locales";
|
import { Modal, notification } from "ant-design-vue";
|
||||||
import { Ref, ref } from "vue";
|
import { Ref, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import * as api from "./api";
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useDomainImportManage } from "./use";
|
||||||
import { useSettingStore } from "/@/store/settings";
|
|
||||||
import { Dicts } from "/@/components/plugins/lib/dicts";
|
import { Dicts } from "/@/components/plugins/lib/dicts";
|
||||||
|
import { useSettingStore } from "/@/store/settings";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
import { createAccessApi } from "/@/views/certd/access/api";
|
import { createAccessApi } from "/@/views/certd/access/api";
|
||||||
import { Modal } from "ant-design-vue";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@@ -49,6 +49,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
const dnsProviderTypeDict = dict({
|
const dnsProviderTypeDict = dict({
|
||||||
url: "pi/dnsProvider/dnsProviderTypeDict",
|
url: "pi/dnsProvider/dnsProviderTypeDict",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const openDomainImportManageDialog = useDomainImportManage();
|
||||||
return {
|
return {
|
||||||
crudOptions: {
|
crudOptions: {
|
||||||
settings: {
|
settings: {
|
||||||
@@ -88,6 +90,43 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
actionbar: {
|
||||||
|
buttons: {
|
||||||
|
add: {
|
||||||
|
icon: "ion:add-circle-outline",
|
||||||
|
},
|
||||||
|
import: {
|
||||||
|
title: "从域名提供商导入域名",
|
||||||
|
type: "primary",
|
||||||
|
text: "从域名提供商导入",
|
||||||
|
needPlus: true,
|
||||||
|
color: "gold",
|
||||||
|
icon: "mingcute:vip-1-line",
|
||||||
|
click: async () => {
|
||||||
|
await openDomainImportManageDialog({
|
||||||
|
afterSubmit: res => {
|
||||||
|
crudExpose.doRefresh();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
syncExpirationDate: {
|
||||||
|
title: "同步域名过期时间",
|
||||||
|
type: "primary",
|
||||||
|
icon: "ion:refresh-outline",
|
||||||
|
text: "同步域名过期时间",
|
||||||
|
click: async () => {
|
||||||
|
await api.SyncExpirationStart();
|
||||||
|
notification.success({
|
||||||
|
message: "同步任务已提交",
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
crudExpose.doRefresh();
|
||||||
|
}, 2000);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
columns: {
|
columns: {
|
||||||
id: {
|
id: {
|
||||||
title: "ID",
|
title: "ID",
|
||||||
@@ -119,6 +158,13 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
expirationDate: {
|
||||||
|
title: t("certd.domain.expirationDate"),
|
||||||
|
type: "date",
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
challengeType: {
|
challengeType: {
|
||||||
title: t("certd.domain.challengeType"),
|
title: t("certd.domain.challengeType"),
|
||||||
type: "dict-select",
|
type: "dict-select",
|
||||||
@@ -285,6 +331,20 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
fromType: {
|
||||||
|
title: t("certd.domain.fromType"),
|
||||||
|
type: "dict-select",
|
||||||
|
dict: Dicts.domainFromTypeDict,
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
component: {
|
||||||
|
color: "auto",
|
||||||
|
},
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
title: t("certd.domain.disabled"),
|
title: t("certd.domain.disabled"),
|
||||||
type: "dict-switch",
|
type: "dict-switch",
|
||||||
|
|||||||
@@ -0,0 +1,137 @@
|
|||||||
|
<template>
|
||||||
|
<div class="domain-import-task-status min-h-[300px]">
|
||||||
|
<div class="action mb-5">
|
||||||
|
<fs-button type="primary" icon="mingcute:vip-1-line" @click="addTask">添加导入任务</fs-button>
|
||||||
|
<fs-button type="primary" icon="ion:refresh-outline" class="ml-2" @click="loadImportTaskStatus">刷新</fs-button>
|
||||||
|
</div>
|
||||||
|
<div class="table-container overflow-auto mb-10">
|
||||||
|
<table class="cd-table border-gray-300 w-full">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="w-[220px]">来源</th>
|
||||||
|
<th class="">进度</th>
|
||||||
|
<th class="w-[220px]">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="item in list" :key="item.key">
|
||||||
|
<td class="ellipsis">
|
||||||
|
<span class="flex items-center pointer" @click="editTask(item)">
|
||||||
|
<span class="flex-1 ellipsis flex items-center">
|
||||||
|
<fs-icon :icon="item.icon" class="mr-2"></fs-icon>
|
||||||
|
{{ item.title }}
|
||||||
|
</span>
|
||||||
|
<fs-icon icon="ant-design:edit-outlined" class="ml-2" />
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div v-if="item.task">
|
||||||
|
<div>
|
||||||
|
<a-tag color="blue">总数:{{ item.task?.total }}</a-tag>
|
||||||
|
<a-tag color="success" class="ml-2">成功:{{ item.task?.successCount }}</a-tag>
|
||||||
|
<a-tag type="info" class="ml-2">跳过:{{ item.task?.skipCount }}</a-tag>
|
||||||
|
<a-tooltip v-if="item.task?.errors.length > 0">
|
||||||
|
<template #title>
|
||||||
|
<div v-for="error in item.task?.errors" :key="error">{{ error }}</div>
|
||||||
|
</template>
|
||||||
|
<a-tag color="red" class="ml-2">失败:{{ item.task?.errors.length }}</a-tag>
|
||||||
|
</a-tooltip>
|
||||||
|
</div>
|
||||||
|
<a-progress :percent="item.task?.progress" size="small" status="active" />
|
||||||
|
</div>
|
||||||
|
<div v-else>未执行</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<fs-button type="primary" icon="ion:play-outline" :disabled="item.task?.status === 'running'" @click="startTask(item)">执行</fs-button>
|
||||||
|
<fs-button type="primary" class="ml-2" danger icon="ion:trash-outline" @click="deleteTask(item)">删除</fs-button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { Modal } from "ant-design-vue";
|
||||||
|
import { onMounted, onUnmounted, ref } from "vue";
|
||||||
|
import * as api from "./api";
|
||||||
|
import { useDomainImport } from "./use";
|
||||||
|
import { useSettingStore } from "/@/store/settings";
|
||||||
|
defineOptions({
|
||||||
|
name: "DomainImportTaskStatus",
|
||||||
|
});
|
||||||
|
|
||||||
|
const list = ref([]);
|
||||||
|
|
||||||
|
async function loadImportTaskStatus() {
|
||||||
|
const res = await api.ImportTaskStatus();
|
||||||
|
list.value = res || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
async function startTask(item: any) {
|
||||||
|
settingStore.checkPlus();
|
||||||
|
await api.ImportTaskStart(item.key);
|
||||||
|
await loadImportTaskStatus();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function deleteTask(item: any) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "确认删除吗?",
|
||||||
|
okText: "确认",
|
||||||
|
okType: "danger",
|
||||||
|
onOk: async () => {
|
||||||
|
await api.ImportTaskDelete(item.key);
|
||||||
|
await loadImportTaskStatus();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const openDomainImportDialog = useDomainImport();
|
||||||
|
const settingStore = useSettingStore();
|
||||||
|
async function addTask() {
|
||||||
|
settingStore.checkPlus();
|
||||||
|
await openDomainImportDialog({
|
||||||
|
afterSubmit: async (res?: any) => {
|
||||||
|
if (res) {
|
||||||
|
await api.ImportTaskStart(res.key);
|
||||||
|
}
|
||||||
|
await loadImportTaskStatus();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function editTask(item: any) {
|
||||||
|
settingStore.checkPlus();
|
||||||
|
await openDomainImportDialog({
|
||||||
|
afterSubmit: async () => {
|
||||||
|
await loadImportTaskStatus();
|
||||||
|
},
|
||||||
|
form: item,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const checkIntervalRef = ref();
|
||||||
|
onMounted(async () => {
|
||||||
|
await loadImportTaskStatus();
|
||||||
|
checkIntervalRef.value = setInterval(async () => {
|
||||||
|
await loadImportTaskStatus();
|
||||||
|
}, 3000);
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
clearInterval(checkIntervalRef.value);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.domain-import-task-status {
|
||||||
|
.table-container {
|
||||||
|
height: 50vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-progress {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
import { message } from "ant-design-vue";
|
||||||
|
import * as api from "./api";
|
||||||
|
import { useFormDialog } from "/@/use/use-dialog";
|
||||||
|
import { compute } from "@fast-crud/fast-crud";
|
||||||
|
import { Dicts } from "/@/components/plugins/lib/dicts";
|
||||||
|
import { useSettingStore } from "/@/store/settings";
|
||||||
|
import DomainImportTaskStatus from "./import.vue";
|
||||||
|
export function useDomainImport() {
|
||||||
|
const { openFormDialog } = useFormDialog();
|
||||||
|
|
||||||
|
const columns = {
|
||||||
|
dnsProviderType: {
|
||||||
|
title: "域名提供商",
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
component: {
|
||||||
|
name: "dns-provider-selector",
|
||||||
|
on: {
|
||||||
|
//@ts-ignore
|
||||||
|
selectedChange: ({ form, $event }) => {
|
||||||
|
form.dnsProviderAccessType = $event.accessType;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
//@ts-ignore
|
||||||
|
valueChange({ form }) {
|
||||||
|
form.dnsProviderAccessId = null;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dnsProviderAccessType: {
|
||||||
|
title: "域名提供商访问类型",
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dnsProviderAccessId: {
|
||||||
|
title: "域名提供商授权",
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
component: {
|
||||||
|
name: "access-selector",
|
||||||
|
vModel: "modelValue",
|
||||||
|
type: compute(({ form }) => {
|
||||||
|
return form.dnsProviderAccessType || form.dnsProviderType;
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return function openDomainImportDialog(req: { afterSubmit?: (res?: any) => void; form?: any }) {
|
||||||
|
openFormDialog({
|
||||||
|
title: "从域名提供商导入域名",
|
||||||
|
columns: columns,
|
||||||
|
initialForm: {
|
||||||
|
...req.form,
|
||||||
|
},
|
||||||
|
onSubmit: async (form: any) => {
|
||||||
|
const res = await api.ImportTaskSave({
|
||||||
|
key: form.key,
|
||||||
|
dnsProviderType: form.dnsProviderType,
|
||||||
|
dnsProviderAccessId: form.dnsProviderAccessId,
|
||||||
|
});
|
||||||
|
if (req.afterSubmit) {
|
||||||
|
req.afterSubmit(res);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function useDomainImportManage() {
|
||||||
|
const { openFormDialog } = useFormDialog();
|
||||||
|
const settingStore = useSettingStore();
|
||||||
|
return async function openDomainImportManageDialog(req: { afterSubmit?: (res?: any) => void; form?: any; zIndex?: number }) {
|
||||||
|
await openFormDialog({
|
||||||
|
title: "从域名提供商导入域名",
|
||||||
|
body: () => {
|
||||||
|
return <DomainImportTaskStatus />;
|
||||||
|
},
|
||||||
|
zIndex: req.zIndex,
|
||||||
|
onSubmit: async (form: any) => {
|
||||||
|
if (req.afterSubmit) {
|
||||||
|
req.afterSubmit(form);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -77,3 +77,11 @@ export async function ResetStatus(id: number) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function Import(form: { domainList: string; cnameProviderId: any }) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/import",
|
||||||
|
method: "post",
|
||||||
|
data: form,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ import { useUserStore } from "/@/store/user";
|
|||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import CnameTip from "/@/components/plugins/cert/domains-verify-plan-editor/cname-tip.vue";
|
import CnameTip from "/@/components/plugins/cert/domains-verify-plan-editor/cname-tip.vue";
|
||||||
|
import { useCnameImport } from "./use";
|
||||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
|
const crudBinding = crudExpose.crudBinding;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
||||||
@@ -27,10 +29,13 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const openCnameImportDialog = useCnameImport();
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
const selectedRowKeys: Ref<any[]> = ref([]);
|
const selectedRowKeys: Ref<any[]> = ref([]);
|
||||||
context.selectedRowKeys = selectedRowKeys;
|
context.selectedRowKeys = selectedRowKeys;
|
||||||
|
|
||||||
const dictRef = dict({
|
const dictRef = dict({
|
||||||
data: [
|
data: [
|
||||||
{ label: t("certd.pending_cname_setup"), value: "cname", color: "warning" },
|
{ label: t("certd.pending_cname_setup"), value: "cname", color: "warning" },
|
||||||
@@ -64,6 +69,39 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
editRequest,
|
editRequest,
|
||||||
delRequest,
|
delRequest,
|
||||||
},
|
},
|
||||||
|
actionbar: {
|
||||||
|
buttons: {
|
||||||
|
add: {
|
||||||
|
icon: "ion:add-circle-outline",
|
||||||
|
},
|
||||||
|
import: {
|
||||||
|
title: "导入CNAME记录",
|
||||||
|
type: "primary",
|
||||||
|
text: "批量导入",
|
||||||
|
icon: "mingcute:vip-1-line",
|
||||||
|
click: () => {
|
||||||
|
settingStore.checkPlus();
|
||||||
|
openCnameImportDialog({
|
||||||
|
afterSubmit: () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
crudExpose?.doRefresh();
|
||||||
|
}, 2000);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
export: {
|
||||||
|
title: "导出CNAME记录之后,可用于批量导入cname解析到域名注册商",
|
||||||
|
type: "primary",
|
||||||
|
text: "批量导出",
|
||||||
|
icon: "mingcute:vip-1-line",
|
||||||
|
click: () => {
|
||||||
|
settingStore.checkPlus();
|
||||||
|
crudBinding.value.toolbar.buttons.export.click({});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
tabs: {
|
tabs: {
|
||||||
name: "status",
|
name: "status",
|
||||||
show: true,
|
show: true,
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
import { dict } from "@fast-crud/fast-crud";
|
||||||
|
import { message } from "ant-design-vue";
|
||||||
|
import * as api from "./api";
|
||||||
|
import { useFormDialog } from "/@/use/use-dialog";
|
||||||
|
|
||||||
|
export const cnameProviderDict = dict({
|
||||||
|
url: "/cname/provider/list",
|
||||||
|
value: "id",
|
||||||
|
label: "domain",
|
||||||
|
});
|
||||||
|
export function useCnameImport() {
|
||||||
|
const { openFormDialog } = useFormDialog();
|
||||||
|
|
||||||
|
const columns = {
|
||||||
|
domainList: {
|
||||||
|
title: "域名列表",
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
component: {
|
||||||
|
name: "a-textarea",
|
||||||
|
rows: 5,
|
||||||
|
},
|
||||||
|
col: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
helper: "每个域名一行,批量导入\n泛域名请去掉*.\n已经存在的会自动跳过",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cnameProviderId: {
|
||||||
|
title: "CNAME服务",
|
||||||
|
type: "dict-select",
|
||||||
|
dict: cnameProviderDict,
|
||||||
|
form: {
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return function openCnameImportDialog(req: { afterSubmit?: () => void }) {
|
||||||
|
openFormDialog({
|
||||||
|
title: "导入CNAME记录",
|
||||||
|
columns: columns,
|
||||||
|
onSubmit: async (form: any) => {
|
||||||
|
await api.Import({
|
||||||
|
domainList: form.domainList,
|
||||||
|
cnameProviderId: form.cnameProviderId,
|
||||||
|
});
|
||||||
|
message.success("导入任务已提交");
|
||||||
|
if (req.afterSubmit) {
|
||||||
|
req.afterSubmit();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -167,8 +167,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
type: "text",
|
type: "text",
|
||||||
helper: t("certd.helperIpCname"),
|
|
||||||
form: {
|
form: {
|
||||||
|
helper: t("certd.helperIpCname"),
|
||||||
rules: [{ required: true, message: t("certd.ruleIpRequired") }],
|
rules: [{ required: true, message: t("certd.ruleIpRequired") }],
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
|
|||||||
@@ -85,46 +85,23 @@ export function useCertPipelineCreator() {
|
|||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
function createCrudOptions(certPlugins: any[], getFormData: any, doSubmit: any): CreateCrudOptionsRet {
|
function createCrudOptions(req: { certPlugin: any; doSubmit: any; title?: string }): CreateCrudOptionsRet {
|
||||||
const inputs: any = {};
|
const inputs: any = {};
|
||||||
const moreParams = [];
|
const moreParams = [];
|
||||||
for (const plugin of certPlugins) {
|
const doSubmit = req.doSubmit;
|
||||||
for (const inputKey in plugin.input) {
|
for (const inputKey in req.certPlugin.input) {
|
||||||
if (inputs[inputKey]) {
|
// inputs[inputKey].form.show = true;
|
||||||
//如果两个插件有的字段,直接显示
|
const inputDefine = cloneDeep(req.certPlugin.input[inputKey]);
|
||||||
inputs[inputKey].form.show = true;
|
if (inputDefine.maybeNeed) {
|
||||||
continue;
|
moreParams.push(inputKey);
|
||||||
}
|
|
||||||
const inputDefine = cloneDeep(plugin.input[inputKey]);
|
|
||||||
if (!inputDefine.required && !inputDefine.maybeNeed) {
|
|
||||||
moreParams.push(inputKey);
|
|
||||||
// continue;
|
|
||||||
}
|
|
||||||
useReference(inputDefine);
|
|
||||||
inputs[inputKey] = {
|
|
||||||
title: inputDefine.title,
|
|
||||||
form: {
|
|
||||||
...inputDefine,
|
|
||||||
show: compute(ctx => {
|
|
||||||
const form = getFormData();
|
|
||||||
if (!form) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
let inputDefineShow = true;
|
|
||||||
if (inputDefine.show != null) {
|
|
||||||
const computeShow = inputDefine.show as any;
|
|
||||||
if (computeShow === false) {
|
|
||||||
inputDefineShow = false;
|
|
||||||
} else if (computeShow && computeShow.computeFn) {
|
|
||||||
inputDefineShow = computeShow.computeFn({ form });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return form?.certApplyPlugin === plugin.name && inputDefineShow;
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
useReference(inputDefine);
|
||||||
|
inputs[inputKey] = {
|
||||||
|
title: inputDefine.title,
|
||||||
|
form: {
|
||||||
|
...inputDefine,
|
||||||
|
},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const pluginStore = usePluginStore();
|
const pluginStore = usePluginStore();
|
||||||
@@ -146,7 +123,7 @@ export function useCertPipelineCreator() {
|
|||||||
wrapClassName: "cert_pipeline_create_form",
|
wrapClassName: "cert_pipeline_create_form",
|
||||||
width: 1350,
|
width: 1350,
|
||||||
saveRemind: false,
|
saveRemind: false,
|
||||||
title: t("certd.pipelineForm.createTitle"),
|
title: req.title || t("certd.pipelineForm.createTitle"),
|
||||||
},
|
},
|
||||||
group: {
|
group: {
|
||||||
groups: {
|
groups: {
|
||||||
@@ -159,44 +136,44 @@ export function useCertPipelineCreator() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
columns: {
|
columns: {
|
||||||
certApplyPlugin: {
|
// certApplyPlugin: {
|
||||||
title: t("certd.plugin.selectTitle"),
|
// title: t("certd.plugin.selectTitle"),
|
||||||
type: "dict-select",
|
// type: "dict-select",
|
||||||
dict: dict({
|
// dict: dict({
|
||||||
data: [
|
// data: [
|
||||||
{ value: "CertApply", label: "JS-ACME" },
|
// { value: "CertApply", label: "JS-ACME" },
|
||||||
{ value: "CertApplyLego", label: "Lego-ACME" },
|
// { value: "CertApplyLego", label: "Lego-ACME" },
|
||||||
{ value: "CertApplyGetFormAliyun", label: "Aliyun-Order" },
|
// { value: "CertApplyGetFormAliyun", label: "Aliyun-Order" },
|
||||||
],
|
// ],
|
||||||
}),
|
// }),
|
||||||
form: {
|
// form: {
|
||||||
order: 0,
|
// order: 0,
|
||||||
value: "CertApply",
|
// value: "CertApply",
|
||||||
helper: {
|
// helper: {
|
||||||
render: () => {
|
// render: () => {
|
||||||
return (
|
// return (
|
||||||
<ul>
|
// <ul>
|
||||||
<li>{t("certd.plugin.jsAcme")}</li>
|
// <li>{t("certd.plugin.jsAcme")}</li>
|
||||||
<li>{t("certd.plugin.legoAcme")}</li>
|
// <li>{t("certd.plugin.legoAcme")}</li>
|
||||||
<li>{t("certd.plugin.aliyunOrder")}</li>
|
// <li>{t("certd.plugin.aliyunOrder")}</li>
|
||||||
</ul>
|
// </ul>
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
valueChange: {
|
// valueChange: {
|
||||||
handle: async ({ form, value }) => {
|
// handle: async ({ form, value }) => {
|
||||||
const config = await pluginStore.getPluginConfig({
|
// const config = await pluginStore.getPluginConfig({
|
||||||
name: value,
|
// name: value,
|
||||||
type: "builtIn",
|
// type: "builtIn",
|
||||||
});
|
// });
|
||||||
if (config.sysSetting?.input) {
|
// if (config.sysSetting?.input) {
|
||||||
merge(form, config.sysSetting.input);
|
// merge(form, config.sysSetting.input);
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
immediate: true,
|
// immediate: true,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
...inputs,
|
...inputs,
|
||||||
triggerCron: {
|
triggerCron: {
|
||||||
title: t("certd.pipelineForm.triggerCronTitle"),
|
title: t("certd.pipelineForm.triggerCronTitle"),
|
||||||
@@ -336,18 +313,10 @@ export function useCertPipelineCreator() {
|
|||||||
return certPlugins;
|
return certPlugins;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function openAddCertdPipelineDialog(req: { defaultGroupId?: number }) {
|
async function openAddCertdPipelineDialog(req: { pluginName: string; defaultGroupId?: number; title?: string }) {
|
||||||
//检查是否流水线数量超出限制
|
//检查是否流水线数量超出限制
|
||||||
await checkPipelineLimit();
|
await checkPipelineLimit();
|
||||||
|
|
||||||
const wrapperRef = ref();
|
|
||||||
function getFormData() {
|
|
||||||
if (!wrapperRef.value) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return wrapperRef.value.getFormData();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doSubmit({ form }: any) {
|
async function doSubmit({ form }: any) {
|
||||||
// const certDetail = readCertDetail(form.cert.crt);
|
// const certDetail = readCertDetail(form.cert.crt);
|
||||||
// 添加certd pipeline
|
// 添加certd pipeline
|
||||||
@@ -375,7 +344,7 @@ export function useCertPipelineCreator() {
|
|||||||
strategy: {
|
strategy: {
|
||||||
runStrategy: 0, // 正常执行
|
runStrategy: 0, // 正常执行
|
||||||
},
|
},
|
||||||
type: form.certApplyPlugin,
|
type: req.pluginName,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -410,11 +379,19 @@ export function useCertPipelineCreator() {
|
|||||||
router.push({ path: "/certd/pipeline/detail", query: { id, editMode: "true" } });
|
router.push({ path: "/certd/pipeline/detail", query: { id, editMode: "true" } });
|
||||||
}
|
}
|
||||||
const certPlugins = await getCertPlugins();
|
const certPlugins = await getCertPlugins();
|
||||||
const { crudOptions } = createCrudOptions(certPlugins, getFormData, doSubmit);
|
const certPlugin = certPlugins.find(plugin => plugin.name === req.pluginName);
|
||||||
|
if (!certPlugin) {
|
||||||
|
message.error("该证书申请插件不存在");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const { crudOptions } = createCrudOptions({
|
||||||
|
certPlugin,
|
||||||
|
doSubmit,
|
||||||
|
title: req.title,
|
||||||
|
});
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
crudOptions.columns.groupId.form.value = req.defaultGroupId || undefined;
|
crudOptions.columns.groupId.form.value = req.defaultGroupId || undefined;
|
||||||
const wrapper = await openCrudFormDialog({ crudOptions });
|
await openCrudFormDialog({ crudOptions });
|
||||||
wrapperRef.value = wrapper;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,29 +1,26 @@
|
|||||||
import * as api from "./api";
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, useUi } from "@fast-crud/fast-crud";
|
||||||
|
import { Modal, notification } from "ant-design-vue";
|
||||||
|
import dayjs from "dayjs";
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, useUi } from "@fast-crud/fast-crud";
|
import * as api from "./api";
|
||||||
import { statusUtil } from "/@/views/certd/pipeline/pipeline/utils/util.status";
|
import { GetDetail } from "./api";
|
||||||
import { Modal, notification } from "ant-design-vue";
|
import { groupDictRef } from "./group/dicts";
|
||||||
import { useUserStore } from "/@/store/user";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { useUserStore } from "/@/store/user";
|
||||||
import { eachStages } from "./utils";
|
|
||||||
import { setRunnableIds, useCertPipelineCreator } from "/@/views/certd/pipeline/certd-form/use";
|
|
||||||
import { useCertUpload } from "/@/views/certd/pipeline/cert-upload/use";
|
import { useCertUpload } from "/@/views/certd/pipeline/cert-upload/use";
|
||||||
|
import { setRunnableIds } from "/@/views/certd/pipeline/certd-form/use";
|
||||||
import GroupSelector from "/@/views/certd/pipeline/group/group-selector.vue";
|
import GroupSelector from "/@/views/certd/pipeline/group/group-selector.vue";
|
||||||
|
import { statusUtil } from "/@/views/certd/pipeline/pipeline/utils/util.status";
|
||||||
import { useCertViewer } from "/@/views/certd/pipeline/use";
|
import { useCertViewer } from "/@/views/certd/pipeline/use";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
import { GetDetail, GetObj } from "./api";
|
|
||||||
import { groupDictRef } from "./group/dicts";
|
|
||||||
|
|
||||||
export default function ({ crudExpose, context: { selectedRowKeys } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context: { selectedRowKeys, openCertApplyDialog } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const lastResRef = ref();
|
const lastResRef = ref();
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const { openAddCertdPipelineDialog } = useCertPipelineCreator();
|
|
||||||
const { openUploadCreateDialog } = useCertUpload();
|
const { openUploadCreateDialog } = useCertUpload();
|
||||||
|
|
||||||
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
||||||
@@ -51,7 +48,10 @@ export default function ({ crudExpose, context: { selectedRowKeys } }: CreateCru
|
|||||||
delete form.lastVars;
|
delete form.lastVars;
|
||||||
delete form.createTime;
|
delete form.createTime;
|
||||||
delete form.id;
|
delete form.id;
|
||||||
let pipeline = JSON.parse(form.content);
|
let pipeline = form.content;
|
||||||
|
if (typeof pipeline === "string" && pipeline.startsWith("{")) {
|
||||||
|
pipeline = JSON.parse(form.content);
|
||||||
|
}
|
||||||
pipeline.title = form.title;
|
pipeline.title = form.title;
|
||||||
pipeline = setRunnableIds(pipeline);
|
pipeline = setRunnableIds(pipeline);
|
||||||
form.content = JSON.stringify(pipeline);
|
form.content = JSON.stringify(pipeline);
|
||||||
@@ -105,7 +105,8 @@ export default function ({ crudExpose, context: { selectedRowKeys } }: CreateCru
|
|||||||
actionbar: {
|
actionbar: {
|
||||||
buttons: {
|
buttons: {
|
||||||
add: {
|
add: {
|
||||||
order: 5,
|
order: 99,
|
||||||
|
show: false,
|
||||||
icon: "ion:ios-add-circle-outline",
|
icon: "ion:ios-add-circle-outline",
|
||||||
text: t("certd.customPipeline"),
|
text: t("certd.customPipeline"),
|
||||||
},
|
},
|
||||||
@@ -115,9 +116,7 @@ export default function ({ crudExpose, context: { selectedRowKeys } }: CreateCru
|
|||||||
type: "primary",
|
type: "primary",
|
||||||
icon: "ion:ios-add-circle-outline",
|
icon: "ion:ios-add-circle-outline",
|
||||||
click() {
|
click() {
|
||||||
const searchForm = crudExpose.getSearchValidatedFormData();
|
openCertApplyDialog({ key: "CertApply" });
|
||||||
const defaultGroupId = searchForm.groupId;
|
|
||||||
openAddCertdPipelineDialog({ defaultGroupId });
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
uploadCert: {
|
uploadCert: {
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<fs-page class="page-cert">
|
<fs-page class="page-cert">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="title">{{ t("certd.myPipelines") }}</div>
|
<div class="title">
|
||||||
|
{{ t("certd.myPipelines") }}
|
||||||
|
<div class="sub">{{ t("certd.pipelinePage.myPipelinesDesc") }}</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- <a-alert v-if="settingStore.sysPublic.notice" type="warning" show-icon>
|
<!-- <a-alert v-if="settingStore.sysPublic.notice" type="warning" show-icon>
|
||||||
<template #message>
|
<template #message>
|
||||||
@@ -9,6 +12,28 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-alert> -->
|
</a-alert> -->
|
||||||
<fs-crud ref="crudRef" v-bind="crudBinding">
|
<fs-crud ref="crudRef" v-bind="crudBinding">
|
||||||
|
<template #actionbar-right>
|
||||||
|
<a-dropdown class="ml-1">
|
||||||
|
<a-button type="primary" class="ant-dropdown-link" @click.prevent>
|
||||||
|
{{ t("certd.pipelinePage.addMore") }}
|
||||||
|
<DownOutlined />
|
||||||
|
</a-button>
|
||||||
|
<template #overlay>
|
||||||
|
<a-menu @click="onActionbarMoreItemClick">
|
||||||
|
<!-- <a-menu-item key="CertApplyUpload" class="flex items-center">
|
||||||
|
<fs-icon icon="ion:business-outline" />
|
||||||
|
商用证书托管流水线
|
||||||
|
</a-menu-item> -->
|
||||||
|
<a-menu-item v-for="item in addMorePipelineBtns" :key="item.key" :title="item.title">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<fs-icon :icon="item.icon" />
|
||||||
|
<span class="ml-2">{{ item.title }}</span>
|
||||||
|
</div>
|
||||||
|
</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</template>
|
||||||
|
</a-dropdown>
|
||||||
|
</template>
|
||||||
<div v-if="selectedRowKeys.length > 0" class="batch-actions">
|
<div v-if="selectedRowKeys.length > 0" class="batch-actions">
|
||||||
<div class="batch-actions-inner">
|
<div class="batch-actions-inner">
|
||||||
<span>{{ t("certd.selectedCount", { count: selectedRowKeys.length }) }}</span>
|
<span>{{ t("certd.selectedCount", { count: selectedRowKeys.length }) }}</span>
|
||||||
@@ -19,7 +44,6 @@
|
|||||||
<change-trigger :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-trigger>
|
<change-trigger :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-trigger>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template #actionbar-right> </template>
|
|
||||||
<template #form-bottom>
|
<template #form-bottom>
|
||||||
<div>{{ t("certd.applyCertificate") }}</div>
|
<div>{{ t("certd.applyCertificate") }}</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -28,7 +52,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onActivated, onMounted, ref } from "vue";
|
import { computed, onActivated, onMounted, ref } from "vue";
|
||||||
import { dict, useFs } from "@fast-crud/fast-crud";
|
import { dict, useFs } from "@fast-crud/fast-crud";
|
||||||
import createCrudOptions from "./crud";
|
import createCrudOptions from "./crud";
|
||||||
import ChangeGroup from "./components/change-group.vue";
|
import ChangeGroup from "./components/change-group.vue";
|
||||||
@@ -42,6 +66,8 @@ const { t } = useI18n();
|
|||||||
import ChangeNotification from "/@/views/certd/pipeline/components/change-notification.vue";
|
import ChangeNotification from "/@/views/certd/pipeline/components/change-notification.vue";
|
||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { groupDictRef } from "./group/dicts";
|
import { groupDictRef } from "./group/dicts";
|
||||||
|
import { useCertPipelineCreator } from "./certd-form/use";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "PipelineManager",
|
name: "PipelineManager",
|
||||||
@@ -51,6 +77,36 @@ const selectedRowKeys = ref([]);
|
|||||||
const context: any = {
|
const context: any = {
|
||||||
selectedRowKeys,
|
selectedRowKeys,
|
||||||
};
|
};
|
||||||
|
const router = useRouter();
|
||||||
|
const { openAddCertdPipelineDialog } = useCertPipelineCreator();
|
||||||
|
function onActionbarMoreItemClick(req: { key: string; item: any }) {
|
||||||
|
openCertApplyDialog({ key: req.key, title: req.item?.title });
|
||||||
|
}
|
||||||
|
|
||||||
|
const addMorePipelineBtns = computed(() => {
|
||||||
|
return [
|
||||||
|
{ key: "CertApplyGetFormAliyun", title: t("certd.pipelinePage.aliyunSubscriptionPipeline"), icon: "svg:icon-aliyun" },
|
||||||
|
{ key: "CertApplyLego", title: t("certd.pipelinePage.legoCertPipeline"), icon: "cbi:lego" },
|
||||||
|
{ key: "AddPipeline", title: t("certd.pipelinePage.customPipeline"), icon: "ion:add-circle-outline" },
|
||||||
|
{ key: "BatchAddPipeline", title: t("certd.pipelinePage.batchAddPipeline"), icon: "ion:duplicate" },
|
||||||
|
];
|
||||||
|
});
|
||||||
|
function openCertApplyDialog(req: { key: string; title: string }) {
|
||||||
|
if (req.key === "AddPipeline") {
|
||||||
|
crudExpose.openAdd({});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (req.key === "BatchAddPipeline") {
|
||||||
|
router.push({ path: "/certd/pipeline/template" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const searchForm = crudExpose.getSearchValidatedFormData();
|
||||||
|
const defaultGroupId = searchForm.groupId;
|
||||||
|
openAddCertdPipelineDialog({ pluginName: req.key, defaultGroupId, title: req.title });
|
||||||
|
}
|
||||||
|
context.openCertApplyDialog = openCertApplyDialog;
|
||||||
|
|
||||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context });
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context });
|
||||||
|
|
||||||
// 页面打开后获取列表数据
|
// 页面打开后获取列表数据
|
||||||
|
|||||||
@@ -308,6 +308,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
|
import { usePreferences } from "/@/vben/preferences";
|
||||||
import { computed, defineComponent, onMounted, onUnmounted, provide, ref, Ref, watch } from "vue";
|
import { computed, defineComponent, onMounted, onUnmounted, provide, ref, Ref, watch } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import PiTaskForm from "./component/task-form/index.vue";
|
import PiTaskForm from "./component/task-form/index.vue";
|
||||||
@@ -920,7 +921,9 @@ export default defineComponent({
|
|||||||
console.log("currentPipeline", pipeline);
|
console.log("currentPipeline", pipeline);
|
||||||
};
|
};
|
||||||
|
|
||||||
const logsCollapse = ref(false);
|
// 获取浏览器宽度
|
||||||
|
const viewWidth = window.innerWidth;
|
||||||
|
const logsCollapse = ref(viewWidth < 768 ? true : false);
|
||||||
|
|
||||||
function toggleLogsCollapse() {
|
function toggleLogsCollapse() {
|
||||||
logsCollapse.value = !logsCollapse.value;
|
logsCollapse.value = !logsCollapse.value;
|
||||||
@@ -1062,8 +1065,9 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.layout-right {
|
.layout-right {
|
||||||
width: 354px;
|
width: 364px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
max-width: 90vw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1287,9 +1291,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
.layout-right {
|
.layout-right {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&.collapsed {
|
&.collapsed {
|
||||||
margin-right: -354px;
|
margin-right: max(-364px, -90vw);
|
||||||
}
|
}
|
||||||
|
|
||||||
.collapse-toggle {
|
.collapse-toggle {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
<div class="statistic-data m-20">
|
<div class="statistic-data m-20">
|
||||||
<a-row :gutter="20" class="flex-wrap">
|
<a-row :gutter="20" class="flex-wrap">
|
||||||
<a-col :md="6" :xs="24">
|
<a-col :md="6" :xs="24">
|
||||||
<statistic-card :title="t('certd.dashboard.pipelineCount')" :count="count.pipelineCount">
|
<statistic-card icon="fluent-color:data-line-24" :title="t('certd.dashboard.pipelineCount')" :count="count.pipelineCount" :sub-counts="count.pipelineEnableCount">
|
||||||
<template v-if="count.pipelineCount === 0" #default>
|
<template v-if="count.pipelineCount === 0" #default>
|
||||||
<div class="flex-center flex-1 flex-col">
|
<div class="flex-center flex-1 flex-col">
|
||||||
<div style="font-size: 18px; font-weight: 700">{{ t("certd.dashboard.noPipeline") }}</div>
|
<div style="font-size: 18px; font-weight: 700">{{ t("certd.dashboard.noPipeline") }}</div>
|
||||||
@@ -79,18 +79,30 @@
|
|||||||
</template>
|
</template>
|
||||||
</statistic-card>
|
</statistic-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :xs="24">
|
<!-- <a-col :md="6" :xs="24">
|
||||||
<statistic-card :title="t('certd.dashboard.pipelineStatus')" :footer="false">
|
<statistic-card :title="t('certd.dashboard.pipelineStatus')" :footer="false">
|
||||||
<pie-count v-if="count.pipelineStatusCount" :data="count.pipelineStatusCount"></pie-count>
|
<pie-count v-if="count.pipelineStatusCount" :data="count.pipelineStatusCount"></pie-count>
|
||||||
</statistic-card>
|
</statistic-card>
|
||||||
|
</a-col> -->
|
||||||
|
<a-col :md="6" :xs="24">
|
||||||
|
<statistic-card icon="fluent-color:certificate-24" :title="t('certd.dashboard.certCount')" :count="count.certCount" :sub-counts="count.certStatusCount">
|
||||||
|
<template v-if="count.certCount === 0" #default>
|
||||||
|
<div class="flex-center flex-1 flex-col">
|
||||||
|
<div style="font-size: 18px; font-weight: 700">{{ t("certd.dashboard.noCert") }}</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<router-link to="/certd/monitor/cert" class="flex"> <fs-icon icon="ion:settings-outline" class="mr-5 fs-16" /> {{ t("certd.dashboard.manageCert") }} </router-link>
|
||||||
|
</template>
|
||||||
|
</statistic-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :xs="24">
|
<a-col :md="6" :xs="24">
|
||||||
<statistic-card :title="t('certd.dashboard.recentRun')" :footer="false">
|
<statistic-card icon="fluent-color:data-trending-24" :title="t('certd.dashboard.recentRun')" :footer="false">
|
||||||
<day-count v-if="count.historyCountPerDay" :data="count.historyCountPerDay" :title="t('certd.dashboard.runCount')"></day-count>
|
<day-count v-if="count.historyCountPerDay" :data="count.historyCountPerDay" :title="t('certd.dashboard.runCount')"></day-count>
|
||||||
</statistic-card>
|
</statistic-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :xs="24">
|
<a-col :md="6" :xs="24">
|
||||||
<statistic-card :title="t('certd.dashboard.expiringCerts')">
|
<statistic-card icon="fluent-color:alert-urgent-24" :title="t('certd.dashboard.expiringCerts')">
|
||||||
<expiring-list v-if="count.expiringList" :data="count.expiringList"></expiring-list>
|
<expiring-list v-if="count.expiringList" :data="count.expiringList"></expiring-list>
|
||||||
</statistic-card>
|
</statistic-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -100,8 +112,11 @@
|
|||||||
<div v-if="pluginGroups" class="plugin-list">
|
<div v-if="pluginGroups" class="plugin-list">
|
||||||
<a-card>
|
<a-card>
|
||||||
<template #title>
|
<template #title>
|
||||||
{{ t("certd.dashboard.supportedTasks") }}
|
<div class="flex items-center">
|
||||||
<a-tag color="green">{{ pluginGroups.groups.all.plugins.length }}</a-tag>
|
<fs-icon icon="fluent-color:puzzle-piece-24" class="mr-5 fs-28" />
|
||||||
|
<div class="mr-5">{{ t("certd.dashboard.supportedTasks") }}</div>
|
||||||
|
<a-tag color="green">{{ pluginGroups.groups.all.plugins.length }}</a-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<a-row :gutter="10">
|
<a-row :gutter="10">
|
||||||
<a-col v-for="item of pluginGroups.groups.all.plugins" :key="item.name" class="plugin-item-col" :xl="4" :md="6" :xs="24">
|
<a-col v-for="item of pluginGroups.groups.all.plugins" :key="item.name" class="plugin-item-col" :xl="4" :md="6" :xs="24">
|
||||||
@@ -126,32 +141,33 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
|
<a-tour v-bind="tour" v-model:current="tour.current" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { FsIcon } from "@fast-crud/fast-crud";
|
import { FsIcon } from "@fast-crud/fast-crud";
|
||||||
import SimpleSteps from "/@/components/tutorial/simple-steps.vue";
|
import { notification } from "ant-design-vue";
|
||||||
import { useUserStore } from "/@/store/user";
|
|
||||||
import { computed, ComputedRef, onMounted, Ref, ref } from "vue";
|
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import StatisticCard from "/@/views/framework/home/dashboard/statistic-card.vue";
|
import { computed, ComputedRef, onMounted, Ref, ref } from "vue";
|
||||||
import TutorialButton from "/@/components/tutorial/index.vue";
|
|
||||||
import DayCount from "./charts/day-count.vue";
|
|
||||||
import PieCount from "./charts/pie-count.vue";
|
|
||||||
import ExpiringList from "./charts/expiring-list.vue";
|
|
||||||
import SuiteCard from "./suite-card.vue";
|
|
||||||
import { useSettingStore } from "/@/store/settings";
|
|
||||||
import { SiteInfo } from "/@/store/settings/api.basic";
|
|
||||||
import { UserInfoRes } from "/@/store/user/api.user";
|
|
||||||
import { GetStatisticCount } from "/@/views/framework/home/dashboard/api";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import * as api from "./api";
|
import * as api from "./api";
|
||||||
|
import DayCount from "./charts/day-count.vue";
|
||||||
|
import ExpiringList from "./charts/expiring-list.vue";
|
||||||
|
import NoticeBar from "./notice-bar.vue";
|
||||||
|
import SuiteCard from "./suite-card.vue";
|
||||||
|
import TutorialButton from "/@/components/tutorial/index.vue";
|
||||||
|
import SimpleSteps from "/@/components/tutorial/simple-steps.vue";
|
||||||
|
import { usePluginStore } from "/@/store/plugin";
|
||||||
|
import { useSettingStore } from "/@/store/settings";
|
||||||
|
import { SiteInfo } from "/@/store/settings/api.basic";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
|
import { UserInfoRes } from "/@/store/user/api.user";
|
||||||
|
import { LocalStorage } from "/@/utils/util.storage";
|
||||||
|
import { GetStatisticCount } from "/@/views/framework/home/dashboard/api";
|
||||||
|
import StatisticCard from "/@/views/framework/home/dashboard/statistic-card.vue";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
import { usePluginStore } from "/@/store/plugin";
|
|
||||||
import { notification } from "ant-design-vue";
|
|
||||||
import NoticeBar from "./notice-bar.vue";
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "DashboardUser",
|
name: "DashboardUser",
|
||||||
});
|
});
|
||||||
@@ -242,6 +258,19 @@ function transformStatusCount() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
count.value.pipelineStatusCount = result;
|
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", title: "到期不足15天" },
|
||||||
|
{ name: t("certd.dashboard.certNoExpireCount"), value: certCount.notExpired, color: "green" },
|
||||||
|
];
|
||||||
|
count.value.certCount = certCount.total;
|
||||||
}
|
}
|
||||||
async function loadCount() {
|
async function loadCount() {
|
||||||
count.value = await GetStatisticCount();
|
count.value = await GetStatisticCount();
|
||||||
@@ -266,6 +295,9 @@ onMounted(async () => {
|
|||||||
loadLatestVersion();
|
loadLatestVersion();
|
||||||
loadCount();
|
loadCount();
|
||||||
loadPluginGroups();
|
loadPluginGroups();
|
||||||
|
if (count.value.pipelineCount === 0) {
|
||||||
|
tourHandleOpen(true);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function openUpgradeUrl() {
|
function openUpgradeUrl() {
|
||||||
@@ -300,6 +332,50 @@ const noticeList = computed(() => {
|
|||||||
|
|
||||||
return list;
|
return list;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function useTour() {
|
||||||
|
const tour = ref({
|
||||||
|
open: false,
|
||||||
|
current: 0,
|
||||||
|
steps: [],
|
||||||
|
onClose: () => {
|
||||||
|
tour.value.open = false;
|
||||||
|
LocalStorage.set("home-tour-off", true, 999999999);
|
||||||
|
},
|
||||||
|
onFinish: () => {
|
||||||
|
tour.value.open = false;
|
||||||
|
LocalStorage.set("home-tour-off", true, 999999999);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const tourHandleOpen = (val: boolean): void => {
|
||||||
|
if (LocalStorage.get("home-tour-off")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initSteps();
|
||||||
|
tour.value.open = val;
|
||||||
|
};
|
||||||
|
|
||||||
|
function initSteps() {
|
||||||
|
//@ts-ignore
|
||||||
|
tour.value.steps = [
|
||||||
|
{
|
||||||
|
title: "您是第一次使用吗?",
|
||||||
|
description: "此处可以查看新手教程哦 ↑↑↑↑",
|
||||||
|
target: () => {
|
||||||
|
return document.querySelector("header .tutorial-button");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
tour,
|
||||||
|
tourHandleOpen,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const { tour, tourHandleOpen } = useTour();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
|||||||
@@ -3,12 +3,35 @@
|
|||||||
<a-card>
|
<a-card>
|
||||||
<div class="data-item">
|
<div class="data-item">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="title">{{ title }}</div>
|
<div class="title">
|
||||||
|
<fs-icon :icon="icon" class="statistic-icon"></fs-icon>
|
||||||
|
{{ title }}
|
||||||
|
</div>
|
||||||
<div class="more"></div>
|
<div class="more"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div v-if="!slots.default" class="statistic">
|
<div v-if="!slots.default" class="statistic">
|
||||||
<div v-if="count !== 0" class="value">{{ count }}</div>
|
<div v-if="count !== 0" class="value flex items-center w-full">
|
||||||
|
<div class="total flex-center flex-1 flex-col">
|
||||||
|
<span>{{ count }}</span>
|
||||||
|
<span class="sub-title">{{ title }}</span>
|
||||||
|
</div>
|
||||||
|
<a-divider type="vertical h-10"></a-divider>
|
||||||
|
<div class="sub flex-1 flex-col h-[80%] flex-evenly pl-4">
|
||||||
|
<div v-for="item in subCounts" :key="item.name" class="sub-item flex justify-center w-full" :title="item.title">
|
||||||
|
<div class="flex items-center w-[60%] ellipsis overflow-hidden">
|
||||||
|
<div class="status-indicator" :class="`bg-${item.color}`"></div>
|
||||||
|
{{ item.name }}:
|
||||||
|
</div>
|
||||||
|
<div class="w-[40%] flex items-center justify-center relative">
|
||||||
|
<span class="icon-text">{{ item.value }}</span>
|
||||||
|
<div v-if="item.value !== 0 && item.checkIcon" class="ml-2 flex items-center absolute right-0">
|
||||||
|
<fs-icon :icon="item.checkIcon" class="fs-icon"></fs-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<a-empty v-else></a-empty>
|
<a-empty v-else></a-empty>
|
||||||
</div>
|
</div>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
@@ -23,53 +46,126 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { FsIcon } from "@fast-crud/fast-crud";
|
import { FsIcon } from "@fast-crud/fast-crud";
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
icon: string;
|
||||||
title: string;
|
title: string;
|
||||||
count?: number;
|
count?: number;
|
||||||
|
subCounts?: {
|
||||||
|
name: string;
|
||||||
|
value: number;
|
||||||
|
color: string;
|
||||||
|
checkIcon?: string;
|
||||||
|
title?: string;
|
||||||
|
}[];
|
||||||
}>();
|
}>();
|
||||||
const slots = defineSlots();
|
const slots = defineSlots();
|
||||||
</script>
|
</script>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.statistic-card {
|
.statistic-card {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.ant-card-body {
|
||||||
|
padding: 15px 24px;
|
||||||
|
}
|
||||||
.icon-text {
|
.icon-text {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.fs-icon {
|
.fs-icon {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-item {
|
.data-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 188px;
|
height: 200px;
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
//padding-bottom: 10px;
|
margin-top: 6px;
|
||||||
color: #8077a4;
|
margin-bottom: 6px;
|
||||||
|
color: #494949;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.more {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statistic-icon {
|
||||||
|
font-size: 28px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
.statistic {
|
.statistic {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #2c254e;
|
.total {
|
||||||
|
color: hsl(var(--primary));
|
||||||
|
.sub-title {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #626262;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-item {
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
.status-indicator {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 12px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-green {
|
||||||
|
background: linear-gradient(90deg, #4caf50, #8bc34a);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-red {
|
||||||
|
background: linear-gradient(90deg, #f44336, #e57373);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-yellow {
|
||||||
|
background: linear-gradient(90deg, #ff9800, #ffc107);
|
||||||
|
}
|
||||||
|
.bg-blue {
|
||||||
|
background: linear-gradient(90deg, #2196f3, #64b5f6);
|
||||||
|
}
|
||||||
|
.bg-gray {
|
||||||
|
background: linear-gradient(90deg, #9e9e9e, #bdbdbd);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
x-vue-echarts {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
color: #8077a4;
|
color: #8077a4;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@@ -81,10 +177,10 @@ const slots = defineSlots();
|
|||||||
border-style: dashed;
|
border-style: dashed;
|
||||||
border-width: 1px 0 0;
|
border-width: 1px 0 0;
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
|
|
||||||
> * {
|
> * {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
margin-bottom: -10px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||