mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
refactor: host
This commit is contained in:
@@ -13,7 +13,10 @@ export class HostShellExecute extends AbstractHostPlugin {
|
||||
label: '执行远程主机脚本命令',
|
||||
input: {
|
||||
script: {
|
||||
label: 'shell脚本命令'
|
||||
label: 'shell脚本命令',
|
||||
component: {
|
||||
name: 'a-textarea'
|
||||
}
|
||||
},
|
||||
accessProvider: {
|
||||
label: '主机登录配置',
|
||||
@@ -21,7 +24,7 @@ export class HostShellExecute extends AbstractHostPlugin {
|
||||
desc: '登录',
|
||||
component: {
|
||||
name: 'access-provider-selector',
|
||||
filter: 'host'
|
||||
filter: 'ssh'
|
||||
},
|
||||
required: true
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import ssh2 from 'ssh2'
|
||||
import logger from '../utils/util.log.js'
|
||||
import path from 'path'
|
||||
import { util } from '@certd/api'
|
||||
const logger = util.logger
|
||||
export class SshClient {
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -13,10 +13,10 @@ export class UploadCertToHost extends AbstractHostPlugin {
|
||||
label: '上传证书到主机',
|
||||
input: {
|
||||
crtPath: {
|
||||
label: '证书路径'
|
||||
label: '证书保存路径'
|
||||
},
|
||||
keyPath: {
|
||||
label: '私钥路径'
|
||||
label: '私钥保存路径'
|
||||
},
|
||||
accessProvider: {
|
||||
label: '主机登录配置',
|
||||
@@ -24,7 +24,7 @@ export class UploadCertToHost extends AbstractHostPlugin {
|
||||
desc: 'access授权',
|
||||
component: {
|
||||
name: 'access-provider-selector',
|
||||
filter: 'host'
|
||||
filter: 'ssh'
|
||||
},
|
||||
required: true
|
||||
}
|
||||
|
||||
@@ -9,6 +9,10 @@ import { DeployCertToTencentCDN } from './tencent/deploy-to-cdn/index.js'
|
||||
import { DeployCertToTencentCLB } from './tencent/deploy-to-clb/index.js'
|
||||
|
||||
import { DeployCertToTencentTKEIngress } from './tencent/deploy-to-tke-ingress/index.js'
|
||||
|
||||
import { UploadCertToHost } from './host/upload-to-host/index.js'
|
||||
import { HostShellExecute } from './host/host-shell-execute/index.js'
|
||||
|
||||
import { pluginRegistry } from '@certd/api'
|
||||
|
||||
export const DefaultPlugins = {
|
||||
@@ -17,7 +21,9 @@ export const DefaultPlugins = {
|
||||
UploadCertToTencent,
|
||||
DeployCertToTencentTKEIngress,
|
||||
DeployCertToTencentCDN,
|
||||
DeployCertToTencentCLB
|
||||
DeployCertToTencentCLB,
|
||||
UploadCertToHost,
|
||||
HostShellExecute
|
||||
}
|
||||
export default {
|
||||
install () {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import dayjs from 'dayjs'
|
||||
import tencentcloud from 'tencentcloud-sdk-nodejs'
|
||||
import { AbstractTencentPlugin } from '../abstract-tencent.js'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user