mirror of https://github.com/certd/certd
chore:
parent
70760e4ede
commit
071ef281c1
|
@ -45,23 +45,23 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
props: {
|
props: {
|
||||||
multiple: true,
|
multiple: true,
|
||||||
crossPage: true,
|
crossPage: true,
|
||||||
selectedRowKeys
|
selectedRowKeys,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
pageRequest,
|
pageRequest,
|
||||||
addRequest,
|
addRequest,
|
||||||
editRequest,
|
editRequest,
|
||||||
delRequest
|
delRequest,
|
||||||
},
|
},
|
||||||
actionbar: {
|
actionbar: {
|
||||||
buttons: {
|
buttons: {
|
||||||
add: {
|
add: {
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
rowHandle: {
|
rowHandle: {
|
||||||
show: false,
|
show: false,
|
||||||
|
@ -69,18 +69,18 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
buttons: {
|
buttons: {
|
||||||
edit: {
|
edit: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
copy: {
|
copy: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
remove: {
|
remove: {
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
table: {
|
table: {
|
||||||
rowKey: "name"
|
rowKey: "name",
|
||||||
},
|
},
|
||||||
columns: {
|
columns: {
|
||||||
// id: {
|
// id: {
|
||||||
|
@ -98,20 +98,20 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
title: "插件名称",
|
title: "插件名称",
|
||||||
type: "text",
|
type: "text",
|
||||||
search: {
|
search: {
|
||||||
show: true
|
show: true,
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 200
|
width: 200,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
icon: {
|
icon: {
|
||||||
title: "图标",
|
title: "图标",
|
||||||
type: "text",
|
type: "text",
|
||||||
form: {
|
form: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 100,
|
width: 100,
|
||||||
|
@ -120,32 +120,32 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
name: "fs-icon",
|
name: "fs-icon",
|
||||||
vModel: "icon",
|
vModel: "icon",
|
||||||
style: {
|
style: {
|
||||||
fontSize: "22px"
|
fontSize: "22px",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
title: "标题",
|
title: "标题",
|
||||||
type: "text",
|
type: "text",
|
||||||
column: {
|
column: {
|
||||||
width: 300
|
width: 300,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
desc: {
|
desc: {
|
||||||
title: "描述",
|
title: "描述",
|
||||||
type: "text",
|
type: "text",
|
||||||
column: {
|
column: {
|
||||||
width: 300
|
width: 300,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
group: {
|
group: {
|
||||||
title: "分组",
|
title: "分组",
|
||||||
type: "text",
|
type: "text",
|
||||||
column: {
|
column: {
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center"
|
align: "center",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
title: "点击禁用/启用",
|
title: "点击禁用/启用",
|
||||||
|
@ -153,11 +153,11 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: [
|
data: [
|
||||||
{ label: "启用", value: false, color: "success" },
|
{ label: "启用", value: false, color: "success" },
|
||||||
{ label: "禁用", value: true, color: "error" }
|
{ label: "禁用", value: true, color: "error" },
|
||||||
]
|
],
|
||||||
}),
|
}),
|
||||||
form: {
|
form: {
|
||||||
value: false
|
value: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 120,
|
width: 120,
|
||||||
|
@ -174,39 +174,39 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
id: row.id,
|
id: row.id,
|
||||||
name: row.name,
|
name: row.name,
|
||||||
type: row.type,
|
type: row.type,
|
||||||
disabled: !value
|
disabled: !value,
|
||||||
});
|
});
|
||||||
await crudExpose.doRefresh();
|
await crudExpose.doRefresh();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
createTime: {
|
createTime: {
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
form: {
|
form: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 160,
|
width: 160,
|
||||||
align: "center"
|
align: "center",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
updateTime: {
|
updateTime: {
|
||||||
title: "更新时间",
|
title: "更新时间",
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
form: {
|
form: {
|
||||||
show: false
|
show: false,
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
show: true
|
show: true,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
name: AliyunAccess
|
||||||
|
version: 1.0.0
|
||||||
|
title: 阿里云授权
|
||||||
|
desc: 阿里云授权
|
||||||
|
icon: fa-cloud
|
||||||
|
author:
|
||||||
|
id:
|
||||||
|
name:
|
||||||
|
email:
|
||||||
|
link:
|
||||||
|
type: access
|
||||||
|
input:
|
||||||
|
accessKeyId:
|
||||||
|
title: AccessKeyId
|
||||||
|
type: string
|
||||||
|
component:
|
||||||
|
name: a-input
|
||||||
|
required: true
|
||||||
|
helper: 访问密钥ID
|
||||||
|
accessKeySecret:
|
||||||
|
type: string
|
||||||
|
title: AccessKeySecret
|
||||||
|
encrypt: true
|
||||||
|
|
||||||
|
script: |
|
||||||
|
import { AccessInput, BaseAccess, IsAccess } from '@certd/pipeline';
|
||||||
|
class AliyunAccess extends BaseAccess {
|
||||||
|
accessKeyId = '';
|
||||||
|
secretAccessKey = '';
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
name: AliyunDeployToCdn
|
||||||
|
version: 1.0.0
|
||||||
|
author:
|
||||||
|
title: 阿里云-部署到CDN
|
||||||
|
desc: 部署证书到阿里云CDN
|
||||||
|
icon: fa-cloud
|
||||||
|
pluginType: plugin
|
||||||
|
metadata:
|
||||||
|
dependencies:
|
||||||
|
- "@alicloud/pop-core": "^1.7.10"
|
||||||
|
input:
|
||||||
|
endpoint:
|
||||||
|
type: string,
|
||||||
|
title: '证书服务接入点',
|
||||||
|
helper: '不会选就按默认',
|
||||||
|
value: 'cas.aliyuncs.com',
|
||||||
|
component:
|
||||||
|
name: 'a-select',
|
||||||
|
options:
|
||||||
|
- value: 'cas.aliyuncs.com'
|
||||||
|
label: '中国大陆'
|
||||||
|
required: true,
|
||||||
|
|
||||||
|
cert:
|
||||||
|
type: string,
|
||||||
|
title: '域名证书',
|
||||||
|
helper: '请选择前置任务输出的域名证书',
|
||||||
|
component:
|
||||||
|
name: 'output-selector',
|
||||||
|
from:
|
||||||
|
- 'group:cert_apply',
|
||||||
|
- 'xxx',
|
||||||
|
required: true,
|
||||||
|
|
||||||
|
script: |
|
||||||
|
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline';
|
||||||
|
class AliyunDeployToCdn extends AbstractTaskPlugin {
|
||||||
|
endpoint = '';
|
||||||
|
cert = '';
|
||||||
|
async onInstance() {}
|
||||||
|
async execute(): Promise<void> {
|
||||||
|
this.logger.info('开始部署证书到阿里云cdn');
|
||||||
|
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||||
|
const sslClient = new AliyunSslClient({
|
||||||
|
access,
|
||||||
|
logger: this.logger,
|
||||||
|
endpoint: this.endpoint || 'cas.aliyuncs.com',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,11 +30,24 @@ export class PluginEntity {
|
||||||
content: string;
|
content: string;
|
||||||
|
|
||||||
@Column({ comment: '类型', length: 100, nullable: true })
|
@Column({ comment: '类型', length: 100, nullable: true })
|
||||||
type: string; // builtIn | custom
|
type: string; // builtIn | local | download
|
||||||
|
|
||||||
@Column({ comment: '启用/禁用', default: false })
|
@Column({ comment: '启用/禁用', default: false })
|
||||||
disabled: boolean;
|
disabled: boolean;
|
||||||
|
|
||||||
|
@Column({ comment: '版本', length: 100, nullable: true })
|
||||||
|
version: string;
|
||||||
|
|
||||||
|
@Column({ comment: '插件类型', length: 100, nullable: true })
|
||||||
|
pluginType: string;
|
||||||
|
|
||||||
|
@Column({ comment: '元数据', length: 40960, nullable: true })
|
||||||
|
metadata: string;
|
||||||
|
|
||||||
|
@Column({ comment: '作者', length: 100, nullable: true })
|
||||||
|
author: string;
|
||||||
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
name: 'create_time',
|
name: 'create_time',
|
||||||
comment: '创建时间',
|
comment: '创建时间',
|
||||||
|
|
Loading…
Reference in New Issue