mirror of
https://github.com/certd/certd.git
synced 2026-04-08 17:12:22 +08:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7feece597a | ||
|
|
fa16c782ca | ||
|
|
a03d0b6a4a | ||
|
|
dff76b8912 | ||
|
|
cffea9a9bc | ||
|
|
43fee42198 | ||
|
|
5cd3968929 | ||
|
|
65dcae79f8 | ||
|
|
e11b3becfd | ||
|
|
73fa937f5c | ||
|
|
6ebe2e54ac | ||
|
|
fb29a11cc9 | ||
|
|
a9e06cbf92 |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 腾讯云授权支持设置是否国际站,部署到EO插件支持国际站 ([5cd3968](https://github.com/certd/certd/commit/5cd3968929acef333cf30d3b20cf21cea6c82c5f))
|
||||
* 修复邮箱包含.号校验失败的bug ([65dcae7](https://github.com/certd/certd/commit/65dcae79f8faa7a6cb425e10a0fdb6758b0719f3))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 首次打开任务日志查看页面,自动滚动到底部 ([43fee42](https://github.com/certd/certd/commit/43fee42198e8697185b427b1fa3eb79409603393))
|
||||
* 支持批量修改通知和定时 ([e11b3be](https://github.com/certd/certd/commit/e11b3becfd4abe6547e84d09adc38ebd6e1c4b87))
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1 +1 @@
|
||||
00:39
|
||||
12:23
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持s3 access做测试 ([f00aeac](https://github.com/certd/certd/commit/f00aeacb8b5c81f0bafa4c1b76723dec2b6b7784))
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
* 登录宝塔面板,在菜单栏中点击 Docker,首次进入会提示安装Docker服务,点击立即安装,按提示完成安装
|
||||
|
||||
### 2、部署certd
|
||||
|
||||
#### 2.1 应用商店一键部署【推荐】
|
||||
以下两种方式人选一种:
|
||||
#### 2.1 应用商店方式一键部署【推荐】
|
||||
|
||||
* 在宝塔Docker应用商店中找到`certd`(要先点右上角更新应用)
|
||||
* 点击安装,配置域名等基本信息即可完成安装
|
||||
|
||||
> 需要宝塔9.2.0及以上版本才支持
|
||||
|
||||
#### 2.2 容器编排部署
|
||||
#### 2.2 容器编排方式部署
|
||||
|
||||
1. 打开`docker-compose.yaml`,整个内容复制下来
|
||||
https://gitee.com/certd/certd/raw/v2/docker/run/docker-compose.yaml
|
||||
@@ -43,12 +43,15 @@ admin/123456
|
||||
## 三、如何升级
|
||||
宝塔升级certd非常简单
|
||||
|
||||
`docker`->`容器编排`->`左侧选择Certd`->`更新镜像`
|
||||
打开容器页面: `docker`->`容器编排`->`左侧选择Certd`->`更新镜像`
|
||||
|
||||

|
||||
|
||||
|
||||
## 四、数据备份
|
||||
|
||||
部署方式不同,数据保存位置不同
|
||||
|
||||
### 4.1 应用商店部署方式
|
||||
点击进入安装路径,数据保存在`./data`目录下,可以手动备份
|
||||
|
||||
@@ -62,7 +65,6 @@ admin/123456
|
||||
数据默认保存在`/data/certd`目录下,可以手动备份
|
||||
|
||||
|
||||
|
||||
### 4.3 自动备份
|
||||
|
||||
> 建议配置一条 [数据库备份流水线](../../use/backup/),自动备份
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
}
|
||||
},
|
||||
"npmClient": "pnpm",
|
||||
"version": "1.35.4"
|
||||
"version": "1.35.5"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/publishlab/node-acme-client/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
## [1.35.4](https://github.com/publishlab/node-acme-client/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"description": "Simple and unopinionated ACME client",
|
||||
"private": false,
|
||||
"author": "nmorsman",
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"type": "module",
|
||||
"module": "scr/index.js",
|
||||
"main": "src/index.js",
|
||||
@@ -18,7 +18,7 @@
|
||||
"types"
|
||||
],
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.35.4",
|
||||
"@certd/basic": "^1.35.5",
|
||||
"@peculiar/x509": "^1.11.0",
|
||||
"asn1js": "^3.0.5",
|
||||
"axios": "^1.7.2",
|
||||
@@ -69,5 +69,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
@@ -1 +1 @@
|
||||
12:19
|
||||
17:10
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -45,5 +45,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持批量修改通知和定时 ([e11b3be](https://github.com/certd/certd/commit/e11b3becfd4abe6547e84d09adc38ebd6e1c4b87))
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -17,8 +17,8 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.35.4",
|
||||
"@certd/plus-core": "^1.35.4",
|
||||
"@certd/basic": "^1.35.5",
|
||||
"@certd/plus-core": "^1.35.5",
|
||||
"dayjs": "^1.11.7",
|
||||
"lodash-es": "^4.17.21",
|
||||
"reflect-metadata": "^0.1.13"
|
||||
@@ -44,5 +44,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -452,12 +452,12 @@ export class Executor {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (notification.type === "email") {
|
||||
if (notification.type === "email" && notification.options?.receivers) {
|
||||
try {
|
||||
await this.options.emailService?.send({
|
||||
subject,
|
||||
content,
|
||||
receivers: notification.options.receivers,
|
||||
receivers: notification.options?.receivers,
|
||||
});
|
||||
} catch (e) {
|
||||
logger.error("send email error", e);
|
||||
|
||||
@@ -52,7 +52,9 @@ export type Stage = Runnable & {
|
||||
export type Trigger = {
|
||||
id: string;
|
||||
title: string;
|
||||
cron: string;
|
||||
props: {
|
||||
cron: string;
|
||||
};
|
||||
type: string;
|
||||
};
|
||||
|
||||
@@ -78,14 +80,13 @@ export type EmailOptions = {
|
||||
receivers: string[];
|
||||
};
|
||||
export type NotificationWhen = "error" | "success" | "turnToSuccess" | "start";
|
||||
export type NotificationType = "email" | "url";
|
||||
export type NotificationType = "email" | "other";
|
||||
export type Notification = {
|
||||
type: NotificationType;
|
||||
when: NotificationWhen[];
|
||||
options: EmailOptions;
|
||||
options?: EmailOptions;
|
||||
notificationId: number;
|
||||
title: string;
|
||||
subType: string;
|
||||
};
|
||||
|
||||
export type Pipeline = Runnable & {
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
"types": "./dist/d/index.d.ts",
|
||||
@@ -24,5 +24,5 @@
|
||||
"prettier": "^2.8.8",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -31,5 +31,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/jdcloud",
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"description": "jdcloud openApi sdk",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
@@ -61,5 +61,5 @@
|
||||
"fetch"
|
||||
]
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -17,7 +17,7 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.35.4",
|
||||
"@certd/basic": "^1.35.5",
|
||||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -32,5 +32,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -27,10 +27,10 @@
|
||||
],
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.35.4",
|
||||
"@certd/basic": "^1.35.4",
|
||||
"@certd/pipeline": "^1.35.4",
|
||||
"@certd/plus-core": "^1.35.4",
|
||||
"@certd/acme-client": "^1.35.5",
|
||||
"@certd/basic": "^1.35.5",
|
||||
"@certd/pipeline": "^1.35.5",
|
||||
"@certd/plus-core": "^1.35.5",
|
||||
"@midwayjs/cache": "~3.14.0",
|
||||
"@midwayjs/core": "~3.20.3",
|
||||
"@midwayjs/i18n": "~3.20.3",
|
||||
@@ -61,5 +61,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -46,5 +46,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -16,10 +16,10 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.35.4",
|
||||
"@certd/basic": "^1.35.4",
|
||||
"@certd/pipeline": "^1.35.4",
|
||||
"@certd/plugin-lib": "^1.35.4",
|
||||
"@certd/acme-client": "^1.35.5",
|
||||
"@certd/basic": "^1.35.5",
|
||||
"@certd/pipeline": "^1.35.5",
|
||||
"@certd/plugin-lib": "^1.35.5",
|
||||
"@google-cloud/publicca": "^1.3.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"jszip": "^3.10.1",
|
||||
@@ -43,5 +43,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 腾讯云授权支持设置是否国际站,部署到EO插件支持国际站 ([5cd3968](https://github.com/certd/certd/commit/5cd3968929acef333cf30d3b20cf21cea6c82c5f))
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-lib",
|
||||
"private": false,
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -21,8 +21,8 @@
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@alicloud/tea-util": "^1.4.10",
|
||||
"@aws-sdk/client-s3": "^3.787.0",
|
||||
"@certd/basic": "^1.35.4",
|
||||
"@certd/pipeline": "^1.35.4",
|
||||
"@certd/basic": "^1.35.5",
|
||||
"@certd/pipeline": "^1.35.5",
|
||||
"@kubernetes/client-node": "0.21.0",
|
||||
"ali-oss": "^6.22.0",
|
||||
"basic-ftp": "^5.0.5",
|
||||
@@ -53,5 +53,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
"gitHead": "93017c044d4533ce40a2aab525f10b82761d09d0"
|
||||
}
|
||||
|
||||
@@ -8,8 +8,7 @@ import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline";
|
||||
export class TencentAccess extends BaseAccess {
|
||||
@AccessInput({
|
||||
title: "secretId",
|
||||
helper:
|
||||
"使用对应的插件需要有对应的权限,比如上传证书,需要证书管理权限;部署到clb需要clb相关权限\n前往[密钥管理](https://console.cloud.tencent.com/cam/capi)进行创建",
|
||||
helper: "使用对应的插件需要有对应的权限,比如上传证书,需要证书管理权限;部署到clb需要clb相关权限\n前往[密钥管理](https://console.cloud.tencent.com/cam/capi)进行创建",
|
||||
component: {
|
||||
placeholder: "secretId",
|
||||
},
|
||||
@@ -25,4 +24,29 @@ export class TencentAccess extends BaseAccess {
|
||||
rules: [{ required: true, message: "该项必填" }],
|
||||
})
|
||||
secretKey = "";
|
||||
|
||||
@AccessInput({
|
||||
title: "站点类型",
|
||||
value: "cn",
|
||||
component: {
|
||||
name: "a-select",
|
||||
options: [
|
||||
{
|
||||
label: "国内站",
|
||||
value: "cn",
|
||||
},
|
||||
{
|
||||
label: "国际站",
|
||||
value: "intl",
|
||||
},
|
||||
],
|
||||
},
|
||||
encrypt: true,
|
||||
rules: [{ required: true, message: "该项必填" }],
|
||||
})
|
||||
accountType: string;
|
||||
|
||||
isIntl() {
|
||||
return this.accountType === "intl";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复邮箱包含.号校验失败的bug ([65dcae7](https://github.com/certd/certd/commit/65dcae79f8faa7a6cb425e10a0fdb6758b0719f3))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 首次打开任务日志查看页面,自动滚动到底部 ([43fee42](https://github.com/certd/certd/commit/43fee42198e8697185b427b1fa3eb79409603393))
|
||||
* 支持批量修改通知和定时 ([e11b3be](https://github.com/certd/certd/commit/e11b3becfd4abe6547e84d09adc38ebd6e1c4b87))
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/ui-client
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --open",
|
||||
@@ -102,8 +102,8 @@
|
||||
"zod-defaults": "^0.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/lib-iframe": "^1.35.4",
|
||||
"@certd/pipeline": "^1.35.4",
|
||||
"@certd/lib-iframe": "^1.35.5",
|
||||
"@certd/pipeline": "^1.35.5",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
||||
@@ -54,7 +54,9 @@ onMounted(async () => {
|
||||
async function addItem() {
|
||||
const email = newEmail.value;
|
||||
//验证邮箱格式
|
||||
if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(newEmail.value)) {
|
||||
const regExp =
|
||||
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/;
|
||||
if (!regExp.test(email)) {
|
||||
notification.error({
|
||||
message: "请填写正确的邮箱地址",
|
||||
});
|
||||
|
||||
@@ -84,6 +84,23 @@ export async function BatchUpdateGroup(pipelineIds: number[], groupId: number):
|
||||
});
|
||||
}
|
||||
|
||||
export async function BatchUpdateTrigger(pipelineIds: number[], trigger: any): Promise<void> {
|
||||
return await request({
|
||||
url: apiPrefix + "/batchUpdateTrigger",
|
||||
method: "post",
|
||||
data: { ids: pipelineIds, trigger },
|
||||
});
|
||||
}
|
||||
|
||||
export async function BatchUpdateNotificaiton(pipelineIds: number[], notification: any): Promise<void> {
|
||||
return await request({
|
||||
url: apiPrefix + "/batchUpdateNotification",
|
||||
method: "post",
|
||||
data: { ids: pipelineIds, notification },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export async function BatchDelete(pipelineIds: number[]): Promise<void> {
|
||||
return await request({
|
||||
url: apiPrefix + "/batchDelete",
|
||||
@@ -99,6 +116,8 @@ export async function BatchRerun(pipelineIds: number[]): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
export async function GetFiles(pipelineId: number) {
|
||||
return await request({
|
||||
url: historyApiPrefix + "/files",
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<fs-button icon="mdi:format-list-group" type="link" text="修改通知" @click="openFormDialog"></fs-button>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import * as api from "../api";
|
||||
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
const props = defineProps<{
|
||||
selectedRowKeys: any[];
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
change: any;
|
||||
}>();
|
||||
async function batchUpdateRequest(form: any) {
|
||||
/**
|
||||
* type: NotificationType;
|
||||
* when: NotificationWhen[];
|
||||
* options?: EmailOptions;
|
||||
* notificationId: number;
|
||||
* title: string;
|
||||
*/
|
||||
await api.BatchUpdateNotificaiton(props.selectedRowKeys, {
|
||||
type: "other",
|
||||
title: form.title || "通知",
|
||||
when: form.when,
|
||||
notificationId: form.notificationId,
|
||||
});
|
||||
emit("change");
|
||||
}
|
||||
|
||||
const { openCrudFormDialog } = useFormWrapper();
|
||||
|
||||
async function openFormDialog() {
|
||||
const crudOptions: any = {
|
||||
columns: {
|
||||
when: {
|
||||
title: "触发时机",
|
||||
form: {
|
||||
value: ["error", "turnToSuccess"],
|
||||
component: {
|
||||
name: "a-select",
|
||||
vModel: "value",
|
||||
mode: "multiple",
|
||||
options: [
|
||||
{ value: "start", label: "开始时" },
|
||||
{ value: "success", label: "成功时" },
|
||||
{ value: "turnToSuccess", label: "失败转成功时" },
|
||||
{ value: "error", label: "失败时" },
|
||||
],
|
||||
},
|
||||
helper: `建议仅选择'失败时'和'失败转成功'两种即可`,
|
||||
rules: [{ required: true, message: "此项必填" }],
|
||||
},
|
||||
},
|
||||
notificationId: {
|
||||
title: "通知配置",
|
||||
form: {
|
||||
component: {
|
||||
name: NotificationSelector,
|
||||
on: {
|
||||
selectedChange({ form, $event }: any) {
|
||||
form.title = $event?.name || "通知";
|
||||
},
|
||||
},
|
||||
},
|
||||
helper: "请选择通知方式",
|
||||
rules: [{ required: true, message: "此项必填" }],
|
||||
},
|
||||
},
|
||||
},
|
||||
form: {
|
||||
mode: "edit",
|
||||
//@ts-ignore
|
||||
async doSubmit({ form }) {
|
||||
await batchUpdateRequest(form);
|
||||
},
|
||||
col: {
|
||||
span: 22,
|
||||
},
|
||||
labelCol: {
|
||||
style: {
|
||||
width: "100px",
|
||||
},
|
||||
},
|
||||
wrapper: {
|
||||
title: "批量修改通知",
|
||||
width: 600,
|
||||
},
|
||||
},
|
||||
} as any;
|
||||
await openCrudFormDialog({ crudOptions });
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<fs-button icon="mdi:format-list-group" type="link" text="修改定时" @click="openFormDialog"></fs-button>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import * as api from "../api";
|
||||
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||
|
||||
const props = defineProps<{
|
||||
selectedRowKeys: any[];
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
change: any;
|
||||
}>();
|
||||
async function batchUpdateRequest(form: any) {
|
||||
await api.BatchUpdateTrigger(props.selectedRowKeys, {
|
||||
title: "定时触发",
|
||||
type: "timer",
|
||||
props: form.props,
|
||||
});
|
||||
emit("change");
|
||||
}
|
||||
|
||||
const { openCrudFormDialog } = useFormWrapper();
|
||||
|
||||
async function openFormDialog() {
|
||||
const crudOptions: any = {
|
||||
columns: {
|
||||
"props.cron": {
|
||||
title: "定时",
|
||||
form: {
|
||||
component: {
|
||||
name: "cron-editor",
|
||||
vModel: "modelValue",
|
||||
},
|
||||
rules: [{ required: true, message: "请选择定时Cron" }],
|
||||
},
|
||||
},
|
||||
},
|
||||
form: {
|
||||
mode: "edit",
|
||||
//@ts-ignore
|
||||
async doSubmit({ form }) {
|
||||
await batchUpdateRequest(form);
|
||||
},
|
||||
col: {
|
||||
span: 22,
|
||||
},
|
||||
labelCol: {
|
||||
style: {
|
||||
width: "100px",
|
||||
},
|
||||
},
|
||||
wrapper: {
|
||||
title: "批量修改定时",
|
||||
width: 600,
|
||||
},
|
||||
},
|
||||
} as any;
|
||||
await openCrudFormDialog({ crudOptions });
|
||||
}
|
||||
</script>
|
||||
@@ -7,9 +7,11 @@
|
||||
<div v-if="selectedRowKeys.length > 0" class="batch-actions">
|
||||
<div class="batch-actions-inner">
|
||||
<span> 已选择 {{ selectedRowKeys.length }} 项 </span>
|
||||
<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>
|
||||
<fs-button icon="ion:trash-outline" class="color-red" type="link" text="批量删除" @click="batchDelete"></fs-button>
|
||||
<fs-button icon="icon-park-outline:replay-music" class="need-plus" type="link" text="强制重新运行" @click="batchRerun"></fs-button>
|
||||
<change-group class="color-green" :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-group>
|
||||
<change-notification class="color-green" :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-notification>
|
||||
<change-trigger class="color-green" :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-trigger>
|
||||
</div>
|
||||
</div>
|
||||
<template #actionbar-right> </template>
|
||||
@@ -26,8 +28,10 @@ import { dict, useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import PiCertdForm from "./certd-form/index.vue";
|
||||
import ChangeGroup from "./components/change-group.vue";
|
||||
import ChangeTrigger from "./components/change-trigger.vue";
|
||||
import { Modal, notification } from "ant-design-vue";
|
||||
import * as api from "./api";
|
||||
import ChangeNotification from "/@/views/certd/pipeline/components/change-notification.vue";
|
||||
|
||||
defineOptions({
|
||||
name: "PipelineManager",
|
||||
@@ -55,7 +59,7 @@ onActivated(async () => {
|
||||
await crudExpose.doRefresh();
|
||||
});
|
||||
|
||||
function groupChanged() {
|
||||
function batchFinished() {
|
||||
crudExpose.doRefresh();
|
||||
selectedRowKeys.value = [];
|
||||
}
|
||||
|
||||
@@ -24,17 +24,17 @@
|
||||
disabled: !editMode,
|
||||
options: [
|
||||
{ value: 'email', label: '邮件' },
|
||||
{ value: 'other', label: '其他通知方式' }
|
||||
]
|
||||
{ value: 'other', label: '其他通知方式' },
|
||||
],
|
||||
},
|
||||
rules: [{ required: true, message: '此项必填' }]
|
||||
rules: [{ required: true, message: '此项必填' }],
|
||||
}"
|
||||
/>
|
||||
<fs-form-item
|
||||
v-model="currentNotification.when"
|
||||
:item="{
|
||||
title: '触发时机',
|
||||
key: 'type',
|
||||
key: 'when',
|
||||
value: ['error'],
|
||||
component: {
|
||||
name: 'a-select',
|
||||
@@ -45,11 +45,11 @@
|
||||
{ value: 'start', label: '开始时' },
|
||||
{ value: 'success', label: '成功时' },
|
||||
{ value: 'turnToSuccess', label: '失败转成功时' },
|
||||
{ value: 'error', label: '失败时' }
|
||||
]
|
||||
{ value: 'error', label: '失败时' },
|
||||
],
|
||||
},
|
||||
helper: `建议仅选择'失败时'和'失败转成功'两种即可`,
|
||||
rules: [{ required: true, message: '此项必填' }]
|
||||
rules: [{ required: true, message: '此项必填' }],
|
||||
}"
|
||||
/>
|
||||
<pi-notification-form-email v-if="currentNotification.type === 'email'" ref="optionsRef" v-model:options="currentNotification.options"></pi-notification-form-email>
|
||||
@@ -59,14 +59,14 @@
|
||||
v-model="currentNotification.notificationId"
|
||||
:item="{
|
||||
title: '通知配置',
|
||||
key: 'type',
|
||||
key: 'notificationId',
|
||||
component: {
|
||||
disabled: !editMode,
|
||||
name: NotificationSelector,
|
||||
onSelectedChange
|
||||
onSelectedChange,
|
||||
},
|
||||
helper: '请选择通知方式',
|
||||
rules: [{ required: true, message: '此项必填' }]
|
||||
rules: [{ required: true, message: '此项必填' }],
|
||||
}"
|
||||
/>
|
||||
</a-form>
|
||||
@@ -96,8 +96,8 @@ export default {
|
||||
props: {
|
||||
editMode: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
emits: ["update"],
|
||||
setup(props: any, context: any) {
|
||||
@@ -118,23 +118,23 @@ export default {
|
||||
{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择类型"
|
||||
}
|
||||
message: "请选择类型",
|
||||
},
|
||||
],
|
||||
when: [
|
||||
{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择通知时机"
|
||||
}
|
||||
message: "请选择通知时机",
|
||||
},
|
||||
],
|
||||
notificationId: [
|
||||
{
|
||||
type: "number",
|
||||
required: true,
|
||||
message: "请选择通知配置"
|
||||
}
|
||||
]
|
||||
message: "请选择通知配置",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const notificationDrawerShow = () => {
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
async onOk() {
|
||||
callback.value("delete");
|
||||
notificationDrawerClose();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -222,21 +222,21 @@ export default {
|
||||
notificationDelete,
|
||||
rules,
|
||||
blankFn,
|
||||
optionsRef
|
||||
optionsRef,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
...useNotificationForm(),
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 16 }
|
||||
wrapperCol: { span: 16 },
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
NotificationSelector() {
|
||||
return NotificationSelector;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -119,6 +119,31 @@ export default {
|
||||
logs: [],
|
||||
});
|
||||
}
|
||||
|
||||
async function scrollBottom(node: any, force = false) {
|
||||
let el = document.querySelector(`.pi-task-view-logs.id-${node.node.id}`);
|
||||
if (!el) {
|
||||
return;
|
||||
}
|
||||
//判断当前是否在底部
|
||||
let isBottom = true;
|
||||
if (el) {
|
||||
isBottom = el.scrollHeight - el.scrollTop - el.clientHeight < 5;
|
||||
}
|
||||
if (force) {
|
||||
isBottom = true;
|
||||
}
|
||||
await nextTick();
|
||||
el = document.querySelector(`.pi-task-view-logs.id-${node.node.id}`);
|
||||
//如果在底部则滚动到底部
|
||||
if (isBottom && el) {
|
||||
el?.scrollTo({
|
||||
top: el.scrollHeight,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
for (let node of nodes) {
|
||||
if (currentHistory?.value?.logs != null) {
|
||||
node.logs = computed(() => {
|
||||
@@ -146,30 +171,12 @@ export default {
|
||||
return node.logs.value.length;
|
||||
},
|
||||
async () => {
|
||||
let el = document.querySelector(`.pi-task-view-logs.id-${node.node.id}`);
|
||||
if (!el) {
|
||||
return;
|
||||
}
|
||||
//判断当前是否在底部
|
||||
let isBottom = true;
|
||||
if (el) {
|
||||
isBottom = el.scrollHeight - el.scrollTop - el.clientHeight < 5;
|
||||
console.log("isBottom", isBottom, el.scrollHeight, el.scrollTop, el.clientHeight);
|
||||
}
|
||||
await nextTick();
|
||||
el = document.querySelector(`.pi-task-view-logs.id-${node.node.id}`);
|
||||
//如果在底部则滚动到底部
|
||||
if (isBottom && el) {
|
||||
el?.scrollTo({
|
||||
top: el.scrollHeight,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
await scrollBottom(node);
|
||||
}
|
||||
);
|
||||
nextTick(() => {
|
||||
scrollBottom(node, true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,8 +185,6 @@ export default {
|
||||
}
|
||||
|
||||
detail.value = { nodes };
|
||||
|
||||
console.log("nodes", nodes);
|
||||
};
|
||||
|
||||
const taskViewClose = () => {
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
v-model:open="triggerDrawerVisible"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
width="650px"
|
||||
class="pi-trigger-form"
|
||||
@after-open-change="triggerDrawerOnAfterVisibleChange"
|
||||
>
|
||||
<a-drawer v-model:open="triggerDrawerVisible" placement="right" :closable="true" width="650px" class="pi-trigger-form" @after-open-change="triggerDrawerOnAfterVisibleChange">
|
||||
<template #title>
|
||||
<div>
|
||||
编辑触发器
|
||||
@@ -26,9 +19,9 @@
|
||||
component: {
|
||||
name: 'a-input',
|
||||
vModel: 'value',
|
||||
disabled: !editMode
|
||||
disabled: !editMode,
|
||||
},
|
||||
rules: [{ required: true, message: '此项必填' }]
|
||||
rules: [{ required: true, message: '此项必填' }],
|
||||
}"
|
||||
/>
|
||||
|
||||
@@ -42,9 +35,9 @@
|
||||
name: 'a-select',
|
||||
vModel: 'value',
|
||||
disabled: !editMode,
|
||||
options: [{ value: 'timer', label: '定时' }]
|
||||
options: [{ value: 'timer', label: '定时' }],
|
||||
},
|
||||
rules: [{ required: true, message: '此项必填' }]
|
||||
rules: [{ required: true, message: '此项必填' }],
|
||||
}"
|
||||
/>
|
||||
|
||||
@@ -56,10 +49,10 @@
|
||||
component: {
|
||||
disabled: !editMode,
|
||||
name: 'cron-editor',
|
||||
vModel: 'modelValue'
|
||||
vModel: 'modelValue',
|
||||
},
|
||||
helper: '点击上面的按钮,选择每天几点定时执行。\n建议设置为每天触发一次,证书未到期之前任务会跳过,不会重复执行',
|
||||
rules: [{ required: true, message: '此项必填' }]
|
||||
rules: [{ required: true, message: '此项必填' }],
|
||||
}"
|
||||
/>
|
||||
</a-form>
|
||||
@@ -84,8 +77,8 @@ export default {
|
||||
props: {
|
||||
editMode: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
emits: ["update"],
|
||||
setup(props, context) {
|
||||
@@ -105,9 +98,9 @@ export default {
|
||||
{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入名称"
|
||||
}
|
||||
]
|
||||
message: "请输入名称",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const triggerDrawerShow = () => {
|
||||
@@ -117,7 +110,7 @@ export default {
|
||||
triggerDrawerVisible.value = false;
|
||||
};
|
||||
|
||||
const triggerDrawerOnAfterVisibleChange = (val) => {
|
||||
const triggerDrawerOnAfterVisibleChange = val => {
|
||||
console.log("triggerDrawerOnAfterVisibleChange", val);
|
||||
};
|
||||
|
||||
@@ -128,7 +121,7 @@ export default {
|
||||
triggerDrawerShow();
|
||||
};
|
||||
|
||||
const triggerAdd = (emit) => {
|
||||
const triggerAdd = emit => {
|
||||
mode.value = "add";
|
||||
const trigger = { id: nanoid(), title: "定时触发", type: "timer", props: {} };
|
||||
triggerOpen(trigger, emit);
|
||||
@@ -144,7 +137,7 @@ export default {
|
||||
triggerOpen(trigger, emit);
|
||||
};
|
||||
|
||||
const triggerSave = async (e) => {
|
||||
const triggerSave = async e => {
|
||||
console.log("currentTriggerSave", currentTrigger.value);
|
||||
try {
|
||||
await triggerFormRef.value.validate();
|
||||
@@ -164,7 +157,7 @@ export default {
|
||||
async onOk() {
|
||||
callback.value("delete");
|
||||
triggerDrawerClose();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -185,16 +178,16 @@ export default {
|
||||
triggerSave,
|
||||
triggerDelete,
|
||||
rules,
|
||||
blankFn
|
||||
blankFn,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
...useTriggerForm(),
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 16 }
|
||||
wrapperCol: { span: 16 },
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -26,4 +26,4 @@ typeorm:
|
||||
|
||||
account:
|
||||
server:
|
||||
baseUrl: 'http://127.0.0.1:1017/subject'
|
||||
baseUrl: 'http://localhost:1017/subject'
|
||||
|
||||
@@ -3,6 +3,16 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 腾讯云授权支持设置是否国际站,部署到EO插件支持国际站 ([5cd3968](https://github.com/certd/certd/commit/5cd3968929acef333cf30d3b20cf21cea6c82c5f))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持批量修改通知和定时 ([e11b3be](https://github.com/certd/certd/commit/e11b3becfd4abe6547e84d09adc38ebd6e1c4b87))
|
||||
|
||||
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-server",
|
||||
"version": "1.35.4",
|
||||
"version": "1.35.5",
|
||||
"description": "fast-server base midway",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
@@ -42,20 +42,20 @@
|
||||
"@aws-sdk/client-cloudfront": "^3.699.0",
|
||||
"@aws-sdk/client-iam": "^3.699.0",
|
||||
"@aws-sdk/client-s3": "^3.705.0",
|
||||
"@certd/acme-client": "^1.35.4",
|
||||
"@certd/basic": "^1.35.4",
|
||||
"@certd/commercial-core": "^1.35.4",
|
||||
"@certd/acme-client": "^1.35.5",
|
||||
"@certd/basic": "^1.35.5",
|
||||
"@certd/commercial-core": "^1.35.5",
|
||||
"@certd/cv4pve-api-javascript": "^8.4.1",
|
||||
"@certd/jdcloud": "^1.35.4",
|
||||
"@certd/lib-huawei": "^1.35.4",
|
||||
"@certd/lib-k8s": "^1.35.4",
|
||||
"@certd/lib-server": "^1.35.4",
|
||||
"@certd/midway-flyway-js": "^1.35.4",
|
||||
"@certd/pipeline": "^1.35.4",
|
||||
"@certd/plugin-cert": "^1.35.4",
|
||||
"@certd/plugin-lib": "^1.35.4",
|
||||
"@certd/plugin-plus": "^1.35.4",
|
||||
"@certd/plus-core": "^1.35.4",
|
||||
"@certd/jdcloud": "^1.35.5",
|
||||
"@certd/lib-huawei": "^1.35.5",
|
||||
"@certd/lib-k8s": "^1.35.5",
|
||||
"@certd/lib-server": "^1.35.5",
|
||||
"@certd/midway-flyway-js": "^1.35.5",
|
||||
"@certd/pipeline": "^1.35.5",
|
||||
"@certd/plugin-cert": "^1.35.5",
|
||||
"@certd/plugin-lib": "^1.35.5",
|
||||
"@certd/plugin-plus": "^1.35.5",
|
||||
"@certd/plus-core": "^1.35.5",
|
||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
||||
"@koa/cors": "^5.0.0",
|
||||
|
||||
@@ -123,6 +123,19 @@ export class PipelineController extends CrudController<PipelineService> {
|
||||
return this.ok({});
|
||||
}
|
||||
|
||||
|
||||
@Post('/batchUpdateTrigger', { summary: Constants.per.authOnly })
|
||||
async batchUpdateTrigger(@Body('ids') ids: number[], @Body('trigger') trigger: any) {
|
||||
await this.service.batchUpdateTrigger(ids, trigger, this.getUserId());
|
||||
return this.ok({});
|
||||
}
|
||||
|
||||
@Post('/batchUpdateNotification', { summary: Constants.per.authOnly })
|
||||
async batchUpdateNotification(@Body('ids') ids: number[], @Body('notification') notification: any) {
|
||||
await this.service.batchUpdateNotifications(ids, notification, this.getUserId());
|
||||
return this.ok({});
|
||||
}
|
||||
|
||||
@Post('/batchRerun', { summary: Constants.per.authOnly })
|
||||
async batchRerun(@Body('ids') ids: number[]) {
|
||||
await this.service.batchRerun(ids, this.getUserId());
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
Executor,
|
||||
IAccessService,
|
||||
ICnameProxyService,
|
||||
INotificationService,
|
||||
INotificationService, Notification,
|
||||
Pipeline,
|
||||
ResultType,
|
||||
RunHistory,
|
||||
@@ -45,6 +45,7 @@ import {NotificationService} from "./notification-service.js";
|
||||
import {UserSuiteEntity, UserSuiteService} from "@certd/commercial-core";
|
||||
import {CertInfoService} from "../../monitor/service/cert-info-service.js";
|
||||
import {TaskServiceBuilder} from "./task-service-getter.js";
|
||||
import {nanoid} from "nanoid";
|
||||
|
||||
const runningTasks: Map<string | number, Executor> = new Map();
|
||||
|
||||
@@ -149,8 +150,17 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
const info = await this.info(pipelineId);
|
||||
if (info && !info.disabled) {
|
||||
const pipeline = JSON.parse(info.content);
|
||||
// 手动触发,不要await
|
||||
this.registerTriggers(pipeline);
|
||||
this.registerTriggers(pipeline,false);
|
||||
}
|
||||
}
|
||||
|
||||
public async registerTrigger(info:PipelineEntity) {
|
||||
if (info == null) {
|
||||
return;
|
||||
}
|
||||
if (info && !info.disabled) {
|
||||
const pipeline = JSON.parse(info.content);
|
||||
this.registerTriggers(pipeline,false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,10 +184,11 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
//修改
|
||||
old = await this.info(bean.id);
|
||||
}
|
||||
const pipeline = JSON.parse(bean.content || '{}');
|
||||
RunnableCollection.initPipelineRunnableType(pipeline);
|
||||
const isUpdate = bean.id > 0 && old != null;
|
||||
|
||||
|
||||
const pipeline = JSON.parse(bean.content || '{}');
|
||||
RunnableCollection.initPipelineRunnableType(pipeline);
|
||||
let domains = [];
|
||||
if (pipeline.stages) {
|
||||
RunnableCollection.each(pipeline.stages, (runnable: any) => {
|
||||
@@ -199,22 +210,32 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
//如果是添加,先保存一下,获取到id,更新pipeline.id
|
||||
await this.addOrUpdate(bean);
|
||||
}
|
||||
await this.clearTriggers(bean.id);
|
||||
|
||||
await this.doUpdatePipelineJson(bean, pipeline);
|
||||
|
||||
//保存域名信息到certInfo表
|
||||
let fromType = 'pipeline';
|
||||
if (bean.type === 'cert_upload') {
|
||||
fromType = 'upload';
|
||||
}
|
||||
await this.certInfoService.updateDomains(pipeline.id, pipeline.userId || bean.userId, domains, fromType);
|
||||
return bean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新Pipeline, 包括trigger
|
||||
* @param bean
|
||||
* @param pipeline
|
||||
*/
|
||||
async doUpdatePipelineJson(bean: PipelineEntity, pipeline:Pipeline) {
|
||||
await this.clearTriggers(bean);
|
||||
if (pipeline.title) {
|
||||
bean.title = pipeline.title;
|
||||
}
|
||||
pipeline.id = bean.id;
|
||||
bean.content = JSON.stringify(pipeline);
|
||||
await this.addOrUpdate(bean);
|
||||
await this.registerTriggerById(bean.id);
|
||||
|
||||
//保存域名信息到certInfo表
|
||||
let fromType = 'pipeline';
|
||||
if(bean.type === 'cert_upload') {
|
||||
fromType = 'upload';
|
||||
}
|
||||
await this.certInfoService.updateDomains(pipeline.id, pipeline.userId || bean.userId, domains,fromType);
|
||||
return bean;
|
||||
await this.registerTrigger(bean);
|
||||
}
|
||||
|
||||
private async checkMaxPipelineCount(bean: PipelineEntity, pipeline: Pipeline, domains: string[]) {
|
||||
@@ -375,11 +396,16 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
await this.certInfoService.deleteByPipelineId(id);
|
||||
}
|
||||
|
||||
async clearTriggers(id: number) {
|
||||
async clearTriggers(id: number | PipelineEntity) {
|
||||
if (id == null) {
|
||||
return;
|
||||
}
|
||||
const pipeline = await this.info(id);
|
||||
let pipeline:PipelineEntity = null
|
||||
if (typeof id === 'number') {
|
||||
pipeline = await this.info(id);
|
||||
}else{
|
||||
pipeline = id
|
||||
}
|
||||
if (!pipeline) {
|
||||
return;
|
||||
}
|
||||
@@ -703,6 +729,58 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
{ groupId }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
async batchUpdateTrigger(ids: number[], trigger: any, userId: any){
|
||||
|
||||
const list = await this.find({
|
||||
where:{
|
||||
id: In(ids),
|
||||
userId
|
||||
}
|
||||
})
|
||||
|
||||
for (const item of list) {
|
||||
const pipeline = JSON.parse(item.content);
|
||||
pipeline.triggers = [{
|
||||
id: nanoid(),
|
||||
title: '定时触发',
|
||||
...trigger
|
||||
}]
|
||||
await this.doUpdatePipelineJson(item,pipeline)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async batchUpdateNotifications(ids: number[], notification: Notification, userId: any){
|
||||
|
||||
const list = await this.find({
|
||||
where:{
|
||||
id: In(ids),
|
||||
userId
|
||||
}
|
||||
})
|
||||
|
||||
for (const item of list) {
|
||||
const pipeline = JSON.parse(item.content);
|
||||
pipeline.notifications = [{
|
||||
id: nanoid(),
|
||||
title: '通知',
|
||||
/**
|
||||
* type: NotificationType;
|
||||
* when: NotificationWhen[];
|
||||
* options: EmailOptions;
|
||||
* notificationId: number;
|
||||
* title: string;
|
||||
* subType: string;
|
||||
*/
|
||||
type: "other",
|
||||
...notification
|
||||
}]
|
||||
await this.doUpdatePipelineJson(item,pipeline)
|
||||
}
|
||||
}
|
||||
|
||||
async batchRerun(ids: number[], userId: any) {
|
||||
if (!isPlus()){
|
||||
throw new NeedVIPException("此功能需要升级专业版")
|
||||
|
||||
@@ -89,6 +89,7 @@ export class DeployCertToTencentEO extends AbstractTaskPlugin {
|
||||
getClient(accessProvider: TencentAccess) {
|
||||
const TeoClient = this.Client;
|
||||
|
||||
const endpoint = accessProvider.isIntl()?"teo.intl.tencentcloudapi.com": "teo.tencentcloudapi.com";
|
||||
const clientConfig = {
|
||||
credential: {
|
||||
secretId: accessProvider.secretId,
|
||||
@@ -97,7 +98,7 @@ export class DeployCertToTencentEO extends AbstractTaskPlugin {
|
||||
region: '',
|
||||
profile: {
|
||||
httpProfile: {
|
||||
endpoint: 'teo.tencentcloudapi.com',
|
||||
endpoint,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user