mirror of https://github.com/certd/certd
chore:
parent
b561535626
commit
2c32703e6b
|
@ -35,7 +35,7 @@ export class TencentStartInstancesPlugin extends AbstractTaskPlugin {
|
||||||
name: 'a-auto-complete',
|
name: 'a-auto-complete',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
options: [
|
options: [
|
||||||
{ value: '', label: '--------中国大陆地区-------', disabled: true },
|
{ value: '1', label: '--------中国大陆地区-------', disabled: true },
|
||||||
{ value: 'ap-beijing-1', label: '北京1区' },
|
{ value: 'ap-beijing-1', label: '北京1区' },
|
||||||
{ value: 'ap-beijing', label: '北京' },
|
{ value: 'ap-beijing', label: '北京' },
|
||||||
{ value: 'ap-nanjing', label: '南京' },
|
{ value: 'ap-nanjing', label: '南京' },
|
||||||
|
@ -46,7 +46,7 @@ export class TencentStartInstancesPlugin extends AbstractTaskPlugin {
|
||||||
{ value: 'ap-shenzhen-fsi', label: '深圳金融' },
|
{ value: 'ap-shenzhen-fsi', label: '深圳金融' },
|
||||||
{ value: 'ap-shanghai-fsi', label: '上海金融' },
|
{ value: 'ap-shanghai-fsi', label: '上海金融' },
|
||||||
{ value: 'ap-beijing-fsi', label: '北京金融' },
|
{ value: 'ap-beijing-fsi', label: '北京金融' },
|
||||||
{ value: '', label: '--------中国香港及境外-------', disabled: true },
|
{ value: '2', label: '--------中国香港及境外-------', disabled: true },
|
||||||
{ value: 'ap-hongkong', label: '中国香港' },
|
{ value: 'ap-hongkong', label: '中国香港' },
|
||||||
{ value: 'ap-singapore', label: '新加坡' },
|
{ value: 'ap-singapore', label: '新加坡' },
|
||||||
{ value: 'ap-mumbai', label: '孟买' },
|
{ value: 'ap-mumbai', label: '孟买' },
|
||||||
|
@ -68,19 +68,18 @@ export class TencentStartInstancesPlugin extends AbstractTaskPlugin {
|
||||||
createRemoteSelectInputDefine({
|
createRemoteSelectInputDefine({
|
||||||
title: '实列ID',
|
title: '实列ID',
|
||||||
helper: '请选择实列',
|
helper: '请选择实列',
|
||||||
typeName: 'TencentStartInstancesPlugin',
|
|
||||||
action: TencentStartInstancesPlugin.prototype.onGetInstanceList.name,
|
action: TencentStartInstancesPlugin.prototype.onGetInstanceList.name,
|
||||||
watches: ['region'],
|
watches: ['region', 'accessId'],
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
instanceId!: string | string[];
|
instanceId!: string[];
|
||||||
|
|
||||||
async onInstance() {}
|
async onInstance() {}
|
||||||
|
|
||||||
async execute(): Promise<void> {
|
async execute(): Promise<void> {
|
||||||
const cvmClient = await this.getCvmClient();
|
const cvmClient = await this.getCvmClient();
|
||||||
const res = await cvmClient.StartInstances({
|
const res = await cvmClient.StartInstances({
|
||||||
InstanceIds: Array.isArray(this.instanceId) ? this.instanceId : [this.instanceId],
|
InstanceIds: this.instanceId,
|
||||||
});
|
});
|
||||||
this.checkRet(res);
|
this.checkRet(res);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue