mirror of
https://github.com/certd/certd.git
synced 2026-04-14 04:20:52 +08:00
Compare commits
138 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f252871fb8 | ||
|
|
107196122c | ||
|
|
563c02d8da | ||
|
|
765934970a | ||
|
|
9cbdfda829 | ||
|
|
c1fbc8cd68 | ||
|
|
a92107cc47 | ||
|
|
3e84e116e8 | ||
|
|
7c0cdd169e | ||
|
|
424fd96615 | ||
|
|
ebfcea88da | ||
|
|
3c7eb2f5e2 | ||
|
|
936167972f | ||
|
|
7f6070c960 | ||
|
|
0aea9c129c | ||
|
|
d20fb7daa8 | ||
|
|
a619f8a2fe | ||
|
|
0acb858d7b | ||
|
|
e459be76fe | ||
|
|
c4c59ccc75 | ||
|
|
c820315409 | ||
|
|
2a19b61b7a | ||
|
|
e1cf64ae16 | ||
|
|
d3c2f8eb43 | ||
|
|
a00453c83a | ||
|
|
2eb0e54909 | ||
|
|
ac87bc57e9 | ||
|
|
2b8ea857f0 | ||
|
|
11c52114b2 | ||
|
|
f55f9b4dd3 | ||
|
|
cdd369ea98 | ||
|
|
f2aab9f476 | ||
|
|
2619dc3556 | ||
|
|
1bbed351ba | ||
|
|
4cfb2644c6 | ||
|
|
5b85c7ad39 | ||
|
|
ab3a3156f2 | ||
|
|
28a582025e | ||
|
|
8451a83a3a | ||
|
|
92c8dcc666 | ||
|
|
da68b02e1e | ||
|
|
2d7729dbe9 | ||
|
|
6467edb843 | ||
|
|
1f01b3a9ff | ||
|
|
8aa1f8926d | ||
|
|
ace363fa35 | ||
|
|
919f70a5fd | ||
|
|
9d6ad771a3 | ||
|
|
bafccb20c6 | ||
|
|
cef30c2af0 | ||
|
|
ca58056a75 | ||
|
|
03e2e99498 | ||
|
|
fba7afc4e9 | ||
|
|
d7dda336ec | ||
|
|
55d4395160 | ||
|
|
f7d5baa6d0 | ||
|
|
6ff509d263 | ||
|
|
57778981a7 | ||
|
|
6ac3bc564f | ||
|
|
82d08e2153 | ||
|
|
6212cd77e8 | ||
|
|
170034f943 | ||
|
|
e639a8f9f1 | ||
|
|
9d10c45dac | ||
|
|
b84159f2f1 | ||
|
|
49f26b4049 | ||
|
|
0e7e44cee2 | ||
|
|
36e769502c | ||
|
|
a4b6580247 | ||
|
|
84fb1c5127 | ||
|
|
ddfd0fb81d | ||
|
|
37edbf5824 | ||
|
|
e15212bf49 | ||
|
|
6a0cc1b1f3 | ||
|
|
0e8339c701 | ||
|
|
5d71a4dbde | ||
|
|
0b78030c59 | ||
|
|
24237c16bf | ||
|
|
c48da5dea7 | ||
|
|
6702ca10a1 | ||
|
|
4b44bd5e61 | ||
|
|
8a55beda92 | ||
|
|
a12b824339 | ||
|
|
c4a743189e | ||
|
|
85f9ef35f6 | ||
|
|
6de220e38a | ||
|
|
0d455d8c2f | ||
|
|
f7b0b44ef6 | ||
|
|
81282a9c88 | ||
|
|
a9b302e38d | ||
|
|
1fe4c367f7 | ||
|
|
2de7583900 | ||
|
|
356703c83e | ||
|
|
1cae709b2b | ||
|
|
46a492248f | ||
|
|
d876ea6711 | ||
|
|
b40b4c3cfd | ||
|
|
44980d6c46 | ||
|
|
442f9647a2 | ||
|
|
a06ef07178 | ||
|
|
0c2ea5da4c | ||
|
|
45814ceb49 | ||
|
|
41f4617e66 | ||
|
|
a463711b03 | ||
|
|
3a147141b1 | ||
|
|
aea1c13bd3 | ||
|
|
9cc4c017ae | ||
|
|
88022747be | ||
|
|
ebb292a2f7 | ||
|
|
818998259d | ||
|
|
36b02c2cec | ||
|
|
e6195ade3e | ||
|
|
231a875bb4 | ||
|
|
378c777a38 | ||
|
|
8ef63916ef | ||
|
|
f32ecdf5f1 | ||
|
|
94739b9b8e | ||
|
|
023db4e04e | ||
|
|
5a4b95f5fe | ||
|
|
b091657b5c | ||
|
|
f7bf5c9328 | ||
|
|
86e521b9aa | ||
|
|
e08cf57b72 | ||
|
|
9e06cb9a83 | ||
|
|
c65e8622b8 | ||
|
|
7795efeb7a | ||
|
|
e725e0020e | ||
|
|
cff7baaaad | ||
|
|
4d68a174cb | ||
|
|
ed1a9fc7aa | ||
|
|
47ebab237b | ||
|
|
f9553e7d44 | ||
|
|
ae51676471 | ||
|
|
f933fb705c | ||
|
|
918ea59b9a | ||
|
|
b9dab77c8b | ||
|
|
4159534a64 | ||
|
|
d00177a9b6 |
108
CHANGELOG.md
108
CHANGELOG.md
@@ -3,6 +3,114 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复阿里云新加坡clb无法部署证书的bug ([c1fbc8c](https://github.com/certd/certd/commit/c1fbc8cd68ae020ef342e4e92f4d9b4869ca1ead))
|
||||||
|
* 修复阿里云新加坡clb无法部署证书的bug ([3e84e11](https://github.com/certd/certd/commit/3e84e116e863b54c6b4d7db160af372dacc5857f))
|
||||||
|
* 修复检查github release 插件无法保存最后版本的bug ([a92107c](https://github.com/certd/certd/commit/a92107cc47133883b099d5228b06373e84c8bb50))
|
||||||
|
* 修复站点监控定时器多次添加的bug ([9361679](https://github.com/certd/certd/commit/936167972fe83e519bc01a0dd961d9c0635d24ab))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 阿里云dns操作增加重试机制 ([424fd96](https://github.com/certd/certd/commit/424fd96615c05e949af8c837c261c1400bdffba2))
|
||||||
|
* 优化阿里云nlb支持部署扩展证书 ([9cbdfda](https://github.com/certd/certd/commit/9cbdfda829b231733d54c66c5024d46e6fc11af3))
|
||||||
|
* 子域名托管帮助链接优化为打开新窗口 ([7c0cdd1](https://github.com/certd/certd/commit/7c0cdd169e2f943e703e433677f2f437d4aa02ee))
|
||||||
|
* history增加触发类型显示 ([7f6070c](https://github.com/certd/certd/commit/7f6070c960ed7bf02add5ab36436de6573f2f1fa))
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 某些证书提供商的证书确实commonName导致无法转换证书的问题 ([ac87bc5](https://github.com/certd/certd/commit/ac87bc57e957ea4679707bfd38d6840e26319bed))
|
||||||
|
* 修复站点监控通知渠道设置无效的bug ([a00453c](https://github.com/certd/certd/commit/a00453c83a58114ce2873dd6e6aaf313f1ce0f87))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 修改 HTTPS 服务器监听地址 ([e1cf64a](https://github.com/certd/certd/commit/e1cf64ae16d4abfe4299ff16d5088c30cf3c6365))
|
||||||
|
* 优化流水线页面,增加下次执行时间、查看证书显示 ([c820315](https://github.com/certd/certd/commit/c8203154094fae3d17198747f49f5f41ddf29a4e))
|
||||||
|
* 站点证书监控支持定时设置,重试次数设置 ([d3c2f8e](https://github.com/certd/certd/commit/d3c2f8eb436e670772d14a54acd6b541c5aa3978))
|
||||||
|
* 证书申请支持letencrypt profile选项 ([2eb0e54](https://github.com/certd/certd/commit/2eb0e54909d8ad36708e07c12fd598998159bc43))
|
||||||
|
* aliyun alb支持部署扩展证书 ([2a19b61](https://github.com/certd/certd/commit/2a19b61b7a78620c06396c2cc37cc77d738b6d12))
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* 完善注释 ([6702ca1](https://github.com/certd/certd/commit/6702ca10a17f5d7dbff789b039f7269496f66b97))
|
||||||
|
* AWS 中国区 CloudFront 证书部署(IAM 证书) ([8a55bed](https://github.com/certd/certd/commit/8a55beda924b3be2a53b9ba80d9487cefa8bf887))
|
||||||
|
* **lego:** support for command options ([b84159f](https://github.com/certd/certd/commit/b84159f2f11531f058837c2e82d66499f3740f20))
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复用户最大流水线数量校验的问题 ([919f70a](https://github.com/certd/certd/commit/919f70a5fd2842ca69f96f1659bb5a7ba3f73776))
|
||||||
|
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/certd/certd/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
|
||||||
|
* 修复cv4pve sdk (proxmox插件连接失败时无法正常结束任务的bug) ([49f26b4](https://github.com/certd/certd/commit/49f26b4049a0549b0270395157e96e8f04a68bc4))
|
||||||
|
* 修复flexcdn部署证书的顶级CA名称显示 ([6467edb](https://github.com/certd/certd/commit/6467edb84324d7c80a85212675dbacedc459df83))
|
||||||
|
* 修复flexcdn证书commonNames错误的问题 ([ace363f](https://github.com/certd/certd/commit/ace363fa355436e769b27f71cc487d30d6441780))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 分组选择支持清空选项 ([03e2e99](https://github.com/certd/certd/commit/03e2e9949837b34eb3ea56d14a9e8a5dabc96063))
|
||||||
|
* 优化cname检查,当有冲突的cname记录时,给出提示 ([e639a8f](https://github.com/certd/certd/commit/e639a8f9f12640ffcca69f1a6a0324459924afbd))
|
||||||
|
* 增加下载日志按钮 ([6ff509d](https://github.com/certd/certd/commit/6ff509d263c0182645b4692c10b5fedb192db964))
|
||||||
|
* 站点监控支持批量导入域名和ip ([2d7729d](https://github.com/certd/certd/commit/2d7729dbe98f29088f5f317db2b52cc1ede223a6))
|
||||||
|
* 支持设置用户有效期 ([6ac3bc5](https://github.com/certd/certd/commit/6ac3bc564f407dad2cd0b0b0744e887387aa5da3))
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **flexcdn:** fix cert upload and skipSslVerify required ([c48da5d](https://github.com/certd/certd/commit/c48da5dea7f0f0cdeae643b106b4a678acc3b14b))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 阿里云CLB支持部署到扩展域名 ([0e8339c](https://github.com/certd/certd/commit/0e8339c70190890d449099e1d26e5ed06ff135fb))
|
||||||
|
* 优化流水线名称过长时的显示 ([6a0cc1b](https://github.com/certd/certd/commit/6a0cc1b1f3ad508f9e4093b3b682b163f12389eb))
|
||||||
|
* 支持部署到飞牛OS ([ddfd0fb](https://github.com/certd/certd/commit/ddfd0fb81d6638352920261065f1ab8e27bdd564))
|
||||||
|
* 支持日志写入文件 ([37edbf5](https://github.com/certd/certd/commit/37edbf5824d6aaae68ea1ef7259c6f739d418d2c))
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复Farcdn证书有效期错误的问题 ([1fe4c36](https://github.com/certd/certd/commit/1fe4c367f7128de9ba5e3395ae06bc81e63a7d5a))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 不止证书自动化,插件解锁无限可能 ([a9b302e](https://github.com/certd/certd/commit/a9b302e38d3328d75df8b2da3d8b914851e55e9c))
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
* 支持github 新版本检查并发布通知 ([356703c](https://github.com/certd/certd/commit/356703c83ea18c6efb8931402e181280d7b7e696))
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 更新 1panel API 版本支持v1/v2设置 ([e6195ad](https://github.com/certd/certd/commit/e6195ade3ec54b138825b8d6738f86eb8afdd720))
|
||||||
|
* 同步更新namesilo接口,修复无法创建和删除dns记录的问题 ([36b02c2](https://github.com/certd/certd/commit/36b02c2cec145c13d4ef29d49aba5b6b4f697df2))
|
||||||
|
* 修复阿里云 esa 证书获取站点列表错误的问题 ([0c2ea5d](https://github.com/certd/certd/commit/0c2ea5da4c836f8a0df132a3f22d399bd9ee1de9))
|
||||||
|
* 修复部署到华为cdn,子账号ak查询不到域名的bug ([ebb292a](https://github.com/certd/certd/commit/ebb292a2f7a425c1bc810f59468beb3f1d5bc3f0))
|
||||||
|
* 修复证书申请任务无法修改dns提供商类型的bug ([8802274](https://github.com/certd/certd/commit/88022747bebe2054223e0241d68d410771405e68))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 关闭腾讯云证书通知提醒 ([231a875](https://github.com/certd/certd/commit/231a875bb481420c39bf76ec9ff4e50954ab9fe4))
|
||||||
|
* 优化站点选择组件,切换选择时不刷新列表 ([3a14714](https://github.com/certd/certd/commit/3a147141b1a5d67c92a5ce88a5313eaa62859e03))
|
||||||
|
* 优化站点ip检查 ([a463711](https://github.com/certd/certd/commit/a463711b03a20120f2a298be15d71ca152d27f21))
|
||||||
|
* 站点监控支持监控IP ([9cc4c01](https://github.com/certd/certd/commit/9cc4c017ae646a18284e732769b82636feda01d3))
|
||||||
|
* 支持批量重新运行 ([8189982](https://github.com/certd/certd/commit/818998259ddc75e722196ac5c365038818539b9b))
|
||||||
|
* farcdn优化 ([a06ef07](https://github.com/certd/certd/commit/a06ef07178ed73c537e21c7d57e5e5144d2c056d))
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化阿里云DCDN插件,支持多选 ([b091657](https://github.com/certd/certd/commit/b091657b5c537acf2442a2bfc345d0a77f5e2c50))
|
||||||
|
* 支持部署到farcdn ([e08cf57](https://github.com/certd/certd/commit/e08cf57b72128998f487ab6469868052fbce0dba))
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -110,8 +110,7 @@ https://certd.handfree.work/
|
|||||||
> * 请务必使用web应用防火墙防护本应用,防止XSS、SQL注入等攻击
|
> * 请务必使用web应用防火墙防护本应用,防止XSS、SQL注入等攻击
|
||||||
> * 请务必做好服务器本身的安全防护,防止数据库泄露
|
> * 请务必做好服务器本身的安全防护,防止数据库泄露
|
||||||
> * 请务必做好数据备份,避免数据丢失
|
> * 请务必做好数据备份,避免数据丢失
|
||||||
|
> * [更多安全生产建议点我](https://certd.docmirror.cn/guide/feature/safe/)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 五、更多帮助
|
## 五、更多帮助
|
||||||
@@ -169,7 +168,11 @@ https://afdian.com/a/greper
|
|||||||
1. 可以调整开源协议以使其更严格或更宽松。
|
1. 可以调整开源协议以使其更严格或更宽松。
|
||||||
2. 可以用于商业用途。
|
2. 可以用于商业用途。
|
||||||
|
|
||||||
|
感谢以下贡献者做出的贡献。
|
||||||
|
|
||||||
|
<a href="https://github.com/certd/certd/graphs/contributors">
|
||||||
|
<img src="https://contrib.rocks/image?repo=certd/certd" />
|
||||||
|
</a>
|
||||||
|
|
||||||
## 九、 开源许可
|
## 九、 开源许可
|
||||||
* 本项目遵循 GNU Affero General Public License(AGPL)开源协议。
|
* 本项目遵循 GNU Affero General Public License(AGPL)开源协议。
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
01:40
|
09:12
|
||||||
|
|||||||
@@ -3,6 +3,114 @@
|
|||||||
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.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 某些证书提供商的证书确实commonName导致无法转换证书的问题 ([ac87bc5](https://github.com/certd/certd/commit/ac87bc57e957ea4679707bfd38d6840e26319bed))
|
||||||
|
* 修复站点监控通知渠道设置无效的bug ([a00453c](https://github.com/certd/certd/commit/a00453c83a58114ce2873dd6e6aaf313f1ce0f87))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 修改 HTTPS 服务器监听地址 ([e1cf64a](https://github.com/certd/certd/commit/e1cf64ae16d4abfe4299ff16d5088c30cf3c6365))
|
||||||
|
* 优化流水线页面,增加下次执行时间、查看证书显示 ([c820315](https://github.com/certd/certd/commit/c8203154094fae3d17198747f49f5f41ddf29a4e))
|
||||||
|
* 站点证书监控支持定时设置,重试次数设置 ([d3c2f8e](https://github.com/certd/certd/commit/d3c2f8eb436e670772d14a54acd6b541c5aa3978))
|
||||||
|
* 证书申请支持letencrypt profile选项 ([2eb0e54](https://github.com/certd/certd/commit/2eb0e54909d8ad36708e07c12fd598998159bc43))
|
||||||
|
* aliyun alb支持部署扩展证书 ([2a19b61](https://github.com/certd/certd/commit/2a19b61b7a78620c06396c2cc37cc77d738b6d12))
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* 完善注释 ([6702ca1](https://github.com/certd/certd/commit/6702ca10a17f5d7dbff789b039f7269496f66b97))
|
||||||
|
* AWS 中国区 CloudFront 证书部署(IAM 证书) ([8a55bed](https://github.com/certd/certd/commit/8a55beda924b3be2a53b9ba80d9487cefa8bf887))
|
||||||
|
* **lego:** support for command options ([b84159f](https://github.com/certd/certd/commit/b84159f2f11531f058837c2e82d66499f3740f20))
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复用户最大流水线数量校验的问题 ([919f70a](https://github.com/certd/certd/commit/919f70a5fd2842ca69f96f1659bb5a7ba3f73776))
|
||||||
|
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/certd/certd/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
|
||||||
|
* 修复cv4pve sdk (proxmox插件连接失败时无法正常结束任务的bug) ([49f26b4](https://github.com/certd/certd/commit/49f26b4049a0549b0270395157e96e8f04a68bc4))
|
||||||
|
* 修复flexcdn部署证书的顶级CA名称显示 ([6467edb](https://github.com/certd/certd/commit/6467edb84324d7c80a85212675dbacedc459df83))
|
||||||
|
* 修复flexcdn证书commonNames错误的问题 ([ace363f](https://github.com/certd/certd/commit/ace363fa355436e769b27f71cc487d30d6441780))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 分组选择支持清空选项 ([03e2e99](https://github.com/certd/certd/commit/03e2e9949837b34eb3ea56d14a9e8a5dabc96063))
|
||||||
|
* 优化cname检查,当有冲突的cname记录时,给出提示 ([e639a8f](https://github.com/certd/certd/commit/e639a8f9f12640ffcca69f1a6a0324459924afbd))
|
||||||
|
* 增加下载日志按钮 ([6ff509d](https://github.com/certd/certd/commit/6ff509d263c0182645b4692c10b5fedb192db964))
|
||||||
|
* 站点监控支持批量导入域名和ip ([2d7729d](https://github.com/certd/certd/commit/2d7729dbe98f29088f5f317db2b52cc1ede223a6))
|
||||||
|
* 支持设置用户有效期 ([6ac3bc5](https://github.com/certd/certd/commit/6ac3bc564f407dad2cd0b0b0744e887387aa5da3))
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **flexcdn:** fix cert upload and skipSslVerify required ([c48da5d](https://github.com/certd/certd/commit/c48da5dea7f0f0cdeae643b106b4a678acc3b14b))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 阿里云CLB支持部署到扩展域名 ([0e8339c](https://github.com/certd/certd/commit/0e8339c70190890d449099e1d26e5ed06ff135fb))
|
||||||
|
* 优化流水线名称过长时的显示 ([6a0cc1b](https://github.com/certd/certd/commit/6a0cc1b1f3ad508f9e4093b3b682b163f12389eb))
|
||||||
|
* 支持部署到飞牛OS ([ddfd0fb](https://github.com/certd/certd/commit/ddfd0fb81d6638352920261065f1ab8e27bdd564))
|
||||||
|
* 支持日志写入文件 ([37edbf5](https://github.com/certd/certd/commit/37edbf5824d6aaae68ea1ef7259c6f739d418d2c))
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复Farcdn证书有效期错误的问题 ([1fe4c36](https://github.com/certd/certd/commit/1fe4c367f7128de9ba5e3395ae06bc81e63a7d5a))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 不止证书自动化,插件解锁无限可能 ([a9b302e](https://github.com/certd/certd/commit/a9b302e38d3328d75df8b2da3d8b914851e55e9c))
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
* 支持github 新版本检查并发布通知 ([356703c](https://github.com/certd/certd/commit/356703c83ea18c6efb8931402e181280d7b7e696))
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 更新 1panel API 版本支持v1/v2设置 ([e6195ad](https://github.com/certd/certd/commit/e6195ade3ec54b138825b8d6738f86eb8afdd720))
|
||||||
|
* 同步更新namesilo接口,修复无法创建和删除dns记录的问题 ([36b02c2](https://github.com/certd/certd/commit/36b02c2cec145c13d4ef29d49aba5b6b4f697df2))
|
||||||
|
* 修复阿里云 esa 证书获取站点列表错误的问题 ([0c2ea5d](https://github.com/certd/certd/commit/0c2ea5da4c836f8a0df132a3f22d399bd9ee1de9))
|
||||||
|
* 修复部署到华为cdn,子账号ak查询不到域名的bug ([ebb292a](https://github.com/certd/certd/commit/ebb292a2f7a425c1bc810f59468beb3f1d5bc3f0))
|
||||||
|
* 修复证书申请任务无法修改dns提供商类型的bug ([8802274](https://github.com/certd/certd/commit/88022747bebe2054223e0241d68d410771405e68))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 关闭腾讯云证书通知提醒 ([231a875](https://github.com/certd/certd/commit/231a875bb481420c39bf76ec9ff4e50954ab9fe4))
|
||||||
|
* 优化站点选择组件,切换选择时不刷新列表 ([3a14714](https://github.com/certd/certd/commit/3a147141b1a5d67c92a5ce88a5313eaa62859e03))
|
||||||
|
* 优化站点ip检查 ([a463711](https://github.com/certd/certd/commit/a463711b03a20120f2a298be15d71ca152d27f21))
|
||||||
|
* 站点监控支持监控IP ([9cc4c01](https://github.com/certd/certd/commit/9cc4c017ae646a18284e732769b82636feda01d3))
|
||||||
|
* 支持批量重新运行 ([8189982](https://github.com/certd/certd/commit/818998259ddc75e722196ac5c365038818539b9b))
|
||||||
|
* farcdn优化 ([a06ef07](https://github.com/certd/certd/commit/a06ef07178ed73c537e21c7d57e5e5144d2c056d))
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化阿里云DCDN插件,支持多选 ([b091657](https://github.com/certd/certd/commit/b091657b5c537acf2442a2bfc345d0a77f5e2c50))
|
||||||
|
* 支持部署到farcdn ([e08cf57](https://github.com/certd/certd/commit/e08cf57b72128998f487ab6469868052fbce0dba))
|
||||||
|
|
||||||
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复公共插件配置修改不生效的bug,优化系统设置参数注入时机 ([e1e510c](https://github.com/certd/certd/commit/e1e510ce1e37a5ae82478226b6987a83f22d1ecb))
|
||||||
|
* 修复又拍云 CDN 设置证书参数和强制 HTTPS 配置报错的bug ([7984b62](https://github.com/certd/certd/commit/7984b625ba6727132f205db8e25f790bce27b2f7))
|
||||||
|
* 修复lego模式下每次都重新申请证书的bug ([f807b8c](https://github.com/certd/certd/commit/f807b8cb465cc329fa034ecbef94e18ef394f870))
|
||||||
|
* 优化 RunnableError错误信息展示 ([36bc3ff](https://github.com/certd/certd/commit/36bc3ff22da93ba342c3c1103d7ee2bbcecf44f2))
|
||||||
|
* **cert:** 修正证书过期时间计算逻辑 ([a3086e6](https://github.com/certd/certd/commit/a3086e6a5bec8b07f5e1d21a2ca8bd969c75bd5c))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 二次认证页面中,添加动态验证码输入框的焦点控制,提升用户体验 ([bb22f06](https://github.com/certd/certd/commit/bb22f062ed4ab4b5b71938270fe4cc666af6b8e7))
|
||||||
|
* 添加阿里云 ESA证书部署插件 ([1db1ffd](https://github.com/certd/certd/commit/1db1ffde99ac7e4684fa606ebc4c327f829b3a26))
|
||||||
|
* 站点证书监控增加通知设置 ([3422a1a](https://github.com/certd/certd/commit/3422a1a59fd0d2c0f17fa9c7e8988ac527ecfdd9))
|
||||||
|
|
||||||
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
|
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmClient": "pnpm",
|
"npmClient": "pnpm",
|
||||||
"version": "1.34.6"
|
"version": "1.35.2"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,46 @@
|
|||||||
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.35.2](https://github.com/publishlab/node-acme-client/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/publishlab/node-acme-client/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 证书申请支持letencrypt profile选项 ([2eb0e54](https://github.com/publishlab/node-acme-client/commit/2eb0e54909d8ad36708e07c12fd598998159bc43))
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/publishlab/node-acme-client/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/publishlab/node-acme-client/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/publishlab/node-acme-client/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化cname检查,当有冲突的cname记录时,给出提示 ([e639a8f](https://github.com/publishlab/node-acme-client/commit/e639a8f9f12640ffcca69f1a6a0324459924afbd))
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/publishlab/node-acme-client/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/publishlab/node-acme-client/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/publishlab/node-acme-client/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/publishlab/node-acme-client/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
## [1.34.6](https://github.com/publishlab/node-acme-client/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/publishlab/node-acme-client/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
**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.34.6",
|
"version": "1.35.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.34.6",
|
"@certd/basic": "^1.35.2",
|
||||||
"@peculiar/x509": "^1.11.0",
|
"@peculiar/x509": "^1.11.0",
|
||||||
"asn1js": "^3.0.5",
|
"asn1js": "^3.0.5",
|
||||||
"axios": "^1.7.2",
|
"axios": "^1.7.2",
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"https-proxy-agent": "^7.0.5",
|
"https-proxy-agent": "^7.0.5",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"node-forge": "^1.3.1",
|
"node-forge": "^1.3.1",
|
||||||
"punycode": "^2.3.1"
|
"punycode.js": "^2.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.14.10",
|
"@types/node": "^20.14.10",
|
||||||
@@ -69,5 +69,5 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||||
},
|
},
|
||||||
"gitHead": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ export default async (client, userOpts) => {
|
|||||||
|
|
||||||
log("[auto] Placing new certificate order with ACME provider");
|
log("[auto] Placing new certificate order with ACME provider");
|
||||||
const orderPayload = { identifiers: uniqueDomains.map((d) => ({ type: "dns", value: d })) };
|
const orderPayload = { identifiers: uniqueDomains.map((d) => ({ type: "dns", value: d })) };
|
||||||
|
if (opts.profile && client.sslProvider === 'letsencrypt' ){
|
||||||
|
orderPayload.profile = opts.profile;
|
||||||
|
}
|
||||||
const order = await client.createOrder(orderPayload);
|
const order = await client.createOrder(orderPayload);
|
||||||
const authorizations = await client.getAuthorizations(order);
|
const authorizations = await client.getAuthorizations(order);
|
||||||
|
|
||||||
@@ -213,12 +216,16 @@ export default async (client, userOpts) => {
|
|||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function runPromisePa(tasks, waitTime = 5000) {
|
async function runPromisePa(tasks, waitTime = 8000) {
|
||||||
const results = [];
|
const results = [];
|
||||||
|
let j = 0
|
||||||
// eslint-disable-next-line no-await-in-loop,no-restricted-syntax
|
// eslint-disable-next-line no-await-in-loop,no-restricted-syntax
|
||||||
for (const task of tasks) {
|
for (const task of tasks) {
|
||||||
|
j++
|
||||||
|
log(`开始第${j}个任务`);
|
||||||
results.push(task());
|
results.push(task());
|
||||||
// eslint-disable-next-line no-await-in-loop
|
// eslint-disable-next-line no-await-in-loop
|
||||||
|
log(`wait ${waitTime}s`)
|
||||||
await wait(waitTime);
|
await wait(waitTime);
|
||||||
}
|
}
|
||||||
return Promise.all(results);
|
return Promise.all(results);
|
||||||
@@ -242,6 +249,7 @@ export default async (client, userOpts) => {
|
|||||||
log(`跳过本地验证(skipChallengeVerification=true),等待 60s`);
|
log(`跳过本地验证(skipChallengeVerification=true),等待 60s`);
|
||||||
await wait(60 * 1000);
|
await wait(60 * 1000);
|
||||||
} else {
|
} else {
|
||||||
|
log("开始本地校验")
|
||||||
await runPromisePa(localVerifyTasks, 1000);
|
await runPromisePa(localVerifyTasks, 1000);
|
||||||
log(`本地校验完成,等待${waitDnsDiffuseTime}s`)
|
log(`本地校验完成,等待${waitDnsDiffuseTime}s`)
|
||||||
await wait(waitDnsDiffuseTime * 1000)
|
await wait(waitDnsDiffuseTime * 1000)
|
||||||
|
|||||||
@@ -90,10 +90,12 @@ const defaultOpts = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
class AcmeClient {
|
class AcmeClient {
|
||||||
|
sslProvider
|
||||||
constructor(opts) {
|
constructor(opts) {
|
||||||
if (!Buffer.isBuffer(opts.accountKey)) {
|
if (!Buffer.isBuffer(opts.accountKey)) {
|
||||||
opts.accountKey = Buffer.from(opts.accountKey);
|
opts.accountKey = Buffer.from(opts.accountKey);
|
||||||
}
|
}
|
||||||
|
this.sslProvider = opts.sslProvider;
|
||||||
|
|
||||||
this.opts = { ...defaultOpts, ...opts };
|
this.opts = { ...defaultOpts, ...opts };
|
||||||
this.backoffOpts = {
|
this.backoffOpts = {
|
||||||
|
|||||||
2
packages/core/acme-client/types/index.d.ts
vendored
2
packages/core/acme-client/types/index.d.ts
vendored
@@ -66,6 +66,7 @@ export interface ClientAutoOptions {
|
|||||||
challengePriority?: string[];
|
challengePriority?: string[];
|
||||||
preferredChain?: string;
|
preferredChain?: string;
|
||||||
signal?: AbortSignal;
|
signal?: AbortSignal;
|
||||||
|
profile?:string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Client {
|
export class Client {
|
||||||
@@ -203,6 +204,7 @@ export const agents: any;
|
|||||||
export function setLogger(fn: (message: any, ...args: any[]) => void): void;
|
export function setLogger(fn: (message: any, ...args: any[]) => void): void;
|
||||||
|
|
||||||
export function walkTxtRecord(record: any): Promise<string[]>;
|
export function walkTxtRecord(record: any): Promise<string[]>;
|
||||||
|
export function getAuthoritativeDnsResolver(record:string): Promise<any>;
|
||||||
|
|
||||||
export const CancelError: typeof CancelError;
|
export const CancelError: typeof CancelError;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,41 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持部署到飞牛OS ([ddfd0fb](https://github.com/certd/certd/commit/ddfd0fb81d6638352920261065f1ab8e27bdd564))
|
||||||
|
* 支持日志写入文件 ([37edbf5](https://github.com/certd/certd/commit/37edbf5824d6aaae68ea1ef7259c6f739d418d2c))
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/basic
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
23:42
|
23:54
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/basic",
|
"name": "@certd/basic",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.6",
|
"version": "1.35.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -45,5 +45,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,16 +18,31 @@ const OutputAppender = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let logFilePath = "./logs/app.log";
|
||||||
export function resetLogConfigure() {
|
export function resetLogConfigure() {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
log4js.configure({
|
log4js.configure({
|
||||||
appenders: { std: { type: "stdout" }, output: { type: OutputAppender } },
|
appenders: {
|
||||||
categories: { default: { appenders: ["std"], level: "info" }, pipeline: { appenders: ["std", "output"], level: "info" } },
|
std: { type: "stdout" },
|
||||||
|
output: { type: OutputAppender },
|
||||||
|
file: {
|
||||||
|
type: "dateFile",
|
||||||
|
filename: logFilePath,
|
||||||
|
keepFileExt: true,
|
||||||
|
compress: true,
|
||||||
|
numBackups: 3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
categories: { default: { appenders: ["std", "file"], level: "info" }, pipeline: { appenders: ["std", "file", "output"], level: "info" } },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
resetLogConfigure();
|
resetLogConfigure();
|
||||||
export const logger = log4js.getLogger("default");
|
export const logger = log4js.getLogger("default");
|
||||||
|
|
||||||
|
export function resetLogFilePath(filePath: string) {
|
||||||
|
logFilePath = filePath;
|
||||||
|
resetLogConfigure();
|
||||||
|
}
|
||||||
export function buildLogger(write: (text: string) => void) {
|
export function buildLogger(write: (text: string) => void) {
|
||||||
const logger = log4js.getLogger("pipeline");
|
const logger = log4js.getLogger("pipeline");
|
||||||
const _secrets: string[] = [];
|
const _secrets: string[] = [];
|
||||||
@@ -41,8 +56,15 @@ export function buildLogger(write: (text: string) => void) {
|
|||||||
if (item == null) {
|
if (item == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//换成同长度的*号, item可能有多行
|
if (item.includes(text)) {
|
||||||
text = text.replaceAll(item, "*".repeat(item.length));
|
//整个包含
|
||||||
|
text = "*".repeat(text.length);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (text.includes(item)) {
|
||||||
|
//换成同长度的*号, item可能有多行
|
||||||
|
text = text.replaceAll(item, "*".repeat(item.length));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
write(text);
|
write(text);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -97,11 +97,17 @@ export function createAxiosService({ logger }: { logger: Logger }) {
|
|||||||
if (config.logRes == null) {
|
if (config.logRes == null) {
|
||||||
config.logRes = false;
|
config.logRes = false;
|
||||||
}
|
}
|
||||||
|
if (config.logData == null) {
|
||||||
|
config.logData = false;
|
||||||
|
}
|
||||||
|
|
||||||
logger.info(`http request:${config.url},method:${config.method}`);
|
logger.info(`http request:${config.url},method:${config.method}`);
|
||||||
if (config.logParams !== false && config.params) {
|
if (config.logParams !== false && config.params) {
|
||||||
logger.info(`params:${JSON.stringify(config.params)}`);
|
logger.info(`params:${JSON.stringify(config.params)}`);
|
||||||
}
|
}
|
||||||
|
if (config.logData !== false && config.data) {
|
||||||
|
logger.info(`data:${JSON.stringify(config.data)}`);
|
||||||
|
}
|
||||||
if (config.timeout == null) {
|
if (config.timeout == null) {
|
||||||
config.timeout = 15000;
|
config.timeout = 15000;
|
||||||
}
|
}
|
||||||
@@ -226,6 +232,7 @@ export type HttpRequestConfig<D = any> = {
|
|||||||
skipCheckRes?: boolean;
|
skipCheckRes?: boolean;
|
||||||
logParams?: boolean;
|
logParams?: boolean;
|
||||||
logRes?: boolean;
|
logRes?: boolean;
|
||||||
|
logData?: boolean;
|
||||||
httpProxy?: string;
|
httpProxy?: string;
|
||||||
returnOriginRes?: boolean;
|
returnOriginRes?: boolean;
|
||||||
} & AxiosRequestConfig<D>;
|
} & AxiosRequestConfig<D>;
|
||||||
|
|||||||
@@ -3,6 +3,44 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持部署到飞牛OS ([ddfd0fb](https://github.com/certd/certd/commit/ddfd0fb81d6638352920261065f1ab8e27bdd564))
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化站点选择组件,切换选择时不刷新列表 ([3a14714](https://github.com/certd/certd/commit/3a147141b1a5d67c92a5ce88a5313eaa62859e03))
|
||||||
|
* 站点监控支持监控IP ([9cc4c01](https://github.com/certd/certd/commit/9cc4c017ae646a18284e732769b82636feda01d3))
|
||||||
|
* 支持批量重新运行 ([8189982](https://github.com/certd/certd/commit/818998259ddc75e722196ac5c365038818539b9b))
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/pipeline",
|
"name": "@certd/pipeline",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.6",
|
"version": "1.35.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.34.6",
|
"@certd/basic": "^1.35.2",
|
||||||
"@certd/plus-core": "^1.34.6",
|
"@certd/plus-core": "^1.35.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"
|
||||||
@@ -44,5 +44,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,3 +2,18 @@ import { IContext } from "../core/index.js";
|
|||||||
|
|
||||||
export type UserContext = IContext;
|
export type UserContext = IContext;
|
||||||
export type PipelineContext = IContext;
|
export type PipelineContext = IContext;
|
||||||
|
|
||||||
|
export type PageReq = {
|
||||||
|
offset?: number;
|
||||||
|
limit?: number;
|
||||||
|
searchKey?: string;
|
||||||
|
// sortBy?: string;
|
||||||
|
// sortOrder?: "asc" | "desc";
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PageRes = {
|
||||||
|
offset?: number;
|
||||||
|
limit?: number;
|
||||||
|
total?: string;
|
||||||
|
list: any[];
|
||||||
|
};
|
||||||
|
|||||||
@@ -489,7 +489,15 @@ export class Executor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param stepId 如果==ALL 清除所有
|
||||||
|
*/
|
||||||
clearLastStatus(stepId: string) {
|
clearLastStatus(stepId: string) {
|
||||||
|
if (stepId === "ALL") {
|
||||||
|
this.lastStatusMap.clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.lastStatusMap.clearById(stepId);
|
this.lastStatusMap.clearById(stepId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ export class RunnableCollection {
|
|||||||
if (runnable?.status) {
|
if (runnable?.status) {
|
||||||
runnable.status.status = ResultType.none;
|
runnable.status.status = ResultType.none;
|
||||||
runnable.status.result = ResultType.none;
|
runnable.status.result = ResultType.none;
|
||||||
|
runnable.status.output = {};
|
||||||
runnable.status.inputHash = "";
|
runnable.status.inputHash = "";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
runnable.input = {};
|
runnable.input = {};
|
||||||
|
|||||||
@@ -152,6 +152,16 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|||||||
this.logger = ctx.logger;
|
this.logger = ctx.logger;
|
||||||
this.accessService = ctx.accessService;
|
this.accessService = ctx.accessService;
|
||||||
this.http = ctx.http;
|
this.http = ctx.http;
|
||||||
|
// 将证书加入secret
|
||||||
|
// @ts-ignore
|
||||||
|
if (this.cert && this.cert.crt && this.cert.key) {
|
||||||
|
//有证书
|
||||||
|
// @ts-ignore
|
||||||
|
const cert: any = this.cert;
|
||||||
|
this.registerSecret(cert.crt);
|
||||||
|
this.registerSecret(cert.key);
|
||||||
|
this.registerSecret(cert.one);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAccess<T = any>(accessId: string | number, isCommon = false) {
|
async getAccess<T = any>(accessId: string | number, isCommon = false) {
|
||||||
@@ -186,6 +196,14 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|||||||
return res as T;
|
return res as T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
registerSecret(value: string) {
|
||||||
|
// @ts-ignore
|
||||||
|
if (this.logger?.addSecret) {
|
||||||
|
// @ts-ignore
|
||||||
|
this.logger.addSecret(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
randomFileId() {
|
randomFileId() {
|
||||||
return Math.random().toString(36).substring(2, 9);
|
return Math.random().toString(36).substring(2, 9);
|
||||||
}
|
}
|
||||||
@@ -228,13 +246,10 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildCertName(domain: string) {
|
buildCertName(domain: string) {
|
||||||
if (domain.includes("*")) {
|
domain = domain.replaceAll("*", "_").replaceAll(".", "_");
|
||||||
domain = domain.replaceAll("*", "_");
|
|
||||||
}
|
|
||||||
return `${domain}_${dayjs().format("YYYYMMDDHHmmssSSS")}`;
|
return `${domain}_${dayjs().format("YYYYMMDDHHmmssSSS")}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async onRequest(req: PluginRequestHandleReq<any>) {
|
async onRequest(req: PluginRequestHandleReq<any>) {
|
||||||
if (!req.action) {
|
if (!req.action) {
|
||||||
throw new Error("action is required");
|
throw new Error("action is required");
|
||||||
|
|||||||
@@ -3,6 +3,38 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
**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.34.6",
|
"version": "1.35.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": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,38 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
**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.34.6",
|
"version": "1.35.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": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,38 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
**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.34.6",
|
"version": "1.35.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",
|
||||||
@@ -61,5 +61,5 @@
|
|||||||
"fetch"
|
"fetch"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gitHead": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,38 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
**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.34.6",
|
"version": "1.35.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.34.6",
|
"@certd/basic": "^1.35.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": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,42 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持设置用户有效期 ([6ac3bc5](https://github.com/certd/certd/commit/6ac3bc564f407dad2cd0b0b0744e887387aa5da3))
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-server",
|
"name": "@certd/lib-server",
|
||||||
"version": "1.34.6",
|
"version": "1.35.2",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -27,10 +27,10 @@
|
|||||||
],
|
],
|
||||||
"license": "AGPL",
|
"license": "AGPL",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.34.6",
|
"@certd/acme-client": "^1.35.2",
|
||||||
"@certd/basic": "^1.34.6",
|
"@certd/basic": "^1.35.2",
|
||||||
"@certd/pipeline": "^1.34.6",
|
"@certd/pipeline": "^1.35.2",
|
||||||
"@certd/plus-core": "^1.34.6",
|
"@certd/plus-core": "^1.35.2",
|
||||||
"@midwayjs/cache": "~3.14.0",
|
"@midwayjs/cache": "~3.14.0",
|
||||||
"@midwayjs/core": "~3.20.3",
|
"@midwayjs/core": "~3.20.3",
|
||||||
"@midwayjs/i18n": "~3.20.3",
|
"@midwayjs/i18n": "~3.20.3",
|
||||||
@@ -61,5 +61,5 @@
|
|||||||
"typeorm": "^0.3.11",
|
"typeorm": "^0.3.11",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export class SysPublicSettings extends BaseSettings {
|
|||||||
static __access__ = 'public';
|
static __access__ = 'public';
|
||||||
|
|
||||||
registerEnabled = false;
|
registerEnabled = false;
|
||||||
|
userValidTimeEnabled?:boolean = false;
|
||||||
passwordLoginEnabled = true;
|
passwordLoginEnabled = true;
|
||||||
usernameRegisterEnabled = true;
|
usernameRegisterEnabled = true;
|
||||||
mobileRegisterEnabled = false;
|
mobileRegisterEnabled = false;
|
||||||
|
|||||||
@@ -3,11 +3,12 @@ import { InjectEntityModel } from '@midwayjs/typeorm';
|
|||||||
import { Repository } from 'typeorm';
|
import { Repository } from 'typeorm';
|
||||||
import { SysSettingsEntity } from '../entity/sys-settings.js';
|
import { SysSettingsEntity } from '../entity/sys-settings.js';
|
||||||
import { BaseSettings, SysInstallInfo, SysPrivateSettings, SysPublicSettings, SysSecret, SysSecretBackup } from './models.js';
|
import { BaseSettings, SysInstallInfo, SysPrivateSettings, SysPublicSettings, SysSecret, SysSecretBackup } from './models.js';
|
||||||
import * as _ from 'lodash-es';
|
|
||||||
import { BaseService } from '../../../basic/index.js';
|
import { BaseService } from '../../../basic/index.js';
|
||||||
import { cache, logger, setGlobalProxy } from '@certd/basic';
|
import { cache, logger, setGlobalProxy } from '@certd/basic';
|
||||||
import * as dns from 'node:dns';
|
import * as dns from 'node:dns';
|
||||||
|
import {mergeUtils} from "@certd/basic";
|
||||||
|
const {merge} = mergeUtils;
|
||||||
/**
|
/**
|
||||||
* 设置
|
* 设置
|
||||||
*/
|
*/
|
||||||
@@ -75,7 +76,7 @@ export class SysSettingsService extends BaseService<SysSettingsEntity> {
|
|||||||
}
|
}
|
||||||
let newSetting: T = new type();
|
let newSetting: T = new type();
|
||||||
const savedSettings = await this.getSettingByKey(key);
|
const savedSettings = await this.getSettingByKey(key);
|
||||||
newSetting = _.merge(newSetting, savedSettings);
|
newSetting = merge(newSetting, savedSettings);
|
||||||
await this.saveSetting(newSetting);
|
await this.saveSetting(newSetting);
|
||||||
cache.set(cacheKey, newSetting);
|
cache.set(cacheKey, newSetting);
|
||||||
return newSetting;
|
return newSetting;
|
||||||
|
|||||||
@@ -3,6 +3,38 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
**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.34.6",
|
"version": "1.35.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": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,52 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 某些证书提供商的证书确实commonName导致无法转换证书的问题 ([ac87bc5](https://github.com/certd/certd/commit/ac87bc57e957ea4679707bfd38d6840e26319bed))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 证书申请支持letencrypt profile选项 ([2eb0e54](https://github.com/certd/certd/commit/2eb0e54909d8ad36708e07c12fd598998159bc43))
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **lego:** support for command options ([b84159f](https://github.com/certd/certd/commit/b84159f2f11531f058837c2e82d66499f3740f20))
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/certd/certd/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复证书申请任务无法修改dns提供商类型的bug ([8802274](https://github.com/certd/certd/commit/88022747bebe2054223e0241d68d410771405e68))
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-cert",
|
"name": "@certd/plugin-cert",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.6",
|
"version": "1.35.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -16,16 +16,16 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.34.6",
|
"@certd/acme-client": "^1.35.2",
|
||||||
"@certd/basic": "^1.34.6",
|
"@certd/basic": "^1.35.2",
|
||||||
"@certd/pipeline": "^1.34.6",
|
"@certd/pipeline": "^1.35.2",
|
||||||
"@certd/plugin-lib": "^1.34.6",
|
"@certd/plugin-lib": "^1.35.2",
|
||||||
"@google-cloud/publicca": "^1.3.0",
|
"@google-cloud/publicca": "^1.3.0",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"psl": "^1.9.0",
|
"psl": "^1.9.0",
|
||||||
"punycode": "^2.3.1",
|
"punycode.js": "^2.3.1",
|
||||||
"rimraf": "^5.0.5"
|
"rimraf": "^5.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -43,5 +43,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,9 +29,25 @@ export type DnsProviderContext = {
|
|||||||
|
|
||||||
export interface IDnsProvider<T = any> {
|
export interface IDnsProvider<T = any> {
|
||||||
onInstance(): Promise<void>;
|
onInstance(): Promise<void>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中文转英文
|
||||||
|
* @param domain
|
||||||
|
*/
|
||||||
|
punyCodeEncode(domain: string): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转中文域名
|
||||||
|
* @param domain
|
||||||
|
*/
|
||||||
|
punyCodeDecode(domain: string): string;
|
||||||
|
|
||||||
createRecord(options: CreateRecordOptions): Promise<T>;
|
createRecord(options: CreateRecordOptions): Promise<T>;
|
||||||
|
|
||||||
removeRecord(options: RemoveRecordOptions<T>): Promise<void>;
|
removeRecord(options: RemoveRecordOptions<T>): Promise<void>;
|
||||||
|
|
||||||
setCtx(ctx: DnsProviderContext): void;
|
setCtx(ctx: DnsProviderContext): void;
|
||||||
|
|
||||||
//中文域名是否需要punycode转码,如果返回True,则使用punycode来添加解析记录,否则使用中文域名添加解析记录
|
//中文域名是否需要punycode转码,如果返回True,则使用punycode来添加解析记录,否则使用中文域名添加解析记录
|
||||||
usePunyCode(): boolean;
|
usePunyCode(): boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { CreateRecordOptions, DnsProviderContext, DnsProviderDefine, IDnsProvider, RemoveRecordOptions } from "./api.js";
|
import { CreateRecordOptions, DnsProviderContext, DnsProviderDefine, IDnsProvider, RemoveRecordOptions } from "./api.js";
|
||||||
import { dnsProviderRegistry } from "./registry.js";
|
import { dnsProviderRegistry } from "./registry.js";
|
||||||
import { HttpClient, ILogger } from "@certd/basic";
|
import { HttpClient, ILogger } from "@certd/basic";
|
||||||
|
import punycode from "punycode.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;
|
||||||
@@ -13,6 +13,22 @@ export abstract class AbstractDnsProvider<T = any> implements IDnsProvider<T> {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中文转英文
|
||||||
|
* @param domain
|
||||||
|
*/
|
||||||
|
punyCodeEncode(domain: string) {
|
||||||
|
return punycode.toASCII(domain);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转中文域名
|
||||||
|
* @param domain
|
||||||
|
*/
|
||||||
|
punyCodeDecode(domain: string) {
|
||||||
|
return punycode.toUnicode(domain);
|
||||||
|
}
|
||||||
|
|
||||||
setCtx(ctx: DnsProviderContext) {
|
setCtx(ctx: DnsProviderContext) {
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
this.logger = ctx.logger;
|
this.logger = ctx.logger;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Challenge } from "@certd/acme-client/types/rfc8555";
|
|||||||
import { IContext } from "@certd/pipeline";
|
import { IContext } from "@certd/pipeline";
|
||||||
import { ILogger, utils } from "@certd/basic";
|
import { ILogger, utils } from "@certd/basic";
|
||||||
import { IDnsProvider, IDomainParser } from "../../dns-provider/index.js";
|
import { IDnsProvider, IDomainParser } from "../../dns-provider/index.js";
|
||||||
import punycode from "node:punycode";
|
import punycode from "punycode.js";
|
||||||
import { IOssClient } from "@certd/plugin-lib";
|
import { IOssClient } from "@certd/plugin-lib";
|
||||||
export type CnameVerifyPlan = {
|
export type CnameVerifyPlan = {
|
||||||
type?: string;
|
type?: string;
|
||||||
@@ -233,16 +233,18 @@ export class AcmeService {
|
|||||||
let dnsProvider = providers.dnsProvider;
|
let dnsProvider = providers.dnsProvider;
|
||||||
let fullRecord = `_acme-challenge.${fullDomain}`;
|
let fullRecord = `_acme-challenge.${fullDomain}`;
|
||||||
|
|
||||||
|
const origDomain = punycode.toUnicode(domain);
|
||||||
|
const origFullDomain = punycode.toUnicode(fullDomain);
|
||||||
if (providers.domainsVerifyPlan) {
|
if (providers.domainsVerifyPlan) {
|
||||||
//按照计划执行
|
//按照计划执行
|
||||||
const domainVerifyPlan = providers.domainsVerifyPlan[domain];
|
const domainVerifyPlan = providers.domainsVerifyPlan[origDomain];
|
||||||
if (domainVerifyPlan) {
|
if (domainVerifyPlan) {
|
||||||
if (domainVerifyPlan.type === "dns") {
|
if (domainVerifyPlan.type === "dns") {
|
||||||
dnsProvider = domainVerifyPlan.dnsProvider;
|
dnsProvider = domainVerifyPlan.dnsProvider;
|
||||||
} else if (domainVerifyPlan.type === "cname") {
|
} else if (domainVerifyPlan.type === "cname") {
|
||||||
const cnameVerifyPlan = domainVerifyPlan.cnameVerifyPlan;
|
const cnameVerifyPlan = domainVerifyPlan.cnameVerifyPlan;
|
||||||
if (cnameVerifyPlan) {
|
if (cnameVerifyPlan) {
|
||||||
const cname = cnameVerifyPlan[fullDomain];
|
const cname = cnameVerifyPlan[origFullDomain];
|
||||||
if (cname) {
|
if (cname) {
|
||||||
dnsProvider = cname.dnsProvider;
|
dnsProvider = cname.dnsProvider;
|
||||||
domain = await this.options.domainParser.parse(cname.domain);
|
domain = await this.options.domainParser.parse(cname.domain);
|
||||||
@@ -325,8 +327,9 @@ export class AcmeService {
|
|||||||
csrInfo: any;
|
csrInfo: any;
|
||||||
isTest?: boolean;
|
isTest?: boolean;
|
||||||
privateKeyType?: string;
|
privateKeyType?: string;
|
||||||
|
profile?: string;
|
||||||
}): Promise<CertInfo> {
|
}): Promise<CertInfo> {
|
||||||
const { email, isTest, csrInfo, dnsProvider, domainsVerifyPlan } = options;
|
const { email, isTest, csrInfo, dnsProvider, domainsVerifyPlan, profile } = options;
|
||||||
const client: acme.Client = await this.getAcmeClient(email, isTest);
|
const client: acme.Client = await this.getAcmeClient(email, isTest);
|
||||||
|
|
||||||
let domains = options.domains;
|
let domains = options.domains;
|
||||||
@@ -398,6 +401,7 @@ export class AcmeService {
|
|||||||
return await this.challengeRemoveFn(authz, challenge, keyAuthorization, recordReq, recordRes, dnsProvider, httpUploader);
|
return await this.challengeRemoveFn(authz, challenge, keyAuthorization, recordReq, recordRes, dnsProvider, httpUploader);
|
||||||
},
|
},
|
||||||
signal: this.options.signal,
|
signal: this.options.signal,
|
||||||
|
profile,
|
||||||
});
|
});
|
||||||
|
|
||||||
const crtString = crt.toString();
|
const crtString = crt.toString();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export abstract class CertApplyBasePlugin extends CertApplyBaseConvertPlugin {
|
|||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: "邮箱",
|
title: "邮箱",
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: "email-selector",
|
||||||
vModel: "value",
|
vModel: "value",
|
||||||
},
|
},
|
||||||
rules: [{ type: "email", message: "请输入正确的邮箱" }],
|
rules: [{ type: "email", message: "请输入正确的邮箱" }],
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import path from "path";
|
|||||||
import { CertificateInfo, crypto } from "@certd/acme-client";
|
import { CertificateInfo, crypto } from "@certd/acme-client";
|
||||||
import { ILogger } from "@certd/basic";
|
import { ILogger } from "@certd/basic";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import { uniq } from "lodash-es";
|
||||||
|
|
||||||
export type CertReaderHandleContext = {
|
export type CertReaderHandleContext = {
|
||||||
reader: CertReader;
|
reader: CertReader;
|
||||||
@@ -88,19 +89,39 @@ export class CertReader {
|
|||||||
|
|
||||||
getAllDomains() {
|
getAllDomains() {
|
||||||
const { detail } = this.getCrtDetail();
|
const { detail } = this.getCrtDetail();
|
||||||
const domains = [detail.domains.commonName];
|
const domains = [];
|
||||||
|
if (detail.domains?.commonName) {
|
||||||
|
domains.push(detail.domains.commonName);
|
||||||
|
}
|
||||||
domains.push(...detail.domains.altNames);
|
domains.push(...detail.domains.altNames);
|
||||||
return domains;
|
//去重
|
||||||
|
return uniq(domains);
|
||||||
|
}
|
||||||
|
|
||||||
|
getAltNames() {
|
||||||
|
const { detail } = this.getCrtDetail();
|
||||||
|
return detail.domains.altNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
static getMainDomain(crt: string) {
|
static getMainDomain(crt: string) {
|
||||||
const { detail } = CertReader.readCertDetail(crt);
|
const { detail } = CertReader.readCertDetail(crt);
|
||||||
return detail.domains.commonName;
|
return CertReader.getMainDomainFromDetail(detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
getMainDomain() {
|
getMainDomain() {
|
||||||
const { detail } = this.getCrtDetail();
|
const { detail } = this.getCrtDetail();
|
||||||
return detail.domains.commonName;
|
return CertReader.getMainDomainFromDetail(detail);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getMainDomainFromDetail(detail: CertificateInfo) {
|
||||||
|
let domain = detail?.domains?.commonName;
|
||||||
|
if (domain == null) {
|
||||||
|
domain = detail?.domains?.altNames?.[0];
|
||||||
|
}
|
||||||
|
if (domain == null) {
|
||||||
|
domain = "unknown";
|
||||||
|
}
|
||||||
|
return domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
saveToFile(type: "crt" | "key" | "pfx" | "der" | "oc" | "one" | "ic" | "jks", filepath?: string) {
|
saveToFile(type: "crt" | "key" | "pfx" | "der" | "oc" | "one" | "ic" | "jks", filepath?: string) {
|
||||||
@@ -172,10 +193,15 @@ export class CertReader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildCertFileName(suffix: string, applyTime: any, prefix = "cert") {
|
buildCertFileName(suffix: string, applyTime: any, prefix = "cert") {
|
||||||
const detail = this.getCrtDetail();
|
let domain = this.getMainDomain();
|
||||||
let domain = detail.detail.domains.commonName;
|
domain = domain.replaceAll(".", "_").replaceAll("*", "_");
|
||||||
domain = domain.replace(".", "_").replace("*", "_");
|
|
||||||
const timeStr = dayjs(applyTime).format("YYYYMMDDHHmmss");
|
const timeStr = dayjs(applyTime).format("YYYYMMDDHHmmss");
|
||||||
return `${prefix}_${domain}_${timeStr}.${suffix}`;
|
return `${prefix}_${domain}_${timeStr}.${suffix}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildCertName() {
|
||||||
|
let domain = this.getMainDomain();
|
||||||
|
domain = domain.replaceAll(".", "_").replaceAll("*", "_");
|
||||||
|
return `${domain}_${dayjs().format("YYYYMMDDHHmmssSSS")}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,11 +102,11 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
return form.challengeType === 'dns'
|
return form.challengeType === 'dns'
|
||||||
}),
|
}),
|
||||||
component:{
|
component:{
|
||||||
on:{
|
onSelectedChange: ctx.compute(({form})=>{
|
||||||
selectedChange({form,$event}){
|
return ($event)=>{
|
||||||
form.dnsProviderAccessType = $event.accessType
|
form.dnsProviderAccessType = $event.accessType
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
@@ -248,6 +248,30 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
})
|
})
|
||||||
privateKeyType!: PrivateKeyType;
|
privateKeyType!: PrivateKeyType;
|
||||||
|
|
||||||
|
@TaskInput({
|
||||||
|
title: "证书配置",
|
||||||
|
value: "classic",
|
||||||
|
component: {
|
||||||
|
name: "a-select",
|
||||||
|
vModel: "value",
|
||||||
|
options: [
|
||||||
|
{ value: "classic", label: "经典(classic)" },
|
||||||
|
{ value: "tlsserver", label: "TLS服务器(tlsserver)" },
|
||||||
|
{ value: "shortlived", label: "短暂的(shortlived)" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
helper: "如无特殊需求,默认即可",
|
||||||
|
required: false,
|
||||||
|
mergeScript: `
|
||||||
|
return {
|
||||||
|
show: ctx.compute(({form})=>{
|
||||||
|
return form.sslProvider === 'letsencrypt'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
})
|
||||||
|
certProfile!: string;
|
||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: "使用代理",
|
title: "使用代理",
|
||||||
value: false,
|
value: false,
|
||||||
@@ -395,6 +419,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
csrInfo,
|
csrInfo,
|
||||||
isTest: false,
|
isTest: false,
|
||||||
privateKeyType: this.privateKeyType,
|
privateKeyType: this.privateKeyType,
|
||||||
|
profile: this.certProfile,
|
||||||
});
|
});
|
||||||
|
|
||||||
const certInfo = this.formatCerts(cert);
|
const certInfo = this.formatCerts(cert);
|
||||||
|
|||||||
@@ -80,17 +80,29 @@ export class CertApplyLegoPlugin extends CertApplyBasePlugin {
|
|||||||
legoEabAccessId!: number;
|
legoEabAccessId!: number;
|
||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: "自定义LEGO参数",
|
title: "自定义LEGO全局参数",
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: "a-input",
|
||||||
vModel: "value",
|
vModel: "value",
|
||||||
placeholder: "--dns-timeout 30",
|
placeholder: "--dns-timeout 30",
|
||||||
},
|
},
|
||||||
helper: "额外的lego命令行参数,参考文档:https://go-acme.github.io/lego/usage/cli/options/",
|
helper: "额外的lego全局命令行参数,参考文档:https://go-acme.github.io/lego/usage/cli/options/",
|
||||||
maybeNeed: true,
|
maybeNeed: true,
|
||||||
})
|
})
|
||||||
customArgs = "";
|
customArgs = "";
|
||||||
|
|
||||||
|
@TaskInput({
|
||||||
|
title: "自定义LEGO签名参数",
|
||||||
|
component: {
|
||||||
|
name: "a-input",
|
||||||
|
vModel: "value",
|
||||||
|
placeholder: "--no-bundle",
|
||||||
|
},
|
||||||
|
helper: "额外的lego签名命令行参数,参考文档:https://go-acme.github.io/lego/usage/cli/options/",
|
||||||
|
maybeNeed: true,
|
||||||
|
})
|
||||||
|
customCommandOptions = "";
|
||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: "加密算法",
|
title: "加密算法",
|
||||||
value: "ec256",
|
value: "ec256",
|
||||||
@@ -205,7 +217,7 @@ export class CertApplyLegoPlugin extends CertApplyBasePlugin {
|
|||||||
if (this.acmeServer) {
|
if (this.acmeServer) {
|
||||||
serverArgs = ` --server ${this.acmeServer}`;
|
serverArgs = ` --server ${this.acmeServer}`;
|
||||||
}
|
}
|
||||||
const cmds = [`${legoPath} -a --email "${this.email}" --dns ${this.dnsType} ${keyType} ${domainArgs} ${serverArgs} ${eabArgs} ${savePathArgs} ${this.customArgs || ""} run`];
|
const cmds = [`${legoPath} -a --email "${this.email}" --dns ${this.dnsType} ${keyType} ${domainArgs} ${serverArgs} ${eabArgs} ${savePathArgs} ${this.customArgs || ""} run ${this.customCommandOptions || ""}`];
|
||||||
|
|
||||||
await this.ctx.utils.sp.spawn({
|
await this.ctx.utils.sp.spawn({
|
||||||
cmd: cmds,
|
cmd: cmds,
|
||||||
|
|||||||
@@ -3,6 +3,55 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复阿里云新加坡clb无法部署证书的bug ([3e84e11](https://github.com/certd/certd/commit/3e84e116e863b54c6b4d7db160af372dacc5857f))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化阿里云nlb支持部署扩展证书 ([9cbdfda](https://github.com/certd/certd/commit/9cbdfda829b231733d54c66c5024d46e6fc11af3))
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* aliyun alb支持部署扩展证书 ([2a19b61](https://github.com/certd/certd/commit/2a19b61b7a78620c06396c2cc37cc77d738b6d12))
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持部署到飞牛OS ([ddfd0fb](https://github.com/certd/certd/commit/ddfd0fb81d6638352920261065f1ab8e27bdd564))
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复阿里云 esa 证书获取站点列表错误的问题 ([0c2ea5d](https://github.com/certd/certd/commit/0c2ea5da4c836f8a0df132a3f22d399bd9ee1de9))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 关闭腾讯云证书通知提醒 ([231a875](https://github.com/certd/certd/commit/231a875bb481420c39bf76ec9ff4e50954ab9fe4))
|
||||||
|
* 优化站点选择组件,切换选择时不刷新列表 ([3a14714](https://github.com/certd/certd/commit/3a147141b1a5d67c92a5ce88a5313eaa62859e03))
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-lib",
|
"name": "@certd/plugin-lib",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.6",
|
"version": "1.35.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -17,11 +17,12 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alicloud/openapi-client": "^0.4.14",
|
"@alicloud/openapi-client": "^0.4.14",
|
||||||
|
"@alicloud/openapi-util": "^0.3.2",
|
||||||
"@alicloud/pop-core": "^1.7.10",
|
"@alicloud/pop-core": "^1.7.10",
|
||||||
"@alicloud/tea-util": "^1.4.10",
|
"@alicloud/tea-util": "^1.4.10",
|
||||||
"@aws-sdk/client-s3": "^3.787.0",
|
"@aws-sdk/client-s3": "^3.787.0",
|
||||||
"@certd/basic": "^1.34.6",
|
"@certd/basic": "^1.35.2",
|
||||||
"@certd/pipeline": "^1.34.6",
|
"@certd/pipeline": "^1.35.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",
|
||||||
@@ -52,5 +53,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "d23792fda2a185e8ba038434460792f738878a42"
|
"gitHead": "a619f8a2fee68169ae3c57cf6e8de18141de17ba"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ export type AliyunClientV2Req = {
|
|||||||
pathname?: `/`;
|
pathname?: `/`;
|
||||||
|
|
||||||
data?: any;
|
data?: any;
|
||||||
query?: any;
|
|
||||||
};
|
};
|
||||||
export class AliyunClientV2 {
|
export class AliyunClientV2 {
|
||||||
access: AliyunAccess;
|
access: AliyunAccess;
|
||||||
@@ -32,6 +31,12 @@ export class AliyunClientV2 {
|
|||||||
return this.client;
|
return this.client;
|
||||||
}
|
}
|
||||||
const $OpenApi = await import("@alicloud/openapi-client");
|
const $OpenApi = await import("@alicloud/openapi-client");
|
||||||
|
// const Credential = await import("@alicloud/credentials");
|
||||||
|
// //@ts-ignore
|
||||||
|
// const credential = new Credential.default.default({
|
||||||
|
//
|
||||||
|
// type: "access_key",
|
||||||
|
// });
|
||||||
const config = new $OpenApi.Config({
|
const config = new $OpenApi.Config({
|
||||||
accessKeyId: this.access.accessKeyId,
|
accessKeyId: this.access.accessKeyId,
|
||||||
accessKeySecret: this.access.accessKeySecret,
|
accessKeySecret: this.access.accessKeySecret,
|
||||||
@@ -49,7 +54,7 @@ export class AliyunClientV2 {
|
|||||||
|
|
||||||
const $OpenApi = await import("@alicloud/openapi-client");
|
const $OpenApi = await import("@alicloud/openapi-client");
|
||||||
const $Util = await import("@alicloud/tea-util");
|
const $Util = await import("@alicloud/tea-util");
|
||||||
|
const OpenApiUtil = await import("@alicloud/openapi-util");
|
||||||
const params = new $OpenApi.Params({
|
const params = new $OpenApi.Params({
|
||||||
// 接口名称
|
// 接口名称
|
||||||
action: req.action,
|
action: req.action,
|
||||||
@@ -69,11 +74,12 @@ export class AliyunClientV2 {
|
|||||||
bodyType: "json",
|
bodyType: "json",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (req.data?.query) {
|
||||||
|
//@ts-ignore
|
||||||
|
req.data.query = OpenApiUtil.default.default.query(req.data.query);
|
||||||
|
}
|
||||||
const runtime = new $Util.RuntimeOptions({});
|
const runtime = new $Util.RuntimeOptions({});
|
||||||
const request = new $OpenApi.OpenApiRequest({
|
const request = new $OpenApi.OpenApiRequest(req.data);
|
||||||
body: req.data,
|
|
||||||
query: req.query,
|
|
||||||
});
|
|
||||||
// 复制代码运行请自行打印 API 的返回值
|
// 复制代码运行请自行打印 API 的返回值
|
||||||
// 返回值实际为 Map 类型,可从 Map 中获得三类数据:响应体 body、响应头 headers、HTTP 返回的状态码 statusCode。
|
// 返回值实际为 Map 类型,可从 Map 中获得三类数据:响应体 body、响应头 headers、HTTP 返回的状态码 statusCode。
|
||||||
const res = await client.callApi(params, request, runtime);
|
const res = await client.callApi(params, request, runtime);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export type AliyunSslUploadCertReq = {
|
|||||||
cert: AliyunCertInfo;
|
cert: AliyunCertInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type CasCertInfo = { certId: number; certName: string; certIdentifier: string };
|
export type CasCertInfo = { certId: number; certName: string; certIdentifier: string; notAfter: number; casRegion: string };
|
||||||
|
|
||||||
export class AliyunSslClient {
|
export class AliyunSslClient {
|
||||||
opts: AliyunSslClientOpts;
|
opts: AliyunSslClientOpts;
|
||||||
@@ -68,6 +68,8 @@ export class AliyunSslClient {
|
|||||||
certId: certId,
|
certId: certId,
|
||||||
certName: res.Name,
|
certName: res.Name,
|
||||||
certIdentifier: res.CertIdentifier,
|
certIdentifier: res.CertIdentifier,
|
||||||
|
notAfter: res.NotAfter,
|
||||||
|
casRegion: this.getCasRegionFromEndpoint(this.opts.endpoint),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +85,7 @@ export class AliyunSslClient {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
};
|
};
|
||||||
|
|
||||||
this.opts.logger.info("开始上传证书");
|
this.opts.logger.info(`开始上传证书:${req.name}`);
|
||||||
const ret: any = await client.request("UploadUserCertificate", params, requestOption);
|
const ret: any = await client.request("UploadUserCertificate", params, requestOption);
|
||||||
this.checkRet(ret);
|
this.checkRet(ret);
|
||||||
this.opts.logger.info("证书上传成功:aliyunCertId=", ret.CertId);
|
this.opts.logger.info("证书上传成功:aliyunCertId=", ret.CertId);
|
||||||
@@ -148,4 +150,24 @@ export class AliyunSslClient {
|
|||||||
this.checkRet(res);
|
this.checkRet(res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async deleteCert(certId: any) {
|
||||||
|
await this.doRequest("DeleteUserCertificate", { CertId: certId }, { method: "POST" });
|
||||||
|
}
|
||||||
|
|
||||||
|
getCasRegionFromEndpoint(endpoint: string) {
|
||||||
|
if (!endpoint) {
|
||||||
|
return "cn-hangzhou";
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* {value: 'cas.aliyuncs.com', label: '中国大陆'},
|
||||||
|
* {value: 'cas.ap-southeast-1.aliyuncs.com', label: '新加坡'},
|
||||||
|
* {value: 'cas.eu-central-1.aliyuncs.com', label: '德国(法兰克福)'},
|
||||||
|
*/
|
||||||
|
const region = endpoint.replace(".aliyuncs.com", "").replace("cas.", "");
|
||||||
|
if (region === "cas") {
|
||||||
|
return "cn-hangzhou";
|
||||||
|
}
|
||||||
|
return region;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ export function createRemoteSelectInputDefine(opts?: {
|
|||||||
rules?: any;
|
rules?: any;
|
||||||
mergeScript?: string;
|
mergeScript?: string;
|
||||||
search?: boolean;
|
search?: boolean;
|
||||||
|
pager?: boolean;
|
||||||
|
component?: any;
|
||||||
}) {
|
}) {
|
||||||
const title = opts?.title || "请选择";
|
const title = opts?.title || "请选择";
|
||||||
const certDomainsInputKey = opts?.certDomainsInputKey || "certDomains";
|
const certDomainsInputKey = opts?.certDomainsInputKey || "certDomains";
|
||||||
@@ -49,6 +51,7 @@ export function createRemoteSelectInputDefine(opts?: {
|
|||||||
const watches = opts?.watches || [];
|
const watches = opts?.watches || [];
|
||||||
const helper = opts?.helper || "请选择";
|
const helper = opts?.helper || "请选择";
|
||||||
const search = opts?.search ?? false;
|
const search = opts?.search ?? false;
|
||||||
|
const pager = opts?.pager ?? false;
|
||||||
let mode = "tags";
|
let mode = "tags";
|
||||||
if (opts.multi === false) {
|
if (opts.multi === false) {
|
||||||
mode = undefined;
|
mode = undefined;
|
||||||
@@ -66,7 +69,9 @@ export function createRemoteSelectInputDefine(opts?: {
|
|||||||
typeName,
|
typeName,
|
||||||
action,
|
action,
|
||||||
search,
|
search,
|
||||||
|
pager,
|
||||||
watches: [certDomainsInputKey, accessIdInputKey, ...watches],
|
watches: [certDomainsInputKey, accessIdInputKey, ...watches],
|
||||||
|
...opts.component,
|
||||||
},
|
},
|
||||||
rules: opts?.rules,
|
rules: opts?.rules,
|
||||||
required: opts.required ?? true,
|
required: opts.required ?? true,
|
||||||
|
|||||||
@@ -165,10 +165,16 @@ export class AsyncSsh2Client {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param script
|
||||||
|
* @param opts {withStdErr 返回{stdOut,stdErr}}
|
||||||
|
*/
|
||||||
async exec(
|
async exec(
|
||||||
script: string,
|
script: string,
|
||||||
opts: {
|
opts: {
|
||||||
throwOnStdErr?: boolean;
|
throwOnStdErr?: boolean;
|
||||||
|
withStdErr?: boolean;
|
||||||
env?: any;
|
env?: any;
|
||||||
} = {}
|
} = {}
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
@@ -193,6 +199,7 @@ export class AsyncSsh2Client {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let data = "";
|
let data = "";
|
||||||
|
let stdErr = "";
|
||||||
let hasErrorLog = false;
|
let hasErrorLog = false;
|
||||||
stream
|
stream
|
||||||
.on("close", (code: any, signal: any) => {
|
.on("close", (code: any, signal: any) => {
|
||||||
@@ -205,7 +212,15 @@ export class AsyncSsh2Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
resolve(data);
|
if (opts.withStdErr === true) {
|
||||||
|
//@ts-ignore
|
||||||
|
resolve({
|
||||||
|
stdErr,
|
||||||
|
stdOut: data,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
resolve(data);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
reject(new Error(data));
|
reject(new Error(data));
|
||||||
}
|
}
|
||||||
@@ -221,7 +236,7 @@ export class AsyncSsh2Client {
|
|||||||
})
|
})
|
||||||
.stderr.on("data", (ret: Buffer) => {
|
.stderr.on("data", (ret: Buffer) => {
|
||||||
const err = this.convert(iconv, ret);
|
const err = this.convert(iconv, ret);
|
||||||
data += err;
|
stdErr += err;
|
||||||
hasErrorLog = true;
|
hasErrorLog = true;
|
||||||
this.logger.error(`[${this.connConf.host}][error]: ` + err.trimEnd());
|
this.logger.error(`[${this.connConf.host}][error]: ` + err.trimEnd());
|
||||||
});
|
});
|
||||||
@@ -323,9 +338,6 @@ export class AsyncSsh2Client {
|
|||||||
|
|
||||||
export class SshClient {
|
export class SshClient {
|
||||||
logger: ILogger;
|
logger: ILogger;
|
||||||
constructor(logger: ILogger) {
|
|
||||||
this.logger = logger;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param connectConf
|
* @param connectConf
|
||||||
@@ -382,6 +394,9 @@ export class SshClient {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
constructor(logger: ILogger) {
|
||||||
|
this.logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
async scpUpload(options: { conn: any; localPath: string; remotePath: string; opts?: { mode?: string } }) {
|
async scpUpload(options: { conn: any; localPath: string; remotePath: string; opts?: { mode?: string } }) {
|
||||||
const { conn, localPath, remotePath } = options;
|
const { conn, localPath, remotePath } = options;
|
||||||
|
|||||||
@@ -49,10 +49,23 @@ export class TencentSslClient {
|
|||||||
};
|
};
|
||||||
const ret = await client.UploadCertificate(params);
|
const ret = await client.UploadCertificate(params);
|
||||||
this.checkRet(ret);
|
this.checkRet(ret);
|
||||||
this.logger.info("证书上传成功:tencentCertId=", ret.CertificateId);
|
this.logger.info(`证书[${opts.certName}]上传成功:tencentCertId=`, ret.CertificateId);
|
||||||
|
await this.switchCertNotify([ret.CertificateId], true);
|
||||||
return ret.CertificateId;
|
return ret.CertificateId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async switchCertNotify(certIds: string[], disabled: boolean) {
|
||||||
|
const client = await this.getSslClient();
|
||||||
|
const params = {
|
||||||
|
CertificateIds: certIds,
|
||||||
|
SwitchStatus: disabled ? 1 : 0, //1是忽略通知,0是不忽略
|
||||||
|
};
|
||||||
|
const ret = await client.ModifyCertificatesExpiringNotificationSwitch(params);
|
||||||
|
this.checkRet(ret);
|
||||||
|
this.logger.info(`关闭证书${certIds}过期通知成功`);
|
||||||
|
return ret.RequestId;
|
||||||
|
}
|
||||||
|
|
||||||
async deployCertificateInstance(params: any) {
|
async deployCertificateInstance(params: any) {
|
||||||
const client = await this.getSslClient();
|
const client = await this.getSslClient();
|
||||||
const res = await client.DeployCertificateInstance(params);
|
const res = await client.DeployCertificateInstance(params);
|
||||||
|
|||||||
@@ -3,6 +3,69 @@
|
|||||||
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.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 子域名托管帮助链接优化为打开新窗口 ([7c0cdd1](https://github.com/certd/certd/commit/7c0cdd169e2f943e703e433677f2f437d4aa02ee))
|
||||||
|
* history增加触发类型显示 ([7f6070c](https://github.com/certd/certd/commit/7f6070c960ed7bf02add5ab36436de6573f2f1fa))
|
||||||
|
|
||||||
|
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化流水线页面,增加下次执行时间、查看证书显示 ([c820315](https://github.com/certd/certd/commit/c8203154094fae3d17198747f49f5f41ddf29a4e))
|
||||||
|
* 站点证书监控支持定时设置,重试次数设置 ([d3c2f8e](https://github.com/certd/certd/commit/d3c2f8eb436e670772d14a54acd6b541c5aa3978))
|
||||||
|
|
||||||
|
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/ui-client
|
||||||
|
|
||||||
|
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/certd/certd/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
|
||||||
|
* 修复flexcdn部署证书的顶级CA名称显示 ([6467edb](https://github.com/certd/certd/commit/6467edb84324d7c80a85212675dbacedc459df83))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 分组选择支持清空选项 ([03e2e99](https://github.com/certd/certd/commit/03e2e9949837b34eb3ea56d14a9e8a5dabc96063))
|
||||||
|
* 优化cname检查,当有冲突的cname记录时,给出提示 ([e639a8f](https://github.com/certd/certd/commit/e639a8f9f12640ffcca69f1a6a0324459924afbd))
|
||||||
|
* 增加下载日志按钮 ([6ff509d](https://github.com/certd/certd/commit/6ff509d263c0182645b4692c10b5fedb192db964))
|
||||||
|
* 站点监控支持批量导入域名和ip ([2d7729d](https://github.com/certd/certd/commit/2d7729dbe98f29088f5f317db2b52cc1ede223a6))
|
||||||
|
* 支持设置用户有效期 ([6ac3bc5](https://github.com/certd/certd/commit/6ac3bc564f407dad2cd0b0b0744e887387aa5da3))
|
||||||
|
|
||||||
|
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化流水线名称过长时的显示 ([6a0cc1b](https://github.com/certd/certd/commit/6a0cc1b1f3ad508f9e4093b3b682b163f12389eb))
|
||||||
|
|
||||||
|
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
* 支持github 新版本检查并发布通知 ([356703c](https://github.com/certd/certd/commit/356703c83ea18c6efb8931402e181280d7b7e696))
|
||||||
|
|
||||||
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复证书申请任务无法修改dns提供商类型的bug ([8802274](https://github.com/certd/certd/commit/88022747bebe2054223e0241d68d410771405e68))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化站点选择组件,切换选择时不刷新列表 ([3a14714](https://github.com/certd/certd/commit/3a147141b1a5d67c92a5ce88a5313eaa62859e03))
|
||||||
|
* 优化站点ip检查 ([a463711](https://github.com/certd/certd/commit/a463711b03a20120f2a298be15d71ca152d27f21))
|
||||||
|
* 站点监控支持监控IP ([9cc4c01](https://github.com/certd/certd/commit/9cc4c017ae646a18284e732769b82636feda01d3))
|
||||||
|
* 支持批量重新运行 ([8189982](https://github.com/certd/certd/commit/818998259ddc75e722196ac5c365038818539b9b))
|
||||||
|
|
||||||
|
## [1.34.7](https://github.com/certd/certd/compare/v1.34.6...v1.34.7) (2025-05-26)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/ui-client
|
||||||
|
|
||||||
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-client",
|
"name": "@certd/ui-client",
|
||||||
"version": "1.34.6",
|
"version": "1.35.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --open",
|
"dev": "vite --open",
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"debug": "vite --mode debug --open",
|
"debug": "vite --mode debug --open",
|
||||||
"debug:pm": "vite --mode debugpm",
|
"debug:pm": "vite --mode debugpm",
|
||||||
"debug:force": "vite --force --mode debug",
|
"debug:force": "vite --force --mode debug",
|
||||||
"build": "cross-env NODE_OPTIONS=--max-old-space-size=32768 vite build ",
|
"build": "cross-env NODE_OPTIONS=--max-old-space-size=40960 vite build ",
|
||||||
"dev-build": "echo 1",
|
"dev-build": "echo 1",
|
||||||
"test:unit": "vitest",
|
"test:unit": "vitest",
|
||||||
"serve": "vite preview",
|
"serve": "vite preview",
|
||||||
@@ -102,8 +102,8 @@
|
|||||||
"zod-defaults": "^0.1.3"
|
"zod-defaults": "^0.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@certd/lib-iframe": "^1.34.6",
|
"@certd/lib-iframe": "^1.35.2",
|
||||||
"@certd/pipeline": "^1.34.6",
|
"@certd/pipeline": "^1.35.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",
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ function createRequestFunction(service: any) {
|
|||||||
headers: {
|
headers: {
|
||||||
"Content-Type": get(config, "headers.Content-Type", "application/json"),
|
"Content-Type": get(config, "headers.Content-Type", "application/json"),
|
||||||
},
|
},
|
||||||
timeout: 20000,
|
timeout: 30000,
|
||||||
baseURL: env.API,
|
baseURL: env.API,
|
||||||
data: {},
|
data: {},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,17 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="cron-editor">
|
<div class="cron-editor">
|
||||||
<div class="flex-o">
|
<div class="flex-o">
|
||||||
<cron-light
|
<cron-light :disabled="disabled" :readonly="readonly" :period="period" class="flex-o cron-ant" locale="zh-CN" format="quartz" :model-value="modelValue" @update:model-value="onUpdate" @error="onError" />
|
||||||
:disabled="disabled"
|
|
||||||
:readonly="readonly"
|
|
||||||
:period="period"
|
|
||||||
class="flex-o cron-ant"
|
|
||||||
locale="zh-CN"
|
|
||||||
format="quartz"
|
|
||||||
:model-value="modelValue"
|
|
||||||
@update:model-value="onUpdate"
|
|
||||||
@error="onError"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-5 flex">
|
<div class="mt-5 flex">
|
||||||
<a-input :disabled="true" :readonly="readonly" :value="modelValue" @change="onChange"></a-input>
|
<a-input :disabled="true" :readonly="readonly" :value="modelValue" @change="onChange"></a-input>
|
||||||
@@ -26,13 +16,15 @@
|
|||||||
import parser from "cron-parser";
|
import parser from "cron-parser";
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import { getCronNextTimes } from "/@/components/cron-editor/utils";
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "CronEditor"
|
name: "CronEditor",
|
||||||
});
|
});
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue?: string;
|
modelValue?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
|
allowEveryMin?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const period = ref<string>("");
|
const period = ref<string>("");
|
||||||
@@ -58,9 +50,12 @@ const onUpdate = (value: string) => {
|
|||||||
if (arr[0] === "*") {
|
if (arr[0] === "*") {
|
||||||
arr[0] = "0";
|
arr[0] = "0";
|
||||||
}
|
}
|
||||||
if (arr[1] === "*") {
|
if (!props.allowEveryMin) {
|
||||||
arr[1] = "0";
|
if (arr[1] === "*") {
|
||||||
|
arr[1] = "0";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
value = arr.join(" ");
|
value = arr.join(" ");
|
||||||
|
|
||||||
emit("update:modelValue", value);
|
emit("update:modelValue", value);
|
||||||
@@ -90,10 +85,10 @@ const nextTime = computed(() => {
|
|||||||
if (props.modelValue == null) {
|
if (props.modelValue == null) {
|
||||||
return "请先设置正确的cron表达式";
|
return "请先设置正确的cron表达式";
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const interval = parser.parseExpression(props.modelValue);
|
const nextTimes = getCronNextTimes(props.modelValue, 2);
|
||||||
const next = interval.next().getTime();
|
return nextTimes.join(",");
|
||||||
return dayjs(next).format("YYYY-MM-DD HH:mm:ss");
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
return "请先设置正确的cron表达式";
|
return "请先设置正确的cron表达式";
|
||||||
|
|||||||
15
packages/ui/certd-client/src/components/cron-editor/utils.ts
Normal file
15
packages/ui/certd-client/src/components/cron-editor/utils.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import parser from "cron-parser";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
export function getCronNextTimes(cron: string, count: number = 1) {
|
||||||
|
if (cron == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
const nextTimes = [];
|
||||||
|
const interval = parser.parseExpression(cron);
|
||||||
|
for (let i = 0; i < count; i++) {
|
||||||
|
const next = interval.next().getTime();
|
||||||
|
nextTimes.push(dayjs(next).format("YYYY-MM-DD HH:mm:ss"));
|
||||||
|
}
|
||||||
|
return nextTimes;
|
||||||
|
}
|
||||||
@@ -76,7 +76,7 @@ export default {
|
|||||||
.text-editable {
|
.text-editable {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
line-height: 34px;
|
line-height: 34px;
|
||||||
|
overflow: hidden;
|
||||||
span.fs-iconify {
|
span.fs-iconify {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import { request } from "/src/api/service";
|
||||||
|
|
||||||
|
export async function EmailList() {
|
||||||
|
return await request({
|
||||||
|
url: "/mine/email/list",
|
||||||
|
method: "post",
|
||||||
|
data: {},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function EmailDelete(email: string) {
|
||||||
|
return await request({
|
||||||
|
url: "/mine/email/delete",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
email: email,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function EmailAdd(email: string) {
|
||||||
|
return await request({
|
||||||
|
url: "/mine/email/add",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
email: email,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
<template>
|
||||||
|
<a-select :options="emails">
|
||||||
|
<template #option="{ value: val }">
|
||||||
|
<div class="flex flex-row w-full">
|
||||||
|
<span class="flex-1">{{ val }}</span>
|
||||||
|
<fs-icon class="ml-5" icon="ion:close" @click="deleteItem(val)"></fs-icon>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #dropdownRender="{ menuNode: menu }">
|
||||||
|
<v-nodes :vnodes="menu" />
|
||||||
|
<a-divider style="margin: 4px 0" />
|
||||||
|
<div class="w-full flex flex-row p-5">
|
||||||
|
<a-input ref="inputRef" v-model:value="newEmail" class="flex-1" placeholder="添加新邮箱" @keydown.enter="addItem" />
|
||||||
|
<a-button class="ml-5" type="primary" @click="addItem">
|
||||||
|
<template #icon>
|
||||||
|
<plus-outlined />
|
||||||
|
</template>
|
||||||
|
添加邮箱
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</a-select>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { defineComponent, onMounted, ref } from "vue";
|
||||||
|
import * as api from "./api";
|
||||||
|
import { Modal, notification } from "ant-design-vue";
|
||||||
|
|
||||||
|
const props = defineProps<{}>();
|
||||||
|
const VNodes = defineComponent({
|
||||||
|
props: {
|
||||||
|
vnodes: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
render() {
|
||||||
|
return this.vnodes;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const newEmail = ref("");
|
||||||
|
const emails = ref([]);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const list = await api.EmailList();
|
||||||
|
emails.value = list.map((item: string) => {
|
||||||
|
return {
|
||||||
|
value: item,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
async function addItem() {
|
||||||
|
const email = newEmail.value;
|
||||||
|
//验证邮箱格式
|
||||||
|
if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(newEmail.value)) {
|
||||||
|
notification.error({
|
||||||
|
message: "请填写正确的邮箱地址",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
debugger;
|
||||||
|
if (emails.value.find(item => item.value === email)) {
|
||||||
|
notification.warning({
|
||||||
|
message: "此邮箱已存在",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await api.EmailAdd(email);
|
||||||
|
emails.value.unshift({
|
||||||
|
value: email,
|
||||||
|
label: email,
|
||||||
|
});
|
||||||
|
newEmail.value = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
async function deleteItem(value: string) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "删除邮箱",
|
||||||
|
content: "确定要删除此邮箱吗?",
|
||||||
|
onOk: async () => {
|
||||||
|
await api.EmailDelete(value);
|
||||||
|
emails.value = emails.value.filter(item => item.value !== value);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -13,17 +13,22 @@ import ExpiresTimeText from "./expires-time-text.vue";
|
|||||||
import FileInput from "./file-input.vue";
|
import FileInput from "./file-input.vue";
|
||||||
import PemInput from "./pem-input.vue";
|
import PemInput from "./pem-input.vue";
|
||||||
import { defineAsyncComponent } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
|
import NotificationSelector from "../views/certd/notification/notification-selector/index.vue";
|
||||||
|
import EmailSelector from "./email-selector/index.vue";
|
||||||
|
import ValidTimeFormat from "./valid-time-format.vue";
|
||||||
export default {
|
export default {
|
||||||
install(app: any) {
|
install(app: any) {
|
||||||
app.component(
|
app.component(
|
||||||
"CodeEditor",
|
"CodeEditor",
|
||||||
defineAsyncComponent(() => import("./code-editor/index.vue"))
|
defineAsyncComponent(() => import("./code-editor/index.vue"))
|
||||||
);
|
);
|
||||||
|
app.component("EmailSelector", EmailSelector);
|
||||||
|
app.component("NotificationSelector", NotificationSelector);
|
||||||
app.component("PiContainer", PiContainer);
|
app.component("PiContainer", PiContainer);
|
||||||
app.component("TextEditable", TextEditable);
|
app.component("TextEditable", TextEditable);
|
||||||
app.component("FileInput", FileInput);
|
app.component("FileInput", FileInput);
|
||||||
app.component("PemInput", PemInput);
|
app.component("PemInput", PemInput);
|
||||||
|
app.component("ValidTimeFormat", ValidTimeFormat);
|
||||||
// app.component("CodeEditor", CodeEditor);
|
// app.component("CodeEditor", CodeEditor);
|
||||||
|
|
||||||
app.component("CronLight", CronLight);
|
app.component("CronLight", CronLight);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export type CnameRecord = {
|
|||||||
status?: string;
|
status?: string;
|
||||||
hostRecord?: string;
|
hostRecord?: string;
|
||||||
recordValue?: string;
|
recordValue?: string;
|
||||||
|
error?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DomainGroupItem = {
|
export type DomainGroupItem = {
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="status center flex-center">
|
<td class="status center flex-center">
|
||||||
<fs-values-format v-model="cnameRecord.status" :dict="statusDict" />
|
<fs-values-format v-model="cnameRecord.status" :dict="statusDict" />
|
||||||
|
<a-tooltip v-if="cnameRecord.error" :title="cnameRecord.error">
|
||||||
|
<fs-icon class="ml-5 color-red" icon="ion:warning-outline"></fs-icon>
|
||||||
|
</a-tooltip>
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<template v-if="cnameRecord.status !== 'valid'">
|
<template v-if="cnameRecord.status !== 'valid'">
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import CnameRecordInfo from "/@/components/plugins/cert/domains-verify-plan-edit
|
|||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "CnameVerifyPlan"
|
name: "CnameVerifyPlan",
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["update:modelValue", "change"]);
|
const emit = defineEmits(["update:modelValue", "change"]);
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-if="item.type === 'http'" class="plan-http">
|
<div v-if="item.type === 'http'" class="plan-http">
|
||||||
<http-verify-plan v-model="item.httpVerifyPlan" @change="onPlanChanged" />
|
<http-verify-plan v-model="item.httpVerifyPlan" @change="onPlanChanged" />
|
||||||
|
<div class="helper">证书颁发机构将请求 https://yourdomain/.well-known/acme-challenge/xxxxxx 来验证域名所有权。</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -19,6 +19,10 @@
|
|||||||
<a-divider style="margin: 4px 0" />
|
<a-divider style="margin: 4px 0" />
|
||||||
</template>
|
</template>
|
||||||
<v-nodes :vnodes="menu" />
|
<v-nodes :vnodes="menu" />
|
||||||
|
|
||||||
|
<div v-if="pager === true" class="pager text-center p-5">
|
||||||
|
<a-pagination v-model:current="pagerRef.current" simple :total="pagerRef.total" :page-size="pagerRef.limit" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</a-select>
|
</a-select>
|
||||||
<div class="ml-5">
|
<div class="ml-5">
|
||||||
@@ -32,7 +36,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ComponentPropsType, doRequest } from "/@/components/plugins/lib";
|
import { ComponentPropsType, doRequest } from "/@/components/plugins/lib";
|
||||||
import { defineComponent, inject, ref, useAttrs, watch } from "vue";
|
import { defineComponent, inject, ref, useAttrs, watch, Ref } from "vue";
|
||||||
import { PluginDefine } from "@certd/pipeline";
|
import { PluginDefine } from "@certd/pipeline";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -54,7 +58,8 @@ const VNodes = defineComponent({
|
|||||||
const props = defineProps<
|
const props = defineProps<
|
||||||
{
|
{
|
||||||
watches: string[];
|
watches: string[];
|
||||||
search: boolean;
|
search?: boolean;
|
||||||
|
pager?: boolean;
|
||||||
} & ComponentPropsType
|
} & ComponentPropsType
|
||||||
>();
|
>();
|
||||||
|
|
||||||
@@ -73,6 +78,9 @@ const optionsRef = ref([]);
|
|||||||
const message = ref("");
|
const message = ref("");
|
||||||
const hasError = ref(false);
|
const hasError = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
const pagerRef: Ref = ref({
|
||||||
|
current: 1,
|
||||||
|
});
|
||||||
const getOptions = async () => {
|
const getOptions = async () => {
|
||||||
if (loading.value) {
|
if (loading.value) {
|
||||||
return;
|
return;
|
||||||
@@ -107,6 +115,7 @@ const getOptions = async () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
optionsRef.value = [];
|
optionsRef.value = [];
|
||||||
|
|
||||||
|
const offset = (pagerRef.value.current - 1) * (pagerRef.value.limit ?? 100);
|
||||||
try {
|
try {
|
||||||
const res = await doRequest(
|
const res = await doRequest(
|
||||||
{
|
{
|
||||||
@@ -116,6 +125,8 @@ const getOptions = async () => {
|
|||||||
input,
|
input,
|
||||||
data: {
|
data: {
|
||||||
searchKey: props.search ? searchKeyRef.value : "",
|
searchKey: props.search ? searchKeyRef.value : "",
|
||||||
|
offset: offset,
|
||||||
|
limit: pagerRef.value.limit,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -126,10 +137,26 @@ const getOptions = async () => {
|
|||||||
showErrorNotify: false,
|
showErrorNotify: false,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (res && res.length > 0) {
|
const list = res?.list || res || [];
|
||||||
|
if (list.length > 0) {
|
||||||
message.value = "获取数据成功,请从下拉框中选择";
|
message.value = "获取数据成功,请从下拉框中选择";
|
||||||
}
|
}
|
||||||
optionsRef.value = res;
|
optionsRef.value = list;
|
||||||
|
pagerRef.value.total = list.length;
|
||||||
|
if (props.pager) {
|
||||||
|
if (res.offset != null) {
|
||||||
|
pagerRef.value.offset = res.offset ?? 0;
|
||||||
|
}
|
||||||
|
if (res.limit != null) {
|
||||||
|
pagerRef.value.limit = res.limit ?? 100;
|
||||||
|
}
|
||||||
|
if (res.total != null) {
|
||||||
|
pagerRef.value.total = res.total ?? list.length;
|
||||||
|
}
|
||||||
|
const { offset, limit } = pagerRef.value;
|
||||||
|
pagerRef.value.current = offset % limit === 0 ? offset / limit + 1 : offset / limit;
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -151,27 +178,37 @@ async function refreshOptions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function doSearch() {
|
async function doSearch() {
|
||||||
|
pagerRef.value.current = 1;
|
||||||
await refreshOptions();
|
await refreshOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => {
|
() => {
|
||||||
const values = [];
|
|
||||||
|
|
||||||
const pluginType = getPluginType();
|
const pluginType = getPluginType();
|
||||||
const { form } = getScope();
|
const { form, key } = getScope();
|
||||||
const input = pluginType === "plugin" ? form.input : form;
|
const input = pluginType === "plugin" ? form.input : form;
|
||||||
|
const watches = {};
|
||||||
for (const item of props.watches) {
|
for (const key of props.watches) {
|
||||||
values.push(input[item]);
|
watches[key] = input[key];
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
form: input,
|
form: watches,
|
||||||
watched: values,
|
key,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async () => {
|
async (value, oldValue) => {
|
||||||
await getOptions();
|
const { form } = value;
|
||||||
|
const oldForm = oldValue.form;
|
||||||
|
let changed = oldForm == null || optionsRef.value.length == 0;
|
||||||
|
for (const key of props.watches) {
|
||||||
|
if (form[key] != oldForm[key]) {
|
||||||
|
changed = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (changed) {
|
||||||
|
await getOptions();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<div class="valid-time-format">
|
||||||
|
<a-tag v-if="isExpired" color="red">{{ prefix || "" }}已过期</a-tag>
|
||||||
|
<a-tag v-if="isValid" color="green" :title="date">
|
||||||
|
<fs-time-humanize v-if="humanize" :model-value="modelValue" :options="{ largest: 1, units: ['y', 'd', 'h'] }" :use-format-greater="30000000000" />
|
||||||
|
<template v-else> {{ prefix || "" }}{{ date }} </template>
|
||||||
|
</a-tag>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from "vue";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
modelValue: number;
|
||||||
|
humanize?: boolean;
|
||||||
|
prefix?: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const date = computed(() => {
|
||||||
|
return dayjs(props.modelValue || 0).format("YYYY-MM-DD");
|
||||||
|
});
|
||||||
|
|
||||||
|
const isValid = computed(() => {
|
||||||
|
return props.modelValue > 0 && props.modelValue > new Date().getTime();
|
||||||
|
});
|
||||||
|
|
||||||
|
const isExpired = computed(() => {
|
||||||
|
return props.modelValue > 0 && props.modelValue < new Date().getTime();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -4,7 +4,7 @@ export async function doActive(form: any) {
|
|||||||
return await request({
|
return await request({
|
||||||
url: "/sys/plus/active",
|
url: "/sys/plus/active",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: form
|
data: form,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12,6 +12,6 @@ export async function getVipTrial() {
|
|||||||
return await request({
|
return await request({
|
||||||
url: "/sys/plus/getVipTrial",
|
url: "/sys/plus/getVipTrial",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: {}
|
data: {},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,13 +233,13 @@ function openUpgrade() {
|
|||||||
desc: "社区免费版",
|
desc: "社区免费版",
|
||||||
type: "free",
|
type: "free",
|
||||||
icon: "lucide:package-open",
|
icon: "lucide:package-open",
|
||||||
privilege: ["证书申请无限制", "域名数量无限制", "证书流水线数量无限制", "常用的主机、云平台、cdn等部署插件", "邮件、webhook通知方式"],
|
privilege: ["证书申请无限制", "域名数量无限制", "证书流水线数量无限制", "常用的主机、云平台、cdn、宝塔、1Panel等部署插件", "邮件、webhook通知方式"],
|
||||||
},
|
},
|
||||||
plus: {
|
plus: {
|
||||||
title: "专业版",
|
title: "专业版",
|
||||||
desc: "开源需要您的赞助支持",
|
desc: "开源需要您的赞助支持",
|
||||||
type: "plus",
|
type: "plus",
|
||||||
privilege: ["可加VIP群,您的需求将优先实现", "站点证书监控无限制", "更多通知方式", "插件全开放,更多强大的部署插件,宝塔、群晖、1Panel等"],
|
privilege: ["可加VIP群,您的需求将优先实现", "站点证书监控无限制", "更多通知方式", "插件全开放,群辉等更多插件"],
|
||||||
trial: {
|
trial: {
|
||||||
title: "点击获取7天试用",
|
title: "点击获取7天试用",
|
||||||
click: () => {
|
click: () => {
|
||||||
|
|||||||
@@ -111,14 +111,19 @@ function install(app: App, options: any = {}) {
|
|||||||
columnSizeSaver.clear();
|
columnSizeSaver.clear();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
buttons: {
|
||||||
|
export: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
rowHandle: {
|
rowHandle: {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
buttons: {
|
buttons: {
|
||||||
view: { type: "link", text: null, icon: "ion:eye-outline" },
|
view: { type: "link", text: null, icon: "ion:eye-outline", tooltip: { title: "查看" } },
|
||||||
copy: { show: true, type: "link", text: null, icon: "ion:copy-outline" },
|
copy: { show: true, type: "link", text: null, icon: "ion:copy-outline", tooltip: { title: "复制" } },
|
||||||
edit: { type: "link", text: null, icon: "ion:create-outline" },
|
edit: { type: "link", text: null, icon: "ion:create-outline", tooltip: { title: "编辑" } },
|
||||||
remove: { type: "link", style: { color: "red" }, text: null, icon: "ion:trash-outline" },
|
remove: { type: "link", style: { color: "red" }, text: null, icon: "ion:trash-outline", tooltip: { title: "删除" } },
|
||||||
},
|
},
|
||||||
dropdown: {
|
dropdown: {
|
||||||
more: {
|
more: {
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export const certdResources = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "OpenKey",
|
title: "开放接口密钥",
|
||||||
name: "OpenKey",
|
name: "OpenKey",
|
||||||
path: "/certd/open/openkey",
|
path: "/certd/open/openkey",
|
||||||
component: "/certd/open/openkey/index.vue",
|
component: "/certd/open/openkey/index.vue",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export type PlusInfo = {
|
|||||||
};
|
};
|
||||||
export type SysPublicSetting = {
|
export type SysPublicSetting = {
|
||||||
registerEnabled?: boolean;
|
registerEnabled?: boolean;
|
||||||
|
userValidTimeEnabled?: boolean;
|
||||||
usernameRegisterEnabled?: boolean;
|
usernameRegisterEnabled?: boolean;
|
||||||
mobileRegisterEnabled?: boolean;
|
mobileRegisterEnabled?: boolean;
|
||||||
emailRegisterEnabled?: boolean;
|
emailRegisterEnabled?: boolean;
|
||||||
@@ -116,6 +117,6 @@ export async function getProductInfo(): Promise<any> {
|
|||||||
return await request({
|
return await request({
|
||||||
url: "/basic/settings/productInfo",
|
url: "/basic/settings/productInfo",
|
||||||
method: "get",
|
method: "get",
|
||||||
silent: true,
|
showErrorNotify: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ export interface UserInfoRes {
|
|||||||
avatar?: string;
|
avatar?: string;
|
||||||
roleIds: number[];
|
roleIds: number[];
|
||||||
isWeak?: boolean;
|
isWeak?: boolean;
|
||||||
|
validTime?: number;
|
||||||
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LoginRes {
|
export interface LoginRes {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import * as api from "./api";
|
|||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { Ref, ref } from "vue";
|
import { Ref, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
@@ -31,7 +31,15 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
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({
|
||||||
|
data: [
|
||||||
|
{ label: "待设置CNAME", value: "cname", color: "warning" },
|
||||||
|
{ label: "验证中", value: "validating", color: "blue" },
|
||||||
|
{ label: "验证成功", value: "valid", color: "green" },
|
||||||
|
{ label: "验证失败", value: "failed", color: "red" },
|
||||||
|
{ label: "验证超时", value: "timeout", color: "red" },
|
||||||
|
],
|
||||||
|
});
|
||||||
return {
|
return {
|
||||||
crudOptions: {
|
crudOptions: {
|
||||||
settings: {
|
settings: {
|
||||||
@@ -174,21 +182,25 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
status: {
|
status: {
|
||||||
title: "状态",
|
title: "状态",
|
||||||
type: "dict-select",
|
type: "dict-select",
|
||||||
dict: dict({
|
dict: dictRef,
|
||||||
data: [
|
|
||||||
{ label: "待设置CNAME", value: "cname", color: "warning" },
|
|
||||||
{ label: "验证中", value: "validating", color: "blue" },
|
|
||||||
{ label: "验证成功", value: "valid", color: "green" },
|
|
||||||
{ label: "验证失败", value: "failed", color: "red" },
|
|
||||||
{ label: "验证超时", value: "timeout", color: "red" },
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
addForm: {
|
addForm: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
cellRender({ value, row }) {
|
||||||
|
return (
|
||||||
|
<div class={"flex flex-center"}>
|
||||||
|
<fs-values-format modelValue={value} dict={dictRef}></fs-values-format>
|
||||||
|
{row.error && (
|
||||||
|
<a-tooltip title={row.error}>
|
||||||
|
<fs-icon class={"ml-5 color-red"} icon="ion:warning-outline"></fs-icon>
|
||||||
|
</a-tooltip>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
triggerValidate: {
|
triggerValidate: {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export async function GetList(query: any) {
|
|||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/page",
|
url: apiPrefix + "/page",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: query
|
data: query,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ export async function AddObj(obj: any) {
|
|||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/add",
|
url: apiPrefix + "/add",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: obj
|
data: obj,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ export async function UpdateObj(obj: any) {
|
|||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/update",
|
url: apiPrefix + "/update",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: obj
|
data: obj,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ export async function DelObj(id: any) {
|
|||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/delete",
|
url: apiPrefix + "/delete",
|
||||||
method: "post",
|
method: "post",
|
||||||
params: { id }
|
params: { id },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ export async function GetObj(id: any) {
|
|||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/info",
|
url: apiPrefix + "/info",
|
||||||
method: "post",
|
method: "post",
|
||||||
params: { id }
|
params: { id },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ export async function GetDetail(id: any) {
|
|||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/detail",
|
url: apiPrefix + "/detail",
|
||||||
method: "post",
|
method: "post",
|
||||||
params: { id }
|
params: { id },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,6 +54,6 @@ export async function DeleteBatch(ids: any[]) {
|
|||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/deleteByIds",
|
url: apiPrefix + "/deleteByIds",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: { ids }
|
data: { ids },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,10 @@ import * as api from "./api";
|
|||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { computed, Ref, ref } from "vue";
|
import { computed, Ref, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, EditReq, UserPageQuery, UserPageRes, utils } from "@fast-crud/fast-crud";
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, utils } from "@fast-crud/fast-crud";
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
|
import { statusUtil } from "/@/views/certd/pipeline/pipeline/utils/util.status";
|
||||||
|
|
||||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -44,46 +45,46 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
props: {
|
props: {
|
||||||
multiple: true,
|
multiple: true,
|
||||||
crossPage: true,
|
crossPage: true,
|
||||||
selectedRowKeys
|
selectedRowKeys,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
pageRequest,
|
pageRequest,
|
||||||
addRequest,
|
addRequest,
|
||||||
editRequest,
|
editRequest,
|
||||||
delRequest
|
delRequest,
|
||||||
},
|
},
|
||||||
actionbar: {
|
actionbar: {
|
||||||
buttons: {
|
buttons: {
|
||||||
add: {
|
add: {
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
formItem: {
|
formItem: {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
style: {
|
style: {
|
||||||
// width: "100px"
|
// width: "100px"
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
wrapperCol: {
|
wrapperCol: {
|
||||||
style: {
|
style: {
|
||||||
width: "50%"
|
width: "50%",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
rowHandle: {
|
rowHandle: {
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
buttons: {
|
buttons: {
|
||||||
edit: {
|
edit: {
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
columns: {
|
columns: {
|
||||||
id: {
|
id: {
|
||||||
@@ -91,11 +92,11 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
key: "id",
|
key: "id",
|
||||||
type: "number",
|
type: "number",
|
||||||
column: {
|
column: {
|
||||||
width: 100
|
width: 100,
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
userId: {
|
userId: {
|
||||||
title: "用户Id",
|
title: "用户Id",
|
||||||
@@ -103,69 +104,113 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
search: {
|
search: {
|
||||||
show: computed(() => {
|
show: computed(() => {
|
||||||
return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline;
|
return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline;
|
||||||
})
|
}),
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
show: computed(() => {
|
show: computed(() => {
|
||||||
return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline;
|
return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline;
|
||||||
}),
|
}),
|
||||||
width: 100
|
width: 100,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
pipelineId: {
|
pipelineId: {
|
||||||
title: "流水线Id",
|
title: "流水线Id",
|
||||||
type: "number",
|
type: "number",
|
||||||
search: {
|
search: {
|
||||||
show: true
|
show: true,
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 100
|
width: 100,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
pipelineTitle: {
|
pipelineTitle: {
|
||||||
title: "流水线名称",
|
title: "流水线名称",
|
||||||
type: "text",
|
type: "text",
|
||||||
search: {
|
search: {
|
||||||
show: true
|
show: true,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 300,
|
width: 300,
|
||||||
|
tooltip: true,
|
||||||
|
ellipsis: true,
|
||||||
cellRender: ({ row, value }) => {
|
cellRender: ({ row, value }) => {
|
||||||
return (
|
return <router-link to={{ path: "/certd/pipeline/detail", query: { id: row.pipelineId, editMode: false, historyId: row.id } }}>{value}</router-link>;
|
||||||
<router-link to={{ path: "/certd/pipeline/detail", query: { id: row.pipelineId, editMode: false, historyId: row.id } }}>{value}</router-link>
|
},
|
||||||
);
|
},
|
||||||
}
|
},
|
||||||
}
|
triggerType: {
|
||||||
|
title: "触发类型",
|
||||||
|
type: "dict-select",
|
||||||
|
search: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
dict: dict({
|
||||||
|
data: [
|
||||||
|
{ value: "user", label: "手动执行" },
|
||||||
|
{ value: "timer", label: "定时执行" },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
value: "custom",
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
sorter: true,
|
||||||
|
width: 90,
|
||||||
|
align: "center",
|
||||||
|
show: true,
|
||||||
|
component: {
|
||||||
|
color: "auto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
title: "状态",
|
||||||
|
type: "dict-select",
|
||||||
|
search: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
dict: dict({
|
||||||
|
data: statusUtil.getOptions(),
|
||||||
|
}),
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
sorter: true,
|
||||||
|
width: 120,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
createTime: {
|
createTime: {
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
form: {
|
form: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 160,
|
width: 160,
|
||||||
align: "center"
|
align: "center",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
updateTime: {
|
updateTime: {
|
||||||
title: "更新时间",
|
title: "更新时间",
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
form: {
|
form: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
show: true
|
show: true,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,4 +55,33 @@ export const siteInfoApi = {
|
|||||||
method: "post",
|
method: "post",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async Import(form: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/import",
|
||||||
|
method: "post",
|
||||||
|
data: form,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async DisabledChange(id: number, disabled: boolean) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/disabledChange",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
id,
|
||||||
|
disabled,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async IpCheckChange(id: number, ipCheck: boolean) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/ipCheckChange",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
id,
|
||||||
|
ipCheck,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, ColumnCompositionProps, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
import { siteInfoApi } from "./api";
|
import { siteInfoApi } from "./api";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { notification } from "ant-design-vue";
|
import { Modal, notification } from "ant-design-vue";
|
||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { mySuiteApi } from "/@/views/certd/suite/mine/api";
|
import { mySuiteApi } from "/@/views/certd/suite/mine/api";
|
||||||
import { mitter } from "/@/utils/util.mitt";
|
import { mitter } from "/@/utils/util.mitt";
|
||||||
|
import { useSiteIpMonitor } from "./ip/use";
|
||||||
|
import { useSiteImport } from "/@/views/certd/monitor/site/use";
|
||||||
|
|
||||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@@ -41,6 +43,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
{ label: "异常", value: "error", color: "red" },
|
{ label: "异常", value: "error", color: "red" },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { openSiteIpMonitorDialog } = useSiteIpMonitor();
|
||||||
|
const { openSiteImportDialog } = useSiteImport();
|
||||||
return {
|
return {
|
||||||
crudOptions: {
|
crudOptions: {
|
||||||
request: {
|
request: {
|
||||||
@@ -94,6 +99,19 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
await crudExpose.openAdd({});
|
await crudExpose.openAdd({});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
//导入按钮
|
||||||
|
import: {
|
||||||
|
show: true,
|
||||||
|
text: "批量导入",
|
||||||
|
type: "primary",
|
||||||
|
async click() {
|
||||||
|
openSiteImportDialog({
|
||||||
|
afterSubmit() {
|
||||||
|
crudExpose.doRefresh();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
rowHandle: {
|
rowHandle: {
|
||||||
@@ -116,8 +134,27 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ipCheck: {
|
||||||
|
order: 10,
|
||||||
|
type: "link",
|
||||||
|
text: null,
|
||||||
|
show: compute(({ row }) => {
|
||||||
|
return row.ipCheck === true;
|
||||||
|
}),
|
||||||
|
tooltip: {
|
||||||
|
title: "IP管理",
|
||||||
|
},
|
||||||
|
icon: "entypo:address",
|
||||||
|
click: async ({ row }) => {
|
||||||
|
openSiteIpMonitorDialog({ siteId: row.id });
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
tabs: {
|
||||||
|
name: "disabled",
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
columns: {
|
columns: {
|
||||||
id: {
|
id: {
|
||||||
title: "ID",
|
title: "ID",
|
||||||
@@ -192,6 +229,34 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
certInfo: {
|
||||||
|
title: "证书信息",
|
||||||
|
type: "text",
|
||||||
|
form: { show: false },
|
||||||
|
column: {
|
||||||
|
width: 200,
|
||||||
|
sorter: false,
|
||||||
|
show: true,
|
||||||
|
conditionalRender: false,
|
||||||
|
cellRender({ value, row }) {
|
||||||
|
const slots = {
|
||||||
|
content() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div>证书颁发机构:{row.certProvider}</div>
|
||||||
|
<div>证书域名:{row.certDomains}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<a-popover placement={"left"} v-slots={slots} overlayStyle={{ maxWidth: "30%" }}>
|
||||||
|
{row.certDomains}
|
||||||
|
</a-popover>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
certDomains: {
|
certDomains: {
|
||||||
title: "证书域名",
|
title: "证书域名",
|
||||||
search: {
|
search: {
|
||||||
@@ -204,7 +269,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
column: {
|
column: {
|
||||||
width: 200,
|
width: 200,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
show: true,
|
show: false,
|
||||||
cellRender({ value }) {
|
cellRender({ value }) {
|
||||||
return (
|
return (
|
||||||
<a-tooltip title={value} placement="left">
|
<a-tooltip title={value} placement="left">
|
||||||
@@ -226,6 +291,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
column: {
|
column: {
|
||||||
width: 200,
|
width: 200,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
|
show: false,
|
||||||
cellRender({ value }) {
|
cellRender({ value }) {
|
||||||
return <a-tooltip title={value}>{value}</a-tooltip>;
|
return <a-tooltip title={value}>{value}</a-tooltip>;
|
||||||
},
|
},
|
||||||
@@ -305,6 +371,72 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
form: {
|
form: {
|
||||||
value: false,
|
value: false,
|
||||||
},
|
},
|
||||||
|
column: {
|
||||||
|
width: 100,
|
||||||
|
sorter: true,
|
||||||
|
align: "center",
|
||||||
|
component: {
|
||||||
|
name: "fs-dict-switch",
|
||||||
|
vModel: "checked",
|
||||||
|
on: {
|
||||||
|
async change({ row, $event }) {
|
||||||
|
await api.DisabledChange(row.id, $event);
|
||||||
|
await crudExpose.doRefresh();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ipCheck: {
|
||||||
|
title: "开启IP检查",
|
||||||
|
type: "dict-switch",
|
||||||
|
dict: dict({
|
||||||
|
data: [
|
||||||
|
{ label: "启用", value: true, color: "green" },
|
||||||
|
{ label: "禁用", value: false, color: "gray" },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
form: {
|
||||||
|
value: false,
|
||||||
|
rules: [{ required: true, message: "请选择" }],
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
align: "center",
|
||||||
|
width: 100,
|
||||||
|
conditionalRender: false,
|
||||||
|
component: {
|
||||||
|
name: "fs-dict-switch",
|
||||||
|
vModel: "checked",
|
||||||
|
on: {
|
||||||
|
change({ row, $event }) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "提示",
|
||||||
|
content: `确定${$event ? "开启" : "关闭"}IP检查?`,
|
||||||
|
onOk: async () => {
|
||||||
|
await api.IpCheckChange(row.id, $event);
|
||||||
|
await crudExpose.doRefresh();
|
||||||
|
if ($event) {
|
||||||
|
openSiteIpMonitorDialog({ siteId: row.id });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCancel: async () => {
|
||||||
|
await crudExpose.doRefresh();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as ColumnCompositionProps,
|
||||||
|
ipCount: {
|
||||||
|
title: "IP数量",
|
||||||
|
search: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 100,
|
width: 100,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
import { request } from "/src/api/service";
|
||||||
|
|
||||||
|
const apiPrefix = "/monitor/site/ip";
|
||||||
|
|
||||||
|
export const siteIpApi = {
|
||||||
|
async GetList(query: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/page",
|
||||||
|
method: "post",
|
||||||
|
data: query,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async AddObj(obj: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/add",
|
||||||
|
method: "post",
|
||||||
|
data: obj,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async UpdateObj(obj: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/update",
|
||||||
|
method: "post",
|
||||||
|
data: obj,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async DelObj(id: number) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/delete",
|
||||||
|
method: "post",
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async GetObj(id: number) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/info",
|
||||||
|
method: "post",
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async DoCheck(id: number) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/check",
|
||||||
|
method: "post",
|
||||||
|
data: { id },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async CheckAll(siteId: number) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/checkAll",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
siteId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async DoSync(siteId: number) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/sync",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
siteId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async Import(form: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/import",
|
||||||
|
method: "post",
|
||||||
|
data: form,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,359 @@
|
|||||||
|
// @ts-ignore
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
|
import { siteIpApi } from "./api";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { Modal, notification } from "ant-design-vue";
|
||||||
|
import { useSiteIpMonitor } from "/@/views/certd/monitor/site/ip/use";
|
||||||
|
|
||||||
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
|
const api = siteIpApi;
|
||||||
|
|
||||||
|
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
||||||
|
if (!query.query) {
|
||||||
|
query.query = {};
|
||||||
|
}
|
||||||
|
query.query.siteId = context.props.siteId;
|
||||||
|
return await api.GetList(query);
|
||||||
|
};
|
||||||
|
const editRequest = async (req: EditReq) => {
|
||||||
|
const { form, row } = req;
|
||||||
|
form.id = row.id;
|
||||||
|
const res = await api.UpdateObj(form);
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
const delRequest = async (req: DelReq) => {
|
||||||
|
const { row } = req;
|
||||||
|
return await api.DelObj(row.id);
|
||||||
|
};
|
||||||
|
|
||||||
|
const addRequest = async (req: AddReq) => {
|
||||||
|
const { form } = req;
|
||||||
|
form.siteId = context.props.siteId;
|
||||||
|
const res = await api.AddObj(form);
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
|
||||||
|
const checkStatusDict = dict({
|
||||||
|
data: [
|
||||||
|
{ label: "成功", value: "ok", color: "green" },
|
||||||
|
{ label: "检查中", value: "checking", color: "blue" },
|
||||||
|
{ label: "异常", value: "error", color: "red" },
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const { openSiteIpImportDialog } = useSiteIpMonitor();
|
||||||
|
return {
|
||||||
|
crudOptions: {
|
||||||
|
request: {
|
||||||
|
pageRequest,
|
||||||
|
addRequest,
|
||||||
|
editRequest,
|
||||||
|
delRequest,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
labelCol: {
|
||||||
|
//固定label宽度
|
||||||
|
span: null,
|
||||||
|
style: {
|
||||||
|
width: "100px",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
col: {
|
||||||
|
span: 22,
|
||||||
|
},
|
||||||
|
wrapper: {
|
||||||
|
width: 600,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actionbar: {
|
||||||
|
buttons: {
|
||||||
|
add: {
|
||||||
|
async click() {
|
||||||
|
await crudExpose.openAdd({});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
import: {
|
||||||
|
show: true,
|
||||||
|
text: "批量导入",
|
||||||
|
type: "primary",
|
||||||
|
async click() {
|
||||||
|
openSiteIpImportDialog({
|
||||||
|
siteId: context.props.siteId,
|
||||||
|
afterSubmit() {
|
||||||
|
crudExpose.doRefresh();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
load: {
|
||||||
|
text: "同步IP",
|
||||||
|
type: "primary",
|
||||||
|
async click() {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "同步IP",
|
||||||
|
content: "确定要同步IP吗?",
|
||||||
|
onOk: async () => {
|
||||||
|
await api.DoSync(context.props.siteId);
|
||||||
|
await crudExpose.doRefresh();
|
||||||
|
notification.success({
|
||||||
|
message: "同步完成",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
checkAll: {
|
||||||
|
text: "检查全部",
|
||||||
|
type: "primary",
|
||||||
|
click: () => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "确认",
|
||||||
|
content: "确认触发检查全部IP站点的证书吗?",
|
||||||
|
onOk: async () => {
|
||||||
|
await siteIpApi.CheckAll(context.props.siteId);
|
||||||
|
notification.success({
|
||||||
|
message: "检查任务已提交",
|
||||||
|
description: "请稍后刷新页面查看结果",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rowHandle: {
|
||||||
|
fixed: "right",
|
||||||
|
width: 240,
|
||||||
|
buttons: {
|
||||||
|
check: {
|
||||||
|
order: 0,
|
||||||
|
type: "link",
|
||||||
|
text: null,
|
||||||
|
tooltip: {
|
||||||
|
title: "立即检查",
|
||||||
|
},
|
||||||
|
icon: "ion:play-sharp",
|
||||||
|
click: async ({ row }) => {
|
||||||
|
await api.DoCheck(row.id);
|
||||||
|
await crudExpose.doRefresh();
|
||||||
|
notification.success({
|
||||||
|
message: "检查任务已提交",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
columns: {
|
||||||
|
id: {
|
||||||
|
title: "ID",
|
||||||
|
key: "id",
|
||||||
|
type: "number",
|
||||||
|
search: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 80,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ipAddress: {
|
||||||
|
title: "IP",
|
||||||
|
search: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
type: "text",
|
||||||
|
helper: "也支持填写CNAME域名",
|
||||||
|
form: {
|
||||||
|
rules: [{ required: true, message: "请输入IP" }],
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 160,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
certDomains: {
|
||||||
|
title: "证书域名",
|
||||||
|
search: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 200,
|
||||||
|
sorter: true,
|
||||||
|
show: false,
|
||||||
|
cellRender({ value }) {
|
||||||
|
return (
|
||||||
|
<a-tooltip title={value} placement="left">
|
||||||
|
{value}
|
||||||
|
</a-tooltip>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
certProvider: {
|
||||||
|
title: "颁发机构",
|
||||||
|
search: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 200,
|
||||||
|
show: false,
|
||||||
|
sorter: true,
|
||||||
|
cellRender({ value }) {
|
||||||
|
return <a-tooltip title={value}>{value}</a-tooltip>;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
certStatus: {
|
||||||
|
title: "证书状态",
|
||||||
|
search: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
type: "dict-select",
|
||||||
|
dict: dict({
|
||||||
|
data: [
|
||||||
|
{ label: "正常", value: "ok", color: "green" },
|
||||||
|
{ label: "过期", value: "expired", color: "red" },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 100,
|
||||||
|
sorter: true,
|
||||||
|
show: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
certExpiresTime: {
|
||||||
|
title: "证书到期时间",
|
||||||
|
search: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: "date",
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
sorter: true,
|
||||||
|
cellRender({ value }) {
|
||||||
|
if (!value) {
|
||||||
|
return "-";
|
||||||
|
}
|
||||||
|
const expireDate = dayjs(value).format("YYYY-MM-DD");
|
||||||
|
const leftDays = dayjs(value).diff(dayjs(), "day");
|
||||||
|
const color = leftDays < 20 ? "red" : "#389e0d";
|
||||||
|
const percent = (leftDays / 90) * 100;
|
||||||
|
return <a-progress title={expireDate + "过期"} percent={percent} strokeColor={color} format={(percent: number) => `${leftDays}天`} />;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
checkStatus: {
|
||||||
|
title: "检查状态",
|
||||||
|
search: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: "dict-select",
|
||||||
|
dict: checkStatusDict,
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 100,
|
||||||
|
align: "center",
|
||||||
|
sorter: true,
|
||||||
|
cellRender({ value, row, key }) {
|
||||||
|
return (
|
||||||
|
<a-tooltip title={row.error}>
|
||||||
|
<fs-values-format v-model={value} dict={checkStatusDict}></fs-values-format>
|
||||||
|
</a-tooltip>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lastCheckTime: {
|
||||||
|
title: "上次检查时间",
|
||||||
|
search: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: "datetime",
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
sorter: true,
|
||||||
|
width: 155,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
from: {
|
||||||
|
title: "来源",
|
||||||
|
search: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: "dict-switch",
|
||||||
|
dict: dict({
|
||||||
|
data: [
|
||||||
|
{ label: "同步", value: "sync", color: "green" },
|
||||||
|
{ label: "手动", value: "manual", color: "blue" },
|
||||||
|
{ label: "导入", value: "import", color: "blue" },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
form: {
|
||||||
|
value: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 100,
|
||||||
|
sorter: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
title: "禁用启用",
|
||||||
|
search: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: "dict-switch",
|
||||||
|
dict: dict({
|
||||||
|
data: [
|
||||||
|
{ label: "启用", value: false, color: "green" },
|
||||||
|
{ label: "禁用", value: true, color: "red" },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
form: {
|
||||||
|
value: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 100,
|
||||||
|
sorter: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
remark: {
|
||||||
|
title: "备注",
|
||||||
|
search: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 200,
|
||||||
|
sorter: true,
|
||||||
|
tooltip: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<div class="site-ip-dialog" style="height: 60vh">
|
||||||
|
<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { onActivated, onMounted, ref, Ref } from "vue";
|
||||||
|
import { useFs } from "@fast-crud/fast-crud";
|
||||||
|
import createCrudOptions from "./crud";
|
||||||
|
import { siteIpApi } from "./api";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "SiteIpCertMonitor",
|
||||||
|
});
|
||||||
|
const props = defineProps<{
|
||||||
|
siteId: number;
|
||||||
|
}>();
|
||||||
|
const { crudBinding, crudRef, crudExpose } = useFs({
|
||||||
|
createCrudOptions,
|
||||||
|
context: {
|
||||||
|
props,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const siteInfoRef: Ref<any> = ref({});
|
||||||
|
onMounted(async () => {
|
||||||
|
siteInfoRef.value = await siteIpApi.GetObj(props.siteId);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 页面打开后获取列表数据
|
||||||
|
onMounted(() => {
|
||||||
|
crudExpose.doRefresh();
|
||||||
|
});
|
||||||
|
onActivated(() => {
|
||||||
|
crudExpose.doRefresh();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||||
|
|
||||||
|
import SiteIpCertMonitor from "./index.vue";
|
||||||
|
import { siteIpApi } from "/@/views/certd/monitor/site/ip/api";
|
||||||
|
|
||||||
|
export function useSiteIpMonitor() {
|
||||||
|
const { openDialog, openCrudFormDialog } = useFormWrapper();
|
||||||
|
|
||||||
|
async function openSiteIpMonitorDialog(opts: { siteId: number }) {
|
||||||
|
await openDialog({
|
||||||
|
wrapper: {
|
||||||
|
title: "站点IP监控",
|
||||||
|
width: "80%",
|
||||||
|
is: "a-modal",
|
||||||
|
footer: false,
|
||||||
|
buttons: {
|
||||||
|
cancel: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
reset: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
ok: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
slots: {
|
||||||
|
"form-body-top": () => {
|
||||||
|
return <SiteIpCertMonitor siteId={opts.siteId} />;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function openSiteIpImportDialog(opts: { afterSubmit: any; siteId: any }) {
|
||||||
|
const { afterSubmit } = opts;
|
||||||
|
await openCrudFormDialog<any>({
|
||||||
|
crudOptions: {
|
||||||
|
columns: {
|
||||||
|
text: {
|
||||||
|
type: "textarea",
|
||||||
|
title: "IP列表",
|
||||||
|
form: {
|
||||||
|
helper: "IP或者CNAME域名,一行一个",
|
||||||
|
rules: [{ required: true, message: "请输入要导入的IP或域名" }],
|
||||||
|
component: {
|
||||||
|
placeholder: "192.168.1.2\ncname.foo.com",
|
||||||
|
rows: 8,
|
||||||
|
},
|
||||||
|
col: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
async doSubmit({ form }) {
|
||||||
|
return siteIpApi.Import({
|
||||||
|
...form,
|
||||||
|
siteId: opts.siteId,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
afterSubmit,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
openSiteIpMonitorDialog,
|
||||||
|
openSiteIpImportDialog,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,6 +3,8 @@ import { request } from "/src/api/service";
|
|||||||
const apiPrefix = "/monitor/site/setting";
|
const apiPrefix = "/monitor/site/setting";
|
||||||
export type UserSiteMonitorSetting = {
|
export type UserSiteMonitorSetting = {
|
||||||
notificationId?: number;
|
notificationId?: number;
|
||||||
|
retryTimes?: number;
|
||||||
|
cron?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function SiteMonitorSettingsGet() {
|
export async function SiteMonitorSettingsGet() {
|
||||||
|
|||||||
@@ -11,6 +11,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="helper">设置通知渠道</div>
|
<div class="helper">设置通知渠道</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="重试次数" :name="['retryTimes']">
|
||||||
|
<div class="flex">
|
||||||
|
<a-input-number v-model:value="formState.retryTimes" />
|
||||||
|
</div>
|
||||||
|
<div class="helper">监控请求重试次数</div>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="监控定时设置" :name="['cron']">
|
||||||
|
<div class="flex flex-baseline">
|
||||||
|
<cron-editor v-model="formState.cron" :disabled="!settingsStore.isPlus" :allow-every-min="userStore.isAdmin" />
|
||||||
|
<vip-button class="ml-5" mode="button"></vip-button>
|
||||||
|
</div>
|
||||||
|
<div class="helper">定时触发监控</div>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item label=" " :colon="false" :wrapper-col="{ span: 16 }">
|
<a-form-item label=" " :colon="false" :wrapper-col="{ span: 16 }">
|
||||||
<loading-button type="primary" html-type="button" :click="doSave">保存</loading-button>
|
<loading-button type="primary" html-type="button" :click="doSave">保存</loading-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -27,8 +40,10 @@ import { notification } from "ant-design-vue";
|
|||||||
import { merge } from "lodash-es";
|
import { merge } from "lodash-es";
|
||||||
import { useSettingStore } from "/src/store/settings";
|
import { useSettingStore } from "/src/store/settings";
|
||||||
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
|
|
||||||
const settingsStore = useSettingStore();
|
const settingsStore = useSettingStore();
|
||||||
|
const userStore = useUserStore();
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "UserSecurity",
|
name: "UserSecurity",
|
||||||
});
|
});
|
||||||
@@ -56,7 +71,7 @@ const doSave = async (form: any) => {
|
|||||||
<style lang="less">
|
<style lang="less">
|
||||||
.page-user-settings {
|
.page-user-settings {
|
||||||
.user-settings-form {
|
.user-settings-form {
|
||||||
width: 600px;
|
width: 700px;
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||||
|
import { siteInfoApi } from "./api";
|
||||||
|
|
||||||
|
export function useSiteImport() {
|
||||||
|
const { openCrudFormDialog } = useFormWrapper();
|
||||||
|
|
||||||
|
async function openSiteImportDialog(opts: { afterSubmit: any }) {
|
||||||
|
const { afterSubmit } = opts;
|
||||||
|
await openCrudFormDialog<any>({
|
||||||
|
crudOptions: {
|
||||||
|
columns: {
|
||||||
|
text: {
|
||||||
|
type: "textarea",
|
||||||
|
title: "域名列表",
|
||||||
|
form: {
|
||||||
|
helper: "格式【域名:端口:名称】,一行一个,其中端口、名称可以省略\n比如:\nwww.baidu.com:443:百度\nwww.taobao.com::淘宝\nwww.google.com",
|
||||||
|
rules: [{ required: true, message: "请输入要导入的域名" }],
|
||||||
|
component: {
|
||||||
|
placeholder: "www.baidu.com:443:百度\nwww.taobao.com::淘宝\nwww.google.com\n",
|
||||||
|
rows: 8,
|
||||||
|
},
|
||||||
|
col: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
async doSubmit({ form }) {
|
||||||
|
return siteInfoApi.Import(form);
|
||||||
|
},
|
||||||
|
afterSubmit,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
openSiteImportDialog,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -15,13 +15,13 @@ export function notificationProvide(api: any) {
|
|||||||
|
|
||||||
export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
||||||
const notificationTypeDictRef = dict({
|
const notificationTypeDictRef = dict({
|
||||||
url: "/pi/notification/getTypeDict"
|
url: "/pi/notification/getTypeDict",
|
||||||
});
|
});
|
||||||
const defaultPluginConfig = {
|
const defaultPluginConfig = {
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: "a-input",
|
||||||
vModel: "value"
|
vModel: "value",
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function buildDefineFields(define: any, form: any, mode: string) {
|
function buildDefineFields(define: any, form: any, mode: string) {
|
||||||
@@ -38,7 +38,7 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
|||||||
const key = "body." + mapKey;
|
const key = "body." + mapKey;
|
||||||
const field = {
|
const field = {
|
||||||
...value,
|
...value,
|
||||||
key
|
key,
|
||||||
};
|
};
|
||||||
const column = merge({ title: key }, defaultPluginConfig, field);
|
const column = merge({ title: key }, defaultPluginConfig, field);
|
||||||
//eval
|
//eval
|
||||||
@@ -69,29 +69,29 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
|||||||
key: "id",
|
key: "id",
|
||||||
type: "number",
|
type: "number",
|
||||||
column: {
|
column: {
|
||||||
width: 100
|
width: 100,
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
title: "通知类型",
|
title: "通知类型",
|
||||||
type: "dict-select",
|
type: "dict-select",
|
||||||
dict: notificationTypeDictRef,
|
dict: notificationTypeDictRef,
|
||||||
search: {
|
search: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 200,
|
width: 200,
|
||||||
component: {
|
component: {
|
||||||
color: "auto"
|
color: "auto",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
editForm: {
|
editForm: {
|
||||||
component: {
|
component: {
|
||||||
disabled: false
|
disabled: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
component: {
|
component: {
|
||||||
@@ -108,7 +108,7 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
|||||||
{item.needPlus && <fs-icon icon={"mingcute:vip-1-line"} className={"color-plus"}></fs-icon>}
|
{item.needPlus && <fs-icon icon={"mingcute:vip-1-line"} className={"color-plus"}></fs-icon>}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: "请选择通知类型" }],
|
rules: [{ required: true, message: "请选择通知类型" }],
|
||||||
valueChange: {
|
valueChange: {
|
||||||
@@ -133,7 +133,7 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
|||||||
form.name = define.title;
|
form.name = define.title;
|
||||||
}
|
}
|
||||||
buildDefineFields(define, form, mode);
|
buildDefineFields(define, form, mode);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
helper: computed(() => {
|
helper: computed(() => {
|
||||||
const define = currentDefine.value;
|
const define = currentDefine.value;
|
||||||
@@ -141,22 +141,22 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return define.desc;
|
return define.desc;
|
||||||
})
|
}),
|
||||||
}
|
},
|
||||||
} as ColumnCompositionProps,
|
} as ColumnCompositionProps,
|
||||||
name: {
|
name: {
|
||||||
title: "通知名称",
|
title: "通知名称",
|
||||||
search: {
|
search: {
|
||||||
show: true
|
show: true,
|
||||||
},
|
},
|
||||||
type: ["text"],
|
type: ["text"],
|
||||||
form: {
|
form: {
|
||||||
rules: [{ required: true, message: "请填写名称" }],
|
rules: [{ required: true, message: "请填写名称" }],
|
||||||
helper: "随便填,当多个相同类型的通知时,便于区分"
|
helper: "随便填,当多个相同类型的通知时,便于区分",
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 200
|
width: 200,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
isDefault: {
|
isDefault: {
|
||||||
title: "是否默认",
|
title: "是否默认",
|
||||||
@@ -164,13 +164,13 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
|||||||
dict: dict({
|
dict: dict({
|
||||||
data: [
|
data: [
|
||||||
{ label: "是", value: true, color: "success" },
|
{ label: "是", value: true, color: "success" },
|
||||||
{ label: "否", value: false, color: "default" }
|
{ label: "否", value: false, color: "default" },
|
||||||
]
|
],
|
||||||
}),
|
}),
|
||||||
form: {
|
form: {
|
||||||
value: false,
|
value: false,
|
||||||
rules: [{ required: true, message: "请选择是否默认" }],
|
rules: [{ required: true, message: "请选择是否默认" }],
|
||||||
order: 999
|
order: 999,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
align: "center",
|
align: "center",
|
||||||
@@ -192,12 +192,12 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
|||||||
},
|
},
|
||||||
onCancel: async () => {
|
onCancel: async () => {
|
||||||
await crudExpose.doRefresh();
|
await crudExpose.doRefresh();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
} as ColumnCompositionProps,
|
} as ColumnCompositionProps,
|
||||||
test: {
|
test: {
|
||||||
title: "测试",
|
title: "测试",
|
||||||
@@ -207,16 +207,16 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
|||||||
}),
|
}),
|
||||||
component: {
|
component: {
|
||||||
name: "api-test",
|
name: "api-test",
|
||||||
action: "TestRequest"
|
action: "TestRequest",
|
||||||
},
|
},
|
||||||
order: 990,
|
order: 990,
|
||||||
col: {
|
col: {
|
||||||
span: 24
|
span: 24,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
column: { show: false },
|
column: { show: false },
|
||||||
@@ -235,8 +235,8 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
|||||||
valueResolve({ form }) {
|
valueResolve({ form }) {
|
||||||
const setting = form.body;
|
const setting = form.body;
|
||||||
form.setting = JSON.stringify(setting);
|
form.setting = JSON.stringify(setting);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
} as ColumnCompositionProps
|
} as ColumnCompositionProps,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,23 +32,23 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
pageRequest,
|
pageRequest,
|
||||||
addRequest,
|
addRequest,
|
||||||
editRequest,
|
editRequest,
|
||||||
delRequest
|
delRequest,
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
//固定label宽度
|
//固定label宽度
|
||||||
span: null,
|
span: null,
|
||||||
style: {
|
style: {
|
||||||
width: "145px"
|
width: "145px",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
rowHandle: {
|
rowHandle: {
|
||||||
width: 200
|
width: 200,
|
||||||
},
|
},
|
||||||
columns: {
|
columns: {
|
||||||
...commonColumnsDefine
|
...commonColumnsDefine,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="notification-selector">
|
<div class="notification-selector">
|
||||||
<div class="flex-o w-100">
|
<div class="flex-o w-100">
|
||||||
<fs-dict-select class="flex-1" :value="modelValue" :dict="optionsDictRef" :disabled="disabled" :render-label="renderLabel" :slots="selectSlots" :allow-clear="true" @update:value="onChange" />
|
<fs-dict-select class="flex-1" :value="modelValue" :dict="optionsDictRef" :disabled="disabled" :render-label="renderLabel" :slots="selectSlots" :allow-clear="true" v-bind="select" @update:value="onChange" />
|
||||||
<fs-table-select
|
<fs-table-select
|
||||||
ref="tableSelectRef"
|
ref="tableSelectRef"
|
||||||
class="flex-0"
|
class="flex-0"
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
:dialog="{ width: 960 }"
|
:dialog="{ width: 960 }"
|
||||||
:destroy-on-close="false"
|
:destroy-on-close="false"
|
||||||
height="400px"
|
height="400px"
|
||||||
|
v-bind="tableSelect"
|
||||||
@update:model-value="onChange"
|
@update:model-value="onChange"
|
||||||
@dialog-closed="doRefresh"
|
@dialog-closed="doRefresh"
|
||||||
>
|
>
|
||||||
@@ -39,17 +40,20 @@ import { message } from "ant-design-vue";
|
|||||||
import { dict } from "@fast-crud/fast-crud";
|
import { dict } from "@fast-crud/fast-crud";
|
||||||
import createCrudOptions from "../crud";
|
import createCrudOptions from "../crud";
|
||||||
import { notificationProvide } from "/@/views/certd/notification/common";
|
import { notificationProvide } from "/@/views/certd/notification/common";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "NotificationSelector",
|
name: "NotificationSelector",
|
||||||
});
|
});
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue?: number | string;
|
modelValue?: number | string | number[] | string[];
|
||||||
type?: string;
|
type?: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
size?: string;
|
size?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
select?: any;
|
||||||
|
tableSelect?: any;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const onChange = async (value: number) => {
|
const onChange = async (value: number) => {
|
||||||
@@ -118,9 +122,12 @@ function clear() {
|
|||||||
emitValue(null);
|
emitValue(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
|
||||||
async function emitValue(value: any) {
|
async function emitValue(value: any) {
|
||||||
target.value = optionsDictRef.dataMap[value];
|
// target.value = optionsDictRef.dataMap[value];
|
||||||
if (value !== 0 && pipeline?.value && target && pipeline.value.userId !== target.value.userId) {
|
const userId = userStore.userInfo.id;
|
||||||
|
if (pipeline?.value && pipeline.value.userId !== userId) {
|
||||||
message.error("对不起,您不能修改他人流水线的通知");
|
message.error("对不起,您不能修改他人流水线的通知");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -134,6 +141,7 @@ watch(
|
|||||||
},
|
},
|
||||||
async value => {
|
async value => {
|
||||||
await optionsDictRef.loadDict();
|
await optionsDictRef.loadDict();
|
||||||
|
//@ts-ignore
|
||||||
target.value = optionsDictRef.dataMap[value];
|
target.value = optionsDictRef.dataMap[value];
|
||||||
emit("selectedChange", target.value);
|
emit("selectedChange", target.value);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export async function Cancel(historyId: any) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function BatchUpdateGroup(pipelineIds: number[], groupId: number): Promise<CertInfo> {
|
export async function BatchUpdateGroup(pipelineIds: number[], groupId: number): Promise<void> {
|
||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/batchUpdateGroup",
|
url: apiPrefix + "/batchUpdateGroup",
|
||||||
method: "post",
|
method: "post",
|
||||||
@@ -84,13 +84,20 @@ export async function BatchUpdateGroup(pipelineIds: number[], groupId: number):
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function BatchDelete(pipelineIds: number[]): Promise<CertInfo> {
|
export async function BatchDelete(pipelineIds: number[]): Promise<void> {
|
||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/batchDelete",
|
url: apiPrefix + "/batchDelete",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: { ids: pipelineIds },
|
data: { ids: pipelineIds },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
export async function BatchRerun(pipelineIds: number[]): Promise<void> {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/batchRerun",
|
||||||
|
method: "post",
|
||||||
|
data: { ids: pipelineIds },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export async function GetFiles(pipelineId: number) {
|
export async function GetFiles(pipelineId: number) {
|
||||||
return await request({
|
return await request({
|
||||||
|
|||||||
@@ -5,17 +5,15 @@ import { useRouter } from "vue-router";
|
|||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, useUi } from "@fast-crud/fast-crud";
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, useUi } from "@fast-crud/fast-crud";
|
||||||
import { statusUtil } from "/@/views/certd/pipeline/pipeline/utils/util.status";
|
import { statusUtil } from "/@/views/certd/pipeline/pipeline/utils/util.status";
|
||||||
import { Modal, notification } from "ant-design-vue";
|
import { Modal, notification } from "ant-design-vue";
|
||||||
import { env } from "/@/utils/util.env";
|
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
import { useModal } from "/@/use/use-modal";
|
|
||||||
import CertView from "./cert-view.vue";
|
|
||||||
import { eachStages } from "./utils";
|
import { eachStages } from "./utils";
|
||||||
import { setRunnableIds, useCertPipelineCreator } from "/@/views/certd/pipeline/certd-form/use";
|
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 GroupSelector from "/@/views/certd/pipeline/group/group-selector.vue";
|
import GroupSelector from "/@/views/certd/pipeline/group/group-selector.vue";
|
||||||
|
import { useCertViewer } from "/@/views/certd/pipeline/use";
|
||||||
|
|
||||||
export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -61,59 +59,7 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
|||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
|
||||||
const model = useModal();
|
const { viewCert, downloadCert } = useCertViewer();
|
||||||
const viewCert = async (row: any) => {
|
|
||||||
const cert = await api.GetCert(row.id);
|
|
||||||
if (!cert) {
|
|
||||||
notification.error({ message: "请先运行一次流水线" });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
model.success({
|
|
||||||
title: "查看证书",
|
|
||||||
maskClosable: true,
|
|
||||||
okText: "关闭",
|
|
||||||
width: 800,
|
|
||||||
content: () => {
|
|
||||||
return <CertView cert={cert}></CertView>;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const downloadCert = async (row: any) => {
|
|
||||||
const files = await api.GetFiles(row.id);
|
|
||||||
model.success({
|
|
||||||
title: "点击链接下载",
|
|
||||||
maskClosable: true,
|
|
||||||
okText: "关闭",
|
|
||||||
content: () => {
|
|
||||||
const children = [];
|
|
||||||
for (const file of files) {
|
|
||||||
const downloadUrl = `${env.API}/pi/history/download?pipelineId=${row.id}&fileId=${file.id}`;
|
|
||||||
children.push(
|
|
||||||
<div>
|
|
||||||
<div class={"flex-o m-5"}>
|
|
||||||
<fs-icon icon={"ant-design:cloud-download-outlined"} class={"mr-5 fs-16"}></fs-icon>
|
|
||||||
<a href={downloadUrl} target={"_blank"}>
|
|
||||||
{file.filename}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (children.length === 0) {
|
|
||||||
return <div>暂无文件下载</div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div class={"mt-3"}>
|
|
||||||
<div> {children}</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
|
|
||||||
@@ -208,6 +154,10 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
|||||||
},
|
},
|
||||||
table: {
|
table: {
|
||||||
scroll: { x: 1500 },
|
scroll: { x: 1500 },
|
||||||
|
remove: {
|
||||||
|
confirmTitle: "确定要删除吗?",
|
||||||
|
confirmMessage: "将删除该流水线相关的所有数据,包括执行历史、证书文件、证书仓库记录等",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
tabs: {
|
tabs: {
|
||||||
name: "groupId",
|
name: "groupId",
|
||||||
@@ -223,6 +173,7 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
|||||||
play: {
|
play: {
|
||||||
order: -999,
|
order: -999,
|
||||||
title: "运行流水线",
|
title: "运行流水线",
|
||||||
|
tooltip: { title: "运行流水线" },
|
||||||
type: "link",
|
type: "link",
|
||||||
icon: "ant-design:play-circle-outlined",
|
icon: "ant-design:play-circle-outlined",
|
||||||
click({ row }) {
|
click({ row }) {
|
||||||
@@ -276,19 +227,21 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
|||||||
viewCert: {
|
viewCert: {
|
||||||
order: 3,
|
order: 3,
|
||||||
title: "查看证书",
|
title: "查看证书",
|
||||||
|
tooltip: { title: "查看证书" },
|
||||||
type: "link",
|
type: "link",
|
||||||
icon: "ph:certificate",
|
icon: "ph:certificate",
|
||||||
async click({ row }) {
|
async click({ row }) {
|
||||||
await viewCert(row);
|
await viewCert(row.id);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
download: {
|
download: {
|
||||||
order: 4,
|
order: 4,
|
||||||
type: "link",
|
type: "link",
|
||||||
title: "下载证书",
|
title: "下载证书",
|
||||||
|
tooltip: { title: "下载证书" },
|
||||||
icon: "ant-design:download-outlined",
|
icon: "ant-design:download-outlined",
|
||||||
async click({ row }) {
|
async click({ row }) {
|
||||||
await downloadCert(row);
|
await downloadCert(row.id);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
remove: {
|
remove: {
|
||||||
@@ -345,14 +298,12 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
|||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 350,
|
width: 350,
|
||||||
|
// tooltip: true,
|
||||||
|
ellipsis: true,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
component: {
|
showTitle: true,
|
||||||
on: {
|
cellRender: ({ row, value }) => {
|
||||||
// 注意:必须要on前缀
|
return <router-link to={{ path: "/certd/pipeline/detail", query: { id: row.id, editMode: false } }}>{value}</router-link>;
|
||||||
onClick({ row }) {
|
|
||||||
router.push({ path: "/certd/pipeline/detail", query: { id: row.id, editMode: "false" } });
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ const pipelineOptions: PipelineOptions = {
|
|||||||
stages: [],
|
stages: [],
|
||||||
triggers: [],
|
triggers: [],
|
||||||
...JSON.parse(detail.pipeline.content || "{}"),
|
...JSON.parse(detail.pipeline.content || "{}"),
|
||||||
|
type: detail.pipeline.type,
|
||||||
|
from: detail.pipeline.from,
|
||||||
},
|
},
|
||||||
} as PipelineDetail;
|
} as PipelineDetail;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="pi-group-selector flex full-w">
|
<div class="pi-group-selector flex full-w">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<fs-dict-select :value="modelValue" :dict="groupDictRef" @update:value="doUpdate"></fs-dict-select>
|
<fs-dict-select :value="modelValue" :dict="groupDictRef" :allow-clear="true" @update:value="doUpdate"></fs-dict-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<fs-table-select
|
<fs-table-select
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<span> 已选择 {{ selectedRowKeys.length }} 项 </span>
|
<span> 已选择 {{ selectedRowKeys.length }} 项 </span>
|
||||||
<fs-button icon="ion:trash-outline" class="color-green" type="link" text="批量删除" @click="batchDelete"></fs-button>
|
<fs-button icon="ion:trash-outline" class="color-green" type="link" text="批量删除" @click="batchDelete"></fs-button>
|
||||||
<change-group class="color-green" :selected-row-keys="selectedRowKeys" @change="groupChanged"></change-group>
|
<change-group class="color-green" :selected-row-keys="selectedRowKeys" @change="groupChanged"></change-group>
|
||||||
|
<fs-button icon="icon-park-outline:replay-music" class="need-plus" type="link" text="强制重新运行" @click="batchRerun"></fs-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template #actionbar-right> </template>
|
<template #actionbar-right> </template>
|
||||||
@@ -70,6 +71,19 @@ function batchDelete() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function batchRerun() {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "确认强制重新运行吗",
|
||||||
|
content: "确定要强制重新运行选中流水线吗?(20条一批执行)",
|
||||||
|
async onOk() {
|
||||||
|
await api.BatchRerun(selectedRowKeys.value);
|
||||||
|
notification.success({ message: "任务已提交" });
|
||||||
|
await crudExpose.doRefresh();
|
||||||
|
selectedRowKeys.value = [];
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.batch-actions {
|
.batch-actions {
|
||||||
|
|||||||
@@ -208,7 +208,6 @@ function useStepForm() {
|
|||||||
const stepOpen = (step: any, emit: any) => {
|
const stepOpen = (step: any, emit: any) => {
|
||||||
callback.value = emit;
|
callback.value = emit;
|
||||||
currentStep.value = merge({ input: {}, strategy: {} }, step);
|
currentStep.value = merge({ input: {}, strategy: {} }, step);
|
||||||
|
|
||||||
if (step.type) {
|
if (step.type) {
|
||||||
changeCurrentPlugin(currentStep.value);
|
changeCurrentPlugin(currentStep.value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,9 +23,11 @@
|
|||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<fs-button v-if="settingsStore.sysPublic.aiChatEnabled !== false" key="aiChat" type="primary" icon="ion:color-wand-outline" @click="taskModal.onAiChat">AI分析</fs-button>
|
<fs-button v-if="settingsStore.sysPublic.aiChatEnabled !== false" key="aiChat" :tooltip="{ title: 'AI分析异常' }" type="primary" icon="ion:color-wand-outline" @click="taskModal.onAiChat">AI分析</fs-button>
|
||||||
<fs-button key="cancel" icon="ion:close-circle-outline" @click="taskModal.onOk">关闭</fs-button>
|
<fs-button key="rerun" type="primary" :tooltip="{ title: '强制重新执行此步骤' }" text="重新运行" icon="icon-park-outline:replay-music" @click="triggerRun(activeKey)"></fs-button>
|
||||||
<fs-button key="submit" icon="ion:checkmark-circle-outline" type="primary" @click="taskModal.onOk">确定</fs-button>
|
<fs-button key="downloadLogs" type="primary" :tooltip="{ title: '当前任务日志下载' }" icon="ion:arrow-down-circle-outline" @click="taskModal.onDownloadLogs">下载日志</fs-button>
|
||||||
|
<fs-button key="cancel" :tooltip="{ title: '关闭窗口' }" icon="ion:close-circle-outline" @click="taskModal.onOk">关闭</fs-button>
|
||||||
|
<!-- <fs-button key="submit" :tooltip="{ title: '关闭窗口' }" icon="ion:checkmark-circle-outline" type="primary" @click="taskModal.onOk">确定</fs-button>-->
|
||||||
</template>
|
</template>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
@@ -36,6 +38,7 @@ import { RunHistory } from "../../type";
|
|||||||
import PiStatusShow from "/@/views/certd/pipeline/pipeline/component/status-show.vue";
|
import PiStatusShow from "/@/views/certd/pipeline/pipeline/component/status-show.vue";
|
||||||
import { usePreferences } from "/@/vben/preferences";
|
import { usePreferences } from "/@/vben/preferences";
|
||||||
import { useSettingStore } from "/@/store/settings/index";
|
import { useSettingStore } from "/@/store/settings/index";
|
||||||
|
import { notification } from "ant-design-vue";
|
||||||
export default {
|
export default {
|
||||||
name: "PiTaskView",
|
name: "PiTaskView",
|
||||||
components: { PiStatusShow },
|
components: { PiStatusShow },
|
||||||
@@ -51,6 +54,22 @@ export default {
|
|||||||
onAiChat() {
|
onAiChat() {
|
||||||
onAiChat();
|
onAiChat();
|
||||||
},
|
},
|
||||||
|
onDownloadLogs() {
|
||||||
|
const logs = currentHistory.value?.logs[activeKey.value];
|
||||||
|
if (!logs || logs.length === 0) {
|
||||||
|
notification.warning({
|
||||||
|
message: "没有日志",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const logText = logs.join("");
|
||||||
|
const blob = new Blob([logText], { type: "text/plain;charset=utf-8" });
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = URL.createObjectURL(blob);
|
||||||
|
a.download = "certd-task-log.txt";
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(a.href);
|
||||||
|
},
|
||||||
cancelText: "关闭",
|
cancelText: "关闭",
|
||||||
});
|
});
|
||||||
const { isMobile } = usePreferences();
|
const { isMobile } = usePreferences();
|
||||||
|
|||||||
@@ -1,18 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<fs-page v-if="pipeline" class="page-pipeline-edit">
|
<fs-page v-if="pipeline" class="page-pipeline-edit">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="title">
|
<div class="title flex-1">
|
||||||
<fs-button class="back" icon="ion:chevron-back-outline" @click="goBack"></fs-button>
|
<fs-button class="back" icon="ion:chevron-back-outline" @click="goBack"></fs-button>
|
||||||
<text-editable v-model="pipeline.title" :hover-show="false" :disabled="!editMode"></text-editable>
|
<text-editable v-model="pipeline.title" :hover-show="false" :disabled="!editMode"></text-editable>
|
||||||
</div>
|
</div>
|
||||||
<div class="more">
|
<div class="more flex items-center flex-1 justify-end">
|
||||||
<template v-if="editMode">
|
<div v-if="isCert" class="flex items-center hidden md:block">
|
||||||
<a-button type="primary" :loading="saveLoading" @click="save">保存</a-button>
|
<a-tag class="mr-5 pointer" color="green" type="primary" text="查看证书" @click="viewCert(pipeline.id)">
|
||||||
<a-button class="ml-5" @click="cancel">取消</a-button>
|
<span class="flex"><fs-icon icon="ant-design:eye-outlined"></fs-icon> 查看证书</span>
|
||||||
</template>
|
</a-tag>
|
||||||
<template v-else>
|
<a-tag class="mr-5 pointer" color="green" type="primary" text="下载证书" @click="downloadCert(pipeline.id)">
|
||||||
<a-button type="primary" @click="edit">编辑</a-button>
|
<span class="flex"> <fs-icon icon="ant-design:download-outlined"></fs-icon> 下载证书 </span>
|
||||||
</template>
|
</a-tag>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center hidden md:block">
|
||||||
|
<a-tag v-if="nextTriggerTimes" color="blue">
|
||||||
|
<span class="flex">
|
||||||
|
<fs-icon icon="ion:time-outline"></fs-icon>
|
||||||
|
下次执行时间:{{ nextTriggerTimes }}
|
||||||
|
</span>
|
||||||
|
</a-tag>
|
||||||
|
<a-tag v-else-if="nextTriggerTimes === false" color="red">
|
||||||
|
<span class="flex">
|
||||||
|
<fs-icon icon="ion:caret-forward-circle-outline"></fs-icon>
|
||||||
|
未设置触发源,不会自动执行
|
||||||
|
</span>
|
||||||
|
</a-tag>
|
||||||
|
</div>
|
||||||
|
<div class="basis-40 flex justify-end mr-10">
|
||||||
|
<template v-if="editMode">
|
||||||
|
<fs-button type="primary" :loading="saveLoading" @click="save">保存</fs-button>
|
||||||
|
<fs-button class="ml-5" @click="cancel">取消</fs-button>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<fs-button icon="ant-design:edit-outlined" type="primary" @click="edit">编辑</fs-button>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -241,7 +266,7 @@
|
|||||||
@cancel="historyCancel()"
|
@cancel="historyCancel()"
|
||||||
></pi-history-timeline-item>
|
></pi-history-timeline-item>
|
||||||
</template>
|
</template>
|
||||||
<a-empty v-if="histories.length === 0"> </a-empty>
|
<a-empty v-if="histories.length === 0"></a-empty>
|
||||||
</a-timeline>
|
</a-timeline>
|
||||||
</a-page-header>
|
</a-page-header>
|
||||||
</div>
|
</div>
|
||||||
@@ -255,7 +280,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, onMounted, onUnmounted, provide, Ref, ref, watch } from "vue";
|
import { defineComponent, onMounted, onUnmounted, provide, Ref, ref, watch, computed } 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";
|
||||||
import PiTriggerForm from "./component/trigger-form/index.vue";
|
import PiTriggerForm from "./component/trigger-form/index.vue";
|
||||||
@@ -275,11 +300,23 @@ import { useUserStore } from "/@/store/user";
|
|||||||
import TaskShortcuts from "./component/shortcut/task-shortcuts.vue";
|
import TaskShortcuts from "./component/shortcut/task-shortcuts.vue";
|
||||||
import { eachSteps, findStep } from "../utils";
|
import { eachSteps, findStep } from "../utils";
|
||||||
import { PluginGroups } from "/@/store/plugin";
|
import { PluginGroups } from "/@/store/plugin";
|
||||||
|
import { getCronNextTimes } from "/@/components/cron-editor/utils";
|
||||||
|
import { useCertViewer } from "/@/views/certd/pipeline/use";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "PipelineEdit",
|
name: "PipelineEdit",
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
components: { FsIcon, PiHistoryTimelineItem, PiTaskForm, PiTriggerForm, PiTaskView, PiStatusShow, PiNotificationForm, VDraggable, TaskShortcuts },
|
components: {
|
||||||
|
FsIcon,
|
||||||
|
PiHistoryTimelineItem,
|
||||||
|
PiTaskForm,
|
||||||
|
PiTriggerForm,
|
||||||
|
PiTaskView,
|
||||||
|
PiStatusShow,
|
||||||
|
PiNotificationForm,
|
||||||
|
VDraggable,
|
||||||
|
TaskShortcuts,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
pipelineId: {
|
pipelineId: {
|
||||||
type: [Number, String],
|
type: [Number, String],
|
||||||
@@ -309,7 +346,24 @@ export default defineComponent({
|
|||||||
|
|
||||||
const currentHistory: Ref<any> = ref({});
|
const currentHistory: Ref<any> = ref({});
|
||||||
|
|
||||||
|
const nextTriggerTimes = computed(() => {
|
||||||
|
const triggers = pipeline.value.triggers;
|
||||||
|
if (!triggers || triggers.length === 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let nextTimes: any = [];
|
||||||
|
for (const item of triggers) {
|
||||||
|
if (!item.props?.cron) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const ret = getCronNextTimes(item.props?.cron, 1);
|
||||||
|
nextTimes.push(...ret);
|
||||||
|
}
|
||||||
|
return nextTimes.join(",");
|
||||||
|
});
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
function goBack() {
|
function goBack() {
|
||||||
router.back();
|
router.back();
|
||||||
}
|
}
|
||||||
@@ -365,8 +419,10 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const intervalLoadHistoryRef = ref();
|
const intervalLoadHistoryRef = ref();
|
||||||
const isLoadingHistory = ref(false);
|
const isLoadingHistory = ref(false);
|
||||||
|
|
||||||
function watchNewHistoryList() {
|
function watchNewHistoryList() {
|
||||||
intervalLoadHistoryRef.value = setInterval(async () => {
|
intervalLoadHistoryRef.value = setInterval(async () => {
|
||||||
if (isLoadingHistory.value) {
|
if (isLoadingHistory.value) {
|
||||||
@@ -390,6 +446,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
watchNewHistoryList();
|
watchNewHistoryList();
|
||||||
});
|
});
|
||||||
@@ -420,7 +477,15 @@ export default defineComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const detail: PipelineDetail = await props.options.getPipelineDetail({ pipelineId: value });
|
const detail: PipelineDetail = await props.options.getPipelineDetail({ pipelineId: value });
|
||||||
currentPipeline.value = _.merge({ title: "新管道流程", stages: [], triggers: [], notifications: [] }, detail.pipeline);
|
currentPipeline.value = _.merge(
|
||||||
|
{
|
||||||
|
title: "新管道流程",
|
||||||
|
stages: [],
|
||||||
|
triggers: [],
|
||||||
|
notifications: [],
|
||||||
|
},
|
||||||
|
detail.pipeline
|
||||||
|
);
|
||||||
pipeline.value = currentPipeline.value;
|
pipeline.value = currentPipeline.value;
|
||||||
await loadHistoryList(true);
|
await loadHistoryList(true);
|
||||||
},
|
},
|
||||||
@@ -535,6 +600,7 @@ export default defineComponent({
|
|||||||
function isLastStage(index: number) {
|
function isLastStage(index: number) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
stageAdd,
|
stageAdd,
|
||||||
isLastStage,
|
isLastStage,
|
||||||
@@ -654,6 +720,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const validateErrors: Ref = ref({});
|
const validateErrors: Ref = ref({});
|
||||||
|
|
||||||
function addValidateError(taskId: string, error: any) {
|
function addValidateError(taskId: string, error: any) {
|
||||||
const errors = validateErrors.value[taskId] || [];
|
const errors = validateErrors.value[taskId] || [];
|
||||||
validateErrors.value[taskId] = errors;
|
validateErrors.value[taskId] = errors;
|
||||||
@@ -708,6 +775,7 @@ export default defineComponent({
|
|||||||
function hasValidateError(taskId: string) {
|
function hasValidateError(taskId: string) {
|
||||||
return validateErrors.value[taskId] != null;
|
return validateErrors.value[taskId] != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const save = async (offEdit = true) => {
|
const save = async (offEdit = true) => {
|
||||||
doValidate();
|
doValidate();
|
||||||
|
|
||||||
@@ -771,9 +839,11 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const logsCollapse = ref(false);
|
const logsCollapse = ref(false);
|
||||||
|
|
||||||
function toggleLogsCollapse() {
|
function toggleLogsCollapse() {
|
||||||
logsCollapse.value = !logsCollapse.value;
|
logsCollapse.value = !logsCollapse.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
historyView,
|
historyView,
|
||||||
historyCancel,
|
historyCancel,
|
||||||
@@ -838,7 +908,12 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { viewCert, downloadCert } = useCertViewer();
|
||||||
|
const isCert = computed(() => {
|
||||||
|
return currentPipeline.value?.type?.startsWith("cert");
|
||||||
|
});
|
||||||
return {
|
return {
|
||||||
|
isCert,
|
||||||
pipeline,
|
pipeline,
|
||||||
currentHistory,
|
currentHistory,
|
||||||
histories,
|
histories,
|
||||||
@@ -852,6 +927,9 @@ export default defineComponent({
|
|||||||
...useHistory(),
|
...useHistory(),
|
||||||
...useNotification(),
|
...useNotification(),
|
||||||
...useScroll(),
|
...useScroll(),
|
||||||
|
nextTriggerTimes,
|
||||||
|
viewCert,
|
||||||
|
downloadCert,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -864,9 +942,11 @@ export default defineComponent({
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
text-wrap: nowrap;
|
text-wrap: nowrap;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.back {
|
.back {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-editable {
|
.text-editable {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
@@ -876,47 +956,57 @@ export default defineComponent({
|
|||||||
.pi-status-show {
|
.pi-status-show {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fs-page-content {
|
.fs-page-content {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout {
|
.layout {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
||||||
.layout-left {
|
.layout-left {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-right {
|
.layout-right {
|
||||||
width: 350px;
|
width: 350px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pipeline-container {
|
.pipeline-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pipeline {
|
.pipeline {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.stages {
|
.stages {
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.stage {
|
.stage {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
border-right: 1px solid #c7c7c7;
|
border-right: 1px solid #c7c7c7;
|
||||||
|
|
||||||
.is-add {
|
.is-add {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover .is-add {
|
&:hover .is-add {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
@@ -925,11 +1015,13 @@ export default defineComponent({
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
color: gray;
|
color: gray;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.stage-move-handle {
|
.stage-move-handle {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//.sortable-ghost {
|
//.sortable-ghost {
|
||||||
// .line {
|
// .line {
|
||||||
// visibility: hidden;
|
// visibility: hidden;
|
||||||
@@ -943,6 +1035,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
&.line-left {
|
&.line-left {
|
||||||
left: 25px;
|
left: 25px;
|
||||||
|
|
||||||
.flow-line {
|
.flow-line {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
}
|
}
|
||||||
@@ -950,6 +1043,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
&.line-right {
|
&.line-right {
|
||||||
right: 25px;
|
right: 25px;
|
||||||
|
|
||||||
.flow-line {
|
.flow-line {
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
}
|
}
|
||||||
@@ -960,6 +1054,7 @@ export default defineComponent({
|
|||||||
border: 1px solid #c7c7c7;
|
border: 1px solid #c7c7c7;
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.add-stage-btn {
|
.add-stage-btn {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
@@ -969,6 +1064,7 @@ export default defineComponent({
|
|||||||
bottom: -12px;
|
bottom: -12px;
|
||||||
left: -12px;
|
left: -12px;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #1890ff;
|
color: #1890ff;
|
||||||
}
|
}
|
||||||
@@ -981,6 +1077,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
&.line-left {
|
&.line-left {
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
||||||
.flow-line {
|
.flow-line {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
@@ -989,6 +1086,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
&.line-right {
|
&.line-right {
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
.flow-line {
|
.flow-line {
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
@@ -1008,13 +1106,16 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.last-stage {
|
&.last-stage {
|
||||||
.line {
|
.line {
|
||||||
width: 50% !important;
|
width: 50% !important;
|
||||||
right: auto;
|
right: auto;
|
||||||
|
|
||||||
.flow-line {
|
.flow-line {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.add-stage-btn {
|
.add-stage-btn {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
@@ -1038,6 +1139,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.task {
|
.task {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -1050,6 +1152,7 @@ export default defineComponent({
|
|||||||
&.in-edit {
|
&.in-edit {
|
||||||
margin-right: 28px;
|
margin-right: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1061,12 +1164,15 @@ export default defineComponent({
|
|||||||
//font-size: 18px;
|
//font-size: 18px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #1890ff;
|
color: #1890ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.copy {
|
&.copy {
|
||||||
right: 30px;
|
right: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.drag {
|
&.drag {
|
||||||
right: 10px;
|
right: 10px;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
@@ -1078,6 +1184,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.shortcut {
|
.shortcut {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -10px;
|
bottom: -10px;
|
||||||
@@ -1092,6 +1199,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
.layout-right {
|
.layout-right {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&.collapsed {
|
&.collapsed {
|
||||||
margin-right: -350px;
|
margin-right: -350px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
如果您不理解什么是子域托管,可以参考文档
|
如果您不理解什么是子域托管,可以参考文档
|
||||||
<a href={"https://help.aliyun.com/zh/dns/subdomain-management"}>子域管理</a>
|
<a href={"https://help.aliyun.com/zh/dns/subdomain-management"} target={"_blank"}>
|
||||||
|
子域管理
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
65
packages/ui/certd-client/src/views/certd/pipeline/use.tsx
Normal file
65
packages/ui/certd-client/src/views/certd/pipeline/use.tsx
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
import * as api from "/@/views/certd/pipeline/api";
|
||||||
|
import { notification } from "ant-design-vue";
|
||||||
|
import CertView from "/@/views/certd/pipeline/cert-view.vue";
|
||||||
|
import { env } from "/@/utils/util.env";
|
||||||
|
import { useModal } from "/@/use/use-modal";
|
||||||
|
|
||||||
|
export function useCertViewer() {
|
||||||
|
const model = useModal();
|
||||||
|
const viewCert = async (id: number) => {
|
||||||
|
const cert = await api.GetCert(id);
|
||||||
|
if (!cert) {
|
||||||
|
notification.error({ message: "请先运行一次流水线" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
model.success({
|
||||||
|
title: "查看证书",
|
||||||
|
maskClosable: true,
|
||||||
|
okText: "关闭",
|
||||||
|
width: 800,
|
||||||
|
content: () => {
|
||||||
|
return <CertView cert={cert}></CertView>;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const downloadCert = async (id: any) => {
|
||||||
|
const files = await api.GetFiles(id);
|
||||||
|
model.success({
|
||||||
|
title: "点击链接下载",
|
||||||
|
maskClosable: true,
|
||||||
|
okText: "关闭",
|
||||||
|
content: () => {
|
||||||
|
const children = [];
|
||||||
|
for (const file of files) {
|
||||||
|
const downloadUrl = `${env.API}/pi/history/download?pipelineId=${id}&fileId=${file.id}`;
|
||||||
|
children.push(
|
||||||
|
<div>
|
||||||
|
<div class={"flex-o m-5"}>
|
||||||
|
<fs-icon icon={"ant-design:cloud-download-outlined"} class={"mr-5 fs-16"}></fs-icon>
|
||||||
|
<a href={downloadUrl} target={"_blank"}>
|
||||||
|
{file.filename}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (children.length === 0) {
|
||||||
|
return <div>暂无文件下载</div>;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div class={"mt-3"}>
|
||||||
|
<div> {children}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
viewCert,
|
||||||
|
downloadCert,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -35,6 +35,10 @@
|
|||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<suite-card class="m-0"></suite-card>
|
<suite-card class="m-0"></suite-card>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="settingsStore.isPlus && settingsStore.sysPublic.userValidTimeEnabled === true && userInfo.validTime">
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
<valid-time-format class="flex-o" prefix="账户有效期:" :model-value="userInfo.validTime" />
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-button type="primary" size="large" html-type="submit" :loading="loading" class="login-button">登录</a-button>
|
<a-button type="primary" size="large" html-type="submit" :loading="loading" class="login-button">登录</a-button>
|
||||||
|
|
||||||
<div class="mt-2"><a href="https://certd.docmirror.cn/guide/use/forgotpasswd/" target="_blank">忘记管理员密码?</a></div>
|
<div v-if="!settingStore.isComm" class="mt-2"><a href="https://certd.docmirror.cn/guide/use/forgotpasswd/" target="_blank">忘记管理员密码?</a></div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item class="user-login-other">
|
<a-form-item class="user-login-other">
|
||||||
@@ -178,6 +178,7 @@ export default defineComponent({
|
|||||||
function hasRegisterTypeEnabled() {
|
function hasRegisterTypeEnabled() {
|
||||||
return sysPublicSettings.registerEnabled && (sysPublicSettings.usernameRegisterEnabled || sysPublicSettings.emailRegisterEnabled);
|
return sysPublicSettings.registerEnabled && (sysPublicSettings.usernameRegisterEnabled || sysPublicSettings.emailRegisterEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
loading,
|
loading,
|
||||||
formState,
|
formState,
|
||||||
@@ -193,6 +194,7 @@ export default defineComponent({
|
|||||||
twoFactor,
|
twoFactor,
|
||||||
handleTwoFactorSubmit,
|
handleTwoFactorSubmit,
|
||||||
verifyCodeInputRef,
|
verifyCodeInputRef,
|
||||||
|
settingStore,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user