mirror of
https://github.com/certd/certd.git
synced 2026-05-01 02:17:27 +08:00
Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 590ff67fcb | |||
| 209e1adf53 | |||
| 53c08484a3 | |||
| c6ca832737 | |||
| 853fdc70a2 | |||
| dc4f811eaa | |||
| d23c8b4a2a | |||
| 00c0dcc81d | |||
| f77feefdb8 | |||
| 2e346e5369 | |||
| 17023f6b55 | |||
| 3bb29abe32 | |||
| ac42d38b7a | |||
| d9c0130b59 | |||
| 4925d5a5e7 | |||
| dd9a7cf5d7 | |||
| 5ee3874b7e | |||
| 17dd77cc96 | |||
| 6c546b5290 | |||
| a853fc2026 | |||
| 92c9ac3826 | |||
| 78c2ced43b | |||
| 72f850f675 | |||
| bc326489ab | |||
| ea5e7d9563 | |||
| 5b5b48fc06 | |||
| 1548ba0b8d | |||
| 26b1c4244f | |||
| 8a4e981931 | |||
| 6163c3f08e | |||
| e17f381b1f | |||
| 316537eb4d | |||
| b2c421600c | |||
| 787f6ef528 | |||
| 8578547467 | |||
| 51ab6d6da1 |
@@ -43,7 +43,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
time: '10' # for 60 seconds
|
time: '10' # for 60 seconds
|
||||||
- name: deploy-certd-demo
|
- name: deploy-certd-demo
|
||||||
uses: tyrrrz/action-http-request@master
|
uses: tyrrrz/action-http-request@prime
|
||||||
with:
|
with:
|
||||||
# 通过webhook 触发 certd-demo来部署
|
# 通过webhook 触发 certd-demo来部署
|
||||||
url: ${{ secrets.WEBHOOK_CERTD_DEMO }}
|
url: ${{ secrets.WEBHOOK_CERTD_DEMO }}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ jobs:
|
|||||||
# greper/certd-agent:latest
|
# greper/certd-agent:latest
|
||||||
# greper/certd-agent:${{steps.get_certd_version.outputs.result}}
|
# greper/certd-agent:${{steps.get_certd_version.outputs.result}}
|
||||||
- name: deploy-certd-doc
|
- name: deploy-certd-doc
|
||||||
uses: tyrrrz/action-http-request@master
|
uses: tyrrrz/action-http-request@prime
|
||||||
with:
|
with:
|
||||||
url: ${{ secrets.WEBHOOK_CERTD_DOC }}
|
url: ${{ secrets.WEBHOOK_CERTD_DOC }}
|
||||||
method: POST
|
method: POST
|
||||||
|
|||||||
@@ -3,6 +3,45 @@
|
|||||||
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.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复企业管理模式下,切换用户登录后,丢失项目列表的bug ([d23c8b4](https://github.com/certd/certd/commit/d23c8b4a2a5f5ab17822c6ee1d4108ac7280b9d1))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持迁移个人数据到企业项目中 ([c6ca832](https://github.com/certd/certd/commit/c6ca83273779ed84de1b23b5e477063af043d015))
|
||||||
|
* install tip ([853fdc7](https://github.com/certd/certd/commit/853fdc70a263b62d75c9ff3970607e6bf1c1593b))
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复部署到openwrt错误的bug ([2e3d0cc](https://github.com/certd/certd/commit/2e3d0cc57c16c48ad435bc8fde729bacaedde9f5))
|
||||||
|
* 修复发件邮箱无法输入的bug ([27b0348](https://github.com/certd/certd/commit/27b0348e1d3d752f418f851965d6afbc26c0160c))
|
||||||
|
* 修复复制流水线保存后丢失分组和排序号的问题 ([bc32648](https://github.com/certd/certd/commit/bc326489abc1d50a0930b4f47aa2d62d3a486798))
|
||||||
|
* 修复获取群辉deviceid报错的bug ([79be392](https://github.com/certd/certd/commit/79be392775a2c91848dd5a66a2618adc4e4b48f6))
|
||||||
|
* 修复京东云域名申请证书报错的bug ([d9c0130](https://github.com/certd/certd/commit/d9c0130b59997144a3c274d456635b800135e43f))
|
||||||
|
* 修复偶尔下载证书报未授权的错误 ([316537e](https://github.com/certd/certd/commit/316537eb4dcbe5ec57784e8bf95ee3cdfd21dce7))
|
||||||
|
* 修复dcdn多个域名同时部署时 可能会出现证书名称重复的bug ([78c2ced](https://github.com/certd/certd/commit/78c2ced43b1a73d142b0ed783b162b97f545ab06))
|
||||||
|
* 优化dcdn部署上传多次证书 偶尔报 The CertName already exists的问题 ([72f850f](https://github.com/certd/certd/commit/72f850f675b500d12ebff2338d1b99d6fab476e1))
|
||||||
|
* **cert-plugin:** 优化又拍云客户端错误处理逻辑,当域名已绑定证书时不再抛出异常。 ([92c9ac3](https://github.com/certd/certd/commit/92c9ac382692e6c84140ff787759ab6d39ccbe96))
|
||||||
|
* esxi部署失败的bug ([1e44115](https://github.com/certd/certd/commit/1e441154617e6516a9a3610412bf597128c62696))
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* 支持企业级管理模式,项目管理,细分权限 ([3734083](https://github.com/certd/certd/commit/37340838b6a61a94b86bfa13cf5da88b26f1315a))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 【破坏性更新】错误返回信息msg字段名统一改成message,与成功的返回结构一致 ([51ab6d6](https://github.com/certd/certd/commit/51ab6d6da1bb551b55b3a6a4a9a945c8d6ace806))
|
||||||
|
* 当域名管理中没有域名时,创建流水线时不展开域名选择框 ([bb0afe1](https://github.com/certd/certd/commit/bb0afe1fa7b0fc52fde051d24fbe6be69d52f4cc))
|
||||||
|
* 任务步骤页面增加串行执行提示说明 ([787f6ef](https://github.com/certd/certd/commit/787f6ef52893d8dc912ee2a7a5b8ce2b73c108c9))
|
||||||
|
* 站点监控支持指定ip地址检查 ([83d81b6](https://github.com/certd/certd/commit/83d81b64b3adb375366039e07c87d1ad79121c13))
|
||||||
|
* AI开发插件 skills 定义初步 ([1f68fad](https://github.com/certd/certd/commit/1f68faddb97a978c5a5e731a8895b4bb0587ad83))
|
||||||
|
* http请求增加建立连接超时配置 ([3c85602](https://github.com/certd/certd/commit/3c85602ab1fc1953cdc06a6cd75a971d14119179))
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
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.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复部署到openwrt错误的bug ([2e3d0cc](https://github.com/certd/certd/commit/2e3d0cc57c16c48ad435bc8fde729bacaedde9f5))
|
||||||
|
* 修复发件邮箱无法输入的bug ([27b0348](https://github.com/certd/certd/commit/27b0348e1d3d752f418f851965d6afbc26c0160c))
|
||||||
|
* 修复复制流水线保存后丢失分组和排序号的问题 ([bc32648](https://github.com/certd/certd/commit/bc326489abc1d50a0930b4f47aa2d62d3a486798))
|
||||||
|
* 修复获取群辉deviceid报错的bug ([79be392](https://github.com/certd/certd/commit/79be392775a2c91848dd5a66a2618adc4e4b48f6))
|
||||||
|
* 修复京东云域名申请证书报错的bug ([d9c0130](https://github.com/certd/certd/commit/d9c0130b59997144a3c274d456635b800135e43f))
|
||||||
|
* 修复偶尔下载证书报未授权的错误 ([316537e](https://github.com/certd/certd/commit/316537eb4dcbe5ec57784e8bf95ee3cdfd21dce7))
|
||||||
|
* 修复dcdn多个域名同时部署时 可能会出现证书名称重复的bug ([78c2ced](https://github.com/certd/certd/commit/78c2ced43b1a73d142b0ed783b162b97f545ab06))
|
||||||
|
* 优化dcdn部署上传多次证书 偶尔报 The CertName already exists的问题 ([72f850f](https://github.com/certd/certd/commit/72f850f675b500d12ebff2338d1b99d6fab476e1))
|
||||||
|
* **cert-plugin:** 优化又拍云客户端错误处理逻辑,当域名已绑定证书时不再抛出异常。 ([92c9ac3](https://github.com/certd/certd/commit/92c9ac382692e6c84140ff787759ab6d39ccbe96))
|
||||||
|
* esxi部署失败的bug ([1e44115](https://github.com/certd/certd/commit/1e441154617e6516a9a3610412bf597128c62696))
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* 支持企业级管理模式,项目管理,细分权限 ([3734083](https://github.com/certd/certd/commit/37340838b6a61a94b86bfa13cf5da88b26f1315a))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 【破坏性更新】错误返回信息msg字段名统一改成message,与成功的返回结构一致 ([51ab6d6](https://github.com/certd/certd/commit/51ab6d6da1bb551b55b3a6a4a9a945c8d6ace806))
|
||||||
|
* 当域名管理中没有域名时,创建流水线时不展开域名选择框 ([bb0afe1](https://github.com/certd/certd/commit/bb0afe1fa7b0fc52fde051d24fbe6be69d52f4cc))
|
||||||
|
* 任务步骤页面增加串行执行提示说明 ([787f6ef](https://github.com/certd/certd/commit/787f6ef52893d8dc912ee2a7a5b8ce2b73c108c9))
|
||||||
|
* 站点监控支持指定ip地址检查 ([83d81b6](https://github.com/certd/certd/commit/83d81b64b3adb375366039e07c87d1ad79121c13))
|
||||||
|
* AI开发插件 skills 定义初步 ([1f68fad](https://github.com/certd/certd/commit/1f68faddb97a978c5a5e731a8895b4bb0587ad83))
|
||||||
|
* http请求增加建立连接超时配置 ([3c85602](https://github.com/certd/certd/commit/3c85602ab1fc1953cdc06a6cd75a971d14119179))
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ https://1panel.cn/docs/installation/online_installation/
|
|||||||
|
|
||||||

|

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

|

|
||||||
|
|
||||||
#### 1.2 访问测试:
|
#### 1.2 访问测试:
|
||||||
@@ -40,6 +39,9 @@ admin/123456
|
|||||||
1. 打开`docker-compose.yaml`,整个内容复制下来
|
1. 打开`docker-compose.yaml`,整个内容复制下来
|
||||||
https://gitee.com/certd/certd/raw/v2/docker/run/docker-compose.yaml
|
https://gitee.com/certd/certd/raw/v2/docker/run/docker-compose.yaml
|
||||||
|
|
||||||
|
::: tip
|
||||||
|
默认使用SQLite数据库,如果需要使用MySQL、PostgreSQL数据库,请参考[多数据库支持](./install/database.md)
|
||||||
|
:::
|
||||||
|
|
||||||
2. 然后到 `1Panel->容器->编排->新建编排`
|
2. 然后到 `1Panel->容器->编排->新建编排`
|
||||||
输入名称,粘贴`docker-compose.yaml`原文内容
|
输入名称,粘贴`docker-compose.yaml`原文内容
|
||||||
@@ -49,7 +51,10 @@ admin/123456
|
|||||||

|

|
||||||
|
|
||||||
> 默认使用sqlite数据库,数据保存在`/data/certd`目录下,您可以手动备份该目录
|
> 默认使用sqlite数据库,数据保存在`/data/certd`目录下,您可以手动备份该目录
|
||||||
> certd还支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../database)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### 2.2 访问测试
|
#### 2.2 访问测试
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,9 @@
|
|||||||
点击确定,等待启动完成
|
点击确定,等待启动完成
|
||||||

|

|
||||||
|
|
||||||
> certd默认使用sqlite数据库,另外支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../database)
|
::: tip
|
||||||
|
默认安装使用SQLite数据库,如果需要使用MySQL、PostgreSQL数据库,请参考[多数据库支持](./install/database.md)
|
||||||
|
:::
|
||||||
|
|
||||||
|
|
||||||
## 二、访问应用
|
## 二、访问应用
|
||||||
|
|||||||
@@ -42,8 +42,9 @@ docker compose up -d
|
|||||||
> 如果提示 没有docker compose命令,请安装docker-compose
|
> 如果提示 没有docker compose命令,请安装docker-compose
|
||||||
> https://docs.docker.com/compose/install/linux/
|
> https://docs.docker.com/compose/install/linux/
|
||||||
|
|
||||||
> certd默认使用sqlite数据库,另外还支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../database)
|
::: tip
|
||||||
|
默认安装使用SQLite数据库,如果需要使用MySQL、PostgreSQL数据库,请参考[多数据库支持](./install/database.md)
|
||||||
|
:::
|
||||||
|
|
||||||
### 3. 访问测试
|
### 3. 访问测试
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ https://certd.handsfree.work/
|
|||||||
2. [Docker方式部署](./install/docker/)
|
2. [Docker方式部署](./install/docker/)
|
||||||
3. [源码方式部署](./install/source/)
|
3. [源码方式部署](./install/source/)
|
||||||
|
|
||||||
|
::: tip
|
||||||
|
默认安装使用SQLite数据库,如果需要使用MySQL、PostgreSQL数据库,请参考[多数据库支持](./install/database.md)
|
||||||
|
:::
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 2. 访问测试
|
### 2. 访问测试
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -9,5 +9,5 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmClient": "pnpm",
|
"npmClient": "pnpm",
|
||||||
"version": "1.38.12"
|
"version": "1.39.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/publishlab/node-acme-client/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/publishlab/node-acme-client/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
## [1.38.12](https://github.com/publishlab/node-acme-client/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/publishlab/node-acme-client/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/acme-client
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"description": "Simple and unopinionated ACME client",
|
"description": "Simple and unopinionated ACME client",
|
||||||
"private": false,
|
"private": false,
|
||||||
"author": "nmorsman",
|
"author": "nmorsman",
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"module": "scr/index.js",
|
"module": "scr/index.js",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"types"
|
"types"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.38.12",
|
"@certd/basic": "^1.39.1",
|
||||||
"@peculiar/x509": "^1.11.0",
|
"@peculiar/x509": "^1.11.0",
|
||||||
"asn1js": "^3.0.5",
|
"asn1js": "^3.0.5",
|
||||||
"axios": "^1.9.0",
|
"axios": "^1.9.0",
|
||||||
@@ -70,5 +70,5 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||||
},
|
},
|
||||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,20 @@
|
|||||||
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.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* esxi部署失败的bug ([1e44115](https://github.com/certd/certd/commit/1e441154617e6516a9a3610412bf597128c62696))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* http请求增加建立连接超时配置 ([3c85602](https://github.com/certd/certd/commit/3c85602ab1fc1953cdc06a6cd75a971d14119179))
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/basic
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
23:18
|
23:44
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/basic",
|
"name": "@certd/basic",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -47,5 +47,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/pipeline
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/pipeline",
|
"name": "@certd/pipeline",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
"compile": "tsc --skipLibCheck --watch"
|
"compile": "tsc --skipLibCheck --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.38.12",
|
"@certd/basic": "^1.39.1",
|
||||||
"@certd/plus-core": "^1.38.12",
|
"@certd/plus-core": "^1.39.1",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"reflect-metadata": "^0.1.13"
|
"reflect-metadata": "^0.1.13"
|
||||||
@@ -45,5 +45,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,9 +170,7 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.ctx?.define?.onlyAdmin) {
|
if (this.ctx?.define?.onlyAdmin) {
|
||||||
if (!this.isAdmin()) {
|
this.checkAdmin();
|
||||||
throw new Error("只有管理员才能运行此任务");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,6 +282,12 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|||||||
return this.ctx.user.role === "admin";
|
return this.ctx.user.role === "admin";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkAdmin() {
|
||||||
|
if (!this.isAdmin()) {
|
||||||
|
throw new Error("只有“管理员”或“系统级项目”才有权限运行此插件任务");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getStepFromPipeline(stepId: string) {
|
getStepFromPipeline(stepId: string) {
|
||||||
let found: any = null;
|
let found: any = null;
|
||||||
RunnableCollection.each(this.ctx.pipeline.stages, step => {
|
RunnableCollection.each(this.ctx.pipeline.stages, step => {
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-huawei
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-huawei",
|
"name": "@certd/lib-huawei",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"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": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-iframe
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-iframe",
|
"name": "@certd/lib-iframe",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"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": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/jdcloud
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/jdcloud",
|
"name": "@certd/jdcloud",
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"description": "jdcloud openApi sdk",
|
"description": "jdcloud openApi sdk",
|
||||||
"main": "./dist/bundle.js",
|
"main": "./dist/bundle.js",
|
||||||
"module": "./dist/bundle.js",
|
"module": "./dist/bundle.js",
|
||||||
@@ -56,5 +56,5 @@
|
|||||||
"fetch"
|
"fetch"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-k8s
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-k8s",
|
"name": "@certd/lib-k8s",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.38.12",
|
"@certd/basic": "^1.39.1",
|
||||||
"@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": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,16 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 【破坏性更新】错误返回信息msg字段名统一改成message,与成功的返回结构一致 ([51ab6d6](https://github.com/certd/certd/commit/51ab6d6da1bb551b55b3a6a4a9a945c8d6ace806))
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-server
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-server",
|
"name": "@certd/lib-server",
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -28,11 +28,11 @@
|
|||||||
],
|
],
|
||||||
"license": "AGPL",
|
"license": "AGPL",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.38.12",
|
"@certd/acme-client": "^1.39.1",
|
||||||
"@certd/basic": "^1.38.12",
|
"@certd/basic": "^1.39.1",
|
||||||
"@certd/pipeline": "^1.38.12",
|
"@certd/pipeline": "^1.39.1",
|
||||||
"@certd/plugin-lib": "^1.38.12",
|
"@certd/plugin-lib": "^1.39.1",
|
||||||
"@certd/plus-core": "^1.38.12",
|
"@certd/plus-core": "^1.39.1",
|
||||||
"@midwayjs/cache": "3.14.0",
|
"@midwayjs/cache": "3.14.0",
|
||||||
"@midwayjs/core": "3.20.11",
|
"@midwayjs/core": "3.20.11",
|
||||||
"@midwayjs/i18n": "3.20.13",
|
"@midwayjs/i18n": "3.20.13",
|
||||||
@@ -64,5 +64,5 @@
|
|||||||
"typeorm": "^0.3.11",
|
"typeorm": "^0.3.11",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export abstract class BaseController {
|
|||||||
fail(msg: string, code?: any) {
|
fail(msg: string, code?: any) {
|
||||||
return {
|
return {
|
||||||
code: code ? code : Constants.res.error.code,
|
code: code ? code : Constants.res.error.code,
|
||||||
msg: msg ? msg : Constants.res.error.code,
|
message: msg ? msg : Constants.res.error.code,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,10 +69,8 @@ export abstract class BaseController {
|
|||||||
if (!projectIdStr){
|
if (!projectIdStr){
|
||||||
projectIdStr = this.ctx.request.query["projectId"] as string;
|
projectIdStr = this.ctx.request.query["projectId"] as string;
|
||||||
}
|
}
|
||||||
if (!projectIdStr){
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
if (!projectIdStr) {
|
if (!projectIdStr) {
|
||||||
|
//这里必须抛异常,否则可能会有权限问题
|
||||||
throw new Error("projectId 不能为空")
|
throw new Error("projectId 不能为空")
|
||||||
}
|
}
|
||||||
const userId = this.getUserId()
|
const userId = this.getUserId()
|
||||||
@@ -85,7 +83,7 @@ export abstract class BaseController {
|
|||||||
let userId = this.getUserId()
|
let userId = this.getUserId()
|
||||||
const projectId = await this.getProjectId(permission)
|
const projectId = await this.getProjectId(permission)
|
||||||
if(projectId){
|
if(projectId){
|
||||||
userId = 0
|
userId = -1 // 企业管理模式下,用户id固定-1
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
projectId,userId
|
projectId,userId
|
||||||
@@ -120,7 +118,7 @@ export abstract class BaseController {
|
|||||||
if(allowAdmin){
|
if(allowAdmin){
|
||||||
await authService.checkUserIdButAllowAdmin(this.ctx, service, id);
|
await authService.checkUserIdButAllowAdmin(this.ctx, service, id);
|
||||||
}else{
|
}else{
|
||||||
await authService.checkUserId(this.ctx, service, id);
|
await authService.checkUserId( service, id, userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {projectId,userId}
|
return {projectId,userId}
|
||||||
|
|||||||
@@ -258,12 +258,12 @@ export abstract class BaseService<T> {
|
|||||||
|
|
||||||
export function checkUserProjectParam(userId: number, projectId: number) {
|
export function checkUserProjectParam(userId: number, projectId: number) {
|
||||||
if (projectId != null ){
|
if (projectId != null ){
|
||||||
if( userId !==0) {
|
if( userId !==-1) {
|
||||||
throw new ValidateException('userId projectId 错误');
|
throw new ValidateException('userId projectId 错误');
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}else{
|
}else{
|
||||||
if( userId > 0) {
|
if( userId != null) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
throw new ValidateException('userId不能为空');
|
throw new ValidateException('userId不能为空');
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
export class BaseException extends Error {
|
export class BaseException extends Error {
|
||||||
code: number;
|
code: number;
|
||||||
data?:any
|
data?:any
|
||||||
constructor(name, code, message,data?:any) {
|
constructor(name: string, code: number, message: string ,data?:any) {
|
||||||
super(message);
|
super(message);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.code = code;
|
this.code = code;
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
export class Result<T> {
|
export class Result<T> {
|
||||||
code: number;
|
code: number;
|
||||||
msg: string;
|
message: string;
|
||||||
data: T;
|
data: T;
|
||||||
|
|
||||||
constructor(code, msg, data?) {
|
constructor(code, message, data?) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
this.msg = msg;
|
this.message = message;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
static error(code = 1, msg, data?: any) {
|
static error(code = 1, message, data?: any) {
|
||||||
return new Result(code, msg, data);
|
return new Result(code, message, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static success(msg, data?) {
|
static success(message, data?) {
|
||||||
return new Result(0, msg, data);
|
return new Result(0, message, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export class AccessEntity {
|
|||||||
@PrimaryGeneratedColumn()
|
@PrimaryGeneratedColumn()
|
||||||
id: number;
|
id: number;
|
||||||
@Column({ name: 'user_id', comment: '用户id' })
|
@Column({ name: 'user_id', comment: '用户id' })
|
||||||
userId: number;
|
userId: number; // 0为系统级别, -1为企业,大于1为用户
|
||||||
@Column({ comment: '名称', length: 100 })
|
@Column({ comment: '名称', length: 100 })
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/midway-flyway-js",
|
"name": "@certd/midway-flyway-js",
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"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": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-cert
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-cert",
|
"name": "@certd/plugin-cert",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
"compile": "tsc --skipLibCheck --watch"
|
"compile": "tsc --skipLibCheck --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.38.12",
|
"@certd/acme-client": "^1.39.1",
|
||||||
"@certd/basic": "^1.38.12",
|
"@certd/basic": "^1.39.1",
|
||||||
"@certd/pipeline": "^1.38.12",
|
"@certd/pipeline": "^1.39.1",
|
||||||
"@certd/plugin-lib": "^1.38.12",
|
"@certd/plugin-lib": "^1.39.1",
|
||||||
"psl": "^1.9.0",
|
"psl": "^1.9.0",
|
||||||
"punycode.js": "^2.3.1"
|
"punycode.js": "^2.3.1"
|
||||||
},
|
},
|
||||||
@@ -38,5 +38,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-lib
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-lib",
|
"name": "@certd/plugin-lib",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -22,10 +22,10 @@
|
|||||||
"@alicloud/pop-core": "^1.7.10",
|
"@alicloud/pop-core": "^1.7.10",
|
||||||
"@alicloud/tea-util": "^1.4.11",
|
"@alicloud/tea-util": "^1.4.11",
|
||||||
"@aws-sdk/client-s3": "^3.964.0",
|
"@aws-sdk/client-s3": "^3.964.0",
|
||||||
"@certd/acme-client": "^1.38.12",
|
"@certd/acme-client": "^1.39.1",
|
||||||
"@certd/basic": "^1.38.12",
|
"@certd/basic": "^1.39.1",
|
||||||
"@certd/pipeline": "^1.38.12",
|
"@certd/pipeline": "^1.39.1",
|
||||||
"@certd/plus-core": "^1.38.12",
|
"@certd/plus-core": "^1.39.1",
|
||||||
"@kubernetes/client-node": "0.21.0",
|
"@kubernetes/client-node": "0.21.0",
|
||||||
"ali-oss": "^6.22.0",
|
"ali-oss": "^6.22.0",
|
||||||
"basic-ftp": "^5.0.5",
|
"basic-ftp": "^5.0.5",
|
||||||
@@ -57,5 +57,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
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.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复企业管理模式下,切换用户登录后,丢失项目列表的bug ([d23c8b4](https://github.com/certd/certd/commit/d23c8b4a2a5f5ab17822c6ee1d4108ac7280b9d1))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持迁移个人数据到企业项目中 ([c6ca832](https://github.com/certd/certd/commit/c6ca83273779ed84de1b23b5e477063af043d015))
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复发件邮箱无法输入的bug ([27b0348](https://github.com/certd/certd/commit/27b0348e1d3d752f418f851965d6afbc26c0160c))
|
||||||
|
* 修复复制流水线保存后丢失分组和排序号的问题 ([bc32648](https://github.com/certd/certd/commit/bc326489abc1d50a0930b4f47aa2d62d3a486798))
|
||||||
|
* 修复获取群辉deviceid报错的bug ([79be392](https://github.com/certd/certd/commit/79be392775a2c91848dd5a66a2618adc4e4b48f6))
|
||||||
|
* 修复偶尔下载证书报未授权的错误 ([316537e](https://github.com/certd/certd/commit/316537eb4dcbe5ec57784e8bf95ee3cdfd21dce7))
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* 支持企业级管理模式,项目管理,细分权限 ([3734083](https://github.com/certd/certd/commit/37340838b6a61a94b86bfa13cf5da88b26f1315a))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 当域名管理中没有域名时,创建流水线时不展开域名选择框 ([bb0afe1](https://github.com/certd/certd/commit/bb0afe1fa7b0fc52fde051d24fbe6be69d52f4cc))
|
||||||
|
* 任务步骤页面增加串行执行提示说明 ([787f6ef](https://github.com/certd/certd/commit/787f6ef52893d8dc912ee2a7a5b8ce2b73c108c9))
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-client",
|
"name": "@certd/ui-client",
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --open",
|
"dev": "vite --open",
|
||||||
@@ -106,8 +106,8 @@
|
|||||||
"zod-defaults": "^0.1.3"
|
"zod-defaults": "^0.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@certd/lib-iframe": "^1.38.12",
|
"@certd/lib-iframe": "^1.39.1",
|
||||||
"@certd/pipeline": "^1.38.12",
|
"@certd/pipeline": "^1.39.1",
|
||||||
"@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",
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 117 KiB |
@@ -136,27 +136,29 @@ function createService() {
|
|||||||
*/
|
*/
|
||||||
function createRequestFunction(service: any) {
|
function createRequestFunction(service: any) {
|
||||||
return function (config: any) {
|
return function (config: any) {
|
||||||
const configDefault = {
|
const configDefault: any = {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": get(config, "headers.Content-Type", "application/json"),
|
"Content-Type": get(config, "headers.Content-Type", "application/json"),
|
||||||
} as any,
|
} as any,
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
baseURL: env.API,
|
baseURL: env.API,
|
||||||
data: {},
|
data: {},
|
||||||
|
params: {},
|
||||||
};
|
};
|
||||||
const projectStore = useProjectStore();
|
const projectStore = useProjectStore();
|
||||||
|
|
||||||
if (projectStore.isEnterprise && !config.url.startsWith("/sys") && !config.url.startsWith("http")) {
|
|
||||||
configDefault.headers["project-id"] = projectStore.currentProjectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const token = userStore.getToken;
|
const token = userStore.getToken;
|
||||||
if (token != null) {
|
if (token != null) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
configDefault.headers.Authorization = token;
|
configDefault.headers.Authorization = token;
|
||||||
}
|
}
|
||||||
return service(Object.assign(configDefault, config));
|
Object.assign(configDefault, config);
|
||||||
|
|
||||||
|
if (!configDefault.params.projectId && projectStore.isEnterprise && !config.url.startsWith("/sys") && !config.url.startsWith("http")) {
|
||||||
|
configDefault.params.projectId = projectStore.currentProject?.id;
|
||||||
|
}
|
||||||
|
return service(configDefault);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,30 +19,30 @@ export function parse(jsonString = "{}", defaultValue = {}) {
|
|||||||
/**
|
/**
|
||||||
* @description 接口请求返回
|
* @description 接口请求返回
|
||||||
* @param {Any} data 返回值
|
* @param {Any} data 返回值
|
||||||
* @param {String} msg 状态信息
|
* @param {String} message 状态信息
|
||||||
* @param {Number} code 状态码
|
* @param {Number} code 状态码
|
||||||
*/
|
*/
|
||||||
export function response(data = {}, msg = "", code = 0) {
|
export function response(data = {}, message = "", code = 0) {
|
||||||
return [200, { code, msg, data }];
|
return [200, { code, message, data }];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 接口请求返回 正确返回
|
* @description 接口请求返回 正确返回
|
||||||
* @param {Any} data 返回值
|
* @param {Any} data 返回值
|
||||||
* @param {String} msg 状态信息
|
* @param {String} message 状态信息
|
||||||
*/
|
*/
|
||||||
export function responseSuccess(data = {}, msg = "成功") {
|
export function responseSuccess(data = {}, message = "成功") {
|
||||||
return response(data, msg);
|
return response(data, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 接口请求返回 错误返回
|
* @description 接口请求返回 错误返回
|
||||||
* @param {Any} data 返回值
|
* @param {Any} data 返回值
|
||||||
* @param {String} msg 状态信息
|
* @param {String} message 状态信息
|
||||||
* @param {Number} code 状态码
|
* @param {Number} code 状态码
|
||||||
*/
|
*/
|
||||||
export function responseError(data = {}, msg = "请求失败", code = 500) {
|
export function responseError(data = {}, message = "请求失败", code = 500) {
|
||||||
return response(data, msg, code);
|
return response(data, message, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ import NotificationSelector from "../views/certd/notification/notification-selec
|
|||||||
import EmailSelector from "./email-selector/index.vue";
|
import EmailSelector from "./email-selector/index.vue";
|
||||||
import ValidTimeFormat from "./valid-time-format.vue";
|
import ValidTimeFormat from "./valid-time-format.vue";
|
||||||
import ProjectSelector from "./project-selector/index.vue";
|
import ProjectSelector from "./project-selector/index.vue";
|
||||||
|
import ProjectCurrent from "./project-selector/project-current.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
install(app: any) {
|
install(app: any) {
|
||||||
app.component(
|
app.component(
|
||||||
@@ -47,5 +49,6 @@ export default {
|
|||||||
app.use(vip);
|
app.use(vip);
|
||||||
app.use(Plugins);
|
app.use(Plugins);
|
||||||
app.component("ProjectSelector", ProjectSelector);
|
app.component("ProjectSelector", ProjectSelector);
|
||||||
|
app.component("ProjectCurrent", ProjectCurrent);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,34 +3,57 @@
|
|||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu @click="handleMenuClick">
|
<a-menu @click="handleMenuClick">
|
||||||
<a-menu-item v-for="item in projectStore.myProjects" :key="item.id">
|
<a-menu-item v-for="item in projectStore.myProjects" :key="item.id">
|
||||||
{{ item.name }}
|
<div class="flex items-center justify-between w-full">
|
||||||
|
<span class="mr-1">{{ item.name }}</span>
|
||||||
|
<fs-values-format :model-value="item.permission" :dict="projectPermissionDict"></fs-values-format>
|
||||||
|
</div>
|
||||||
|
</a-menu-item>
|
||||||
|
<a-menu-item key="join">
|
||||||
|
<div class="flex items-center w-full">
|
||||||
|
<fs-icon icon="ion:add" class="mr-1"></fs-icon>
|
||||||
|
<span>加入其他项目</span>
|
||||||
|
</div>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</template>
|
</template>
|
||||||
<div class="rounded pl-3 pr-3 px-2 py-1 flex-center flex pointer items-center bg-accent h-10 button-text" title="当前项目">
|
<div class="rounded pl-3 pr-3 px-2 py-1 flex-center flex pointer items-center bg-accent h-10 button-text" title="当前项目">
|
||||||
<fs-icon icon="ion:apps" class="mr-1"></fs-icon>
|
<!-- <fs-icon icon="ion:apps" class="mr-1"></fs-icon> -->
|
||||||
当前项目:{{ projectStore.currentProject?.name || "..." }}
|
当前项目:{{ projectStore.currentProject?.name || "..." }}
|
||||||
<fs-icon icon="ion:chevron-down-outline" class="ml-1"></fs-icon>
|
<fs-icon :icon="currentIcon" class="ml-5"></fs-icon>
|
||||||
</div>
|
</div>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from "vue";
|
import { computed, onMounted } from "vue";
|
||||||
import { useProjectStore } from "/@/store/project";
|
import { useProjectStore } from "/@/store/project";
|
||||||
|
import { useDicts } from "/@/views/certd/dicts";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "ProjectSelector",
|
name: "ProjectSelector",
|
||||||
});
|
});
|
||||||
|
|
||||||
const projectStore = useProjectStore();
|
const projectStore = useProjectStore();
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await projectStore.reload();
|
await projectStore.init();
|
||||||
|
console.log(projectStore.myProjects);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
function handleMenuClick({ key }: any) {
|
function handleMenuClick({ key }: any) {
|
||||||
|
if (key === "join") {
|
||||||
|
router.push("/certd/project/join");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
projectStore.changeCurrentProject(key);
|
projectStore.changeCurrentProject(key);
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
const { projectPermissionDict } = useDicts();
|
||||||
|
|
||||||
|
const currentIcon = computed(() => {
|
||||||
|
return projectPermissionDict.dataMap[projectStore.currentProject?.permission || ""]?.icon || "";
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.project-selector {
|
.project-selector {
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<template>
|
||||||
|
<a-tag color="green" class="flex-center flex pointer items-center button-text" title="当前项目">
|
||||||
|
<!-- <fs-icon icon="ion:apps" class="mr-1"></fs-icon> -->
|
||||||
|
当前项目:{{ projectStore.currentProject?.name || "..." }}
|
||||||
|
<fs-icon :icon="currentIcon" class="ml-5"></fs-icon>
|
||||||
|
</a-tag>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { computed, onMounted } from "vue";
|
||||||
|
import { useProjectStore } from "/@/store/project";
|
||||||
|
import { useDicts } from "/@/views/certd/dicts";
|
||||||
|
defineOptions({
|
||||||
|
name: "ProjectCurrent",
|
||||||
|
});
|
||||||
|
|
||||||
|
const projectStore = useProjectStore();
|
||||||
|
// onMounted(async () => {
|
||||||
|
// await projectStore.reload();
|
||||||
|
// });
|
||||||
|
|
||||||
|
const { projectPermissionDict } = useDicts();
|
||||||
|
|
||||||
|
const currentIcon = computed(() => {
|
||||||
|
return projectPermissionDict.dataMap[projectStore.currentProject?.permission || ""]?.icon || "";
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="less"></style>
|
||||||
@@ -218,6 +218,9 @@ export default {
|
|||||||
projectUserManager: "Project User Management",
|
projectUserManager: "Project User Management",
|
||||||
myProjectManager: "My Projects",
|
myProjectManager: "My Projects",
|
||||||
myProjectDetail: "Project Detail",
|
myProjectDetail: "Project Detail",
|
||||||
|
projectJoin: "Join Project",
|
||||||
|
currentProject: "Current Project",
|
||||||
|
projectMemberManager: "Project Member",
|
||||||
},
|
},
|
||||||
certificateRepo: {
|
certificateRepo: {
|
||||||
title: "Certificate Repository",
|
title: "Certificate Repository",
|
||||||
@@ -819,6 +822,28 @@ export default {
|
|||||||
write: "Write",
|
write: "Write",
|
||||||
admin: "Admin",
|
admin: "Admin",
|
||||||
},
|
},
|
||||||
|
projectMemberStatus: "Member Status",
|
||||||
|
|
||||||
|
isSystem: "Is System Project",
|
||||||
|
isSystemHelper: "System-level projects allow running admin plugins",
|
||||||
|
},
|
||||||
|
project: {
|
||||||
|
noProjectJoined: "You haven't joined any projects yet",
|
||||||
|
applyToJoin: "Please apply to join a project to start using",
|
||||||
|
systemProjects: "System Project List",
|
||||||
|
createdAt: "Created At",
|
||||||
|
applyJoin: "Apply to Join",
|
||||||
|
noSystemProjects: "No system projects available",
|
||||||
|
fetchFailed: "Failed to fetch project list",
|
||||||
|
applySuccess: "Application successful, waiting for admin approval",
|
||||||
|
applyFailed: "Application failed, please try again later",
|
||||||
|
leave: "Leave Project",
|
||||||
|
leaveSuccess: "Leave project successful",
|
||||||
|
leaveFailed: "Leave project failed, please try again later",
|
||||||
|
applyJoinConfirm: "Are you sure you want to apply to join this project?",
|
||||||
|
leaveConfirm: "Are you sure you want to leave this project?",
|
||||||
|
viewDetail: "View Detail",
|
||||||
|
projectManage: "Project Manage",
|
||||||
},
|
},
|
||||||
addonSelector: {
|
addonSelector: {
|
||||||
select: "Select",
|
select: "Select",
|
||||||
|
|||||||
@@ -220,10 +220,12 @@ export default {
|
|||||||
netTest: "网络测试",
|
netTest: "网络测试",
|
||||||
enterpriseManager: "企业管理设置",
|
enterpriseManager: "企业管理设置",
|
||||||
projectManager: "项目管理",
|
projectManager: "项目管理",
|
||||||
projectDetail: "项目详情",
|
|
||||||
enterpriseSetting: "企业设置",
|
enterpriseSetting: "企业设置",
|
||||||
myProjectManager: "我的项目",
|
myProjectManager: "我的项目",
|
||||||
myProjectDetail: "项目详情",
|
myProjectDetail: "项目详情",
|
||||||
|
projectJoin: "加入项目",
|
||||||
|
currentProject: "当前项目",
|
||||||
|
projectMemberManager: "项目成员管理",
|
||||||
},
|
},
|
||||||
certificateRepo: {
|
certificateRepo: {
|
||||||
title: "证书仓库",
|
title: "证书仓库",
|
||||||
@@ -831,9 +833,31 @@ export default {
|
|||||||
projectDetailDescription: "管理项目成员",
|
projectDetailDescription: "管理项目成员",
|
||||||
projectPermission: "权限",
|
projectPermission: "权限",
|
||||||
permission: {
|
permission: {
|
||||||
read: "读取",
|
read: "查看",
|
||||||
write: "写入",
|
write: "修改",
|
||||||
admin: "管理员",
|
admin: "管理员",
|
||||||
},
|
},
|
||||||
|
projectMemberStatus: "成员状态",
|
||||||
|
|
||||||
|
isSystem: "是否系统项目",
|
||||||
|
isSystemHelper: "系统级项目允许运行管理员插件",
|
||||||
|
},
|
||||||
|
project: {
|
||||||
|
noProjectJoined: "您还没有加入任何项目",
|
||||||
|
applyToJoin: "请申请加入项目以开始使用",
|
||||||
|
projectList: "项目列表",
|
||||||
|
createdAt: "创建时间",
|
||||||
|
applyJoin: "申请加入",
|
||||||
|
noProjects: "暂无项目",
|
||||||
|
fetchFailed: "获取项目列表失败",
|
||||||
|
applySuccess: "申请成功,等待管理员审核",
|
||||||
|
applyFailed: "申请失败,请稍后重试",
|
||||||
|
leave: "退出项目",
|
||||||
|
leaveSuccess: "退出项目成功",
|
||||||
|
leaveFailed: "退出项目失败,请稍后重试",
|
||||||
|
applyJoinConfirm: "确认加入项目?",
|
||||||
|
leaveConfirm: "确认退出项目?",
|
||||||
|
viewDetail: "查看详情",
|
||||||
|
projectManage: "项目管理",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export default {
|
|||||||
email_webhook_notifications: "邮件、webhook通知方式",
|
email_webhook_notifications: "邮件、webhook通知方式",
|
||||||
|
|
||||||
professional_edition: "专业版",
|
professional_edition: "专业版",
|
||||||
open_source_support: "开源需要您的赞助支持",
|
open_source_support: "开源需要您的赞助支持,个人和企业内部使用",
|
||||||
vip_group_priority: "可加VIP群,您的需求将优先实现",
|
vip_group_priority: "可加VIP群,您的需求将优先实现",
|
||||||
unlimited_site_certificate_monitoring: "站点证书监控无限制",
|
unlimited_site_certificate_monitoring: "站点证书监控无限制",
|
||||||
more_notification_methods: "更多通知方式",
|
more_notification_methods: "更多通知方式",
|
||||||
@@ -66,13 +66,13 @@ export default {
|
|||||||
get_after_support: "立即赞助",
|
get_after_support: "立即赞助",
|
||||||
|
|
||||||
business_edition: "商业版",
|
business_edition: "商业版",
|
||||||
commercial_license: "商业授权,可对外运营",
|
commercial_license: "商业授权,可对外运营,提供SaaS服务",
|
||||||
all_pro_privileges: "拥有专业版所有特权",
|
all_pro_privileges: "拥有专业版所有特权",
|
||||||
allow_commercial_use_modify_logo_title: "允许商用,可修改logo、标题",
|
allow_commercial_use_modify_logo_title: "允许商用,可修改logo、标题",
|
||||||
data_statistics: "数据统计",
|
data_statistics: "数据统计",
|
||||||
plugin_management: "插件管理",
|
plugin_management: "插件管理",
|
||||||
unlimited_multi_users: "多用户无限制",
|
unlimited_multi_users: "多用户无限制",
|
||||||
support_user_payment: "支持用户支付",
|
support_user_payment: "支持用户支付(购买套餐,按流水线条数、域名数量、部署次数计费)",
|
||||||
activate: "激活",
|
activate: "激活",
|
||||||
get_pro_code_after_support: "前往获取",
|
get_pro_code_after_support: "前往获取",
|
||||||
business_contact_author: "",
|
business_contact_author: "",
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ function install(app: App, options: any = {}) {
|
|||||||
if (scope.key === "__blank__") {
|
if (scope.key === "__blank__") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//不能用 !scope.value , 否则switch组件设置为关之后就消失了
|
//不能用 !scope.value , 否则switch组件设置为关之后就消失了
|
||||||
const { value, key, props } = scope;
|
const { value, key, props } = scope;
|
||||||
return !value && key != "_index" && value != false && value != 0;
|
return !value && key != "_index" && value != false && value != 0;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export type UseCrudPermissionExtraProps = {
|
|||||||
export type UseCrudPermissionExtra = (props: UseCrudPermissionExtraProps) => any;
|
export type UseCrudPermissionExtra = (props: UseCrudPermissionExtraProps) => any;
|
||||||
export type UseCrudPermissionCompProps = {
|
export type UseCrudPermissionCompProps = {
|
||||||
isProjectPermission?: boolean;
|
isProjectPermission?: boolean;
|
||||||
|
projectPermission?: string;
|
||||||
prefix?: string;
|
prefix?: string;
|
||||||
extra?: UseCrudPermissionExtra;
|
extra?: UseCrudPermissionExtra;
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
@@ -69,17 +70,17 @@ export function useCrudPermission({ permission }: UseCrudPermissionProps) {
|
|||||||
|
|
||||||
let addPermission = "add";
|
let addPermission = "add";
|
||||||
if (isProjectPermission) {
|
if (isProjectPermission) {
|
||||||
addPermission = "write";
|
addPermission = per.projectPermission || "write";
|
||||||
}
|
}
|
||||||
|
|
||||||
let editPermission = "edit";
|
let editPermission = "edit";
|
||||||
if (isProjectPermission) {
|
if (isProjectPermission) {
|
||||||
editPermission = "write";
|
editPermission = per.projectPermission || "write";
|
||||||
}
|
}
|
||||||
|
|
||||||
let removePermission = "remove";
|
let removePermission = "remove";
|
||||||
if (isProjectPermission) {
|
if (isProjectPermission) {
|
||||||
removePermission = "write";
|
removePermission = per.projectPermission || "write";
|
||||||
}
|
}
|
||||||
return LodashMerge(
|
return LodashMerge(
|
||||||
{
|
{
|
||||||
@@ -93,6 +94,7 @@ export function useCrudPermission({ permission }: UseCrudPermissionProps) {
|
|||||||
edit: { show: hasActionPermission(editPermission) },
|
edit: { show: hasActionPermission(editPermission) },
|
||||||
remove: { show: hasActionPermission(removePermission) },
|
remove: { show: hasActionPermission(removePermission) },
|
||||||
view: { show: hasActionPermission(viewPermission) },
|
view: { show: hasActionPermission(viewPermission) },
|
||||||
|
copy: { show: hasActionPermission(addPermission) },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ import { useSettingStore } from "/@/store/settings";
|
|||||||
import { usePermissionStore } from "/@/plugin/permission/store.permission";
|
import { usePermissionStore } from "/@/plugin/permission/store.permission";
|
||||||
import util from "/@/plugin/permission/util.permission";
|
import util from "/@/plugin/permission/util.permission";
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
|
import { useProjectStore } from "../store/project";
|
||||||
|
export const PROJECT_PATH_PREFIX = "/certd/project";
|
||||||
|
export const SYS_PATH_PREFIX = "/sys";
|
||||||
|
|
||||||
function buildAccessedMenus(menus: any) {
|
function buildAccessedMenus(menus: any) {
|
||||||
if (menus == null) {
|
if (menus == null) {
|
||||||
@@ -124,6 +127,20 @@ function setupAccessGuard(router: Router) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
// 如果是项目模式
|
||||||
|
const projectStore = useProjectStore();
|
||||||
|
if (projectStore.isEnterprise) {
|
||||||
|
//加载我的项目
|
||||||
|
await projectStore.init();
|
||||||
|
if (!projectStore.currentProject && !to.path.startsWith(PROJECT_PATH_PREFIX) && !to.path.startsWith(SYS_PATH_PREFIX)) {
|
||||||
|
//没有项目
|
||||||
|
return {
|
||||||
|
path: `${PROJECT_PATH_PREFIX}/join`,
|
||||||
|
replace: true,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { useSettingStore } from "/@/store/settings";
|
|
||||||
import aboutResource from "/@/router/source/modules/about";
|
|
||||||
import i18n from "/@/locales/i18n";
|
|
||||||
import { useProjectStore } from "/@/store/project";
|
import { useProjectStore } from "/@/store/project";
|
||||||
|
import { useSettingStore } from "/@/store/settings";
|
||||||
|
|
||||||
export const certdResources = [
|
export const certdResources = [
|
||||||
{
|
{
|
||||||
@@ -25,21 +23,22 @@ export const certdResources = [
|
|||||||
const projectStore = useProjectStore();
|
const projectStore = useProjectStore();
|
||||||
return projectStore.isEnterprise;
|
return projectStore.isEnterprise;
|
||||||
},
|
},
|
||||||
|
isMenu: false,
|
||||||
icon: "ion:apps",
|
icon: "ion:apps",
|
||||||
permission: "sys:settings:edit",
|
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "certd.sysResources.myProjectDetail",
|
title: "certd.sysResources.projectJoin",
|
||||||
name: "MyProjectDetail",
|
name: "ProjectJoin",
|
||||||
path: "/certd/project/detail",
|
path: "/certd/project/join",
|
||||||
component: "/certd/project/detail/index.vue",
|
component: "/certd/project/join.vue",
|
||||||
meta: {
|
meta: {
|
||||||
isMenu: false,
|
isMenu: false,
|
||||||
show: true,
|
show: true,
|
||||||
icon: "ion:apps",
|
icon: "ion:apps",
|
||||||
permission: "sys:settings:edit",
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -50,6 +49,7 @@ export const certdResources = [
|
|||||||
meta: {
|
meta: {
|
||||||
icon: "ion:analytics-sharp",
|
icon: "ion:analytics-sharp",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -59,6 +59,7 @@ export const certdResources = [
|
|||||||
component: "/certd/pipeline/detail.vue",
|
component: "/certd/pipeline/detail.vue",
|
||||||
meta: {
|
meta: {
|
||||||
isMenu: false,
|
isMenu: false,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -69,6 +70,7 @@ export const certdResources = [
|
|||||||
meta: {
|
meta: {
|
||||||
icon: "ion:timer-outline",
|
icon: "ion:timer-outline",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -79,6 +81,7 @@ export const certdResources = [
|
|||||||
meta: {
|
meta: {
|
||||||
isMenu: true,
|
isMenu: true,
|
||||||
icon: "ion:duplicate-outline",
|
icon: "ion:duplicate-outline",
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -88,6 +91,7 @@ export const certdResources = [
|
|||||||
component: "/certd/pipeline/template/edit.vue",
|
component: "/certd/pipeline/template/edit.vue",
|
||||||
meta: {
|
meta: {
|
||||||
isMenu: false,
|
isMenu: false,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -97,6 +101,7 @@ export const certdResources = [
|
|||||||
component: "/certd/pipeline/template/import/index.vue",
|
component: "/certd/pipeline/template/import/index.vue",
|
||||||
meta: {
|
meta: {
|
||||||
isMenu: false,
|
isMenu: false,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -122,6 +127,21 @@ export const certdResources = [
|
|||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "certd.sysResources.currentProject",
|
||||||
|
name: "ProjectMemberManager",
|
||||||
|
path: "/certd/project/detail",
|
||||||
|
component: "/certd/project/detail/index.vue",
|
||||||
|
meta: {
|
||||||
|
show: () => {
|
||||||
|
const projectStore = useProjectStore();
|
||||||
|
return projectStore.isEnterprise;
|
||||||
|
},
|
||||||
|
isMenu: true,
|
||||||
|
icon: "ion:apps",
|
||||||
|
auth: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "certd.settings",
|
title: "certd.settings",
|
||||||
name: "MineSetting",
|
name: "MineSetting",
|
||||||
@@ -241,6 +261,10 @@ export const certdResources = [
|
|||||||
icon: "mi:user-check",
|
icon: "mi:user-check",
|
||||||
auth: true,
|
auth: true,
|
||||||
isMenu: true,
|
isMenu: true,
|
||||||
|
show: () => {
|
||||||
|
const projectStore = useProjectStore();
|
||||||
|
return !projectStore.isEnterprise;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
import LayoutPass from "/@/layout/layout-pass.vue";
|
|
||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import aboutResource from "/@/router/source/modules/about";
|
|
||||||
import i18n from "/@/locales/i18n";
|
|
||||||
|
|
||||||
export const sysResources = [
|
export const sysResources = [
|
||||||
{
|
{
|
||||||
@@ -13,6 +10,7 @@ export const sysResources = [
|
|||||||
icon: "ion:settings-outline",
|
icon: "ion:settings-outline",
|
||||||
permission: "sys:settings:view",
|
permission: "sys:settings:view",
|
||||||
order: 10,
|
order: 10,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
@@ -27,6 +25,7 @@ export const sysResources = [
|
|||||||
},
|
},
|
||||||
icon: "ion:speedometer-outline",
|
icon: "ion:speedometer-outline",
|
||||||
permission: "sys:auth:user:view",
|
permission: "sys:auth:user:view",
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -38,6 +37,7 @@ export const sysResources = [
|
|||||||
meta: {
|
meta: {
|
||||||
icon: "ion:settings-outline",
|
icon: "ion:settings-outline",
|
||||||
permission: "sys:settings:view",
|
permission: "sys:settings:view",
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -47,6 +47,7 @@ export const sysResources = [
|
|||||||
component: "/sys/enterprise/project/index.vue",
|
component: "/sys/enterprise/project/index.vue",
|
||||||
meta: {
|
meta: {
|
||||||
show: true,
|
show: true,
|
||||||
|
auth: true,
|
||||||
icon: "ion:apps",
|
icon: "ion:apps",
|
||||||
permission: "sys:settings:edit",
|
permission: "sys:settings:edit",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
@@ -60,6 +61,7 @@ export const sysResources = [
|
|||||||
meta: {
|
meta: {
|
||||||
isMenu: false,
|
isMenu: false,
|
||||||
show: true,
|
show: true,
|
||||||
|
auth: true,
|
||||||
icon: "ion:apps",
|
icon: "ion:apps",
|
||||||
permission: "sys:settings:edit",
|
permission: "sys:settings:edit",
|
||||||
},
|
},
|
||||||
@@ -73,6 +75,7 @@ export const sysResources = [
|
|||||||
icon: "ion:earth-outline",
|
icon: "ion:earth-outline",
|
||||||
permission: "sys:settings:view",
|
permission: "sys:settings:view",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -96,6 +99,7 @@ export const sysResources = [
|
|||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
return settingStore.isComm;
|
return settingStore.isComm;
|
||||||
},
|
},
|
||||||
|
auth: true,
|
||||||
icon: "ion:document-text-outline",
|
icon: "ion:document-text-outline",
|
||||||
permission: "sys:settings:view",
|
permission: "sys:settings:view",
|
||||||
},
|
},
|
||||||
@@ -110,6 +114,7 @@ export const sysResources = [
|
|||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
return settingStore.isComm;
|
return settingStore.isComm;
|
||||||
},
|
},
|
||||||
|
auth: true,
|
||||||
icon: "ion:menu",
|
icon: "ion:menu",
|
||||||
permission: "sys:settings:view",
|
permission: "sys:settings:view",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
@@ -125,6 +130,7 @@ export const sysResources = [
|
|||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
return settingStore.isComm;
|
return settingStore.isComm;
|
||||||
},
|
},
|
||||||
|
auth: true,
|
||||||
icon: "ion:disc-outline",
|
icon: "ion:disc-outline",
|
||||||
permission: "sys:settings:view",
|
permission: "sys:settings:view",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
@@ -139,6 +145,7 @@ export const sysResources = [
|
|||||||
icon: "ion:extension-puzzle-outline",
|
icon: "ion:extension-puzzle-outline",
|
||||||
permission: "sys:settings:view",
|
permission: "sys:settings:view",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -151,6 +158,7 @@ export const sysResources = [
|
|||||||
icon: "ion:extension-puzzle",
|
icon: "ion:extension-puzzle",
|
||||||
permission: "sys:settings:view",
|
permission: "sys:settings:view",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -165,6 +173,7 @@ export const sysResources = [
|
|||||||
},
|
},
|
||||||
icon: "ion:extension-puzzle",
|
icon: "ion:extension-puzzle",
|
||||||
permission: "sys:settings:view",
|
permission: "sys:settings:view",
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -176,6 +185,7 @@ export const sysResources = [
|
|||||||
icon: "ion:golf-outline",
|
icon: "ion:golf-outline",
|
||||||
permission: "sys:settings:view",
|
permission: "sys:settings:view",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -187,6 +197,7 @@ export const sysResources = [
|
|||||||
icon: "ion:list-outline",
|
icon: "ion:list-outline",
|
||||||
permission: "sys:auth:per:view",
|
permission: "sys:auth:per:view",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -198,6 +209,7 @@ export const sysResources = [
|
|||||||
icon: "ion:people-outline",
|
icon: "ion:people-outline",
|
||||||
permission: "sys:auth:role:view",
|
permission: "sys:auth:role:view",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -209,6 +221,7 @@ export const sysResources = [
|
|||||||
icon: "ion:person-outline",
|
icon: "ion:person-outline",
|
||||||
permission: "sys:auth:user:view",
|
permission: "sys:auth:user:view",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -224,6 +237,7 @@ export const sysResources = [
|
|||||||
return settingStore.isComm;
|
return settingStore.isComm;
|
||||||
},
|
},
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
@@ -238,6 +252,7 @@ export const sysResources = [
|
|||||||
},
|
},
|
||||||
icon: "ion:cart",
|
icon: "ion:cart",
|
||||||
permission: "sys:settings:edit",
|
permission: "sys:settings:edit",
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -253,6 +268,7 @@ export const sysResources = [
|
|||||||
icon: "ion:bag-check",
|
icon: "ion:bag-check",
|
||||||
permission: "sys:settings:edit",
|
permission: "sys:settings:edit",
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
auth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { message } from "ant-design-vue";
|
|||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import { useSettingStore } from "../settings";
|
import { useSettingStore } from "../settings";
|
||||||
import { LocalStorage } from "/@/utils/util.storage";
|
import { LocalStorage } from "/@/utils/util.storage";
|
||||||
|
import { useUserStore } from "../user";
|
||||||
|
|
||||||
export type ProjectItem = {
|
export type ProjectItem = {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -13,8 +14,19 @@ export type ProjectItem = {
|
|||||||
|
|
||||||
export const useProjectStore = defineStore("app.project", () => {
|
export const useProjectStore = defineStore("app.project", () => {
|
||||||
const myProjects = ref([]);
|
const myProjects = ref([]);
|
||||||
const lastProjectId = LocalStorage.get("currentProjectId");
|
const inited = ref(false);
|
||||||
const currentProjectId = ref(lastProjectId); // 直接调用
|
const currentProjectId = ref(); // 直接调用
|
||||||
|
|
||||||
|
function $reset() {
|
||||||
|
myProjects.value = [];
|
||||||
|
currentProjectId.value = "";
|
||||||
|
inited.value = false;
|
||||||
|
}
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const userId = userStore.getUserInfo?.id;
|
||||||
|
const lastProjectIdCacheKey = "currentProjectId:" + userId;
|
||||||
|
const lastProjectId = LocalStorage.get(lastProjectIdCacheKey);
|
||||||
|
currentProjectId.value = lastProjectId;
|
||||||
|
|
||||||
const projects = computed(() => {
|
const projects = computed(() => {
|
||||||
return myProjects.value;
|
return myProjects.value;
|
||||||
@@ -59,20 +71,21 @@ export const useProjectStore = defineStore("app.project", () => {
|
|||||||
|
|
||||||
function changeCurrentProject(id: string, silent?: boolean) {
|
function changeCurrentProject(id: string, silent?: boolean) {
|
||||||
currentProjectId.value = id;
|
currentProjectId.value = id;
|
||||||
LocalStorage.set("currentProjectId", id);
|
LocalStorage.set(lastProjectIdCacheKey, id);
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
message.success("切换项目成功");
|
message.success("切换项目成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function reload() {
|
async function reload() {
|
||||||
const projects = await api.MyProjectList();
|
inited.value = false;
|
||||||
myProjects.value = projects;
|
await init();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
if (!myProjects.value) {
|
if (!inited.value) {
|
||||||
await reload();
|
await loadMyProjects();
|
||||||
|
inited.value = true;
|
||||||
}
|
}
|
||||||
return myProjects.value;
|
return myProjects.value;
|
||||||
}
|
}
|
||||||
@@ -112,11 +125,6 @@ export const useProjectStore = defineStore("app.project", () => {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function $reset() {
|
|
||||||
myProjects.value = [];
|
|
||||||
currentProjectId.value = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
projects,
|
projects,
|
||||||
myProjects,
|
myProjects,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useFormWrapper } from "@fast-crud/fast-crud";
|
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||||
|
import { merge } from "lodash-es";
|
||||||
|
|
||||||
export type FormOptionReq = {
|
export type FormOptionReq = {
|
||||||
title: string;
|
title: string;
|
||||||
@@ -7,6 +8,7 @@ export type FormOptionReq = {
|
|||||||
body?: any;
|
body?: any;
|
||||||
initialForm?: any;
|
initialForm?: any;
|
||||||
zIndex?: number;
|
zIndex?: number;
|
||||||
|
wrapper?: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function useFormDialog() {
|
export function useFormDialog() {
|
||||||
@@ -14,19 +16,23 @@ export function useFormDialog() {
|
|||||||
|
|
||||||
async function openFormDialog(req: FormOptionReq) {
|
async function openFormDialog(req: FormOptionReq) {
|
||||||
function createCrudOptions() {
|
function createCrudOptions() {
|
||||||
|
const warpper = merge(
|
||||||
|
{
|
||||||
|
zIndex: req.zIndex,
|
||||||
|
title: req.title,
|
||||||
|
saveRemind: false,
|
||||||
|
slots: {
|
||||||
|
"form-body-top": req.body,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
req.wrapper
|
||||||
|
);
|
||||||
return {
|
return {
|
||||||
crudOptions: {
|
crudOptions: {
|
||||||
columns: req.columns,
|
columns: req.columns,
|
||||||
form: {
|
form: {
|
||||||
initialForm: req.initialForm,
|
initialForm: req.initialForm,
|
||||||
wrapper: {
|
wrapper: warpper,
|
||||||
zIndex: req.zIndex,
|
|
||||||
title: req.title,
|
|
||||||
saveRemind: false,
|
|
||||||
slots: {
|
|
||||||
"form-body-top": req.body,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async afterSubmit() {},
|
async afterSubmit() {},
|
||||||
async doSubmit({ form }: any) {
|
async doSubmit({ form }: any) {
|
||||||
if (req.onSubmit) {
|
if (req.onSubmit) {
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
order: 10,
|
order: 10,
|
||||||
},
|
},
|
||||||
valueBuilder: ({ row, key, value }) => {
|
valueBuilder: ({ row, key, value }) => {
|
||||||
row[key] = row.userId > 0 ? "user" : "sys";
|
row[key] = row.userId != 0 ? "user" : "sys";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...commonColumnsDefine,
|
...commonColumnsDefine,
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
order: 10,
|
order: 10,
|
||||||
},
|
},
|
||||||
valueBuilder: ({ row, key, value }) => {
|
valueBuilder: ({ row, key, value }) => {
|
||||||
row[key] = row.userId > 0 ? "user" : "sys";
|
row[key] = row.userId != 0 ? "user" : "sys";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...commonColumnsDefine,
|
...commonColumnsDefine,
|
||||||
|
|||||||
@@ -22,7 +22,10 @@ export default defineComponent({
|
|||||||
setup() {
|
setup() {
|
||||||
const api = createAddonApi({ from: "user", addonType: "" });
|
const api = createAddonApi({ from: "user", addonType: "" });
|
||||||
addonProvide(api);
|
addonProvide(api);
|
||||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: { api } });
|
const { crudBinding, crudRef, crudExpose } = useFs({
|
||||||
|
createCrudOptions,
|
||||||
|
context: { api, permission: { isProjectPermission: true } },
|
||||||
|
});
|
||||||
|
|
||||||
// 页面打开后获取列表数据
|
// 页面打开后获取列表数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -18,7 +18,12 @@ import createCrudOptions from "./crud";
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "BasicGroupManager",
|
name: "BasicGroupManager",
|
||||||
setup() {
|
setup() {
|
||||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
const { crudBinding, crudRef, crudExpose } = useFs({
|
||||||
|
createCrudOptions,
|
||||||
|
context: {
|
||||||
|
permission: { isProjectPermission: true },
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// 页面打开后获取列表数据
|
// 页面打开后获取列表数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { useSettingStore } from "/@/store/settings";
|
|||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import CnameTip from "/@/components/plugins/cert/domains-verify-plan-editor/cname-tip.vue";
|
import CnameTip from "/@/components/plugins/cert/domains-verify-plan-editor/cname-tip.vue";
|
||||||
import { useCnameImport } from "./use";
|
import { useCnameImport } from "./use";
|
||||||
|
import { useCrudPermission } from "/@/plugin/permission";
|
||||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const crudBinding = crudExpose.crudBinding;
|
const crudBinding = crudExpose.crudBinding;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -45,6 +46,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
{ label: t("certd.validation_timed_out"), value: "timeout", color: "red" },
|
{ label: t("certd.validation_timed_out"), value: "timeout", color: "red" },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { hasActionPermission } = useCrudPermission(context);
|
||||||
return {
|
return {
|
||||||
crudOptions: {
|
crudOptions: {
|
||||||
settings: {
|
settings: {
|
||||||
@@ -75,6 +78,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
icon: "ion:add-circle-outline",
|
icon: "ion:add-circle-outline",
|
||||||
},
|
},
|
||||||
import: {
|
import: {
|
||||||
|
show: hasActionPermission("write"),
|
||||||
title: "导入CNAME记录",
|
title: "导入CNAME记录",
|
||||||
type: "primary",
|
type: "primary",
|
||||||
text: "批量导入",
|
text: "批量导入",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<fs-crud ref="crudRef" v-bind="crudBinding">
|
<fs-crud ref="crudRef" v-bind="crudBinding">
|
||||||
<template #pagination-left>
|
<template #pagination-left>
|
||||||
<a-tooltip :title="t('certd.batch_delete')">
|
<a-tooltip v-if="hasActionPermission('write')" :title="t('certd.batch_delete')">
|
||||||
<fs-button icon="DeleteOutlined" @click="handleBatchDelete"></fs-button>
|
<fs-button icon="DeleteOutlined" @click="handleBatchDelete"></fs-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
@@ -27,13 +27,20 @@ import createCrudOptions from "./crud";
|
|||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import { DeleteBatch } from "./api";
|
import { DeleteBatch } from "./api";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
|
import { useCrudPermission } from "/@/plugin/permission";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "CnameRecord",
|
name: "CnameRecord",
|
||||||
});
|
});
|
||||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
|
||||||
|
const context: any = {
|
||||||
|
permission: { isProjectPermission: true },
|
||||||
|
};
|
||||||
|
|
||||||
|
const { hasActionPermission } = useCrudPermission(context);
|
||||||
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context });
|
||||||
|
|
||||||
const selectedRowKeys = context.selectedRowKeys;
|
const selectedRowKeys = context.selectedRowKeys;
|
||||||
const handleBatchDelete = () => {
|
const handleBatchDelete = () => {
|
||||||
|
|||||||
@@ -1,19 +1,49 @@
|
|||||||
import { dict } from "@fast-crud/fast-crud";
|
import { dict } from "@fast-crud/fast-crud";
|
||||||
import { GetMyProjectList } from "./project/api";
|
import { GetMyProjectList } from "./project/api";
|
||||||
|
import { request } from "/@/api/service";
|
||||||
|
|
||||||
const projectPermissionDict = dict({
|
const projectPermissionDict = dict({
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
label: "read",
|
value: "read",
|
||||||
value: "只读",
|
label: "查看",
|
||||||
|
color: "cyan",
|
||||||
|
icon: "material-symbols:folder-eye-outline-sharp",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "write",
|
value: "write",
|
||||||
value: "读写",
|
label: "修改",
|
||||||
|
color: "green",
|
||||||
|
icon: "material-symbols:edit-square-outline-rounded",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "admin",
|
value: "admin",
|
||||||
value: "管理员",
|
label: "管理员",
|
||||||
|
color: "orange",
|
||||||
|
icon: "material-symbols:manage-accounts-rounded",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
const projectMemberStatusDict = dict({
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
value: "pending",
|
||||||
|
label: "待审核",
|
||||||
|
color: "orange",
|
||||||
|
icon: "material-symbols:hourglass-top",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "approved",
|
||||||
|
label: "已加入",
|
||||||
|
color: "green",
|
||||||
|
icon: "material-symbols:done-all",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "rejected",
|
||||||
|
label: "已拒绝",
|
||||||
|
color: "red",
|
||||||
|
icon: "material-symbols:close",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@@ -36,8 +66,16 @@ const myProjectDict = dict({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const userDict = dict({
|
const userDict = dict({
|
||||||
url: "/sys/authority/user/getSimpleUsers",
|
url: "/basic/user/getSimpleUsers",
|
||||||
value: "id",
|
value: "id",
|
||||||
|
getData: async () => {
|
||||||
|
const res = await request({
|
||||||
|
url: "/basic/user/getSimpleUsers",
|
||||||
|
method: "POST",
|
||||||
|
});
|
||||||
|
return res;
|
||||||
|
},
|
||||||
|
immediate: false,
|
||||||
onReady: ({ dict }) => {
|
onReady: ({ dict }) => {
|
||||||
for (const item of dict.data) {
|
for (const item of dict.data) {
|
||||||
item.label = item.nickName || item.username || item.phoneCode + item.mobile;
|
item.label = item.nickName || item.username || item.phoneCode + item.mobile;
|
||||||
@@ -50,5 +88,6 @@ export function useDicts() {
|
|||||||
projectPermissionDict,
|
projectPermissionDict,
|
||||||
myProjectDict,
|
myProjectDict,
|
||||||
userDict,
|
userDict,
|
||||||
|
projectMemberStatusDict,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<fs-crud ref="crudRef" v-bind="crudBinding">
|
<fs-crud ref="crudRef" v-bind="crudBinding">
|
||||||
<template #pagination-left>
|
<template #pagination-left>
|
||||||
<a-tooltip :title="t('certd.batchDelete')">
|
<a-tooltip v-if="hasActionPermission('write')" :title="t('certd.batchDelete')">
|
||||||
<fs-button icon="DeleteOutlined" @click="handleBatchDelete"></fs-button>
|
<fs-button icon="DeleteOutlined" @click="handleBatchDelete"></fs-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
@@ -20,13 +20,20 @@ import createCrudOptions from "./crud";
|
|||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import { DeleteBatch } from "./api";
|
import { DeleteBatch } from "./api";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
|
import { useCrudPermission } from "/@/plugin/permission";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "PipelineHistory",
|
name: "PipelineHistory",
|
||||||
});
|
});
|
||||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
|
||||||
|
const context: any = {
|
||||||
|
permission: { isProjectPermission: true },
|
||||||
|
};
|
||||||
|
|
||||||
|
const { hasActionPermission } = useCrudPermission(context);
|
||||||
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context });
|
||||||
|
|
||||||
const selectedRowKeys = context.selectedRowKeys;
|
const selectedRowKeys = context.selectedRowKeys;
|
||||||
const handleBatchDelete = () => {
|
const handleBatchDelete = () => {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { useCertUpload } from "/@/views/certd/pipeline/cert-upload/use";
|
|||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { useProjectStore } from "/@/store/project";
|
import { useProjectStore } from "/@/store/project";
|
||||||
import { useDicts } from "../../dicts";
|
import { useDicts } from "../../dicts";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
|
|
||||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@@ -39,6 +40,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
const { myProjectDict } = useDicts();
|
const { myProjectDict } = useDicts();
|
||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
const projectStore = useProjectStore();
|
const projectStore = useProjectStore();
|
||||||
|
const userStore = useUserStore();
|
||||||
const model = useModal();
|
const model = useModal();
|
||||||
const viewCert = async (row: any) => {
|
const viewCert = async (row: any) => {
|
||||||
const cert = await api.GetCert(row.id);
|
const cert = await api.GetCert(row.id);
|
||||||
@@ -140,7 +142,12 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
notification.error({ message: t("certd.certificateNotGenerated") });
|
notification.error({ message: t("certd.certificateNotGenerated") });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.open("/api/monitor/cert/download?id=" + row.id);
|
let url = "/api/monitor/cert/download?id=" + row.id;
|
||||||
|
if (projectStore.isEnterprise) {
|
||||||
|
url += `&projectId=${projectStore.currentProject?.id}`;
|
||||||
|
}
|
||||||
|
url += `&token=${userStore.getToken}`;
|
||||||
|
window.open(url);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const { t } = useI18n();
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: "CertStore",
|
name: "CertStore",
|
||||||
});
|
});
|
||||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: { permission: { isProjectPermission: true } } });
|
||||||
|
|
||||||
// 页面打开后获取列表数据
|
// 页面打开后获取列表数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -734,7 +734,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 100,
|
width: 140,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
@@ -757,7 +757,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
helper: t("monitor.ipSyncModeHelper"),
|
helper: t("monitor.ipSyncModeHelper"),
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 100,
|
width: 140,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
@@ -779,7 +779,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
helper: t("monitor.ipIgnoreCoherenceHelper"),
|
helper: t("monitor.ipIgnoreCoherenceHelper"),
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 100,
|
width: 180,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<div class="helper">{{ t("monitor.setting.cronTrigger") }}</div>
|
<div class="helper">{{ t("monitor.setting.cronTrigger") }}</div>
|
||||||
</a-form-item>
|
</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">{{ t("certd.save") }}</loading-button>
|
<loading-button type="primary" html-type="button" :click="doSave" :disabled="!hasActionPermission('write')">{{ t("certd.save") }}</loading-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,6 +55,7 @@ import { utils } from "/@/utils";
|
|||||||
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
import { useSettingStore } from "/src/store/settings";
|
import { useSettingStore } from "/src/store/settings";
|
||||||
|
import { useCrudPermission } from "/@/plugin/permission";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
@@ -73,6 +74,8 @@ async function loadUserSettings() {
|
|||||||
merge(formState, data);
|
merge(formState, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { hasActionPermission } = useCrudPermission({ permission: { isProjectPermission: true } });
|
||||||
|
|
||||||
loadUserSettings();
|
loadUserSettings();
|
||||||
const doSave = async (form: any) => {
|
const doSave = async (form: any) => {
|
||||||
await utils.sleep(300);
|
await utils.sleep(300);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default defineComponent({
|
|||||||
setup() {
|
setup() {
|
||||||
const api = createNotificationApi();
|
const api = createNotificationApi();
|
||||||
notificationProvide(api);
|
notificationProvide(api);
|
||||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: { api } });
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: { api, permission: { isProjectPermission: true } } });
|
||||||
|
|
||||||
// 页面打开后获取列表数据
|
// 页面打开后获取列表数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { OPEN_API_DOC } from "/@/views/certd/open/openkey/api";
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: "OpenKey",
|
name: "OpenKey",
|
||||||
});
|
});
|
||||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: { permission: { isProjectPermission: true } } });
|
||||||
|
|
||||||
// 页面打开后获取列表数据
|
// 页面打开后获取列表数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -16,13 +16,16 @@ import { useCertViewer } from "/@/views/certd/pipeline/use";
|
|||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
import { useDicts } from "../dicts";
|
import { useDicts } from "../dicts";
|
||||||
import { useProjectStore } from "/@/store/project";
|
import { useProjectStore } from "/@/store/project";
|
||||||
|
import { useCrudPermission } from "/@/plugin/permission";
|
||||||
|
|
||||||
export default function ({ crudExpose, context: { selectedRowKeys, openCertApplyDialog, hasActionPermission } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context: { selectedRowKeys, openCertApplyDialog, permission } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const lastResRef = ref();
|
const lastResRef = ref();
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const { hasActionPermission } = useCrudPermission({ permission });
|
||||||
|
|
||||||
const { openUploadCreateDialog } = useCertUpload();
|
const { openUploadCreateDialog } = useCertUpload();
|
||||||
|
|
||||||
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
||||||
@@ -50,6 +53,7 @@ export default function ({ crudExpose, context: { selectedRowKeys, openCertApply
|
|||||||
delete form.lastVars;
|
delete form.lastVars;
|
||||||
delete form.createTime;
|
delete form.createTime;
|
||||||
delete form.id;
|
delete form.id;
|
||||||
|
delete form.webhook;
|
||||||
let pipeline = form.content;
|
let pipeline = form.content;
|
||||||
if (typeof pipeline === "string" && pipeline.startsWith("{")) {
|
if (typeof pipeline === "string" && pipeline.startsWith("{")) {
|
||||||
pipeline = JSON.parse(form.content);
|
pipeline = JSON.parse(form.content);
|
||||||
@@ -75,8 +79,8 @@ export default function ({ crudExpose, context: { selectedRowKeys, openCertApply
|
|||||||
function onDialogOpen(opt: any) {
|
function onDialogOpen(opt: any) {
|
||||||
const searchForm = crudExpose.getSearchValidatedFormData();
|
const searchForm = crudExpose.getSearchValidatedFormData();
|
||||||
opt.initialForm = {
|
opt.initialForm = {
|
||||||
...opt.initialForm,
|
|
||||||
groupId: searchForm.groupId,
|
groupId: searchForm.groupId,
|
||||||
|
...opt.initialForm,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,11 +128,11 @@ export default function ({ crudExpose, context: { selectedRowKeys, openCertApply
|
|||||||
click() {
|
click() {
|
||||||
openCertApplyDialog({ key: "CertApply" });
|
openCertApplyDialog({ key: "CertApply" });
|
||||||
},
|
},
|
||||||
show: hasActionPermission("add"),
|
show: hasActionPermission("write"),
|
||||||
},
|
},
|
||||||
uploadCert: {
|
uploadCert: {
|
||||||
order: 2,
|
order: 2,
|
||||||
show: hasActionPermission("uploadCert"),
|
show: hasActionPermission("write"),
|
||||||
text: t("certd.commercialCertHosting"),
|
text: t("certd.commercialCertHosting"),
|
||||||
type: "primary",
|
type: "primary",
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@@ -219,7 +223,7 @@ export default function ({ crudExpose, context: { selectedRowKeys, openCertApply
|
|||||||
row = info.pipeline;
|
row = info.pipeline;
|
||||||
row.content = JSON.parse(row.content);
|
row.content = JSON.parse(row.content);
|
||||||
row.title = row.title + "_copy";
|
row.title = row.title + "_copy";
|
||||||
await crudExpose.openCopy({
|
await crudExpose.openAdd({
|
||||||
row: row,
|
row: row,
|
||||||
index: context.index,
|
index: context.index,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,12 +14,16 @@
|
|||||||
import { defineComponent, onActivated, onMounted } from "vue";
|
import { defineComponent, onActivated, onMounted } from "vue";
|
||||||
import { useFs } from "@fast-crud/fast-crud";
|
import { useFs } from "@fast-crud/fast-crud";
|
||||||
import createCrudOptions from "./crud";
|
import createCrudOptions from "./crud";
|
||||||
import { createApi } from "./api";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "PipelineGroupManager",
|
name: "PipelineGroupManager",
|
||||||
setup() {
|
setup() {
|
||||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
const { crudBinding, crudRef, crudExpose } = useFs({
|
||||||
|
createCrudOptions,
|
||||||
|
context: {
|
||||||
|
permission: { isProjectPermission: true },
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// 页面打开后获取列表数据
|
// 页面打开后获取列表数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -37,11 +37,11 @@
|
|||||||
<div v-if="selectedRowKeys.length > 0" class="batch-actions">
|
<div v-if="selectedRowKeys.length > 0" class="batch-actions">
|
||||||
<div class="batch-actions-inner">
|
<div class="batch-actions-inner">
|
||||||
<span>{{ t("certd.selectedCount", { count: selectedRowKeys.length }) }}</span>
|
<span>{{ t("certd.selectedCount", { count: selectedRowKeys.length }) }}</span>
|
||||||
<fs-button icon="ion:trash-outline" class="color-red" type="link" :text="t('certd.batchDelete')" @click="batchDelete"></fs-button>
|
<fs-button v-if="hasActionPermission('write')" icon="ion:trash-outline" class="color-red" type="link" :text="t('certd.batchDelete')" @click="batchDelete"></fs-button>
|
||||||
<batch-rerun :selected-row-keys="selectedRowKeys" @change="batchFinished"></batch-rerun>
|
<batch-rerun :selected-row-keys="selectedRowKeys" @change="batchFinished"></batch-rerun>
|
||||||
<change-group :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-group>
|
<change-group v-if="hasActionPermission('write')" :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-group>
|
||||||
<change-notification :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-notification>
|
<change-notification v-if="hasActionPermission('write')" :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-notification>
|
||||||
<change-trigger :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-trigger>
|
<change-trigger v-if="hasActionPermission('write')" :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-trigger>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template #form-bottom>
|
<template #form-bottom>
|
||||||
|
|||||||
+1
@@ -49,6 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</v-draggable>
|
</v-draggable>
|
||||||
|
<div v-if="currentTask.steps?.length > 0" class="helper mt-6">任务步骤会串行执行,如果前面步骤失败,后面的步骤不会运行</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<fs-crud ref="crudRef" v-bind="crudBinding">
|
<fs-crud ref="crudRef" v-bind="crudBinding">
|
||||||
<template #pagination-left>
|
<template #pagination-left>
|
||||||
<a-tooltip :title="t('certd.batchDelete')">
|
<a-tooltip v-if="hasActionPermission('write')" :title="t('certd.batchDelete')">
|
||||||
<fs-button icon="DeleteOutlined" @click="handleBatchDelete"></fs-button>
|
<fs-button icon="DeleteOutlined" @click="handleBatchDelete"></fs-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
@@ -32,13 +32,21 @@ import createCrudOptions from "./crud";
|
|||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import { DeleteBatch } from "./api";
|
import { DeleteBatch } from "./api";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
|
import { useCrudPermission } from "/@/plugin/permission";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "CnameRecord",
|
name: "CnameRecord",
|
||||||
});
|
});
|
||||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
const context: any = {
|
||||||
|
permission: {
|
||||||
|
isProjectPermission: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const { hasActionPermission } = useCrudPermission({ permission: context.permission });
|
||||||
|
context.hasActionPermission = hasActionPermission;
|
||||||
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context });
|
||||||
|
|
||||||
const selectedRowKeys = context.selectedRowKeys;
|
const selectedRowKeys = context.selectedRowKeys;
|
||||||
const handleBatchDelete = () => {
|
const handleBatchDelete = () => {
|
||||||
|
|||||||
@@ -3,8 +3,12 @@ import { notification } from "ant-design-vue";
|
|||||||
import CertView from "/@/views/certd/pipeline/cert-view.vue";
|
import CertView from "/@/views/certd/pipeline/cert-view.vue";
|
||||||
import { env } from "/@/utils/util.env";
|
import { env } from "/@/utils/util.env";
|
||||||
import { useModal } from "/@/use/use-modal";
|
import { useModal } from "/@/use/use-modal";
|
||||||
|
import { useProjectStore } from "/@/store/project";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
|
|
||||||
export function useCertViewer() {
|
export function useCertViewer() {
|
||||||
|
const projectStore = useProjectStore();
|
||||||
|
const userStore = useUserStore();
|
||||||
const model = useModal();
|
const model = useModal();
|
||||||
const viewCert = async (id: number) => {
|
const viewCert = async (id: number) => {
|
||||||
const cert = await api.GetCert(id);
|
const cert = await api.GetCert(id);
|
||||||
@@ -33,7 +37,11 @@ export function useCertViewer() {
|
|||||||
content: () => {
|
content: () => {
|
||||||
const children = [];
|
const children = [];
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
const downloadUrl = `${env.API}/pi/history/download?pipelineId=${id}&fileId=${file.id}`;
|
let downloadUrl = `${env.API}/pi/history/download?pipelineId=${id}&fileId=${file.id}`;
|
||||||
|
if (projectStore.isEnterprise) {
|
||||||
|
downloadUrl += `&projectId=${projectStore.currentProject?.id}`;
|
||||||
|
}
|
||||||
|
downloadUrl += `&token=${userStore.getToken}`;
|
||||||
children.push(
|
children.push(
|
||||||
<div>
|
<div>
|
||||||
<div class={"flex-o m-5"}>
|
<div class={"flex-o m-5"}>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { request } from "/src/api/service";
|
import { request } from "/src/api/service";
|
||||||
|
|
||||||
const apiPrefix = "/enterprise/myProjectMember";
|
const apiPrefix = "/enterprise/projectMember";
|
||||||
const userApiPrefix = "/sys/authority/user";
|
const userApiPrefix = "/sys/authority/user";
|
||||||
export async function GetList(query: any) {
|
export async function GetList(query: any) {
|
||||||
return await request({
|
return await request({
|
||||||
@@ -65,3 +65,25 @@ export async function GetUserSimpleByIds(query: any) {
|
|||||||
data: query,
|
data: query,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function ApproveJoin(form: any) {
|
||||||
|
return await request({
|
||||||
|
url: "/enterprise/project/approveJoin",
|
||||||
|
method: "post",
|
||||||
|
data: form,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function GetSelfResources() {
|
||||||
|
return await request({
|
||||||
|
url: "/enterprise/transfer/selfResources",
|
||||||
|
method: "post",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function TransferResources() {
|
||||||
|
return await request({
|
||||||
|
url: "/enterprise/transfer/doTransfer",
|
||||||
|
method: "post",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import * as api from "./api";
|
|||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
import { userDict } from "../../dicts";
|
import { useDicts } from "../../dicts";
|
||||||
|
import { useApprove } from "./use";
|
||||||
|
|
||||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -34,6 +35,9 @@ 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 { hasActionPermission } = context;
|
||||||
|
const { userDict, projectMemberStatusDict, projectPermissionDict } = useDicts();
|
||||||
|
const { openApproveDialog } = useApprove();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
crudOptions: {
|
crudOptions: {
|
||||||
@@ -105,7 +109,10 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
search: {
|
search: {
|
||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
form: {},
|
form: {
|
||||||
|
show: true,
|
||||||
|
rules: [{ required: true, message: "请选择用户" }],
|
||||||
|
},
|
||||||
editForm: {
|
editForm: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
@@ -116,23 +123,64 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
permission: {
|
permission: {
|
||||||
title: t("certd.ent.projectPermission"),
|
title: t("certd.ent.projectPermission"),
|
||||||
type: "dict-select",
|
type: "dict-select",
|
||||||
dict: dict({
|
dict: projectPermissionDict,
|
||||||
data: [
|
|
||||||
{ label: t("certd.ent.permission.read"), value: "read", color: "cyan" },
|
|
||||||
{ label: t("certd.ent.permission.write"), value: "write", color: "blue" },
|
|
||||||
{ label: t("certd.ent.permission.admin"), value: "admin", color: "green" },
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
search: {
|
search: {
|
||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
show: true,
|
show: true,
|
||||||
|
rules: [{ required: true, message: "请选择权限" }],
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 200,
|
width: 200,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
status: {
|
||||||
|
title: t("certd.ent.projectMemberStatus"),
|
||||||
|
type: "dict-select",
|
||||||
|
dict: projectMemberStatusDict,
|
||||||
|
search: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
show: true,
|
||||||
|
rules: [{ required: true, message: "请选择状态" }],
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 200,
|
||||||
|
cellRender: ({ row }) => {
|
||||||
|
let approveButton: any = "";
|
||||||
|
if (row.status === "pending" && hasActionPermission("admin")) {
|
||||||
|
approveButton = (
|
||||||
|
<fs-button
|
||||||
|
class="ml-2"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
onClick={async () => {
|
||||||
|
openApproveDialog({
|
||||||
|
id: row.id,
|
||||||
|
permission: row.permission,
|
||||||
|
onSubmit: async (form: any) => {
|
||||||
|
form.userId = row.userId;
|
||||||
|
await api.ApproveJoin(form);
|
||||||
|
crudExpose.doRefresh();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
审批
|
||||||
|
</fs-button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div class="flex items-center">
|
||||||
|
<fs-values-format model-value={row.status} dict={projectMemberStatusDict}></fs-values-format>
|
||||||
|
{approveButton}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
createTime: {
|
createTime: {
|
||||||
title: t("certd.createTime"),
|
title: t("certd.createTime"),
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
|
|||||||
@@ -2,11 +2,19 @@
|
|||||||
<fs-page class="page-project-detail">
|
<fs-page class="page-project-detail">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
{{ t("certd.ent.projectDetailManager") }}
|
当前项目 :{{ project?.name }}
|
||||||
<span class="sub">
|
<span class="sub flex-inline items-center">
|
||||||
{{ t("certd.ent.projectDetailDescription") }}
|
管理员:<fs-values-format :model-value="project.adminId" :dict="userDict" color="green"></fs-values-format>
|
||||||
|
<!-- <a-divider type="vertical"></a-divider>
|
||||||
|
<fs-values-format :model-value="project.permission" :dict="projectPermissionDict"></fs-values-format>
|
||||||
|
<a-divider type="vertical"></a-divider>
|
||||||
|
<fs-values-format :model-value="project.status" :dict="projectMemberStatusDict"></fs-values-format> -->
|
||||||
|
<a-divider type="vertical"></a-divider>
|
||||||
|
<a-button class="mr-5" type="primary" @click="openTransferDialog">个人数据迁移</a-button>
|
||||||
|
<a-button v-if="userStore.isAdmin" type="primary" @click="goProjectManager">{{ t("certd.project.projectManage") }}</a-button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="more"></div>
|
||||||
</template>
|
</template>
|
||||||
<fs-crud ref="crudRef" v-bind="crudBinding">
|
<fs-crud ref="crudRef" v-bind="crudBinding">
|
||||||
<template #pagination-left>
|
<template #pagination-left>
|
||||||
@@ -19,13 +27,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onActivated, onMounted } from "vue";
|
import { onActivated, onMounted, Ref, ref } from "vue";
|
||||||
import { useFs } from "@fast-crud/fast-crud";
|
import { useFs } from "@fast-crud/fast-crud";
|
||||||
import createCrudOptions from "./crud";
|
import createCrudOptions from "./crud";
|
||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import { DeleteBatch } from "./api";
|
import { DeleteBatch } from "./api";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
import { useProjectStore } from "/@/store/project";
|
||||||
|
import { request } from "/@/api/service";
|
||||||
|
import { useDicts } from "../../dicts";
|
||||||
|
import { useCrudPermission } from "/@/plugin/permission";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
|
import { useTransfer } from "./use";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
@@ -35,11 +49,46 @@ defineOptions({
|
|||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const projectIdStr = route.query.projectId as string;
|
const projectIdStr = route.query.projectId as string;
|
||||||
const projectId = Number(projectIdStr);
|
let projectId = Number(projectIdStr);
|
||||||
|
const projectStore = useProjectStore();
|
||||||
|
if (!projectId) {
|
||||||
|
projectId = projectStore.currentProject?.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
function goProjectManager() {
|
||||||
|
router.push(`/sys/enterprise/project`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const { openTransferDialog } = useTransfer();
|
||||||
|
|
||||||
|
const { projectPermissionDict, projectMemberStatusDict, userDict } = useDicts();
|
||||||
|
|
||||||
|
const project: Ref<any> = ref({});
|
||||||
|
|
||||||
|
async function loadProjectDetail() {
|
||||||
|
if (projectId) {
|
||||||
|
const res = await request({
|
||||||
|
url: `/enterprise/project/detail`,
|
||||||
|
method: "post",
|
||||||
|
params: {
|
||||||
|
projectId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
project.value = res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const context: any = {
|
const context: any = {
|
||||||
projectId,
|
projectId,
|
||||||
|
permission: {
|
||||||
|
isProjectPermission: true,
|
||||||
|
projectPermission: "admin",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
const { hasActionPermission } = useCrudPermission(context);
|
||||||
|
context.hasActionPermission = hasActionPermission;
|
||||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context });
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context });
|
||||||
|
|
||||||
const selectedRowKeys = context.selectedRowKeys;
|
const selectedRowKeys = context.selectedRowKeys;
|
||||||
@@ -61,7 +110,12 @@ const handleBatchDelete = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 页面打开后获取列表数据
|
// 页面打开后获取列表数据
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
if (!projectId) {
|
||||||
|
message.error("您还未选择项目");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await loadProjectDetail();
|
||||||
crudExpose.doRefresh();
|
crudExpose.doRefresh();
|
||||||
});
|
});
|
||||||
onActivated(async () => {
|
onActivated(async () => {
|
||||||
|
|||||||
@@ -0,0 +1,134 @@
|
|||||||
|
import { dict } from "@fast-crud/fast-crud";
|
||||||
|
import { useDicts } from "../../dicts";
|
||||||
|
import { useFormDialog } from "/@/use/use-dialog";
|
||||||
|
import * as api from "./api";
|
||||||
|
import { useProjectStore } from "/@/store/project";
|
||||||
|
import { message, Modal } from "ant-design-vue";
|
||||||
|
import { Ref, ref } from "vue";
|
||||||
|
export function useApprove() {
|
||||||
|
const { openFormDialog } = useFormDialog();
|
||||||
|
const { projectPermissionDict, projectMemberStatusDict, userDict } = useDicts();
|
||||||
|
function openApproveDialog({ id, permission, onSubmit }: { id: any; permission: any; onSubmit: any }) {
|
||||||
|
openFormDialog({
|
||||||
|
title: "审批加入申请",
|
||||||
|
columns: {
|
||||||
|
permission: {
|
||||||
|
title: "成员权限",
|
||||||
|
type: "dict-select",
|
||||||
|
dict: projectPermissionDict,
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
title: "审批结果",
|
||||||
|
type: "dict-radio",
|
||||||
|
dict: dict({
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
label: "通过",
|
||||||
|
value: "approved",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "拒绝",
|
||||||
|
value: "rejected",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onSubmit: onSubmit,
|
||||||
|
initialForm: {
|
||||||
|
id: id,
|
||||||
|
permission: permission,
|
||||||
|
status: "approved",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
openApproveDialog,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function useTransfer() {
|
||||||
|
const { openFormDialog } = useFormDialog();
|
||||||
|
|
||||||
|
async function doTransfer() {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "请确认",
|
||||||
|
content: () => (
|
||||||
|
<div>
|
||||||
|
<p>确认迁移个人资源数据到当前项目?</p>
|
||||||
|
<p class="text-red-500">注意;此操作不可逆,一旦迁移,数据将无法还原回个人用户名下。</p>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
okText: "确认",
|
||||||
|
okType: "primary",
|
||||||
|
onOk: async () => {
|
||||||
|
await api.TransferResources();
|
||||||
|
message.success("迁移成功");
|
||||||
|
await loadMyResources();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const selfResources: Ref = ref({});
|
||||||
|
|
||||||
|
const projectStore = useProjectStore();
|
||||||
|
|
||||||
|
async function loadMyResources() {
|
||||||
|
selfResources.value = await api.GetSelfResources();
|
||||||
|
}
|
||||||
|
async function openTransferDialog() {
|
||||||
|
await loadMyResources();
|
||||||
|
openFormDialog({
|
||||||
|
title: "迁移我的个人资源到当前企业项目",
|
||||||
|
wrapper: {
|
||||||
|
buttons: {
|
||||||
|
ok: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
reset: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
body() {
|
||||||
|
return (
|
||||||
|
<div class="p-8">
|
||||||
|
<div class="flex flex-row items-center justify-evenly w-full">
|
||||||
|
<div>
|
||||||
|
<h3 class="text-lg font-bold">我原有的个人资源数量</h3>
|
||||||
|
<div class="mt-4">
|
||||||
|
<p>流水线:{selfResources.value.pipeline}</p>
|
||||||
|
<p>流水线历史:{selfResources.value.history}</p>
|
||||||
|
<p>流水线历史日志:{selfResources.value.historyLog}</p>
|
||||||
|
<p>流水线分组:{selfResources.value.pipelineGroup}</p>
|
||||||
|
<p>存储:{selfResources.value.storage}</p>
|
||||||
|
<p>证书:{selfResources.value.certInfo}</p>
|
||||||
|
<p>授权:{selfResources.value.access}</p>
|
||||||
|
<p>站点监控:{selfResources.value.siteMonitor}</p>
|
||||||
|
<p>通知:{selfResources.value.notification}</p>
|
||||||
|
<p>站点监控分组:{selfResources.value.group}</p>
|
||||||
|
|
||||||
|
<p>流水线模版:{selfResources.value.template}</p>
|
||||||
|
<p>域名:{selfResources.value.domain}</p>
|
||||||
|
<p>子域名托管:{selfResources.value.subdomain}</p>
|
||||||
|
<p>cname记录:{selfResources.value.cnameRecord}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-2xl font-bold"> 迁移到→ </div>
|
||||||
|
<div>项目:"{projectStore.currentProject?.name}"</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-row items-center justify-center w-full">
|
||||||
|
<a-button type="primary" onClick={doTransfer}>
|
||||||
|
确认迁移
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
openTransferDialog,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -30,7 +30,8 @@ const { t } = useI18n();
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: "MyProjectManager",
|
name: "MyProjectManager",
|
||||||
});
|
});
|
||||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
const context: any = { permission: { isProjectPermission: true, projectPermission: "admin" } };
|
||||||
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context });
|
||||||
|
|
||||||
const selectedRowKeys = context.selectedRowKeys;
|
const selectedRowKeys = context.selectedRowKeys;
|
||||||
const handleBatchDelete = () => {
|
const handleBatchDelete = () => {
|
||||||
|
|||||||
@@ -0,0 +1,171 @@
|
|||||||
|
<template>
|
||||||
|
<fs-page class="page-project-join">
|
||||||
|
<template #header>
|
||||||
|
<div class="title">
|
||||||
|
{{ t("certd.sysResources.projectJoin") }}
|
||||||
|
<span v-if="projectStore.projects.length === 0" class="sub">{{ t("certd.project.noProjectJoined") }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="more">
|
||||||
|
<a-button v-if="userStore.isAdmin" type="primary" @click="goProjectManager">{{ t("certd.project.projectManage") }}</a-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div class="project-container">
|
||||||
|
<h3 class="text-lg font-medium mb-4">{{ t("certd.project.projectList") }}</h3>
|
||||||
|
<div class="flex flex-wrap gap-4">
|
||||||
|
<div v-for="project in projects" :key="project.id" class="w-full md:w-1/4">
|
||||||
|
<a-card :bordered="true" class="project-card">
|
||||||
|
<div class="project-card-content">
|
||||||
|
<div class="project-info">
|
||||||
|
<div class="text-md font-bold title">{{ project.name }}</div>
|
||||||
|
<div class="flex items-center justify-start">管理员: <fs-values-format :model-value="project.adminId" :dict="userDict" color="green"></fs-values-format></div>
|
||||||
|
<p class="text-gray-500 text-sm">创建时间:{{ formatDate(project.createTime) }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex-col items-start">
|
||||||
|
<div v-if="project.status" class="mt-1 flex items-center justify-start">状态:<fs-values-format :model-value="project.status" :dict="projectMemberStatusDict"></fs-values-format></div>
|
||||||
|
<div v-if="project.permission" class="mt-1 flex items-center justify-start">权限:<fs-values-format :model-value="project.permission" :dict="projectPermissionDict"></fs-values-format></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<template #actions>
|
||||||
|
<span v-if="project.status === 'approved'" class="flex-inline items-center text-blue-500" :title="t('certd.project.viewDetail')" @click="goProjectDetail(project.id)">
|
||||||
|
<fs-icon class="fs-18 mr-2" icon="mdi:eye-outline"></fs-icon>
|
||||||
|
{{ t("certd.project.viewDetail") }}
|
||||||
|
</span>
|
||||||
|
<span v-if="!project.status || project.status === 'rejected'" class="flex-inline items-center text-blue-500" :title="t('certd.project.applyJoin')" @click="applyToJoin(project.id)">
|
||||||
|
<fs-icon class="fs-18 mr-2" icon="mdi:checkbox-marked-circle-outline"></fs-icon>
|
||||||
|
{{ t("certd.project.applyJoin") }}
|
||||||
|
</span>
|
||||||
|
<span v-if="project.status === 'pending' || project.status === 'approved'" class="flex-inline items-center text-red-500" :title="t('certd.project.leave')" @click="leaveProject(project.id)">
|
||||||
|
<fs-icon class="fs-18 mr-2" icon="mdi:arrow-right-thin-circle-outline"></fs-icon>
|
||||||
|
{{ t("certd.project.leave") }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fs-page>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import { useI18n } from "/src/locales";
|
||||||
|
import { message, Modal } from "ant-design-vue";
|
||||||
|
import { request } from "/src/api/service";
|
||||||
|
import { useProjectStore } from "/@/store/project";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { useDicts } from "../dicts";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "ProjectJoin",
|
||||||
|
});
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const { projectMemberStatusDict, projectPermissionDict, userDict } = useDicts();
|
||||||
|
|
||||||
|
const projects = ref<any[]>([]);
|
||||||
|
|
||||||
|
const projectStore = useProjectStore();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
function goProjectManager() {
|
||||||
|
// 假设这里调用跳转到项目管理页的API
|
||||||
|
router.push(`/sys/enterprise/project`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
function goProjectDetail(projectId: number) {
|
||||||
|
// 假设这里调用跳转到项目详情页的API
|
||||||
|
router.push(`/certd/project/detail?projectId=${projectId}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getSystemProjects = async () => {
|
||||||
|
try {
|
||||||
|
// 假设这里调用获取系统项目列表的API
|
||||||
|
const response = await request({
|
||||||
|
url: "/enterprise/project/all",
|
||||||
|
method: "post",
|
||||||
|
});
|
||||||
|
projects.value = response || [];
|
||||||
|
} catch (error) {
|
||||||
|
message.error(t("certd.project.fetchFailed"));
|
||||||
|
console.error("获取项目列表失败:", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const applyToJoin = async (projectId: number) => {
|
||||||
|
// 假设这里调用申请加入项目的API
|
||||||
|
Modal.confirm({
|
||||||
|
title: t("certd.project.applyJoin"),
|
||||||
|
content: t("certd.project.applyJoinConfirm"),
|
||||||
|
onOk: async () => {
|
||||||
|
await request({
|
||||||
|
url: "/enterprise/project/applyJoin",
|
||||||
|
method: "post",
|
||||||
|
data: { projectId },
|
||||||
|
});
|
||||||
|
message.success(t("certd.project.applySuccess"));
|
||||||
|
await getSystemProjects();
|
||||||
|
// 申请成功后可以刷新页面或跳转到项目列表
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const formatDate = (dateString: string) => {
|
||||||
|
if (!dateString) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return dayjs(dateString).format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getSystemProjects();
|
||||||
|
});
|
||||||
|
|
||||||
|
async function leaveProject(projectId: number) {
|
||||||
|
// 假设这里调用退出项目的API
|
||||||
|
Modal.confirm({
|
||||||
|
title: t("certd.project.leave"),
|
||||||
|
content: t("certd.project.leaveConfirm"),
|
||||||
|
onOk: async () => {
|
||||||
|
await request({
|
||||||
|
url: "/enterprise/project/leave",
|
||||||
|
method: "post",
|
||||||
|
data: { projectId },
|
||||||
|
});
|
||||||
|
message.success(t("certd.project.leaveSuccess"));
|
||||||
|
// 退出成功后可以刷新页面或跳转到项目列表
|
||||||
|
await getSystemProjects();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.page-project-join {
|
||||||
|
.project-container {
|
||||||
|
padding: 24px;
|
||||||
|
margin: 0 auto;
|
||||||
|
.project-card {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-card-content {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -35,6 +35,11 @@
|
|||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<vip-button mode="nav" style="font-size: 12px"></vip-button>
|
<vip-button mode="nav" style="font-size: 12px"></vip-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-if="settingsStore.isEnterprise">
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
<project-current></project-current>
|
||||||
|
</template>
|
||||||
<template v-if="settingsStore.isComm">
|
<template v-if="settingsStore.isComm">
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<suite-card class="m-0"></suite-card>
|
<suite-card class="m-0"></suite-card>
|
||||||
|
|||||||
@@ -90,35 +90,21 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
disabled: {
|
isSystem: {
|
||||||
title: t("certd.disabled"),
|
title: t("certd.ent.isSystem"),
|
||||||
type: "dict-switch",
|
type: "dict-switch",
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: [
|
data: [
|
||||||
{ label: t("certd.enabled"), value: false, color: "success" },
|
{ label: t("common.yes"), value: true, color: "success" },
|
||||||
{ label: t("certd.disabledLabel"), value: true, color: "error" },
|
{ label: t("common.no"), value: false, color: "error" },
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
form: {
|
form: {
|
||||||
value: false,
|
value: true,
|
||||||
|
helper: t("certd.ent.isSystemHelper"),
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 100,
|
width: 150,
|
||||||
component: {
|
|
||||||
title: t("certd.clickToToggle"),
|
|
||||||
on: {
|
|
||||||
async click({ value, row }) {
|
|
||||||
Modal.confirm({
|
|
||||||
title: t("certd.prompt"),
|
|
||||||
content: t("certd.confirmToggleStatus", { action: !value ? t("certd.disable") : t("certd.enable") }),
|
|
||||||
onOk: async () => {
|
|
||||||
await api.SetDisabled(row.id, !value);
|
|
||||||
await crudExpose.doRefresh();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
adminId: {
|
adminId: {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { useSettingStore } from "/@/store/settings";
|
|||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
import { userDict } from "../../dicts";
|
import { userDict } from "../../dicts";
|
||||||
|
import { useDicts } from "/@/views/certd/dicts";
|
||||||
|
|
||||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -35,6 +36,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
const selectedRowKeys: Ref<any[]> = ref([]);
|
const selectedRowKeys: Ref<any[]> = ref([]);
|
||||||
context.selectedRowKeys = selectedRowKeys;
|
context.selectedRowKeys = selectedRowKeys;
|
||||||
|
|
||||||
|
const { projectMemberStatusDict } = useDicts();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
crudOptions: {
|
crudOptions: {
|
||||||
settings: {
|
settings: {
|
||||||
@@ -105,7 +108,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
search: {
|
search: {
|
||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
form: {},
|
form: {
|
||||||
|
rules: [{ required: true, message: "请选择用户" }],
|
||||||
|
},
|
||||||
editForm: {
|
editForm: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
@@ -128,11 +133,34 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
show: true,
|
show: true,
|
||||||
|
rules: [{ required: true, message: "请选择权限" }],
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 200,
|
width: 200,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
status: {
|
||||||
|
title: t("certd.ent.projectMemberStatus"),
|
||||||
|
type: "dict-select",
|
||||||
|
dict: projectMemberStatusDict,
|
||||||
|
search: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
show: true,
|
||||||
|
rules: [{ required: true, message: "请选择状态" }],
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 200,
|
||||||
|
cellRender: ({ row }) => {
|
||||||
|
return (
|
||||||
|
<div class="flex items-center">
|
||||||
|
<fs-values-format model-value={row.status} dict={projectMemberStatusDict}></fs-values-format>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
createTime: {
|
createTime: {
|
||||||
title: t("certd.createTime"),
|
title: t("certd.createTime"),
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</fs-crud>
|
</fs-crud>
|
||||||
|
<AdminModeIntro v-if="!projectStore.isEnterprise" title="当前为SaaS管理模式,项目管理需要切换到企业模式" :open="true"></AdminModeIntro>
|
||||||
</fs-page>
|
</fs-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -22,7 +23,8 @@ import createCrudOptions from "./crud";
|
|||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import { DeleteBatch } from "./api";
|
import { DeleteBatch } from "./api";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
|
import { useProjectStore } from "/@/store/project";
|
||||||
|
import AdminModeIntro from "./intro.vue";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -30,6 +32,7 @@ defineOptions({
|
|||||||
});
|
});
|
||||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||||
|
|
||||||
|
const projectStore = useProjectStore();
|
||||||
const selectedRowKeys = context.selectedRowKeys;
|
const selectedRowKeys = context.selectedRowKeys;
|
||||||
const handleBatchDelete = () => {
|
const handleBatchDelete = () => {
|
||||||
if (selectedRowKeys.value?.length > 0) {
|
if (selectedRowKeys.value?.length > 0) {
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
<template>
|
||||||
|
<div v-if="open" class="admin-mode-intro" :style="fixed ? 'position: fixed;' : 'position: absolute;'" @click="close()">
|
||||||
|
<div class="mask">
|
||||||
|
<div class="intro-content">
|
||||||
|
<h2 class="intro-title text-xl font-bold">{{ title || "管理模式介绍" }}</h2>
|
||||||
|
<div class="mt-8 image-block">
|
||||||
|
<div class="flex gap-8">
|
||||||
|
<div class="intro-desc flex-1">SaaS模式:每个用户管理自己的流水线和授权资源,每个用户独立使用。</div>
|
||||||
|
<div class="intro-desc flex-1">企业模式:通过项目合作管理流水线证书和授权资源,所有用户视为企业内部员工。</div>
|
||||||
|
</div>
|
||||||
|
<div class="image-intro">
|
||||||
|
<img :src="src" alt="" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="action">
|
||||||
|
<a-button type="primary" html-type="button" @click="goSwitchMode">立即前往切换模式</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="tsx">
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
defineOptions({
|
||||||
|
name: "AdminModeIntro",
|
||||||
|
});
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
title?: string;
|
||||||
|
open?: boolean;
|
||||||
|
fixed?: boolean;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const emit = defineEmits(["update:open"]);
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
emit("update:open", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
const src = ref("static/images/ent/admin_mode.png");
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
function goSwitchMode() {
|
||||||
|
router.push("/sys/settings?tab=mode");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.admin-mode-intro {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 9999;
|
||||||
|
|
||||||
|
.mask {
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-content {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-block {
|
||||||
|
text-align: center;
|
||||||
|
.image-intro {
|
||||||
|
width: 100%;
|
||||||
|
img {
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -2,13 +2,23 @@
|
|||||||
<div class="sys-settings-form sys-settings-mode">
|
<div class="sys-settings-form sys-settings-mode">
|
||||||
<a-form :model="formState" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" autocomplete="off" @finish="onFinish">
|
<a-form :model="formState" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" autocomplete="off" @finish="onFinish">
|
||||||
<a-form-item :label="t('certd.sys.setting.adminMode')" :name="['public', 'adminMode']">
|
<a-form-item :label="t('certd.sys.setting.adminMode')" :name="['public', 'adminMode']">
|
||||||
<fs-dict-radio v-model:value="formState.public.adminMode" :dict="adminModeDict" />
|
<div class="w-full flex items-center">
|
||||||
|
<fs-dict-radio v-model:value="formState.public.adminMode" :disabled="!settingsStore.isPlus" :dict="adminModeDict" />
|
||||||
|
<vip-button class="ml-5" mode="button"></vip-button>
|
||||||
|
</div>
|
||||||
|
<div class="helper">SaaS模式:每个用户管理自己的流水线和授权资源,独立使用。</div>
|
||||||
|
<div class="helper">企业模式:通过项目合作管理流水线证书和授权资源,所有用户视为企业内部员工。</div>
|
||||||
|
<div class="helper text-red-500">建议在开始使用时固定一个合适的模式,之后就不要随意切换了。</div>
|
||||||
|
<div v-if="settingsStore.isComm" class="helper text-red-500">商业版不建议设置为企业模式,除非你确定要转成企业内部使用</div>
|
||||||
|
<div><a @click="adminModeIntroOpen = true"> 更多管理模式介绍</a></div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label=" " :colon="false" :wrapper-col="{ span: 8 }">
|
<a-form-item label=" " :colon="false" :wrapper-col="{ span: 8 }">
|
||||||
<a-button :loading="saveLoading" type="primary" html-type="submit">{{ t("certd.saveButton") }}</a-button>
|
<a-button :loading="saveLoading" type="primary" html-type="submit">{{ t("certd.saveButton") }}</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
|
<AdminModeIntro v-model:open="adminModeIntroOpen" fixed></AdminModeIntro>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -22,22 +32,25 @@ import { notification } from "ant-design-vue";
|
|||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
import { dict } from "@fast-crud/fast-crud";
|
import { dict } from "@fast-crud/fast-crud";
|
||||||
import { useProjectStore } from "/@/store/project";
|
import { useProjectStore } from "/@/store/project";
|
||||||
|
import AdminModeIntro from "/@/views/sys/enterprise/project/intro.vue";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "SettingMode",
|
name: "SettingMode",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const adminModeIntroOpen = ref(false);
|
||||||
|
|
||||||
const adminModeDict = dict({
|
const adminModeDict = dict({
|
||||||
data: [
|
data: [
|
||||||
{
|
|
||||||
label: t("certd.sys.setting.enterpriseMode"),
|
|
||||||
value: "enterprise",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: t("certd.sys.setting.saasMode"),
|
label: t("certd.sys.setting.saasMode"),
|
||||||
value: "saas",
|
value: "saas",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: t("certd.sys.setting.enterpriseMode"),
|
||||||
|
value: "enterprise",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ typeorm:
|
|||||||
default:
|
default:
|
||||||
type: mysql # mariadb
|
type: mysql # mariadb
|
||||||
host: localhost
|
host: localhost
|
||||||
port: 3309
|
port: 3308
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
database: certd
|
database: certd
|
||||||
|
|||||||
@@ -3,6 +3,33 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持迁移个人数据到企业项目中 ([c6ca832](https://github.com/certd/certd/commit/c6ca83273779ed84de1b23b5e477063af043d015))
|
||||||
|
|
||||||
|
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复部署到openwrt错误的bug ([2e3d0cc](https://github.com/certd/certd/commit/2e3d0cc57c16c48ad435bc8fde729bacaedde9f5))
|
||||||
|
* 修复复制流水线保存后丢失分组和排序号的问题 ([bc32648](https://github.com/certd/certd/commit/bc326489abc1d50a0930b4f47aa2d62d3a486798))
|
||||||
|
* 修复京东云域名申请证书报错的bug ([d9c0130](https://github.com/certd/certd/commit/d9c0130b59997144a3c274d456635b800135e43f))
|
||||||
|
* 修复偶尔下载证书报未授权的错误 ([316537e](https://github.com/certd/certd/commit/316537eb4dcbe5ec57784e8bf95ee3cdfd21dce7))
|
||||||
|
* 修复dcdn多个域名同时部署时 可能会出现证书名称重复的bug ([78c2ced](https://github.com/certd/certd/commit/78c2ced43b1a73d142b0ed783b162b97f545ab06))
|
||||||
|
* 优化dcdn部署上传多次证书 偶尔报 The CertName already exists的问题 ([72f850f](https://github.com/certd/certd/commit/72f850f675b500d12ebff2338d1b99d6fab476e1))
|
||||||
|
* **cert-plugin:** 优化又拍云客户端错误处理逻辑,当域名已绑定证书时不再抛出异常。 ([92c9ac3](https://github.com/certd/certd/commit/92c9ac382692e6c84140ff787759ab6d39ccbe96))
|
||||||
|
* esxi部署失败的bug ([1e44115](https://github.com/certd/certd/commit/1e441154617e6516a9a3610412bf597128c62696))
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* 支持企业级管理模式,项目管理,细分权限 ([3734083](https://github.com/certd/certd/commit/37340838b6a61a94b86bfa13cf5da88b26f1315a))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 站点监控支持指定ip地址检查 ([83d81b6](https://github.com/certd/certd/commit/83d81b64b3adb375366039e07c87d1ad79121c13))
|
||||||
|
|
||||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/ui-server
|
**Note:** Version bump only for package @certd/ui-server
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
|
||||||
|
CREATE TABLE `cd_project`
|
||||||
|
(
|
||||||
|
`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL,
|
||||||
|
`user_id` bigint NOT NULL,
|
||||||
|
`name` varchar(512) NOT NULL,
|
||||||
|
`admin_id` bigint NOT NULL,
|
||||||
|
`disabled` boolean NOT NULL DEFAULT false,
|
||||||
|
`is_system` boolean NOT NULL DEFAULT false,
|
||||||
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE INDEX `index_project_user_id` ON `cd_project` (`user_id`);
|
||||||
|
CREATE INDEX `index_project_admin_id` ON `cd_project` (`admin_id`);
|
||||||
|
INSERT INTO cd_project (id, user_id, `admin_id`, `name`, `disabled`, `is_system`) VALUES (1, -1, 1,'default', false,false);
|
||||||
|
|
||||||
|
ALTER TABLE cd_cert_info ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_cert_project_id` ON `cd_cert_info` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE cd_site_info ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_site_project_id` ON `cd_site_info` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE cd_site_ip ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_site_ip_project_id` ON `cd_site_ip` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE cd_open_key ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_open_key_project_id` ON `cd_open_key` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE cd_access ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_access_project_id` ON `cd_access` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE cd_addon ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_addon_project_id` ON `cd_addon` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE pi_pipeline ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_pipeline_project_id` ON `pi_pipeline` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE pi_pipeline_group ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_pipeline_group_project_id` ON `pi_pipeline_group` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE pi_storage ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_storage_project_id` ON `pi_storage` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE pi_notification ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_notification_project_id` ON `pi_notification` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE pi_history ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_history_project_id` ON `pi_history` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE pi_history_log ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_history_log_project_id` ON `pi_history_log` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE pi_template ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_template_project_id` ON `pi_template` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE pi_sub_domain ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_sub_domain_project_id` ON `pi_sub_domain` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE cd_cname_record ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_cname_record_project_id` ON `cd_cname_record` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE cd_domain ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_domain_project_id` ON `cd_domain` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE user_settings ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_user_settings_project_id` ON `user_settings` (`project_id`);
|
||||||
|
|
||||||
|
ALTER TABLE cd_group ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX `index_group_project_id` ON `cd_group` (`project_id`);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE `cd_project_member`
|
||||||
|
(
|
||||||
|
`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL,
|
||||||
|
`user_id` bigint NOT NULL,
|
||||||
|
`project_id` bigint NOT NULL,
|
||||||
|
`permission` varchar(128) NOT NULL DEFAULT 'read',
|
||||||
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE cd_project_member ADD COLUMN status varchar(128);
|
||||||
|
|
||||||
|
CREATE INDEX `index_project_member_user_id` ON `cd_project_member` (`user_id`);
|
||||||
|
CREATE INDEX `index_project_member_project_id` ON `cd_project_member` (`project_id`);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE `cd_audit_log`
|
||||||
|
(
|
||||||
|
`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL,
|
||||||
|
`user_id` bigint NOT NULL,
|
||||||
|
`username` varchar(128) NOT NULL,
|
||||||
|
`project_id` bigint NOT NULL,
|
||||||
|
`project_name` varchar(512) NOT NULL,
|
||||||
|
`type` varchar(128) NOT NULL,
|
||||||
|
`action` varchar(128) NOT NULL DEFAULT 'read',
|
||||||
|
`content` longtext NOT NULL,
|
||||||
|
`ip_address` varchar(128) NOT NULL,
|
||||||
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE INDEX `index_audit_log_user_id` ON `cd_audit_log` (`user_id`);
|
||||||
|
CREATE INDEX `index_audit_log_project_id` ON `cd_audit_log` (`project_id`);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE cd_site_info ADD COLUMN ip_address varchar(128);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE `cd_project` ENGINE = InnoDB;
|
||||||
|
ALTER TABLE `cd_project_member` ENGINE = InnoDB;
|
||||||
|
ALTER TABLE `cd_audit_log` ENGINE = InnoDB;
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
|
||||||
|
CREATE TABLE "cd_project"
|
||||||
|
(
|
||||||
|
"id" bigint PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY NOT NULL,
|
||||||
|
"user_id" bigint NOT NULL,
|
||||||
|
"name" varchar(512) NOT NULL,
|
||||||
|
"admin_id" bigint NOT NULL,
|
||||||
|
"disabled" boolean NOT NULL DEFAULT (false),
|
||||||
|
"is_system" boolean NOT NULL DEFAULT (false),
|
||||||
|
"create_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
||||||
|
"update_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE INDEX "index_project_user_id" ON "cd_project" ("user_id");
|
||||||
|
CREATE INDEX "index_project_admin_id" ON "cd_project" ("admin_id");
|
||||||
|
INSERT INTO cd_project (id, user_id, "admin_id", "name", "disabled", "is_system") VALUES (1, -1, 1,'default', false,false);
|
||||||
|
select setval('cd_project_id_seq', 1);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE cd_cert_info ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_cert_project_id" ON "cd_cert_info" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE cd_site_info ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_site_project_id" ON "cd_site_info" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE cd_site_ip ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_site_ip_project_id" ON "cd_site_ip" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE cd_open_key ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_open_key_project_id" ON "cd_open_key" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE cd_access ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_access_project_id" ON "cd_access" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE cd_addon ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_addon_project_id" ON "cd_addon" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE pi_pipeline ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_pipeline_project_id" ON "pi_pipeline" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE pi_pipeline_group ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_pipeline_group_project_id" ON "pi_pipeline_group" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE pi_storage ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_storage_project_id" ON "pi_storage" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE pi_notification ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_notification_project_id" ON "pi_notification" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE pi_history ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_history_project_id" ON "pi_history" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE pi_history_log ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_history_log_project_id" ON "pi_history_log" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE pi_template ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_template_project_id" ON "pi_template" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE pi_sub_domain ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_sub_domain_project_id" ON "pi_sub_domain" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE cd_cname_record ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_cname_record_project_id" ON "cd_cname_record" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE cd_domain ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_domain_project_id" ON "cd_domain" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE user_settings ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_user_settings_project_id" ON "user_settings" ("project_id");
|
||||||
|
|
||||||
|
ALTER TABLE cd_group ADD COLUMN project_id bigint;
|
||||||
|
CREATE INDEX "index_group_project_id" ON "cd_group" ("project_id");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE "cd_project_member"
|
||||||
|
(
|
||||||
|
"id" bigint PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY NOT NULL,
|
||||||
|
"user_id" bigint NOT NULL,
|
||||||
|
"project_id" bigint NOT NULL,
|
||||||
|
"permission" varchar(128) NOT NULL DEFAULT ('read'),
|
||||||
|
"create_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
||||||
|
"update_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP)
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE cd_project_member ADD COLUMN status varchar(128);
|
||||||
|
|
||||||
|
CREATE INDEX "index_project_member_user_id" ON "cd_project_member" ("user_id");
|
||||||
|
CREATE INDEX "index_project_member_project_id" ON "cd_project_member" ("project_id");
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE "cd_audit_log"
|
||||||
|
(
|
||||||
|
"id" bigint PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY NOT NULL,
|
||||||
|
"user_id" bigint NOT NULL,
|
||||||
|
"username" varchar(128) NOT NULL,
|
||||||
|
"project_id" bigint NOT NULL,
|
||||||
|
"project_name" varchar(512) NOT NULL,
|
||||||
|
"type" varchar(128) NOT NULL,
|
||||||
|
"action" varchar(128) NOT NULL DEFAULT ('read'),
|
||||||
|
"content" text NOT NULL,
|
||||||
|
"ip_address" varchar(128) NOT NULL,
|
||||||
|
"create_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
||||||
|
"update_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE INDEX "index_audit_log_user_id" ON "cd_audit_log" ("user_id");
|
||||||
|
CREATE INDEX "index_audit_log_project_id" ON "cd_audit_log" ("project_id");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE cd_site_info ADD COLUMN ip_address varchar(128);
|
||||||
|
|
||||||
@@ -6,6 +6,7 @@ CREATE TABLE "cd_project"
|
|||||||
"name" varchar(512) NOT NULL,
|
"name" varchar(512) NOT NULL,
|
||||||
"admin_id" integer NOT NULL,
|
"admin_id" integer NOT NULL,
|
||||||
"disabled" boolean NOT NULL DEFAULT (false),
|
"disabled" boolean NOT NULL DEFAULT (false),
|
||||||
|
"is_system" boolean NOT NULL DEFAULT (false),
|
||||||
"create_time" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
"create_time" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
||||||
"update_time" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP)
|
"update_time" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP)
|
||||||
);
|
);
|
||||||
@@ -13,7 +14,7 @@ CREATE TABLE "cd_project"
|
|||||||
|
|
||||||
CREATE INDEX "index_project_user_id" ON "cd_project" ("user_id");
|
CREATE INDEX "index_project_user_id" ON "cd_project" ("user_id");
|
||||||
CREATE INDEX "index_project_admin_id" ON "cd_project" ("admin_id");
|
CREATE INDEX "index_project_admin_id" ON "cd_project" ("admin_id");
|
||||||
INSERT INTO cd_project (id, user_id, "admin_id", "name", "disabled") VALUES (1, 0, 1,'default', false);
|
INSERT INTO cd_project (id, user_id, "admin_id", "name", "disabled", "is_system") VALUES (1, -1, 1,'default', false,false);
|
||||||
|
|
||||||
ALTER TABLE cd_cert_info ADD COLUMN project_id integer;
|
ALTER TABLE cd_cert_info ADD COLUMN project_id integer;
|
||||||
CREATE INDEX "index_cert_project_id" ON "cd_cert_info" ("project_id");
|
CREATE INDEX "index_cert_project_id" ON "cd_cert_info" ("project_id");
|
||||||
@@ -82,6 +83,7 @@ CREATE TABLE "cd_project_member"
|
|||||||
"update_time" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP)
|
"update_time" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ALTER TABLE cd_project_member ADD COLUMN status varchar(128);
|
||||||
|
|
||||||
CREATE INDEX "index_project_member_user_id" ON "cd_project_member" ("user_id");
|
CREATE INDEX "index_project_member_user_id" ON "cd_project_member" ("user_id");
|
||||||
CREATE INDEX "index_project_member_project_id" ON "cd_project_member" ("project_id");
|
CREATE INDEX "index_project_member_project_id" ON "cd_project_member" ("project_id");
|
||||||
|
|||||||
@@ -7,18 +7,23 @@ showTest: false
|
|||||||
input:
|
input:
|
||||||
clientId:
|
clientId:
|
||||||
title: ClientId
|
title: ClientId
|
||||||
helper: '[Azure Portal](https://portal.azure.com/)创建应用后获取'
|
helper: >-
|
||||||
|
[Microsoft Entra
|
||||||
|
ID](https://portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/RegisteredApps)创建应用后获取
|
||||||
required: true
|
required: true
|
||||||
clientSecretKey:
|
clientSecretKey:
|
||||||
title: ClientSecretKey
|
title: ClientSecretKey
|
||||||
component:
|
component:
|
||||||
placeholder: ClientSecretKey / appSecretKey
|
placeholder: ClientSecretKey / appSecretKey
|
||||||
|
helper: 客户端凭据->证书与机密->客户端密码->新客户端密码
|
||||||
required: true
|
required: true
|
||||||
tenantId:
|
tenantId:
|
||||||
title: TenantId
|
title: TenantId
|
||||||
helper: 租户ID,留空使用/common端点(需要应用配置为多租户)
|
|
||||||
component:
|
component:
|
||||||
placeholder: common 或 租户ID
|
placeholder: common 或 租户ID
|
||||||
|
helper: |-
|
||||||
|
根据受支持的账户类型填写 common 或 租户ID,默认为common(Microsoft个人账户)。
|
||||||
|
租户ID获取: 概述 -> 目录(租户) ID
|
||||||
value: common
|
value: common
|
||||||
required: false
|
required: false
|
||||||
pluginType: addon
|
pluginType: addon
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ input:
|
|||||||
helper: |-
|
helper: |-
|
||||||
1、支持多个域名打到一个证书上,例如: foo.com,*.foo.com,*.bar.com
|
1、支持多个域名打到一个证书上,例如: foo.com,*.foo.com,*.bar.com
|
||||||
2、子域名被通配符包含的不要填写,例如:www.foo.com已经被*.foo.com包含,不要填写www.foo.com
|
2、子域名被通配符包含的不要填写,例如:www.foo.com已经被*.foo.com包含,不要填写www.foo.com
|
||||||
3、泛域名只能通配*号那一级(*.foo.com的证书不能用于xxx.yyy.foo.com、不能用于foo.com)
|
3、泛域名只能通配*号那一级(*.foo.com的证书不能用于foo.com且不能用于xxx.yyy.foo.com)
|
||||||
4、输入一个,空格之后,再输入下一个
|
4、输入一个,空格之后,再输入下一个
|
||||||
5、如果设置了子域托管解析(比如免费的二级域名托管在CF或者阿里云),请先[设置托管子域名](#/certd/pipeline/subDomain)
|
5、如果设置了子域托管解析(比如免费的二级域名托管在CF或者阿里云),请先[设置托管子域名](#/certd/pipeline/subDomain)
|
||||||
email:
|
email:
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ input:
|
|||||||
helper: |-
|
helper: |-
|
||||||
1、支持多个域名打到一个证书上,例如: foo.com,*.foo.com,*.bar.com
|
1、支持多个域名打到一个证书上,例如: foo.com,*.foo.com,*.bar.com
|
||||||
2、子域名被通配符包含的不要填写,例如:www.foo.com已经被*.foo.com包含,不要填写www.foo.com
|
2、子域名被通配符包含的不要填写,例如:www.foo.com已经被*.foo.com包含,不要填写www.foo.com
|
||||||
3、泛域名只能通配*号那一级(*.foo.com的证书不能用于xxx.yyy.foo.com、不能用于foo.com)
|
3、泛域名只能通配*号那一级(*.foo.com的证书不能用于foo.com且不能用于xxx.yyy.foo.com)
|
||||||
4、输入一个,空格之后,再输入下一个
|
4、输入一个,空格之后,再输入下一个
|
||||||
5、如果设置了子域托管解析(比如免费的二级域名托管在CF或者阿里云),请先[设置托管子域名](#/certd/pipeline/subDomain)
|
5、如果设置了子域托管解析(比如免费的二级域名托管在CF或者阿里云),请先[设置托管子域名](#/certd/pipeline/subDomain)
|
||||||
email:
|
email:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ default:
|
|||||||
strategy:
|
strategy:
|
||||||
runStrategy: 0
|
runStrategy: 0
|
||||||
input:
|
input:
|
||||||
renewDays: 35
|
renewDays: 15
|
||||||
forceUpdate: false
|
forceUpdate: false
|
||||||
name: CertApplyLego
|
name: CertApplyLego
|
||||||
icon: ph:certificate
|
icon: ph:certificate
|
||||||
@@ -37,7 +37,7 @@ input:
|
|||||||
helper: |-
|
helper: |-
|
||||||
1、支持多个域名打到一个证书上,例如: foo.com,*.foo.com,*.bar.com
|
1、支持多个域名打到一个证书上,例如: foo.com,*.foo.com,*.bar.com
|
||||||
2、子域名被通配符包含的不要填写,例如:www.foo.com已经被*.foo.com包含,不要填写www.foo.com
|
2、子域名被通配符包含的不要填写,例如:www.foo.com已经被*.foo.com包含,不要填写www.foo.com
|
||||||
3、泛域名只能通配*号那一级(*.foo.com的证书不能用于xxx.yyy.foo.com、不能用于foo.com)
|
3、泛域名只能通配*号那一级(*.foo.com的证书不能用于foo.com且不能用于xxx.yyy.foo.com)
|
||||||
4、输入一个,空格之后,再输入下一个
|
4、输入一个,空格之后,再输入下一个
|
||||||
5、如果设置了子域托管解析(比如免费的二级域名托管在CF或者阿里云),请先[设置托管子域名](#/certd/pipeline/subDomain)
|
5、如果设置了子域托管解析(比如免费的二级域名托管在CF或者阿里云),请先[设置托管子域名](#/certd/pipeline/subDomain)
|
||||||
email:
|
email:
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ input:
|
|||||||
helper: |-
|
helper: |-
|
||||||
1、支持多个域名打到一个证书上,例如: foo.com,*.foo.com,*.bar.com
|
1、支持多个域名打到一个证书上,例如: foo.com,*.foo.com,*.bar.com
|
||||||
2、子域名被通配符包含的不要填写,例如:www.foo.com已经被*.foo.com包含,不要填写www.foo.com
|
2、子域名被通配符包含的不要填写,例如:www.foo.com已经被*.foo.com包含,不要填写www.foo.com
|
||||||
3、泛域名只能通配*号那一级(*.foo.com的证书不能用于xxx.yyy.foo.com、不能用于foo.com)
|
3、泛域名只能通配*号那一级(*.foo.com的证书不能用于foo.com且不能用于xxx.yyy.foo.com)
|
||||||
4、输入一个,空格之后,再输入下一个
|
4、输入一个,空格之后,再输入下一个
|
||||||
5、如果设置了子域托管解析(比如免费的二级域名托管在CF或者阿里云),请先[设置托管子域名](#/certd/pipeline/subDomain)
|
5、如果设置了子域托管解析(比如免费的二级域名托管在CF或者阿里云),请先[设置托管子域名](#/certd/pipeline/subDomain)
|
||||||
pfxPassword:
|
pfxPassword:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-server",
|
"name": "@certd/ui-server",
|
||||||
"version": "1.38.12",
|
"version": "1.39.1",
|
||||||
"description": "fast-server base midway",
|
"description": "fast-server base midway",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -50,20 +50,20 @@
|
|||||||
"@aws-sdk/client-route-53": "^3.964.0",
|
"@aws-sdk/client-route-53": "^3.964.0",
|
||||||
"@aws-sdk/client-s3": "^3.964.0",
|
"@aws-sdk/client-s3": "^3.964.0",
|
||||||
"@aws-sdk/client-sts": "^3.990.0",
|
"@aws-sdk/client-sts": "^3.990.0",
|
||||||
"@certd/acme-client": "^1.38.12",
|
"@certd/acme-client": "^1.39.1",
|
||||||
"@certd/basic": "^1.38.12",
|
"@certd/basic": "^1.39.1",
|
||||||
"@certd/commercial-core": "^1.38.12",
|
"@certd/commercial-core": "^1.39.1",
|
||||||
"@certd/cv4pve-api-javascript": "^8.4.2",
|
"@certd/cv4pve-api-javascript": "^8.4.2",
|
||||||
"@certd/jdcloud": "^1.38.12",
|
"@certd/jdcloud": "^1.39.1",
|
||||||
"@certd/lib-huawei": "^1.38.12",
|
"@certd/lib-huawei": "^1.39.1",
|
||||||
"@certd/lib-k8s": "^1.38.12",
|
"@certd/lib-k8s": "^1.39.1",
|
||||||
"@certd/lib-server": "^1.38.12",
|
"@certd/lib-server": "^1.39.1",
|
||||||
"@certd/midway-flyway-js": "^1.38.12",
|
"@certd/midway-flyway-js": "^1.39.1",
|
||||||
"@certd/pipeline": "^1.38.12",
|
"@certd/pipeline": "^1.39.1",
|
||||||
"@certd/plugin-cert": "^1.38.12",
|
"@certd/plugin-cert": "^1.39.1",
|
||||||
"@certd/plugin-lib": "^1.38.12",
|
"@certd/plugin-lib": "^1.39.1",
|
||||||
"@certd/plugin-plus": "^1.38.12",
|
"@certd/plugin-plus": "^1.39.1",
|
||||||
"@certd/plus-core": "^1.38.12",
|
"@certd/plus-core": "^1.39.1",
|
||||||
"@google-cloud/publicca": "^1.3.0",
|
"@google-cloud/publicca": "^1.3.0",
|
||||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.185",
|
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.185",
|
||||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.185",
|
"@huaweicloud/huaweicloud-sdk-core": "^3.1.185",
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ const development = {
|
|||||||
type: 'better-sqlite3',
|
type: 'better-sqlite3',
|
||||||
database: './data/db.sqlite',
|
database: './data/db.sqlite',
|
||||||
synchronize: false, // 如果第一次使用,不存在表,有同步的需求可以写 true
|
synchronize: false, // 如果第一次使用,不存在表,有同步的需求可以写 true
|
||||||
logging: false,
|
logging: true,
|
||||||
highlightSql: false,
|
highlightSql: false,
|
||||||
|
|
||||||
// 配置实体模型 或者 entities: '/entity',
|
// 配置实体模型 或者 entities: '/entity',
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user