mirror of
https://github.com/certd/certd.git
synced 2026-07-18 20:17:34 +08:00
Compare commits
2 Commits
9642df2d9d
...
e7e54bc19e
| Author | SHA1 | Date | |
|---|---|---|---|
| e7e54bc19e | |||
| 9fb980599f |
+11
-1
@@ -37,7 +37,7 @@
|
||||
<div class="step-row">
|
||||
<div class="text">
|
||||
<fs-icon icon="ion:flash"></fs-icon>
|
||||
<h4 class="title" :class="{ disabled: element.disabled, deleted: element.disabled }">{{ element.title }}</h4>
|
||||
<h4 class="title" :class="{ disabled: element.disabled, deleted: element.disabled }" :title="element.title">{{ element.title }}</h4>
|
||||
</div>
|
||||
<div class="action">
|
||||
<a key="edit" @click="stepEdit(currentTask, element, index)">编辑</a>
|
||||
@@ -306,6 +306,9 @@ export default {
|
||||
justify-content: space-between;
|
||||
.text {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
> * {
|
||||
margin: 0px;
|
||||
margin-right: 15px;
|
||||
@@ -314,9 +317,16 @@ export default {
|
||||
.action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
word-wrap: nowrap;
|
||||
margin-left: 10px;
|
||||
> * {
|
||||
margin-right: 10px;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline';
|
||||
import { AccessInput, BaseAccess, IsAccess, PageSearch } from '@certd/pipeline';
|
||||
|
||||
/**
|
||||
* 这个注解将注册一个授权配置
|
||||
* 在certd的后台管理系统中,用户可以选择添加此类型的授权
|
||||
管理页面地址:https://www.dns.com.cn/login/toLogin.do
|
||||
是否有API接口,接口地址:https://api.bizcn.com/rrpservices
|
||||
*/
|
||||
@IsAccess({
|
||||
name: 'xinnetconnect',
|
||||
@@ -38,6 +38,23 @@ export class XinnetConnectAccess extends BaseAccess {
|
||||
password = '';
|
||||
|
||||
|
||||
async getDomainList(req: PageSearch): Promise<any> {
|
||||
let bodyXml =`
|
||||
<limit>${req.pageSize}</limit>
|
||||
<offset>${req.pageNo}</offset>
|
||||
`
|
||||
if(req.searchKey){
|
||||
bodyXml += `<domainname>${req.searchKey}</domainname>`
|
||||
}
|
||||
|
||||
const res = await this.doRequest({
|
||||
url: "/domainService",
|
||||
bodyXml: bodyXml,
|
||||
service: "getDomainList",
|
||||
})
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
async addDnsRecord(req: {domain:string,hostRecord:string, value:string, type:string}): Promise<any> {
|
||||
const { domain,hostRecord, value, type } = req;
|
||||
@@ -125,15 +142,19 @@ export class XinnetConnectAccess extends BaseAccess {
|
||||
|
||||
// 提取返回结果
|
||||
const soapBody = result['soap:Envelope']['soap:Body'];
|
||||
const addDnsRecordResponse = soapBody["ns1:addDnsRecordResponse"];
|
||||
console.log(addDnsRecordResponse)
|
||||
const keys = Object.keys(soapBody);
|
||||
if (keys.length === 0) {
|
||||
throw new Error('SOAP响应体为空');
|
||||
}
|
||||
const addDnsRecordResponse = soapBody[keys[0]];
|
||||
this.ctx.logger.info(addDnsRecordResponse)
|
||||
const resultData = addDnsRecordResponse.response.result;
|
||||
|
||||
const res = {
|
||||
code: resultData.$.code,
|
||||
msg: resultData.msg
|
||||
}
|
||||
console.log('操作结果:', res);
|
||||
this.ctx.logger.info('操作结果:', res);
|
||||
|
||||
if (res.code != "200") {
|
||||
throw new Error(res.msg + " code:" + res.code);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert";
|
||||
import { PageRes, PageSearch } from "@certd/pipeline";
|
||||
import { AbstractDnsProvider, CreateRecordOptions, DomainRecord, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert";
|
||||
import { XinnetConnectAccess } from "./access.js";
|
||||
|
||||
|
||||
@@ -62,6 +63,21 @@ export class XinnetConnectDnsProvider extends AbstractDnsProvider<XinnetConnectR
|
||||
await this.access.delDnsRecord(record)
|
||||
this.logger.info(`删除域名解析成功:fullRecord=${fullRecord}`);
|
||||
}
|
||||
|
||||
async getDomainListPage(req: PageSearch): Promise<PageRes<DomainRecord>> {
|
||||
const res = await this.access.getDomainList(req)
|
||||
let list = res.domainlist || []
|
||||
list = list.map(item => ({
|
||||
domain: item.domain,
|
||||
id: item.domain,
|
||||
}))
|
||||
return {
|
||||
pageNo: req.pageNo,
|
||||
pageSize: req.pageSize,
|
||||
total: res.total || 0,
|
||||
list,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//实例化这个provider,将其自动注册到系统中
|
||||
|
||||
Reference in New Issue
Block a user