mirror of https://github.com/certd/certd
chore:
parent
70760e4ede
commit
071ef281c1
|
@ -45,23 +45,23 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
props: {
|
||||
multiple: true,
|
||||
crossPage: true,
|
||||
selectedRowKeys
|
||||
}
|
||||
}
|
||||
}
|
||||
selectedRowKeys,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
request: {
|
||||
pageRequest,
|
||||
addRequest,
|
||||
editRequest,
|
||||
delRequest
|
||||
delRequest,
|
||||
},
|
||||
actionbar: {
|
||||
buttons: {
|
||||
add: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
rowHandle: {
|
||||
show: false,
|
||||
|
@ -69,18 +69,18 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
fixed: "right",
|
||||
buttons: {
|
||||
edit: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
copy: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
remove: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
table: {
|
||||
rowKey: "name"
|
||||
rowKey: "name",
|
||||
},
|
||||
columns: {
|
||||
// id: {
|
||||
|
@ -98,20 +98,20 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
title: "插件名称",
|
||||
type: "text",
|
||||
search: {
|
||||
show: true
|
||||
show: true,
|
||||
},
|
||||
form: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
column: {
|
||||
width: 200
|
||||
}
|
||||
width: 200,
|
||||
},
|
||||
},
|
||||
icon: {
|
||||
title: "图标",
|
||||
type: "text",
|
||||
form: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
column: {
|
||||
width: 100,
|
||||
|
@ -120,32 +120,32 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
name: "fs-icon",
|
||||
vModel: "icon",
|
||||
style: {
|
||||
fontSize: "22px"
|
||||
}
|
||||
}
|
||||
}
|
||||
fontSize: "22px",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
title: {
|
||||
title: "标题",
|
||||
type: "text",
|
||||
column: {
|
||||
width: 300
|
||||
}
|
||||
width: 300,
|
||||
},
|
||||
},
|
||||
desc: {
|
||||
title: "描述",
|
||||
type: "text",
|
||||
column: {
|
||||
width: 300
|
||||
}
|
||||
width: 300,
|
||||
},
|
||||
},
|
||||
group: {
|
||||
title: "分组",
|
||||
type: "text",
|
||||
column: {
|
||||
width: 100,
|
||||
align: "center"
|
||||
}
|
||||
align: "center",
|
||||
},
|
||||
},
|
||||
disabled: {
|
||||
title: "点击禁用/启用",
|
||||
|
@ -153,11 +153,11 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
dict: dict({
|
||||
data: [
|
||||
{ label: "启用", value: false, color: "success" },
|
||||
{ label: "禁用", value: true, color: "error" }
|
||||
]
|
||||
{ label: "禁用", value: true, color: "error" },
|
||||
],
|
||||
}),
|
||||
form: {
|
||||
value: false
|
||||
value: false,
|
||||
},
|
||||
column: {
|
||||
width: 120,
|
||||
|
@ -174,39 +174,39 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
id: row.id,
|
||||
name: row.name,
|
||||
type: row.type,
|
||||
disabled: !value
|
||||
disabled: !value,
|
||||
});
|
||||
await crudExpose.doRefresh();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
createTime: {
|
||||
title: "创建时间",
|
||||
type: "datetime",
|
||||
form: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
column: {
|
||||
sorter: true,
|
||||
width: 160,
|
||||
align: "center"
|
||||
}
|
||||
align: "center",
|
||||
},
|
||||
},
|
||||
updateTime: {
|
||||
title: "更新时间",
|
||||
type: "datetime",
|
||||
form: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
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;
|
||||
|
||||
@Column({ comment: '类型', length: 100, nullable: true })
|
||||
type: string; // builtIn | custom
|
||||
type: string; // builtIn | local | download
|
||||
|
||||
@Column({ comment: '启用/禁用', default: false })
|
||||
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({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
|
|
Loading…
Reference in New Issue