Merge branch 'certd:v2' into v2
|
@ -19,6 +19,7 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
|
||||
- name: get_certd_version
|
||||
id: get_certd_version
|
||||
|
|
17
CHANGELOG.md
|
@ -3,6 +3,23 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复历史记录不能按名称查询的bug ([6113c38](https://github.com/certd/certd/commit/6113c388b7fc58b11ca19ff05cc1286d096c8d28))
|
||||
* pfx兼容windows server 2016 ([e5e468a](https://github.com/certd/certd/commit/e5e468a463f66d02f235de54b7c1e09ace5f1cb1))
|
||||
|
||||
### Features
|
||||
|
||||
* 首页全新改版 ([63ec5b5](https://github.com/certd/certd/commit/63ec5b5519c760a3330569c0da6dac157302a330))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 管理控制台数据统计 ([babd589](https://github.com/certd/certd/commit/babd5897ae013ff7c04ebfcbfac8a00d84dd627c))
|
||||
* 增加向导 ([6d9ef26](https://github.com/certd/certd/commit/6d9ef26ecab71d752c2c55d75aed4fb5f6c05a39))
|
||||
* lego 升级到 4.19.2 ([129bf53](https://github.com/certd/certd/commit/129bf53edc9bbb001fe49fbd7e239bd1d09cc128))
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
### Bug Fixes
|
||||
|
|
|
@ -1 +1 @@
|
|||
11:14
|
||||
2
|
||||
|
|
|
@ -23,19 +23,13 @@ services:
|
|||
# extra_hosts:
|
||||
# ↓↓↓↓ ---------------------------------------------------------- 这里可以配置自定义hosts,外网域名可以指向本地局域网ip地址
|
||||
# - "localdomain.comm:192.168.1.3"
|
||||
environment: # 环境变量
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
# 设置环境变量即可自定义certd配置
|
||||
# 配置项见: packages/ui/certd-server/src/config/config.default.ts
|
||||
# 配置规则: certd_ + 配置项, 点号用_代替
|
||||
# ↓↓↓↓ ----------------------------- 如果忘记管理员密码,可以设置为true,重启之后,管理员密码将改成123456,然后请及时修改回false
|
||||
- certd_system_resetAdminPasswd=false
|
||||
# ↓↓↓↓ -------------------------------- 默认同时启动https,https访问地址https://your.domain:7002
|
||||
#- certd_https_key=./data/ssl/cert.key
|
||||
#- certd_https_cert=./data/ssl/cert.crt
|
||||
#- certd_https_enabled=true
|
||||
#- certd_https_port=7002
|
||||
-
|
||||
# ↓↓↓↓ ------------------------------- 使用postgresql数据库
|
||||
# - certd_flyway_scriptDir=./db/migration-pg # 升级脚本目录
|
||||
# - certd_typeorm_dataSource_default_type=postgres # 数据库类型
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
}
|
||||
},
|
||||
"npmClient": "pnpm",
|
||||
"version": "1.26.16"
|
||||
"version": "1.27.0"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/publishlab/node-acme-client/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
## [1.26.16](https://github.com/publishlab/node-acme-client/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"description": "Simple and unopinionated ACME client",
|
||||
"private": false,
|
||||
"author": "nmorsman",
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"main": "src/index.js",
|
||||
"types": "types/index.d.ts",
|
||||
"license": "MIT",
|
||||
|
@ -60,5 +60,5 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||
},
|
||||
"gitHead": "844fd4358c84251c72c5854ea633f238014244ad"
|
||||
"gitHead": "c643d7edc3721a6d2ac701a35ef600f6b6ff4b34"
|
||||
}
|
||||
|
|
|
@ -42,19 +42,20 @@ function setGlobalProxy(opts) {
|
|||
}
|
||||
|
||||
class HttpError extends Error {
|
||||
// eslint-disable-next-line constructor-super
|
||||
constructor(error) {
|
||||
super(error || error.message);
|
||||
if (!error) {
|
||||
return;
|
||||
}
|
||||
super(error.message);
|
||||
|
||||
if (error.message.indexOf('ssl3_get_record:wrong version number') >= 0) {
|
||||
this.message = error.message;
|
||||
if (this.message && this.message.indexOf('ssl3_get_record:wrong version number') >= 0) {
|
||||
this.message = 'http协议错误,服务端要求http协议,请检查是否使用了https请求';
|
||||
}
|
||||
|
||||
this.name = error.name;
|
||||
this.code = error.code;
|
||||
this.cause = error.cause;
|
||||
|
||||
if (error.response) {
|
||||
this.status = error.response.status;
|
||||
|
@ -62,6 +63,9 @@ class HttpError extends Error {
|
|||
this.response = {
|
||||
data: error.response.data,
|
||||
};
|
||||
if (!this.message) {
|
||||
this.message = this.statusText;
|
||||
}
|
||||
}
|
||||
|
||||
let url = '';
|
||||
|
@ -73,12 +77,18 @@ class HttpError extends Error {
|
|||
params: error.config.params,
|
||||
data: error.config.data,
|
||||
};
|
||||
url = error.config.baseURL + error.config.url;
|
||||
url = (error.config.baseURL || '') + error.config.url;
|
||||
}
|
||||
if (url) {
|
||||
this.message = `${this.message}:${url}`;
|
||||
}
|
||||
|
||||
// const { stack, cause } = error;
|
||||
delete this.cause;
|
||||
delete this.stack;
|
||||
// this.cause = cause;
|
||||
// this.stack = stack;
|
||||
delete error.stack;
|
||||
delete error.cause;
|
||||
delete error.response;
|
||||
delete error.config;
|
||||
delete error.request;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
const { readCsrDomains } = require('./crypto');
|
||||
const { log } = require('./logger');
|
||||
const { wait } = require('./wait');
|
||||
const { CancelError } = require('./error');
|
||||
|
||||
const defaultOpts = {
|
||||
csr: null,
|
||||
|
@ -250,7 +251,7 @@ module.exports = async (client, userOpts) => {
|
|||
i += 1;
|
||||
log(`开始第${i}组`);
|
||||
if (opts.signal && opts.signal.aborted) {
|
||||
throw new Error('用户取消');
|
||||
throw new CancelError('用户取消');
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
@ -114,17 +114,19 @@ instance.interceptors.response.use(null, async (error) => {
|
|||
const code = response ? `HTTP ${response.status}` : error.code;
|
||||
log(`Caught ${code}, retry attempt ${config.retryAttempt}/${retryMaxAttempts} to URL ${config.url}`);
|
||||
|
||||
const retryAfter = (retryDefaultDelay * config.retryAttempt);
|
||||
/* Attempt to parse Retry-After header, fallback to default delay */
|
||||
let retryAfter = response ? parseRetryAfterHeader(response.headers['retry-after']) : 0;
|
||||
const headerRetryAfter = response ? parseRetryAfterHeader(response.headers['retry-after']) : 0;
|
||||
|
||||
if (retryAfter > 0) {
|
||||
log(`Found retry-after response header with value: ${response.headers['retry-after']}, waiting ${retryAfter} seconds`);
|
||||
}
|
||||
else {
|
||||
retryAfter = (retryDefaultDelay * config.retryAttempt);
|
||||
log(`Unable to locate or parse retry-after response header, waiting ${retryAfter} seconds`);
|
||||
if (headerRetryAfter > 0) {
|
||||
const waitMinutes = (headerRetryAfter / 60).toFixed(1);
|
||||
log(`Found retry-after response header with value: ${response.headers['retry-after']}, waiting ${waitMinutes} minutes`);
|
||||
log(JSON.stringify(response.data));
|
||||
return Promise.reject(new Agents.HttpError(error));
|
||||
}
|
||||
|
||||
log(`waiting ${retryAfter} seconds`);
|
||||
|
||||
/* Wait and retry the request */
|
||||
await new Promise((resolve) => { setTimeout(resolve, (retryAfter * 1000)); });
|
||||
return instance(config);
|
||||
|
|
|
@ -12,6 +12,7 @@ const AcmeApi = require('./api');
|
|||
const verify = require('./verify');
|
||||
const util = require('./util');
|
||||
const auto = require('./auto');
|
||||
const { CancelError } = require('./error');
|
||||
|
||||
/**
|
||||
* ACME states
|
||||
|
@ -490,9 +491,10 @@ class AcmeClient {
|
|||
|
||||
const keyAuthorization = await this.getChallengeKeyAuthorization(challenge);
|
||||
|
||||
const verifyFn = async () => {
|
||||
const verifyFn = async (abort) => {
|
||||
if (this.opts.signal && this.opts.signal.aborted) {
|
||||
throw new Error('用户取消');
|
||||
abort();
|
||||
throw new CancelError('用户取消');
|
||||
}
|
||||
await verify[challenge.type](authz, challenge, keyAuthorization);
|
||||
};
|
||||
|
@ -518,7 +520,7 @@ class AcmeClient {
|
|||
|
||||
async completeChallenge(challenge) {
|
||||
if (this.opts.signal && this.opts.signal.aborted) {
|
||||
throw new Error('用户取消');
|
||||
throw new CancelError('用户取消');
|
||||
}
|
||||
const resp = await this.api.completeChallenge(challenge.url, {});
|
||||
return resp.data;
|
||||
|
@ -559,7 +561,7 @@ class AcmeClient {
|
|||
const verifyFn = async (abort) => {
|
||||
if (this.opts.signal && this.opts.signal.aborted) {
|
||||
abort();
|
||||
throw new Error('用户取消');
|
||||
throw new CancelError('用户取消');
|
||||
}
|
||||
|
||||
const resp = await this.api.apiRequest(item.url, null, [200]);
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
class CancelError extends Error {
|
||||
constructor(message) {
|
||||
super(message);
|
||||
this.name = 'CancelError';
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
CancelError,
|
||||
};
|
|
@ -48,3 +48,4 @@ exports.agents = require('./agents');
|
|||
exports.setLogger = require('./logger').setLogger;
|
||||
|
||||
exports.walkTxtRecord = require('./verify').walkTxtRecord;
|
||||
exports.CancelError = require('./error').CancelError;
|
||||
|
|
|
@ -5,5 +5,5 @@ async function wait(ms) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
wait
|
||||
wait,
|
||||
};
|
||||
|
|
|
@ -198,6 +198,8 @@ export const agents: any;
|
|||
* Logger
|
||||
*/
|
||||
|
||||
export function setLogger(fn: (msg: string) => void): void;
|
||||
export function setLogger(fn: (message: any, ...args: any[]) => void): void;
|
||||
|
||||
export function walkTxtRecord(record: any): Promise<string[]>;
|
||||
|
||||
export const CancelError: Error;
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
### Performance Improvements
|
||||
|
|
|
@ -1 +1 @@
|
|||
11:12
|
||||
02:21
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
@ -64,5 +64,5 @@
|
|||
"vite": "^4.3.8",
|
||||
"vue-tsc": "^1.6.5"
|
||||
},
|
||||
"gitHead": "844fd4358c84251c72c5854ea633f238014244ad"
|
||||
"gitHead": "c643d7edc3721a6d2ac701a35ef600f6b6ff4b34"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export * from './util.request.js';
|
||||
export * from './util.env.js';
|
||||
export * from './util.log.js';
|
||||
export * from './util.file.js';
|
||||
export * from './util.sp.js';
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
export function isDev() {
|
||||
return process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'local';
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
import crypto from "crypto";
|
||||
import crypto from 'crypto';
|
||||
|
||||
function md5(data: string) {
|
||||
return crypto.createHash("md5").update(data).digest("hex");
|
||||
return crypto.createHash('md5').update(data).digest('hex');
|
||||
}
|
||||
|
||||
export const hashUtils = {
|
||||
|
|
|
@ -17,15 +17,14 @@ export class HttpError extends Error {
|
|||
if (!error) {
|
||||
return;
|
||||
}
|
||||
super(error.message);
|
||||
super(error.message || error.response?.statusText);
|
||||
|
||||
if (error?.message?.indexOf('ssl3_get_record:wrong version number') >= 0) {
|
||||
if (error?.message?.indexOf && error?.message?.indexOf('ssl3_get_record:wrong version number') >= 0) {
|
||||
this.message = 'http协议错误,服务端要求http协议,请检查是否使用了https请求';
|
||||
}
|
||||
|
||||
this.name = error.name;
|
||||
this.code = error.code;
|
||||
this.cause = error.cause;
|
||||
|
||||
this.status = error.response?.status;
|
||||
this.statusText = error.response?.statusText;
|
||||
|
@ -38,7 +37,7 @@ export class HttpError extends Error {
|
|||
};
|
||||
let url = error.config?.url;
|
||||
if (error.config?.baseURL) {
|
||||
url = error.config?.baseURL + url;
|
||||
url = (error.config?.baseURL || '') + url;
|
||||
}
|
||||
if (url) {
|
||||
this.message = `${this.message} : url=${url}`;
|
||||
|
@ -48,6 +47,9 @@ export class HttpError extends Error {
|
|||
data: error.response?.data,
|
||||
};
|
||||
|
||||
// const { stack, cause } = error;
|
||||
// this.cause = cause;
|
||||
// this.stack = stack;
|
||||
delete error.response;
|
||||
delete error.config;
|
||||
delete error.request;
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
### Performance Improvements
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
@ -15,8 +15,8 @@
|
|||
"test": "mocha --loader=ts-node/esm"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.26.16",
|
||||
"@certd/plus-core": "^1.26.16",
|
||||
"@certd/basic": "^1.27.0",
|
||||
"@certd/plus-core": "^1.27.0",
|
||||
"axios": "^1.7.2",
|
||||
"dayjs": "^1.11.7",
|
||||
"fix-path": "^4.0.0",
|
||||
|
@ -66,5 +66,5 @@
|
|||
"vite": "^4.3.8",
|
||||
"vue-tsc": "^1.6.5"
|
||||
},
|
||||
"gitHead": "844fd4358c84251c72c5854ea633f238014244ad"
|
||||
"gitHead": "c643d7edc3721a6d2ac701a35ef600f6b6ff4b34"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
export class CancelError extends Error {
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -135,7 +135,12 @@ export class Executor {
|
|||
this.runtime.success(runnable);
|
||||
return ResultType.success;
|
||||
} catch (e: any) {
|
||||
this.runtime.error(runnable, e);
|
||||
if (e.name === "CancelError" || this.abort.signal.aborted) {
|
||||
this.runtime.cancel(runnable);
|
||||
return ResultType.canceled;
|
||||
} else {
|
||||
this.runtime.error(runnable, e);
|
||||
}
|
||||
throw e;
|
||||
} finally {
|
||||
this.runtime.finally(runnable);
|
||||
|
|
|
@ -5,3 +5,4 @@ export * from "./storage.js";
|
|||
export * from "./file-store.js";
|
||||
export * from "./license.js";
|
||||
export * from "./handler.js";
|
||||
export * from "./exceptions.js";
|
||||
|
|
|
@ -117,7 +117,8 @@ export class RunHistory {
|
|||
}
|
||||
|
||||
logError(runnable: Runnable, e: Error) {
|
||||
// @ts-ignore
|
||||
delete e.stack;
|
||||
delete e.cause;
|
||||
const errorInfo = runnable.runnableType === "step" ? e : e.message;
|
||||
this._loggers[runnable.id].error(`[${runnable.runnableType}] [${runnable.title}]<id:${runnable.id}> :`, errorInfo);
|
||||
}
|
||||
|
|
|
@ -1,115 +0,0 @@
|
|||
/**
|
||||
* [x]-col的配置
|
||||
*/
|
||||
export type ColProps = {
|
||||
span?: number;
|
||||
[props: string]: any;
|
||||
};
|
||||
|
||||
export type FormItemProps = {
|
||||
/**
|
||||
* 字段label
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* 表单字段组件配置
|
||||
*/
|
||||
component?: ComponentProps;
|
||||
/**
|
||||
* 表单字段 [a|el|n]-col的配置
|
||||
* 一般用来配置跨列:{span:24} 占满一行
|
||||
*/
|
||||
col?: ColProps;
|
||||
/**
|
||||
* 默认值
|
||||
*/
|
||||
value?: any;
|
||||
/**
|
||||
* 帮助提示配置
|
||||
*/
|
||||
helper?: string | FormItemHelperProps;
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
* 是否显示此字段
|
||||
*/
|
||||
show?: boolean;
|
||||
/**
|
||||
* 是否是空白占位栏
|
||||
*/
|
||||
blank?: boolean;
|
||||
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
/**
|
||||
* 表单字段帮助说明配置
|
||||
*/
|
||||
export type FormItemHelperProps = {
|
||||
/**
|
||||
* 自定义渲染帮助说明
|
||||
* @param scope
|
||||
*/
|
||||
render?: (scope: any) => any;
|
||||
/**
|
||||
* 帮助文本
|
||||
*/
|
||||
text?: string;
|
||||
/**
|
||||
* 帮助说明所在的位置,[ undefined | label]
|
||||
*/
|
||||
position?: string;
|
||||
/**
|
||||
* [a|el|n]-tooltip配置
|
||||
*/
|
||||
tooltip?: object;
|
||||
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
/**
|
||||
* 组件配置
|
||||
*/
|
||||
export type ComponentProps = {
|
||||
/**
|
||||
* 组件的名称
|
||||
*/
|
||||
name?: string | object;
|
||||
/**
|
||||
* vmodel绑定的目标属性名
|
||||
*/
|
||||
vModel?: string;
|
||||
|
||||
/**
|
||||
* 当原始组件名的参数被以上属性名占用时,可以配置在这里
|
||||
* 例如:原始组件有一个叫name的属性,你想要配置它,则可以按如下配置
|
||||
* ```
|
||||
* component:{
|
||||
* name:"组件的名称"
|
||||
* props:{
|
||||
* name:"组件的name属性" <-----------
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
props?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
/**
|
||||
* 组件事件监听
|
||||
*/
|
||||
on?: {
|
||||
[key: string]: (context?: any) => void;
|
||||
};
|
||||
|
||||
/**
|
||||
* 组件其他参数
|
||||
* 事件:onXxx:(event)=>void 组件原始事件监听
|
||||
* on.onXxx:(context)=>void 组件事件监听(对原始事件包装)
|
||||
* 样式:style、class等
|
||||
*/
|
||||
[key: string]: any;
|
||||
};
|
|
@ -1,2 +0,0 @@
|
|||
export * from "./pipeline";
|
||||
export * from "./fast-crud";
|
|
@ -1,140 +0,0 @@
|
|||
export enum RunStrategy {
|
||||
AlwaysRun,
|
||||
SkipWhenSucceed,
|
||||
}
|
||||
|
||||
export enum ConcurrencyStrategy {
|
||||
Serial,
|
||||
Parallel,
|
||||
}
|
||||
|
||||
export enum NextStrategy {
|
||||
AllSuccess,
|
||||
OneSuccess,
|
||||
}
|
||||
|
||||
export enum HandlerType {
|
||||
//清空后续任务的状态
|
||||
ClearFollowStatus,
|
||||
SendEmail,
|
||||
}
|
||||
|
||||
export type EventHandler = {
|
||||
type: HandlerType;
|
||||
params: {
|
||||
[key: string]: any;
|
||||
};
|
||||
};
|
||||
|
||||
export type RunnableStrategy = {
|
||||
runStrategy?: RunStrategy;
|
||||
onSuccess?: EventHandler[];
|
||||
onError?: EventHandler[];
|
||||
};
|
||||
|
||||
export type Step = Runnable & {
|
||||
type: string; //插件类型
|
||||
input: {
|
||||
[key: string]: any;
|
||||
};
|
||||
};
|
||||
export type Task = Runnable & {
|
||||
steps: Step[];
|
||||
};
|
||||
|
||||
export type Stage = Runnable & {
|
||||
tasks: Task[];
|
||||
concurrency: ConcurrencyStrategy;
|
||||
next: NextStrategy;
|
||||
};
|
||||
|
||||
export type Trigger = {
|
||||
id: string;
|
||||
title: string;
|
||||
cron: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type FileItem = {
|
||||
id: string;
|
||||
filename: string;
|
||||
path: string;
|
||||
};
|
||||
export type Runnable = {
|
||||
id: string;
|
||||
title: string;
|
||||
strategy?: RunnableStrategy;
|
||||
runnableType?: string; // pipeline, stage, task , step
|
||||
status?: HistoryResult;
|
||||
timeout?: number;
|
||||
default?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
context?: Context;
|
||||
};
|
||||
|
||||
export type EmailOptions = {
|
||||
receivers: string[];
|
||||
};
|
||||
export type NotificationWhen = "error" | "success" | "turnToSuccess" | "start";
|
||||
export type NotificationType = "email" | "url";
|
||||
export type Notification = {
|
||||
type: NotificationType;
|
||||
when: NotificationWhen[];
|
||||
options: EmailOptions;
|
||||
};
|
||||
|
||||
export type Pipeline = Runnable & {
|
||||
version?: number;
|
||||
userId: any;
|
||||
stages: Stage[];
|
||||
triggers: Trigger[];
|
||||
notifications?: Notification[];
|
||||
};
|
||||
|
||||
export type Context = {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export type Log = {
|
||||
title: string;
|
||||
time: number;
|
||||
level: string;
|
||||
text: string;
|
||||
};
|
||||
|
||||
export enum ResultType {
|
||||
start = "start",
|
||||
success = "success",
|
||||
error = "error",
|
||||
canceled = "canceled",
|
||||
skip = "skip",
|
||||
none = "none",
|
||||
}
|
||||
|
||||
export type HistoryResultGroup = {
|
||||
[key: string]: {
|
||||
runnable: Runnable;
|
||||
res: HistoryResult;
|
||||
};
|
||||
};
|
||||
export type HistoryResult = {
|
||||
input: any;
|
||||
output: any;
|
||||
files?: FileItem[];
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
status: ResultType;
|
||||
startTime: number;
|
||||
endTime?: number;
|
||||
/**
|
||||
* 处理结果
|
||||
*/
|
||||
result?: ResultType; //success, error,skip
|
||||
message?: string;
|
||||
};
|
||||
|
||||
export type RunnableMap = {
|
||||
[id: string]: Runnable;
|
||||
};
|
|
@ -4,7 +4,7 @@ import { FileStore } from "../core/file-store.js";
|
|||
import { Logger } from "log4js";
|
||||
import { IAccessService } from "../access/index.js";
|
||||
import { ICnameProxyService, IEmailService } from "../service/index.js";
|
||||
import { IContext, PluginRequestHandleReq, RunnableCollection } from "../core/index.js";
|
||||
import { CancelError, IContext, PluginRequestHandleReq, RunnableCollection } from "../core/index.js";
|
||||
import { ILogger, logger, utils } from "../utils/index.js";
|
||||
import { HttpClient } from "../utils/index.js";
|
||||
import dayjs from "dayjs";
|
||||
|
@ -113,7 +113,7 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|||
|
||||
checkSignal() {
|
||||
if (this.ctx.signal && this.ctx.signal.aborted) {
|
||||
throw new Error("用户取消");
|
||||
throw new CancelError("用户取消");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { logger } from "../utils/index.js";
|
||||
import { isDev, logger } from "../utils/index.js";
|
||||
|
||||
export type Registrable = {
|
||||
name: string;
|
||||
|
@ -71,6 +71,9 @@ export class Registry<T> {
|
|||
if (define?.deprecated) {
|
||||
continue;
|
||||
}
|
||||
if (!isDev() && define.name.startsWith("demo")) {
|
||||
continue;
|
||||
}
|
||||
list.push({ ...define, key });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
"types": "./dist/d/index.d.ts",
|
||||
|
@ -17,5 +17,5 @@
|
|||
"rimraf": "^5.0.5",
|
||||
"rollup": "^3.7.4"
|
||||
},
|
||||
"gitHead": "844fd4358c84251c72c5854ea633f238014244ad"
|
||||
"gitHead": "c643d7edc3721a6d2ac701a35ef600f6b6ff4b34"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
@ -39,5 +39,5 @@
|
|||
"tslib": "^2.5.2",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "844fd4358c84251c72c5854ea633f238014244ad"
|
||||
"gitHead": "c643d7edc3721a6d2ac701a35ef600f6b6ff4b34"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-jdcloud
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-jdcloud
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/lib-jdcloud",
|
||||
"private": false,
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"main": "./dist/bundle.mjs",
|
||||
"module": "./dist/bundle.mjs",
|
||||
"types": "./dist/d/index.d.ts",
|
||||
|
@ -27,5 +27,5 @@
|
|||
"rimraf": "^5.0.5",
|
||||
"rollup": "^3.7.4"
|
||||
},
|
||||
"gitHead": "844fd4358c84251c72c5854ea633f238014244ad"
|
||||
"gitHead": "c643d7edc3721a6d2ac701a35ef600f6b6ff4b34"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
@ -18,7 +18,7 @@
|
|||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/pipeline": "^1.26.16",
|
||||
"@certd/pipeline": "^1.27.0",
|
||||
"@rollup/plugin-commonjs": "^23.0.4",
|
||||
"@rollup/plugin-json": "^6.0.0",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
|
@ -40,5 +40,5 @@
|
|||
"tslib": "^2.5.2",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "844fd4358c84251c72c5854ea633f238014244ad"
|
||||
"gitHead": "c643d7edc3721a6d2ac701a35ef600f6b6ff4b34"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
|
@ -26,9 +26,9 @@
|
|||
],
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.26.16",
|
||||
"@certd/basic": "^1.26.16",
|
||||
"@certd/pipeline": "^1.26.16",
|
||||
"@certd/acme-client": "^1.27.0",
|
||||
"@certd/basic": "^1.27.0",
|
||||
"@certd/pipeline": "^1.27.0",
|
||||
"@midwayjs/cache": "~3.14.0",
|
||||
"@midwayjs/core": "~3.17.1",
|
||||
"@midwayjs/i18n": "~3.17.3",
|
||||
|
@ -69,5 +69,5 @@
|
|||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "844fd4358c84251c72c5854ea633f238014244ad"
|
||||
"gitHead": "c643d7edc3721a6d2ac701a35ef600f6b6ff4b34"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
|
@ -56,5 +56,5 @@
|
|||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "844fd4358c84251c72c5854ea633f238014244ad"
|
||||
"gitHead": "c643d7edc3721a6d2ac701a35ef600f6b6ff4b34"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,20 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* pfx兼容windows server 2016 ([e5e468a](https://github.com/certd/certd/commit/e5e468a463f66d02f235de54b7c1e09ace5f1cb1))
|
||||
|
||||
### Features
|
||||
|
||||
* 首页全新改版 ([63ec5b5](https://github.com/certd/certd/commit/63ec5b5519c760a3330569c0da6dac157302a330))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* lego 升级到 4.19.2 ([129bf53](https://github.com/certd/certd/commit/129bf53edc9bbb001fe49fbd7e239bd1d09cc128))
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
### Bug Fixes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
@ -15,9 +15,9 @@
|
|||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.26.16",
|
||||
"@certd/basic": "^1.26.16",
|
||||
"@certd/pipeline": "^1.26.16",
|
||||
"@certd/acme-client": "^1.27.0",
|
||||
"@certd/basic": "^1.27.0",
|
||||
"@certd/pipeline": "^1.27.0",
|
||||
"@google-cloud/publicca": "^1.3.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"jszip": "^3.10.1",
|
||||
|
@ -57,5 +57,5 @@
|
|||
"vite": "^3.1.0",
|
||||
"vue-tsc": "^0.38.9"
|
||||
},
|
||||
"gitHead": "844fd4358c84251c72c5854ea633f238014244ad"
|
||||
"gitHead": "c643d7edc3721a6d2ac701a35ef600f6b6ff4b34"
|
||||
}
|
||||
|
|
|
@ -60,8 +60,8 @@ export class AcmeService {
|
|||
this.sslProvider = options.sslProvider || "letsencrypt";
|
||||
this.eab = options.eab;
|
||||
this.skipLocalVerify = options.skipLocalVerify ?? false;
|
||||
acme.setLogger((text: string) => {
|
||||
this.logger.info(text);
|
||||
acme.setLogger((message: any, ...args: any[]) => {
|
||||
this.logger.info(message, ...args);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ export class CertConverter {
|
|||
// 转der
|
||||
derPath = await this.convertDer(ctx);
|
||||
|
||||
//jksPath = await this.convertJks(ctx, pfxPath, opts.pfxPassword);
|
||||
//jksPath = await this.convertJks(ctx, opts.pfxPassword);
|
||||
};
|
||||
|
||||
await certReader.readCertFile({ logger: this.logger, handle });
|
||||
|
@ -64,7 +64,10 @@ export class CertConverter {
|
|||
if (pfxPassword) {
|
||||
passwordArg = `-password pass:${pfxPassword}`;
|
||||
}
|
||||
await this.exec(`openssl pkcs12 -export -out ${pfxPath} -inkey ${tmpKeyPath} -in ${tmpCrtPath} ${passwordArg}`);
|
||||
// 兼容server 2016,旧版本不能用sha256
|
||||
const oldPfxCmd = `openssl pkcs12 -macalg SHA1 -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -export -out ${pfxPath} -inkey ${tmpKeyPath} -in ${tmpCrtPath} ${passwordArg}`;
|
||||
// const newPfx = `openssl pkcs12 -export -out ${pfxPath} -inkey ${tmpKeyPath} -in ${tmpCrtPath} ${passwordArg}`;
|
||||
await this.exec(oldPfxCmd);
|
||||
return pfxPath;
|
||||
// const fileBuffer = fs.readFileSync(pfxPath);
|
||||
// this.pfxCert = fileBuffer.toString("base64");
|
||||
|
@ -95,18 +98,18 @@ export class CertConverter {
|
|||
// this.saveFile(filename, fileBuffer);
|
||||
}
|
||||
|
||||
async convertJks(opts: CertReaderHandleContext, pfxPath: string, pfxPassword = "") {
|
||||
async convertJks(opts: CertReaderHandleContext, pfxPassword = "") {
|
||||
const jksPassword = pfxPassword || "123456";
|
||||
try {
|
||||
const randomStr = Math.floor(Math.random() * 1000000) + "";
|
||||
|
||||
// const p12Path = path.join(os.tmpdir(), "/certd/tmp/", randomStr + `_cert.p12`);
|
||||
// const { tmpCrtPath, tmpKeyPath } = opts;
|
||||
// let passwordArg = "-passout pass:";
|
||||
// if (pfxPassword) {
|
||||
// passwordArg = `-password pass:${pfxPassword}`;
|
||||
// }
|
||||
// await this.exec(`openssl pkcs12 -export -in ${tmpCrtPath} -inkey ${tmpKeyPath} -out ${p12Path} -name certd ${passwordArg}`);
|
||||
const p12Path = path.join(os.tmpdir(), "/certd/tmp/", randomStr + `_cert.p12`);
|
||||
const { tmpCrtPath, tmpKeyPath } = opts;
|
||||
let passwordArg = "-passout pass:";
|
||||
if (pfxPassword) {
|
||||
passwordArg = `-password pass:${pfxPassword}`;
|
||||
}
|
||||
await this.exec(`openssl pkcs12 -export -in ${tmpCrtPath} -inkey ${tmpKeyPath} -out ${p12Path} -name certd ${passwordArg}`);
|
||||
|
||||
const jksPath = path.join(os.tmpdir(), "/certd/tmp/", randomStr + `_cert.jks`);
|
||||
const dir = path.dirname(jksPath);
|
||||
|
@ -114,8 +117,9 @@ export class CertConverter {
|
|||
fs.mkdirSync(dir, { recursive: true });
|
||||
}
|
||||
await this.exec(
|
||||
`keytool -importkeystore -srckeystore ${pfxPath} -srcstoretype PKCS12 -srcstorepass "${pfxPassword}" -destkeystore ${jksPath} -deststoretype PKCS12 -deststorepass "${jksPassword}" `
|
||||
`keytool -importkeystore -srckeystore ${p12Path} -srcstoretype PKCS12 -srcstorepass "${pfxPassword}" -destkeystore ${jksPath} -deststoretype PKCS12 -deststorepass "${jksPassword}" `
|
||||
);
|
||||
fs.unlinkSync(p12Path);
|
||||
return jksPath;
|
||||
} catch (e) {
|
||||
this.logger.error("转换jks失败", e);
|
||||
|
|
|
@ -7,6 +7,7 @@ import { CertReader } from "./cert-reader.js";
|
|||
import { CertApplyBasePlugin } from "./base.js";
|
||||
import { GoogleClient } from "../../libs/google.js";
|
||||
import { EabAccess } from "../../access";
|
||||
import { CancelError } from "@certd/pipeline";
|
||||
|
||||
export type { CertInfo };
|
||||
export * from "./cert-reader.js";
|
||||
|
@ -293,6 +294,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||
useMappingProxy: this.useProxy,
|
||||
reverseProxy: this.reverseProxy,
|
||||
privateKeyType: this.privateKeyType,
|
||||
signal: this.ctx.signal,
|
||||
// cnameProxyService: this.ctx.cnameProxyService,
|
||||
// dnsProviderCreator: this.createDnsProvider.bind(this),
|
||||
});
|
||||
|
@ -347,6 +349,9 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||
this.logger.error(e);
|
||||
throw new Error(`通配符域名已经包含了普通域名,请删除其中一个(${message})`);
|
||||
}
|
||||
if (e.name === "CancelError") {
|
||||
throw new CancelError(e.message);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import { CertApplyBasePlugin } from "../base.js";
|
|||
import fs from "fs";
|
||||
import { EabAccess } from "../../../access/index.js";
|
||||
import path from "path";
|
||||
import { utils } from "@certd/basic";
|
||||
import JSZip from "jszip";
|
||||
|
||||
export { CertReader };
|
||||
export type { CertInfo };
|
||||
|
@ -126,6 +128,31 @@ export class CertApplyLegoPlugin extends CertApplyBasePlugin {
|
|||
const savePathArgs = `--path "${saveDir}"`;
|
||||
const os_type = process.platform === "win32" ? "windows" : "linux";
|
||||
const legoPath = path.resolve("./tools", os_type, "lego");
|
||||
if (!fs.existsSync(legoPath)) {
|
||||
//解压缩
|
||||
if (os_type === "linux") {
|
||||
//判断当前是arm64 还是amd64
|
||||
const arch = process.arch;
|
||||
let platform = "amd64";
|
||||
if (arch === "arm64" || arch === "arm") {
|
||||
platform = "arm64";
|
||||
}
|
||||
await utils.sp.spawn({
|
||||
cmd: `tar -zxvf ./tools/linux/lego_linux_${platform}.tar.gz -C ./tools/linux/`,
|
||||
});
|
||||
this.logger.info("解压lego成功");
|
||||
} else {
|
||||
const zip = new JSZip();
|
||||
const data = fs.readFileSync("./tools/windows/lego_windows_amd64.zip");
|
||||
const zipData = await zip.loadAsync(data);
|
||||
const files = Object.keys(zipData.files);
|
||||
for (const file of files) {
|
||||
const content = await zipData.files[file].async("nodebuffer");
|
||||
fs.writeFileSync(`./tools/windows/${file}`, content);
|
||||
}
|
||||
this.logger.info("解压lego成功");
|
||||
}
|
||||
}
|
||||
let serverArgs = "";
|
||||
if (this.acmeServer) {
|
||||
serverArgs = ` --server ${this.acmeServer}`;
|
||||
|
|
|
@ -13,10 +13,12 @@ RUN cd /workspace/certd-server && pnpm install && npm run build-on-docker
|
|||
|
||||
FROM node:18-alpine
|
||||
RUN apk add --no-cache openssl
|
||||
RUN #apk add --no-cache openjdk11-jdk
|
||||
# RUN apk add --no-cache openjdk11-jdk
|
||||
WORKDIR /app/
|
||||
COPY --from=builder /workspace/certd-server/ /app/
|
||||
#RUN cd /app/tools/linux/ && ls -lh && tar -zxvf lego_linux_amd64.tar.gz
|
||||
RUN chmod +x /app/tools/linux/*
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
ENV NODE_ENV=production
|
||||
ENV MIDWAY_SERVER_ENV=production
|
||||
|
|
|
@ -3,6 +3,21 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.27.0](https://github.com/certd/certd/compare/v1.26.16...v1.27.0) (2024-10-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复历史记录不能按名称查询的bug ([6113c38](https://github.com/certd/certd/commit/6113c388b7fc58b11ca19ff05cc1286d096c8d28))
|
||||
|
||||
### Features
|
||||
|
||||
* 首页全新改版 ([63ec5b5](https://github.com/certd/certd/commit/63ec5b5519c760a3330569c0da6dac157302a330))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 管理控制台数据统计 ([babd589](https://github.com/certd/certd/commit/babd5897ae013ff7c04ebfcbfac8a00d84dd627c))
|
||||
* 增加向导 ([6d9ef26](https://github.com/certd/certd/commit/6d9ef26ecab71d752c2c55d75aed4fb5f6c05a39))
|
||||
|
||||
## [1.26.16](https://github.com/certd/certd/compare/v1.26.15...v1.26.16) (2024-10-30)
|
||||
|
||||
**Note:** Version bump only for package @certd/ui-client
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.26.16",
|
||||
"version": "1.27.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --open",
|
||||
|
@ -45,6 +45,7 @@
|
|||
"cron-parser": "^4.9.0",
|
||||
"cropperjs": "^1.6.1",
|
||||
"dayjs": "^1.11.10",
|
||||
"echarts": "^5.5.1",
|
||||
"highlight.js": "^11.9.0",
|
||||
"humanize-duration": "^3.27.3",
|
||||
"lodash-es": "^4.17.21",
|
||||
|
@ -58,13 +59,14 @@
|
|||
"sortablejs": "^1.15.2",
|
||||
"vue": "^3.4.21",
|
||||
"vue-cropperjs": "^5.0.0",
|
||||
"vue-echarts": "^7.0.3",
|
||||
"vue-i18n": "^9.10.2",
|
||||
"vue-router": "^4.3.0",
|
||||
"vuedraggable": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/lib-iframe": "^1.26.16",
|
||||
"@certd/pipeline": "^1.26.16",
|
||||
"@certd/lib-iframe": "^1.27.0",
|
||||
"@certd/pipeline": "^1.27.0",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 42 KiB |
|
@ -6,9 +6,9 @@
|
|||
<link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/>
|
||||
<link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/>
|
||||
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
|
||||
<link rel="stylesheet" href='demo.css'>
|
||||
<link rel="stylesheet" href='iconfont.css'>
|
||||
<script src='iconfont.js'></script>
|
||||
<link rel="stylesheet" href="demo.css">
|
||||
<link rel="stylesheet" href="iconfont.css">
|
||||
<script src="iconfont.js"></script>
|
||||
<!-- jQuery -->
|
||||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
|
||||
<!-- 代码高亮 -->
|
||||
|
@ -38,7 +38,7 @@
|
|||
<div class="main">
|
||||
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
|
||||
<img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
|
||||
|
||||
|
||||
</a></h1>
|
||||
<div class="nav-tabs">
|
||||
<ul id="tabs" class="dib-box">
|
||||
|
@ -46,44 +46,50 @@
|
|||
<li class="dib"><span>Font class</span></li>
|
||||
<li class="dib"><span>Symbol</span></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=4688792" target="_blank" class="nav-more">查看项目</a>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tab-container">
|
||||
<div class="content unicode" style="display: block;">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">华为</div>
|
||||
<div class="code-name">&#xe610;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">qiniuyun</div>
|
||||
<div class="code-name">&#xe603;</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">aliyun</div>
|
||||
<div class="code-name">&#xe601;</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">腾讯云</div>
|
||||
<div class="code-name">&#xe747;</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">doge</div>
|
||||
<div class="code-name">&#xe605;</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">bt</div>
|
||||
<div class="code-name">&#xe600;</div>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="unicode-">Unicode 引用</h2>
|
||||
|
@ -102,7 +108,7 @@
|
|||
<pre><code class="language-css"
|
||||
>@font-face {
|
||||
font-family: 'iconfont';
|
||||
src: url('iconfont.svg?t=1727153857332#iconfont') format('svg');
|
||||
src: url('iconfont.svg?t=1730278432006#iconfont') format('svg');
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||
|
@ -127,7 +133,16 @@
|
|||
</div>
|
||||
<div class="content font-class">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-huawei"></span>
|
||||
<div class="name">
|
||||
华为
|
||||
</div>
|
||||
<div class="code-name">.icon-huawei
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-qiniuyun"></span>
|
||||
<div class="name">
|
||||
|
@ -136,7 +151,7 @@
|
|||
<div class="code-name">.icon-qiniuyun
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-aliyun"></span>
|
||||
<div class="name">
|
||||
|
@ -145,7 +160,7 @@
|
|||
<div class="code-name">.icon-aliyun
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-tencentcloud"></span>
|
||||
<div class="name">
|
||||
|
@ -154,7 +169,7 @@
|
|||
<div class="code-name">.icon-tencentcloud
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-dogecloud"></span>
|
||||
<div class="name">
|
||||
|
@ -163,7 +178,7 @@
|
|||
<div class="code-name">.icon-dogecloud
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-bt"></span>
|
||||
<div class="name">
|
||||
|
@ -172,7 +187,7 @@
|
|||
<div class="code-name">.icon-bt
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="font-class-">font-class 引用</h2>
|
||||
|
@ -199,7 +214,15 @@
|
|||
</div>
|
||||
<div class="content symbol">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-huawei"></use>
|
||||
</svg>
|
||||
<div class="name">华为</div>
|
||||
<div class="code-name">#icon-huawei</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-qiniuyun"></use>
|
||||
|
@ -207,7 +230,7 @@
|
|||
<div class="name">qiniuyun</div>
|
||||
<div class="code-name">#icon-qiniuyun</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-aliyun"></use>
|
||||
|
@ -215,7 +238,7 @@
|
|||
<div class="name">aliyun</div>
|
||||
<div class="code-name">#icon-aliyun</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-tencentcloud"></use>
|
||||
|
@ -223,7 +246,7 @@
|
|||
<div class="name">腾讯云</div>
|
||||
<div class="code-name">#icon-tencentcloud</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-dogecloud"></use>
|
||||
|
@ -231,7 +254,7 @@
|
|||
<div class="name">doge</div>
|
||||
<div class="code-name">#icon-dogecloud</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-bt"></use>
|
||||
|
@ -239,7 +262,7 @@
|
|||
<div class="name">bt</div>
|
||||
<div class="code-name">#icon-bt</div>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="symbol-">Symbol 引用</h2>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 4688792 */
|
||||
src: url('iconfont.svg?t=1727153857332#iconfont') format('svg');
|
||||
src: url('iconfont.svg?t=1730278432006#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
@ -11,6 +11,10 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-huawei:before {
|
||||
content: "\e610";
|
||||
}
|
||||
|
||||
.icon-qiniuyun:before {
|
||||
content: "\e603";
|
||||
}
|
||||
|
|
|
@ -5,6 +5,13 @@
|
|||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "24164616",
|
||||
"name": "华为",
|
||||
"font_class": "huawei",
|
||||
"unicode": "e610",
|
||||
"unicode_decimal": 58896
|
||||
},
|
||||
{
|
||||
"icon_id": "9612999",
|
||||
"name": "qiniuyun",
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="qiniuyun" unicode="" d="M53.684427 804.418697a705.73155 705.73155 0 0 1 52.395618-94.012709 810.709913 810.709913 0 0 1 74.626331-96.63249c6.100347-11.003079 18.301041-15.868388 24.438812-28.106506 10.965654-9.76804 21.968734-20.733695 32.971814-31.736775a1023.698102 1023.698102 0 0 1 119.761413-86.714748c17.103427-9.805465 33.009239-18.338467 50.112667-26.871467 3.742544-4.902733 1.197614-9.805465 2.432653-14.670773 6.100347-35.441893 8.533-72.0814 13.435733-107.485868 2.432654-20.77112 3.742544-42.777279 7.297962-63.623251 6.137772-35.441893 9.805465-72.0814 14.670773-107.523293 6.100347-40.3072 9.76804-80.576976 17.103427-120.884176 3.742544-19.573506 14.670773-35.441893 23.203773-53.78036 2.432654-3.742544 6.100347-6.100347 8.570427-10.965654 31.736774-40.3072 74.476628-57.410627 125.786909-57.410627h287.053136c73.279014 0 124.589295 35.404468 152.695801 103.818174 13.435733 32.971814 15.868388 68.413707 19.536081 102.620562l25.636427 208.871388c2.470079 10.965654-1.197614 12.200694-10.965654 12.200695-24.438814 0-46.444972-6.100347-68.413707-14.670774-17.103427-4.865307-28.106507-17.103427-40.3072-28.106507a21.220225 21.220225 0 0 1-8.533002-6.100347c-8.570426-13.435733-19.573506-24.438814-24.438813-39.07216a410.819071 410.819071 0 0 1-14.670773-41.54224c-9.76804-34.169428-19.536081-69.611321-29.304121-105.015789-3.742544-17.103427-13.435733-29.341546-24.438813-42.77728a40.906008 40.906008 0 0 0-29.304121-13.435734c-59.880706-3.742544-118.488948-2.432654-178.332228-1.197614a58.159136 58.159136 0 0 0-50.112667 30.501735c-8.533 14.670773-12.200694 29.341546-15.868387 45.209934-4.865307 22.00616-14.633347 42.739854-17.103426 65.981053a11.227632 11.227632 0 0 0-1.197615 6.062921c-17.103427 63.623251-35.441893 125.824334-52.395618 189.335309-1.197614 3.742544-3.742544 7.485088-1.197614 9.768041 2.432654 3.742544 7.297961 1.23504 10.965654 0a665.124946 665.124946 0 0 1 70.846362-14.633348 811.907528 811.907528 0 0 1 204.006081-6.100347 435.557288 435.557288 0 0 1 78.181747 13.435733c20.77112 8.533 42.739854 12.200694 64.708589 18.301041 28.106507 8.570426 54.977974 19.536081 83.084479 29.341547 12.200694 6.100347 25.636428 12.200694 37.837122 18.30104a839.826907 839.826907 0 0 1 90.419867 53.742934c4.865307 3.742544 9.76804 9.76804 14.633347 12.23812 13.435733 7.485088 24.438814 17.066002 36.639507 25.636427a52.395618 52.395618 0 0 1 20.771121 15.868387c6.100347 8.570426 14.670773 14.670773 22.00616 21.968735s15.868388 13.473159 21.968733 22.006159c6.100347 7.485088 14.670773 14.670773 22.00616 21.968734s7.485088 17.140853 17.103427 22.00616c7.485088 4.865307 10.965654 13.435733 17.103426 19.53608 2.432654 2.432654 4.865307 3.742544 6.100347 6.137773 1.197614 3.742544 3.742544 6.100347 4.865308 9.76804 14.670773 17.103427 25.673853 37.837121 39.109586 57.373202 10.965654 15.905812 17.103427 33.009239 28.069082 47.680012 1.23504 3.742544 0 7.485088 2.470079 10.965655 13.435733 18.338467 19.536081 40.3072 28.069081 61.07832 3.742544 7.485088 1.23504 9.76804-6.100348 9.76804-8.533 1.23504-17.103427 2.432654-23.203773-4.902732-1.23504-2.432654-3.742544-2.432654-6.100347-2.432654a15.419282 15.419282 0 0 1-15.868387-8.533001c-8.570426-14.670773-26.908893-23.203774-30.539161-41.54224h-1.235039c-8.570426 3.742544-12.200694-3.742544-15.868388-8.533a714.825933 714.825933 0 0 0-72.0814-64.746014 748.92051 748.92051 0 0 0-63.62325-45.209934c-28.106507-17.103427-53.742934-35.404468-84.282095-47.605161-1.23504-1.23504-2.432654-2.470079-2.432654-3.742544 0-3.742544-2.470079-2.470079-4.902732-2.470079a17.178278 17.178278 0 0 1-7.485088-2.432655c-32.971814-19.536081-69.611321-32.971814-105.015789-45.209933-50.112667-18.301041-103.8556-29.304121-156.363494-36.639507a510.370746 510.370746 0 0 0-74.514055-6.100347c-59.880706 0-118.488948-2.432654-178.332228 8.570426a1135.637597 1135.637597 0 0 0-124.589295 28.069082 8.944681 8.944681 0 0 0-7.485089 8.570425 134.057932 134.057932 0 0 1-8.570426 31.736775c-12.200694 40.3072-17.066002 83.047055-39.072161 120.921601-1.23504 1.23504-2.432654 1.23504-4.902732 1.23504a1.197614 1.197614 0 0 1-1.197614-1.23504v2.470079c-8.570426 11.003079-22.00616 15.868388-35.404468 18.301042-15.905812 3.742544-20.77112-1.197614-18.338467-15.868388 4.902733-37.874547 8.533-76.946708 14.633348-116.018869 1.23504-2.432654 2.470079-6.100347-1.197614-7.297961a7.709641 7.709641 0 0 0-7.485089 0c-17.103427 9.76804-32.971814 18.301041-50.07524 26.871467-23.203774 10.965654-43.974893 25.636428-64.746014 39.072161-9.76804 4.902733-17.103427 12.200694-25.636427 18.301041a620.438969 620.438969 0 0 0-81.849441 67.178668 444.988499 444.988499 0 0 0-67.365795 68.413707A49.888114 49.888114 0 0 1 47.022699 862.802386C32.38935 862.802386 28.721657 857.899653 34.822004 844.463919z" horiz-adv-x="1525" />
|
||||
<glyph glyph-name="huawei" unicode="" d="M418.325 157.246875Q310.4375 62.38125 238.38125 62.315625t-109.940625 89.128125l289.884375 5.85z m189.525 0l289.884375-5.803125Q859.8125 62.315625 787.79375 62.315625T607.85 157.29375zM46.915625 405.46875q166.875-89.0625 214.209375-117.50625t161.146875-102.075q-181.03125-11.25-236.953125-0.3c-42.646875 8.334375-75.84375 26.521875-104.26875 54.99375Q24.29375 297.3375 46.915625 405.46875z m932.34375 0Q1001.9 297.365625 945.125 240.5625c-28.415625-28.471875-61.6125-46.659375-104.26875-54.99375q-55.9125-10.96875-236.90625 0.3 113.690625 73.640625 161.109375 102.075t214.2 117.525zM183.3875 649.996875q87.2625-115.65 119.446875-164.94375t145.3125-265.66875Q225.0125 319.734375 137.9375 418.6875c-41.709375 47.38125-41.709375 125.11875 5.625 191.465625q10.3125 14.4375 39.815625 39.815625z m659.353125 0q29.540625-25.40625 39.815625-39.815625c47.38125-66.346875 47.38125-144.046875 5.68125-191.49375q-87.075-99-310.3125-199.33125 113.11875 216.375 145.3125 265.715625t119.503125 164.925zM445.0625 784.575q43.603125-128.925 49.275-181.96875T484.878125 246.1875Q295.259375 519.159375 295.259375 642.384375T445.0625 784.575z m136.134375 0Q730.953125 765.5625 730.953125 642.384375T541.38125 246.1875q-15.159375 303.328125-9.459375 356.4t49.275 181.96875z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="qiniuyun" unicode="" d="M102.32915 778.142528a661.623328 661.623328 0 0 1 49.120892-88.136914 760.040544 760.040544 0 0 1 69.962185-90.59296c5.719075-10.315387 17.157226-14.876613 22.911387-26.349849 10.280301-9.157538 20.595688-19.437839 30.911076-29.753227a959.716971 959.716971 0 0 1 112.276324-81.295076c16.034462-9.192624 30.946162-17.192312 46.980625-25.192 3.508635-4.596312 1.122763-9.192624 2.280613-13.75385 5.719075-33.226775 7.999688-67.576313 12.596-100.768001 2.280613-19.472925 3.508635-40.103699 6.841838-59.646798 5.754161-33.226775 9.192624-67.576313 13.75385-100.803087 5.719075-37.788 9.157538-75.540915 16.034463-113.328915 3.508635-18.350162 13.75385-33.226775 21.753538-50.419087 2.280613-3.508635 5.719075-5.719075 8.034774-10.280301 29.753226-37.788 69.821839-53.822463 117.925228-53.822463h269.112315c68.699076 0 116.802464 33.191689 143.152313 97.329538 12.596 30.911076 14.876613 64.13785 18.315076 96.206777l24.034151 195.816927c2.315699 10.280301-1.122763 11.438151-10.280301 11.438151-22.911388 0-43.542162-5.719075-64.137851-13.753851-16.034462-4.561225-26.34985-16.034462-37.788-26.34985a19.893961 19.893961 0 0 1-7.999689-5.719075c-8.034775-12.596-18.350162-22.911388-22.911387-36.63015a385.142879 385.142879 0 0 1-13.75385-38.945851c-9.157538-32.033839-18.315076-65.260614-27.472613-98.452301-3.508635-16.034462-12.596-27.507699-22.911387-40.103701a38.349382 38.349382 0 0 0-27.472613-12.596c-56.138162-3.508635-111.083389-2.280613-167.186465-1.122763a54.52419 54.52419 0 0 0-46.980625 28.595377c-7.999688 13.75385-11.438151 27.507699-14.876612 42.384312-4.561225 20.630775-13.718763 40.068613-16.034463 61.857237a10.525905 10.525905 0 0 0-1.122764 5.683989c-16.034462 59.646798-33.226775 117.960313-49.120891 177.501852-1.122763 3.508635-3.508635 7.01727-1.122764 9.157538 2.280613 3.508635 6.841839 1.15785 10.280301 0a623.554637 623.554637 0 0 1 66.418464-13.718763 761.163308 761.163308 0 0 1 191.255702-5.719076 408.334958 408.334958 0 0 1 73.295387 12.596c19.472925 7.999688 40.068613 11.438151 60.664302 17.157226 26.34985 8.034775 51.54185 18.315076 77.8917 27.5077 11.438151 5.719075 24.034151 11.438151 35.472301 17.157226a787.337726 787.337726 0 0 1 84.768625 50.384c4.561225 3.508635 9.157538 9.157538 13.718764 11.473237 12.596 7.01727 22.911388 15.999376 34.349538 24.034151a49.120892 49.120892 0 0 1 19.472925 14.876613c5.719075 8.034775 13.75385 13.75385 20.630775 20.595688s14.876613 12.631087 20.595688 20.630775c5.719075 7.01727 13.75385 13.75385 20.630774 20.595688s7.01727 16.069549 16.034463 20.630775c7.01727 4.561225 10.280301 12.596 16.034462 18.315075 2.280613 2.280613 4.561225 3.508635 5.719076 5.754162 1.122763 3.508635 3.508635 5.719075 4.561225 9.157538 13.75385 16.034462 24.069237 35.472301 36.665237 53.787376 10.280301 14.911699 16.034462 30.946162 26.314765 44.700012 1.15785 3.508635 0 7.01727 2.315699 10.280301 12.596 17.192312 18.315076 37.788 26.314763 57.260925 3.508635 7.01727 1.15785 9.157538-5.719075 9.157538-7.999688 1.15785-16.034462 2.280613-21.753538-4.596312-1.15785-2.280613-3.508635-2.280613-5.719076-2.280613a14.455577 14.455577 0 0 1-14.876612-7.999688c-8.034775-13.75385-25.227087-21.753538-28.630464-38.94585h-1.157849c-8.034775 3.508635-11.438151-3.508635-14.876613-7.999688a670.149312 670.149312 0 0 0-67.576313-60.699388 702.112978 702.112978 0 0 0-59.646797-42.384313c-26.34985-16.034462-50.384-33.191689-79.014463-44.629838-1.15785-1.15785-2.280613-2.315699-2.280614-3.508636 0-3.508635-2.315699-2.315699-4.596311-2.315699a16.104635 16.104635 0 0 1-7.01727-2.280613c-30.911076-18.315076-65.260614-30.911076-98.452303-42.384312-46.980625-17.157226-97.364625-27.472613-146.590775-34.349538a478.472574 478.472574 0 0 0-69.856926-5.719076c-56.138162 0-111.083389-2.280613-167.186465 8.034775a1064.660247 1064.660247 0 0 0-116.802464 26.314764 8.385638 8.385638 0 0 0-7.01727 8.034774 125.679311 125.679311 0 0 1-8.034775 29.753226c-11.438151 37.788-15.999376 77.856614-36.630151 113.364001-1.15785 1.15785-2.280613 1.15785-4.596311 1.15785a1.122763 1.122763 0 0 1-1.122763-1.15785v2.315699c-8.034775 10.315387-20.630775 14.876613-33.191689 17.157227-14.911699 3.508635-19.472925-1.122763-17.192313-14.876614 4.596312-35.507388 7.999688-72.137538 13.718765-108.767689 1.15785-2.280613 2.315699-5.719075-1.122764-6.841839a7.227788 7.227788 0 0 0-7.017271 0c-16.034462 9.157538-30.911076 17.157226-46.945538 25.192-21.753538 10.280301-41.226463 24.034151-60.699388 36.630152-9.157538 4.596312-16.034462 11.438151-24.03415 17.157225a581.661533 581.661533 0 0 0-76.733851 62.980002 417.176718 417.176718 0 0 0-63.155433 64.13785A46.770107 46.770107 0 0 1 96.08378 832.877237C82.365016 832.877237 78.926554 828.280925 84.645629 815.684924z" horiz-adv-x="1525" />
|
||||
|
||||
<glyph glyph-name="aliyun" unicode="" d="M991.142857 521.25c-0.321428 87.964285-71.678572 159.214285-159.75 159.214285H580.464285l23.142858-91.285713 215.357142-46.821429a45.621428 45.621428 0 0 0 35.25-42.535715c0.107143-0.535715 0.107143-231.535715 0-232.071428a45.621428 45.621428 0 0 0-35.25-42.535715l-215.357142-46.821428-23.142858-91.392857h250.928572c87.964285 0 159.428572 71.25 159.75 159.214285V521.25zM205.035715 225a45.621428 45.621428 0 0 0-35.25 42.535715c-0.107143 0.642857-0.107143 231.535715 0 232.071428 0.857143 20.785715 15.642857 38.035715 35.25 42.535714l215.357142 46.821428 23.142858 91.285715H192.5c-87.964285 0-159.428572-71.142857-159.75-159.214285V245.785715c0.321428-87.964285 71.785715-159.214285 159.75-159.214287H443.428572l-23.142857 91.392857-215.25 47.035715z m215.25 170.142857h183.214285v-22.821429h-183.214285z" horiz-adv-x="1024" />
|
||||
|
||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
|
@ -18,6 +18,7 @@ export interface UserInfoRes {
|
|||
id: string | number;
|
||||
username: string;
|
||||
nickName: string;
|
||||
avatar: string;
|
||||
roleIds: number[];
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,12 @@ function createService() {
|
|||
}
|
||||
// dataAxios 是 axios 返回数据中的 data
|
||||
const dataAxios = response.data;
|
||||
|
||||
if (response.config.unpack === false) {
|
||||
//如果不需要解包
|
||||
return dataAxios;
|
||||
}
|
||||
|
||||
// 这个状态码是和后端约定的
|
||||
const { code } = dataAxios;
|
||||
// 根据 code 进行判断
|
||||
|
@ -40,10 +46,6 @@ function createService() {
|
|||
case 0:
|
||||
// [ 示例 ] code === 0 代表没有错误
|
||||
// @ts-ignore
|
||||
if (response.config.unpack === false) {
|
||||
//如果不需要解包
|
||||
return dataAxios;
|
||||
}
|
||||
return dataAxios.data;
|
||||
default:
|
||||
// 不是正确的 code
|
||||
|
|
|
@ -65,6 +65,9 @@ const onError = (error: any) => {
|
|||
};
|
||||
|
||||
const nextTime = computed(() => {
|
||||
if (props.modelValue == null) {
|
||||
return "请先设置正确的cron表达式";
|
||||
}
|
||||
try {
|
||||
const interval = parser.parseExpression(props.modelValue);
|
||||
const next = interval.next().getTime();
|
||||
|
|
|
@ -6,23 +6,16 @@ const openedRef = ref(false);
|
|||
function open() {
|
||||
openedRef.value = true;
|
||||
}
|
||||
function close() {
|
||||
openedRef.value = false;
|
||||
}
|
||||
function prev() {
|
||||
console.log("prev");
|
||||
}
|
||||
function next() {
|
||||
console.log("next");
|
||||
}
|
||||
|
||||
const settingStore = useSettingStore();
|
||||
const slots = defineSlots();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="!settingStore.isComm" class="tutorial-button" @click="open">
|
||||
<fs-icon icon="mingcute:question-line"></fs-icon>
|
||||
<div class="ml-5">使用教程</div>
|
||||
<div class="tutorial-button pointer" @click="open">
|
||||
<template v-if="!slots.default">
|
||||
<fs-icon icon="mingcute:question-line"></fs-icon>
|
||||
<div class="ml-5">使用教程</div>
|
||||
</template>
|
||||
<slot></slot>
|
||||
<a-modal v-model:open="openedRef" class="tutorial-modal" width="90%">
|
||||
<template #title> 使用教程 </template>
|
||||
<tutorial-steps v-if="openedRef" />
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<template>
|
||||
<a-steps :current="3" class="mt-10" size="small" :items="steps" @click="goPipeline"></a-steps>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
type Step = {
|
||||
title: string;
|
||||
description?: string;
|
||||
};
|
||||
|
||||
import { ref } from "vue";
|
||||
|
||||
const steps = ref<Step[]>([
|
||||
{
|
||||
title: "创建证书流水线"
|
||||
},
|
||||
{
|
||||
title: "添加部署任务"
|
||||
},
|
||||
{
|
||||
title: "定时运行"
|
||||
}
|
||||
]);
|
||||
|
||||
const router = useRouter();
|
||||
function goPipeline() {
|
||||
router.push({ path: "/certd/pipeline" });
|
||||
}
|
||||
</script>
|
|
@ -8,6 +8,9 @@
|
|||
<div class="description mt-5">
|
||||
<div v-for="desc of currentStepItem.descriptions">{{ desc }}</div>
|
||||
</div>
|
||||
<div v-if="currentStepItem.body">
|
||||
<fs-render :render-func="currentStepItem.body" />
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="currentStepItem.image">
|
||||
<div class="image-box">
|
||||
|
@ -17,13 +20,15 @@
|
|||
</div>
|
||||
|
||||
<div class="flex-center actions">
|
||||
<fs-button class="m-10" icon="mingcute:arrow-left-fill" @click="prev()">上一步</fs-button>
|
||||
<fs-button class="m-10" type="primary" icon-right="mingcute:arrow-right-fill" @click="next()">下一步</fs-button>
|
||||
<fs-button class="m-10" icon="ion:arrow-back-outline" @click="prev()">上一步</fs-button>
|
||||
<fs-button class="m-10" type="primary" icon-right="ion:arrow-forward-outline" @click="next()">下一步</fs-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx">
|
||||
import { FsRender } from "@fast-crud/fast-crud";
|
||||
import SimpleSteps from "./simple-steps.vue";
|
||||
type Step = {
|
||||
title: string;
|
||||
subTitle?: string;
|
||||
|
@ -31,9 +36,10 @@ type Step = {
|
|||
items: StepItems[];
|
||||
};
|
||||
type StepItems = {
|
||||
image: string;
|
||||
image?: string;
|
||||
title: string;
|
||||
descriptions?: string[];
|
||||
body?: () => JSX.Element;
|
||||
};
|
||||
|
||||
import { computed, nextTick, ref } from "vue";
|
||||
|
@ -45,10 +51,10 @@ const steps = ref<Step[]>([
|
|||
items: [
|
||||
{
|
||||
title: "教程演示内容",
|
||||
descriptions: [
|
||||
"1. 本教程演示如何全自动申请和更新证书,部署证书到阿里云CDN和Nginx,证书到期后自动续期,自动部署",
|
||||
"2. 演示流程:创建证书申请流水线 -> 添加部署任务 -> 运行测试 -> 设置定时执行和邮件通知"
|
||||
]
|
||||
descriptions: ["本教程演示如何自动申请证书并部署到Nginx上", "仅需3步,全自动申请部署证书"],
|
||||
body: () => {
|
||||
return <SimpleSteps></SimpleSteps>;
|
||||
}
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/1-add.png",
|
||||
|
@ -56,22 +62,7 @@ const steps = ref<Step[]>([
|
|||
descriptions: ["点击添加证书流水线,填写证书申请信息"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/2-access-provider.png",
|
||||
title: "DNS授权",
|
||||
descriptions: ["证书申请需要给域名添加TXT解析记录来验证域名所有权", "根据你的域名注册商,选择对应的平台授权"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/3-add-access.png",
|
||||
title: "第一次使用,需要添加DNS授权",
|
||||
descriptions: ["选择DNS授权,确认创建"]
|
||||
},
|
||||
// {
|
||||
// image: "/static/doc/images/3-add-access.png",
|
||||
// title: "确定创建流水线",
|
||||
// descriptions: ["选择DNS授权,信息填写无误,确认创建"]
|
||||
// },
|
||||
{
|
||||
image: "/static/doc/images/4-add-success.png",
|
||||
image: "/static/doc/images/3-add-success.png",
|
||||
title: "流水线创建成功",
|
||||
descriptions: ["此时证书申请任务已经建好", "点击手动触发即可测试证书申请", "接下来演示如何添加部署任务"]
|
||||
}
|
||||
|
@ -79,57 +70,32 @@ const steps = ref<Step[]>([
|
|||
},
|
||||
{
|
||||
title: "添加部署证书任务",
|
||||
description: "演示部署到阿里云CDN和Nginx",
|
||||
description: "演示部署到主机上的Nginx",
|
||||
items: [
|
||||
{
|
||||
image: "/static/doc/images/6-1-add-task.png",
|
||||
title: "添加部署任务",
|
||||
descriptions: ["演示第一个部署任务,部署到阿里云CDN"]
|
||||
image: "/static/doc/images/5-1-add-host.png",
|
||||
title: "添加nginx部署任务",
|
||||
descriptions: ["演示第一个部署任务,部署到nginx"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/6-2-add-task.png",
|
||||
title: "选择任务插件",
|
||||
descriptions: ["可以搜索插件,这里选择阿里云CDN插件"]
|
||||
image: "/static/doc/images/5-2-add-host.png",
|
||||
title: "填写任务参数",
|
||||
descriptions: ["填写主机上证书文件的路径", "选择主机ssh登录授权"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/6-3-add-task.png",
|
||||
title: "配置任务参数",
|
||||
descriptions: ["填写CDN的域名和证书ID", "任务保存之后,阿里云CDN的部署任务就配置好了"]
|
||||
image: "/static/doc/images/5-3-add-host.png",
|
||||
title: "让新证书生效",
|
||||
descriptions: ["执行重启脚本", "让证书生效"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/7-1-add-host-task.png",
|
||||
title: "添加主机部署任务",
|
||||
descriptions: ["接下来演示配置第二个部署任务,部署到主机", "部署到主机分两步: 1. 上传证书到主机 2. 运行主机命令"]
|
||||
image: "/static/doc/images/5-4-add-host.png",
|
||||
title: "部署任务添加成功",
|
||||
descriptions: ["现在可以运行"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/7-2-add-host-task.png",
|
||||
title: "配置上传到主机任务",
|
||||
descriptions: ["填写上传到主机任务参数", "比如证书保存路径"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/7-3-add-host-task.png",
|
||||
title: "添加主机ssh登录授权",
|
||||
descriptions: ["填写主机ip、用户名、密码,授权只需添加一次,后续其他任务可以复用"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/8-1-add-host-task.png",
|
||||
title: "上传到主机任务配置完成",
|
||||
descriptions: ["接下来配置主机执行脚本,去部署证书"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/8-2-add-host-task.png",
|
||||
title: "选择添加主机远程命令任务",
|
||||
descriptions: ["选择主机远程命令任务"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/8-4-add-host-task.png",
|
||||
title: "填写证书部署脚本",
|
||||
descriptions: ["选择主机授权,编写部署脚本,这里演示部署到nginx,需要重启nginx,让证书生效"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/8-5-add-host-task.png",
|
||||
title: "上传到主机任务的两个步骤配置完成",
|
||||
descriptions: ["接下来测试运行"]
|
||||
image: "/static/doc/images/5-5-plugin-list.png",
|
||||
title: "还可以添加其他更多部署任务",
|
||||
descriptions: ["插件列表"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -172,11 +138,6 @@ const steps = ref<Step[]>([
|
|||
title: "查看证书部署成功",
|
||||
descriptions: ["访问nginx上的网站,可以看到证书已经部署成功"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/13-2-result.png",
|
||||
title: "阿里云CDN也部署成功",
|
||||
descriptions: ["阿里云CDN上已经更新证书,证书名称已certd开头"]
|
||||
},
|
||||
{
|
||||
image: "/static/doc/images/13-3-download.png",
|
||||
title: "还可以下载证书,手动部署",
|
||||
|
@ -338,5 +299,9 @@ function previewMask() {
|
|||
font-size: 12px !important;
|
||||
color: #999 !important;
|
||||
}
|
||||
|
||||
.description {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -105,7 +105,7 @@ const vipTypeDefine = {
|
|||
comm: {
|
||||
title: "商业版",
|
||||
type: "comm",
|
||||
privilege: ["拥有专业版所有特权", "允许商用", "修改logo、标题", "多用户无限制", "支持用户支付(敬请期待)"]
|
||||
privilege: ["拥有专业版所有特权", "允许商用,可修改logo、标题", "数据统计", "插件管理", "多用户无限制", "支持用户支付(敬请期待)"]
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -256,7 +256,7 @@ function openUpgrade() {
|
|||
padding: 10px;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 5px;
|
||||
height: 160px;
|
||||
height: 170px;
|
||||
//background-color: rgba(250, 237, 167, 0.79);
|
||||
&.current {
|
||||
border-color: green;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<a-dropdown>
|
||||
<div class="fs-user-info">您好,{{ userStore.getUserInfo?.nickName }}</div>
|
||||
<div class="fs-user-info">您好,{{ userStore.getUserInfo?.nickName || userStore.getUserInfo?.username }}</div>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<fs-icon :icon="menu.meta.icon"></fs-icon>
|
||||
<span class="ml-5">{{ menu.title }} </span>
|
||||
</div>
|
||||
<tutorial-button class="flex-center header-btn" />
|
||||
<tutorial-button v-if="!settingStore.isComm" class="flex-center header-btn" />
|
||||
<vip-button class="flex-center header-btn" mode="nav" />
|
||||
</div>
|
||||
<div class="header-right header-buttons">
|
||||
|
|
|
@ -13,6 +13,20 @@ export const sysResources = [
|
|||
permission: "sys:settings:view"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
title: "控制台",
|
||||
name: "SysConsole",
|
||||
path: "/sys/console",
|
||||
component: "/sys/console/index.vue",
|
||||
meta: {
|
||||
show: () => {
|
||||
const settingStore = useSettingStore();
|
||||
return settingStore.isComm;
|
||||
},
|
||||
icon: "ion:speedometer-outline",
|
||||
permission: "sys:auth:user:view"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "用户管理",
|
||||
name: "UserManager",
|
||||
|
|
|
@ -29,3 +29,11 @@
|
|||
.fs-form-wrapper .fs-form-header {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
|
||||
|
||||
.fs-values-format .fs-tag{
|
||||
display: inline-flex;
|
||||
.fs-icon{
|
||||
margin-right: 3px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,10 @@ h1, h2, h3, h4, h5, h6 {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.flex-inline {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.flex-1 {
|
||||
flex: 1;
|
||||
|
@ -84,7 +88,16 @@ h1, h2, h3, h4, h5, h6 {
|
|||
.m-3{
|
||||
margin:3px
|
||||
}
|
||||
.m-5{
|
||||
margin:5px
|
||||
}
|
||||
.m-10 {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.m-20{
|
||||
margin:20px
|
||||
}
|
||||
.mb-2 {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
@ -136,9 +149,6 @@ h1, h2, h3, h4, h5, h6 {
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.m-10 {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.p-5 {
|
||||
padding: 5px;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<a-button class="cd-secret-plain-getter ml-5">
|
||||
<fs-icon class="pointer" :icon="computedIcon" @click="showPlain" />
|
||||
<a-button class="cd-secret-plain-getter ml-5" @click="showPlain">
|
||||
<fs-icon class="pointer" :icon="computedIcon" />
|
||||
</a-button>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
|
|
|
@ -132,6 +132,18 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
helper: {
|
||||
render() {
|
||||
const closeForm = () => {
|
||||
crudExpose.getFormWrapperRef().close();
|
||||
};
|
||||
return (
|
||||
<router-link to={"/sys/cname/provider"} onClick={closeForm}>
|
||||
前往设置CNAME服务
|
||||
</router-link>
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
column: {
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
<template>
|
||||
<fs-page class="page-cert">
|
||||
<template #header>
|
||||
<div class="title">CNAME记录管理</div>
|
||||
<div class="title">
|
||||
CNAME记录管理
|
||||
<span class="sub">
|
||||
<a href="https://certd.docmirror.cn/guide/feature/cname/" target="_blank">CNAME功能原理及使用说明</a>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<fs-crud ref="crudRef" v-bind="crudBinding">
|
||||
<template #pagination-left>
|
||||
|
|
|
@ -65,6 +65,15 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
}
|
||||
}
|
||||
},
|
||||
search: {
|
||||
formItem: {
|
||||
labelCol: {
|
||||
style: {
|
||||
width: "120px"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
rowHandle: {
|
||||
minWidth: 200,
|
||||
fixed: "right",
|
||||
|
|
|
@ -6,6 +6,12 @@
|
|||
<div class="p-10">
|
||||
<a-descriptions title="" bordered>
|
||||
<a-descriptions-item label="用户名">{{ userInfo.username }}</a-descriptions-item>
|
||||
<a-descriptions-item label="头像">
|
||||
<a-avatar v-if="userInfo.avatar" size="large" :src="'/api/basic/file/download?&key=' + userInfo.avatar" style="background-color: #eee"> </a-avatar>
|
||||
<a-avatar v-else size="large" style="background-color: #00b4f5">
|
||||
{{ userInfo.username }}
|
||||
</a-avatar>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="昵称">{{ userInfo.nickName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="邮箱">{{ userInfo.email }}</a-descriptions-item>
|
||||
<a-descriptions-item label="手机号">{{ userInfo.phoneCode }}{{ userInfo.mobile }}</a-descriptions-item>
|
||||
|
|
|
@ -84,6 +84,13 @@ export async function GetFiles(pipelineId: number) {
|
|||
});
|
||||
}
|
||||
|
||||
export async function GetCount() {
|
||||
return await request({
|
||||
url: apiPrefix + "/count",
|
||||
method: "post"
|
||||
});
|
||||
}
|
||||
|
||||
export type CertInfo = {
|
||||
crt: string;
|
||||
key: string;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</template>
|
||||
</a-list-item-meta>
|
||||
<div>
|
||||
<a-textarea :value="item.content" rows="5" />
|
||||
<a-textarea :value="item.content" :rows="5" />
|
||||
</div>
|
||||
</a-list-item>
|
||||
</template>
|
||||
|
|
|
@ -48,7 +48,7 @@ export default function (certPluginGroup: PluginGroup, formWrapperRef: any): Cre
|
|||
wrapper: {
|
||||
width: 1350,
|
||||
saveRemind: false,
|
||||
title: "创建证书申请流水线"
|
||||
title: "创建证书流水线"
|
||||
}
|
||||
},
|
||||
columns: {
|
||||
|
@ -98,8 +98,7 @@ export default function (certPluginGroup: PluginGroup, formWrapperRef: any): Cre
|
|||
vModel: "modelValue",
|
||||
placeholder: "0 0 4 * * *"
|
||||
},
|
||||
helper:
|
||||
"点击上面的按钮,选择每天几点几分定时执行,后面的分秒都要选择0。\n例如:0 0 4 * * *,每天凌晨4点0分0秒触发\n建议设置为每天触发一次,证书未到期之前任务会跳过,不会重复执行",
|
||||
helper: "点击上面的按钮,选择每天几点几分定时执行,后面的分秒都要选择0。\n建议设置为每天触发一次,证书未到期之前任务会跳过,不会重复执行",
|
||||
order: 100
|
||||
}
|
||||
},
|
||||
|
@ -114,14 +113,15 @@ export default function (certPluginGroup: PluginGroup, formWrapperRef: any): Cre
|
|||
}),
|
||||
form: {
|
||||
order: 101,
|
||||
value: true,
|
||||
helper: {
|
||||
render: () => {
|
||||
if (settingStore.isPlus) {
|
||||
return "";
|
||||
return "建议启用";
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
需要配置<router-link to={{ path: "/sys/settings/email" }}>邮件服务器</router-link>才能发送邮件(专业版请忽略)
|
||||
建议启用,需要配置<router-link to={{ path: "/sys/settings/email" }}>邮件服务器</router-link>才能发送邮件
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -438,6 +438,9 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp
|
|||
status: {
|
||||
title: "状态",
|
||||
type: "dict-select",
|
||||
search: {
|
||||
show: true
|
||||
},
|
||||
dict: dict({
|
||||
data: statusUtil.getOptions()
|
||||
}),
|
||||
|
|
|
@ -1,79 +1,145 @@
|
|||
<template>
|
||||
<fs-page class="fs-pipeline-detail">
|
||||
<pipeline-edit v-model:edit-mode="editMode" :pipeline-id="pipelineId" :options="pipelineOptionsRef"></pipeline-edit>
|
||||
<a-tour v-bind="tour" v-model:current="tour.current" />
|
||||
</fs-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, Ref, ref } from "vue";
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, onMounted, Ref, ref } from "vue";
|
||||
import PipelineEdit from "./pipeline/index.vue";
|
||||
import * as pluginApi from "./api.plugin";
|
||||
import * as historyApi from "./api.history";
|
||||
import * as api from "./api";
|
||||
import { useRoute } from "vue-router";
|
||||
import { PipelineDetail, PipelineOptions, PluginGroups, RunHistory } from "./pipeline/type";
|
||||
import { TourProps } from "ant-design-vue";
|
||||
import { LocalStorage } from "/@/utils/util.storage";
|
||||
|
||||
export default defineComponent({
|
||||
name: "PipelineDetail",
|
||||
components: { PipelineEdit },
|
||||
setup() {
|
||||
const route = useRoute();
|
||||
const pipelineId: Ref = ref(route.query.id);
|
||||
|
||||
const pipelineOptions: PipelineOptions = {
|
||||
async getPipelineDetail({ pipelineId }) {
|
||||
const detail = await api.GetDetail(pipelineId);
|
||||
return {
|
||||
pipeline: {
|
||||
id: detail.pipeline.id,
|
||||
stages: [],
|
||||
triggers: [],
|
||||
...JSON.parse(detail.pipeline.content || "{}")
|
||||
}
|
||||
} as PipelineDetail;
|
||||
},
|
||||
|
||||
async getHistoryList({ pipelineId }) {
|
||||
const list: RunHistory[] = await historyApi.GetList({ pipelineId });
|
||||
return list;
|
||||
},
|
||||
|
||||
async getHistoryDetail({ historyId }): Promise<RunHistory> {
|
||||
const detail = await historyApi.GetDetail({ id: historyId });
|
||||
return detail;
|
||||
},
|
||||
|
||||
async getPluginGroups() {
|
||||
const groups = await pluginApi.GetGroups({});
|
||||
return new PluginGroups(groups);
|
||||
},
|
||||
|
||||
async doSave(pipelineConfig: any) {
|
||||
await api.Save({
|
||||
id: pipelineConfig.id,
|
||||
content: JSON.stringify(pipelineConfig)
|
||||
});
|
||||
},
|
||||
async doTrigger(options: { pipelineId: number; stepId?: string }) {
|
||||
const { pipelineId, stepId } = options;
|
||||
await api.Trigger(pipelineId, stepId);
|
||||
}
|
||||
};
|
||||
|
||||
const pipelineOptionsRef: Ref<PipelineOptions> = ref(pipelineOptions);
|
||||
|
||||
const editMode = ref(false);
|
||||
if (route.query.editMode !== "false") {
|
||||
editMode.value = true;
|
||||
}
|
||||
|
||||
return {
|
||||
pipelineOptionsRef,
|
||||
pipelineId,
|
||||
editMode
|
||||
};
|
||||
}
|
||||
defineOptions({
|
||||
name: "PipelineDetail"
|
||||
});
|
||||
const route = useRoute();
|
||||
const pipelineId: Ref = ref(route.query.id);
|
||||
|
||||
const pipelineOptions: PipelineOptions = {
|
||||
async getPipelineDetail({ pipelineId }) {
|
||||
const detail = await api.GetDetail(pipelineId);
|
||||
onLoaded(detail);
|
||||
return {
|
||||
pipeline: {
|
||||
id: detail.pipeline.id,
|
||||
stages: [],
|
||||
triggers: [],
|
||||
...JSON.parse(detail.pipeline.content || "{}")
|
||||
}
|
||||
} as PipelineDetail;
|
||||
},
|
||||
|
||||
async getHistoryList({ pipelineId }) {
|
||||
const list: RunHistory[] = await historyApi.GetList({ pipelineId });
|
||||
return list;
|
||||
},
|
||||
|
||||
async getHistoryDetail({ historyId }): Promise<RunHistory> {
|
||||
const detail = await historyApi.GetDetail({ id: historyId });
|
||||
return detail;
|
||||
},
|
||||
|
||||
async getPluginGroups() {
|
||||
const groups = await pluginApi.GetGroups({});
|
||||
return new PluginGroups(groups);
|
||||
},
|
||||
|
||||
async doSave(pipelineConfig: any) {
|
||||
await api.Save({
|
||||
id: pipelineConfig.id,
|
||||
content: JSON.stringify(pipelineConfig)
|
||||
});
|
||||
},
|
||||
async doTrigger(options: { pipelineId: number; stepId?: string }) {
|
||||
const { pipelineId, stepId } = options;
|
||||
await api.Trigger(pipelineId, stepId);
|
||||
}
|
||||
};
|
||||
|
||||
const pipelineOptionsRef: Ref<PipelineOptions> = ref(pipelineOptions);
|
||||
|
||||
const editMode = ref(false);
|
||||
if (route.query.editMode !== "false") {
|
||||
editMode.value = true;
|
||||
}
|
||||
|
||||
function useTour() {
|
||||
const tour = ref({
|
||||
open: false,
|
||||
current: 0,
|
||||
steps: [],
|
||||
onClose: () => {
|
||||
tour.value.open = false;
|
||||
},
|
||||
onFinish: () => {
|
||||
tour.value.open = false;
|
||||
LocalStorage.set("tour-off", true, 999999999);
|
||||
}
|
||||
});
|
||||
|
||||
const tourHandleOpen = (val: boolean): void => {
|
||||
initSteps();
|
||||
tour.value.open = val;
|
||||
};
|
||||
|
||||
function initSteps() {
|
||||
//@ts-ignore
|
||||
tour.value.steps = [
|
||||
{
|
||||
title: "恭喜创建证书流水线成功",
|
||||
description: "这里就是我们刚创建的证书任务,点击可以修改证书申请参数",
|
||||
target: () => {
|
||||
return document.querySelector(".pipeline .stages .stage_0 .task");
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "添加部署证书任务",
|
||||
description: "证书申请成功之后还需要部署证书,点击这里可以添加证书部署任务",
|
||||
target: () => {
|
||||
return document.querySelector(".pipeline .stages .last-stage .tasks .task");
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "手动运行流水线",
|
||||
description: "点击此处可以手动运行流水线",
|
||||
target: () => {
|
||||
return document.querySelector(".pipeline .stages .first-stage .tasks .task");
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
return {
|
||||
tour,
|
||||
tourHandleOpen
|
||||
};
|
||||
}
|
||||
|
||||
const { tour, tourHandleOpen } = useTour();
|
||||
|
||||
async function onLoaded(pipeline: PipelineDetail) {
|
||||
const count = LocalStorage.get("pipeline-count") ?? 0;
|
||||
if (count > 1) {
|
||||
return;
|
||||
}
|
||||
const off = LocalStorage.get("tour-off") ?? false;
|
||||
if (off) {
|
||||
return;
|
||||
}
|
||||
const res = await api.GetCount();
|
||||
LocalStorage.set("pipeline-count", res.count);
|
||||
if (res.count <= 1) {
|
||||
await nextTick();
|
||||
tourHandleOpen(true);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.page-pipeline-detail {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<a-timeline-item v-if="status && runnable" class="pi-history-timeline-item" :color="status.color">
|
||||
<a-timeline-item v-if="status && runnable" class="pi-history-timeline-item" :color="status.iconColor || status.color">
|
||||
<template #dot>
|
||||
<fs-icon v-bind="status" />
|
||||
<fs-icon v-bind="status" :color="status.iconColor || status.color" />
|
||||
</template>
|
||||
<p>
|
||||
<fs-date-format :model-value="runnable.status?.startTime"></fs-date-format>
|
||||
|
|