更新components.js

This commit is contained in:
GoEdgeLab
2022-09-19 09:50:03 +08:00
parent 20bccc39f5
commit fc503aed1d
2 changed files with 55 additions and 19 deletions

View File

@@ -2148,8 +2148,8 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
已启用 / <span>空连接次数:{{config.minAttempts}}次/分钟</span> / 封禁时间:{{config.timeoutSeconds}}秒 <span v-if="config.ignoreLocal">/ 忽略局域网访问</span> 已启用 / <span>空连接次数:{{config.minAttempts}}次/分钟</span> / 封禁时间:{{config.timeoutSeconds}}秒 <span v-if="config.ignoreLocal">/ 忽略局域网访问</span>
</span> </span>
<span v-else>未启用</span> <span v-else>未启用</span>
</div>`}),Vue.component("domains-box",{props:["v-domains"],data:function(){let e=this.vDomains;return{domains:e=null==e?[]:e,isAdding:!1,addingDomain:""}},methods:{add:function(){this.isAdding=!0;let e=this;setTimeout(function(){e.$refs.addingDomain.focus()},100)},confirm:function(){let t=this;if(this.addingDomain=this.addingDomain.replace(/\s/g,""),0==this.addingDomain.length)teaweb.warn("请输入要添加的域名",function(){t.$refs.addingDomain.focus()});else{if("~"==this.addingDomain[0]){var e=this.addingDomain.substring(1);try{new RegExp(e)}catch(e){return void teaweb.warn("正则表达式错误:"+e.message,function(){t.$refs.addingDomain.focus()})}}this.domains.push(this.addingDomain),this.cancel()}},remove:function(e){this.domains.$remove(e)},cancel:function(){this.isAdding=!1,this.addingDomain=""}},template:`<div> </div>`}),Vue.component("domains-box",{props:["v-domains","name"],data:function(){let e=this.vDomains,t=(null==e&&(e=[]),"domainsJSON");return null!=this.name&&"string"==typeof this.name&&(t=this.name),{domains:e,isAdding:!1,addingDomain:"",realName:t}},methods:{add:function(){this.isAdding=!0;let e=this;setTimeout(function(){e.$refs.addingDomain.focus()},100)},confirm:function(){let t=this;if(this.addingDomain=this.addingDomain.replace(/\s/g,""),0==this.addingDomain.length)teaweb.warn("请输入要添加的域名",function(){t.$refs.addingDomain.focus()});else{if("~"==this.addingDomain[0]){var e=this.addingDomain.substring(1);try{new RegExp(e)}catch(e){return void teaweb.warn("正则表达式错误:"+e.message,function(){t.$refs.addingDomain.focus()})}}this.domains.push(this.addingDomain),this.cancel()}},remove:function(e){this.domains.$remove(e)},cancel:function(){this.isAdding=!1,this.addingDomain=""}},template:`<div>
<input type="hidden" name="domainsJSON" :value="JSON.stringify(domains)"/> <input type="hidden" :name="realName" :value="JSON.stringify(domains)"/>
<div v-if="domains.length > 0"> <div v-if="domains.length > 0">
<span class="ui label small basic" v-for="(domain, index) in domains"> <span class="ui label small basic" v-for="(domain, index) in domains">
<span v-if="domain.length > 0 && domain[0] == '~'" class="grey" style="font-style: normal">[正则]</span> <span v-if="domain.length > 0 && domain[0] == '~'" class="grey" style="font-style: normal">[正则]</span>
@@ -4622,7 +4622,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
<option value="10">[每页]</option><option value="10" selected="selected">10条</option><option value="20">20条</option><option value="30">30条</option><option value="40">40条</option><option value="50">50条</option><option value="60">60条</option><option value="70">70条</option><option value="80">80条</option><option value="90">90条</option><option value="100">100条</option> <option value="10">[每页]</option><option value="10" selected="selected">10条</option><option value="20">20条</option><option value="30">30条</option><option value="40">40条</option><option value="50">50条</option><option value="60">60条</option><option value="70">70条</option><option value="80">80条</option><option value="90">90条</option><option value="100">100条</option>
</select>`}),Vue.component("second-menu",{template:' \t\t<div class="second-menu"> \t\t\t<div class="ui menu text blue small">\t\t\t\t<slot></slot>\t\t\t</div> \t\t\t<div class="ui divider"></div> \t\t</div>'}),Vue.component("loading-message",{template:`<div class="ui message loading"> </select>`}),Vue.component("second-menu",{template:' \t\t<div class="second-menu"> \t\t\t<div class="ui menu text blue small">\t\t\t\t<slot></slot>\t\t\t</div> \t\t\t<div class="ui divider"></div> \t\t</div>'}),Vue.component("loading-message",{template:`<div class="ui message loading">
<div class="ui active inline loader small"></div> &nbsp; <slot></slot> <div class="ui active inline loader small"></div> &nbsp; <slot></slot>
</div>`}),Vue.component("more-options-angle",{data:function(){return{isVisible:!1}},methods:{show:function(){this.isVisible=!this.isVisible,this.$emit("change",this.isVisible)}},template:'<a href="" @click.prevent="show()"><span v-if="!isVisible">更多选项</span><span v-if="isVisible">收起选项</span><i class="icon angle" :class="{down:!isVisible, up:isVisible}"></i></a>'}),Vue.component("inner-menu-item",{props:["href","active","code"],data:function(){var e,t=this.active;return void 0===t&&(e="",t=(e=void 0!==window.TEA.ACTION.data.firstMenuItem?window.TEA.ACTION.data.firstMenuItem:e)==this.code),{vHref:null==this.href?"":this.href,vActive:t}},template:'\t\t<a :href="vHref" class="item right" style="color:#4183c4" :class="{active:vActive}">[<slot></slot>]</a> \t\t'}),Vue.component("health-check-config-box",{props:["v-health-check-config"],data:function(){let t=this.vHealthCheckConfig,i="http",s="",n="/",o="";if(null==t){t={isOn:!1,url:"",interval:{count:60,unit:"second"},statusCodes:[200],timeout:{count:10,unit:"second"},countTries:3,tryDelay:{count:100,unit:"ms"},autoDown:!0,countUp:1,countDown:3,userAgent:"",onlyBasicRequest:!0,accessLogIsOn:!0};let e=this;setTimeout(function(){e.changeURL()},500)}else{try{let e=new URL(t.url);i=e.protocol.substring(0,e.protocol.length-1);var a=(o="%24%7Bhost%7D"==(o=e.host)?"${host}":o).indexOf(":");0<a&&(o=o.substring(0,a)),s=e.port,n=e.pathname,0<e.search.length&&(n+=e.search)}catch(e){}null==t.statusCodes&&(t.statusCodes=[200]),null==t.interval&&(t.interval={count:60,unit:"second"}),null==t.timeout&&(t.timeout={count:10,unit:"second"}),null==t.tryDelay&&(t.tryDelay={count:100,unit:"ms"}),(null==t.countUp||t.countUp<1)&&(t.countUp=1),(null==t.countDown||t.countDown<1)&&(t.countDown=3)}return{healthCheck:t,advancedVisible:!1,urlProtocol:i,urlHost:o,urlPort:s,urlRequestURI:n,urlIsEditing:0==t.url.length}},watch:{urlRequestURI:function(){0<this.urlRequestURI.length&&"/"!=this.urlRequestURI[0]&&(this.urlRequestURI="/"+this.urlRequestURI),this.changeURL()},urlPort:function(e){let t=parseInt(e);isNaN(t)?this.urlPort="":this.urlPort=t.toString(),this.changeURL()},urlProtocol:function(){this.changeURL()},urlHost:function(){this.changeURL()},"healthCheck.countTries":function(e){e=parseInt(e);isNaN(e)?this.healthCheck.countTries=0:this.healthCheck.countTries=e},"healthCheck.countUp":function(e){e=parseInt(e);isNaN(e)?this.healthCheck.countUp=0:this.healthCheck.countUp=e},"healthCheck.countDown":function(e){e=parseInt(e);isNaN(e)?this.healthCheck.countDown=0:this.healthCheck.countDown=e}},methods:{showAdvanced:function(){this.advancedVisible=!this.advancedVisible},changeURL:function(){let e=this.urlHost;0==e.length&&(e="${host}"),this.healthCheck.url=this.urlProtocol+"://"+e+(0<this.urlPort.length?":"+this.urlPort:"")+this.urlRequestURI},changeStatus:function(e){this.healthCheck.statusCodes=e.$map(function(e,t){t=parseInt(t);return isNaN(t)?0:t})},editURL:function(){this.urlIsEditing=!this.urlIsEditing}},template:`<div> </div>`}),Vue.component("more-options-angle",{data:function(){return{isVisible:!1}},methods:{show:function(){this.isVisible=!this.isVisible,this.$emit("change",this.isVisible)}},template:'<a href="" @click.prevent="show()"><span v-if="!isVisible">更多选项</span><span v-if="isVisible">收起选项</span><i class="icon angle" :class="{down:!isVisible, up:isVisible}"></i></a>'}),Vue.component("inner-menu-item",{props:["href","active","code"],data:function(){var e,t=this.active;return void 0===t&&(e="",t=(e=void 0!==window.TEA.ACTION.data.firstMenuItem?window.TEA.ACTION.data.firstMenuItem:e)==this.code),{vHref:null==this.href?"":this.href,vActive:t}},template:'\t\t<a :href="vHref" class="item right" style="color:#4183c4" :class="{active:vActive}">[<slot></slot>]</a> \t\t'}),Vue.component("health-check-config-box",{props:["v-health-check-config","v-check-domain-url"],data:function(){let t=this.vHealthCheckConfig,i="http",s="",n="/",o="";if(null==t){t={isOn:!1,url:"",interval:{count:60,unit:"second"},statusCodes:[200],timeout:{count:10,unit:"second"},countTries:3,tryDelay:{count:100,unit:"ms"},autoDown:!0,countUp:1,countDown:3,userAgent:"",onlyBasicRequest:!0,accessLogIsOn:!0};let e=this;setTimeout(function(){e.changeURL()},500)}else{try{let e=new URL(t.url);i=e.protocol.substring(0,e.protocol.length-1);var a=(o="%24%7Bhost%7D"==(o=e.host)?"${host}":o).indexOf(":");0<a&&(o=o.substring(0,a)),s=e.port,n=e.pathname,0<e.search.length&&(n+=e.search)}catch(e){}null==t.statusCodes&&(t.statusCodes=[200]),null==t.interval&&(t.interval={count:60,unit:"second"}),null==t.timeout&&(t.timeout={count:10,unit:"second"}),null==t.tryDelay&&(t.tryDelay={count:100,unit:"ms"}),(null==t.countUp||t.countUp<1)&&(t.countUp=1),(null==t.countDown||t.countDown<1)&&(t.countDown=3)}return{healthCheck:t,advancedVisible:!1,urlProtocol:i,urlHost:o,urlPort:s,urlRequestURI:n,urlIsEditing:0==t.url.length,hostErr:""}},watch:{urlRequestURI:function(){0<this.urlRequestURI.length&&"/"!=this.urlRequestURI[0]&&(this.urlRequestURI="/"+this.urlRequestURI),this.changeURL()},urlPort:function(e){let t=parseInt(e);isNaN(t)?this.urlPort="":this.urlPort=t.toString(),this.changeURL()},urlProtocol:function(){this.changeURL()},urlHost:function(){this.changeURL(),this.hostErr=""},"healthCheck.countTries":function(e){e=parseInt(e);isNaN(e)?this.healthCheck.countTries=0:this.healthCheck.countTries=e},"healthCheck.countUp":function(e){e=parseInt(e);isNaN(e)?this.healthCheck.countUp=0:this.healthCheck.countUp=e},"healthCheck.countDown":function(e){e=parseInt(e);isNaN(e)?this.healthCheck.countDown=0:this.healthCheck.countDown=e}},methods:{showAdvanced:function(){this.advancedVisible=!this.advancedVisible},changeURL:function(){let e=this.urlHost;0==e.length&&(e="${host}"),this.healthCheck.url=this.urlProtocol+"://"+e+(0<this.urlPort.length?":"+this.urlPort:"")+this.urlRequestURI},changeStatus:function(e){this.healthCheck.statusCodes=e.$map(function(e,t){t=parseInt(t);return isNaN(t)?0:t})},onChangeURLHost:function(){var e=this.vCheckDomainUrl;if(null!=e&&0!=e.length){let t=this;Tea.action(e).params({host:this.urlHost}).success(function(e){e.data.isOk?t.hostErr="":t.hostErr="在当前集群中找不到此域名,可能会影响健康检查结果。"}).post()}},editURL:function(){this.urlIsEditing=!this.urlIsEditing}},template:`<div>
<input type="hidden" name="healthCheckJSON" :value="JSON.stringify(healthCheck)"/> <input type="hidden" name="healthCheckJSON" :value="JSON.stringify(healthCheck)"/>
<table class="ui table definition selectable"> <table class="ui table definition selectable">
<tbody> <tbody>
@@ -4656,8 +4656,8 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
<tr> <tr>
<td>域名</td> <td>域名</td>
<td> <td>
<input type="text" v-model="urlHost"/> <input type="text" v-model="urlHost" @change="onChangeURLHost"/>
<p class="comment">已经部署到当前集群的一个域名如果为空则使用节点IP作为域名。<span class="red" v-if="urlProtocol == 'https' && urlHost.length == 0">如果协议是https这里必须填写一个已经设置了SSL证书的域名。</span></p> <p class="comment"><span v-if="hostErr.length > 0" class="red">{{hostErr}}</span>已经部署到当前集群的一个域名如果为空则使用节点IP作为域名。<span class="red" v-if="urlProtocol == 'https' && urlHost.length == 0">如果协议是https这里必须填写一个已经设置了SSL证书的域名。</span></p>
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -4814,7 +4814,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
<p class="comment">{{message}}<slot></slot></p> <p class="comment">{{message}}<slot></slot></p>
</div>`}),Vue.component("warning-message",{template:'<div class="ui icon message warning"><i class="icon warning circle"></i><div class="content"><slot></slot></div></div>'});let checkboxId=0,radioId=(Vue.component("checkbox",{props:["name","value","v-value","id","checked"],data:function(){checkboxId++;let e=this.id,t=(null==e&&(e="checkbox"+checkboxId),this.vValue),i=(null==t&&(t="1"),this.value);return null==i&&"checked"==this.checked&&(i=t),{elementId:e,elementValue:t,newValue:i}},methods:{change:function(){this.$emit("input",this.newValue)},check:function(){this.newValue=this.elementValue},uncheck:function(){this.newValue=""},isChecked:function(){return this.newValue==this.elementValue}},watch:{value:function(e){"boolean"==typeof e&&(this.newValue=e)}},template:`<div class="ui checkbox"> </div>`}),Vue.component("warning-message",{template:'<div class="ui icon message warning"><i class="icon warning circle"></i><div class="content"><slot></slot></div></div>'});let checkboxId=0,radioId=(Vue.component("checkbox",{props:["name","value","v-value","id","checked"],data:function(){checkboxId++;let e=this.id,t=(null==e&&(e="checkbox"+checkboxId),this.vValue),i=(null==t&&(t="1"),this.value);return null==i&&"checked"==this.checked&&(i=t),{elementId:e,elementValue:t,newValue:i}},methods:{change:function(){this.$emit("input",this.newValue)},check:function(){this.newValue=this.elementValue},uncheck:function(){this.newValue=""},isChecked:function(){return this.newValue==this.elementValue}},watch:{value:function(e){"boolean"==typeof e&&(this.newValue=e)}},template:`<div class="ui checkbox">
<input type="checkbox" :name="name" :value="elementValue" :id="elementId" @change="change" v-model="newValue"/> <input type="checkbox" :name="name" :value="elementValue" :id="elementId" @change="change" v-model="newValue"/>
<label :for="elementId" style="font-size: 0.85em!important;"><slot></slot></label> <label :for="elementId"><slot></slot></label>
</div>`}),Vue.component("network-addresses-view",{props:["v-addresses"],template:`<div> </div>`}),Vue.component("network-addresses-view",{props:["v-addresses"],template:`<div>
<div class="ui label tiny basic" v-if="vAddresses != null" v-for="addr in vAddresses"> <div class="ui label tiny basic" v-if="vAddresses != null" v-for="addr in vAddresses">
{{addr.protocol}}://<span v-if="addr.host.length > 0">{{addr.host.quoteIP()}}</span><span v-else>*</span>:{{addr.portRange}} {{addr.protocol}}://<span v-if="addr.host.length > 0">{{addr.host.quoteIP()}}</span><span v-else>*</span>:{{addr.portRange}}
@@ -5212,11 +5212,11 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
</div> </div>
</div> </div>
</div> </div>
</div>`}),Vue.component("dns-domain-selector",{props:["v-domain-id","v-domain-name"],data:function(){let e=this.vDomainId,t=(null==e&&(e=0),this.vDomainName);return null==t&&(t=""),{domainId:e,domainName:t}},methods:{select:function(){let t=this;teaweb.popup("/dns/domains/selectPopup",{callback:function(e){t.domainId=e.data.domainId,t.domainName=e.data.domainName,t.change()}})},remove:function(){this.domainId=0,this.domainName="",this.change()},update:function(){let t=this;teaweb.popup("/dns/domains/selectPopup?domainId="+this.domainId,{callback:function(e){t.domainId=e.data.domainId,t.domainName=e.data.domainName,t.change()}})},change:function(){this.$emit("change",{id:this.domainId,name:this.domainName})}},template:`<div> </div>`}),Vue.component("dns-domain-selector",{props:["v-domain-id","v-domain-name","v-provider-name"],data:function(){let e=this.vDomainId,t=(null==e&&(e=0),this.vDomainName),i=(null==t&&(t=""),this.vProviderName);return null==i&&(i=""),{domainId:e,domainName:t,providerName:i}},methods:{select:function(){let t=this;teaweb.popup("/dns/domains/selectPopup",{callback:function(e){t.domainId=e.data.domainId,t.domainName=e.data.domainName,t.providerName=e.data.providerName,t.change()}})},remove:function(){this.domainId=0,this.domainName="",this.change()},update:function(){let t=this;teaweb.popup("/dns/domains/selectPopup?domainId="+this.domainId,{callback:function(e){t.domainId=e.data.domainId,t.domainName=e.data.domainName,t.providerName=e.data.providerName,t.change()}})},change:function(){this.$emit("change",{id:this.domainId,name:this.domainName})}},template:`<div>
<input type="hidden" name="dnsDomainId" :value="domainId"/> <input type="hidden" name="dnsDomainId" :value="domainId"/>
<div v-if="domainName.length > 0"> <div v-if="domainName.length > 0">
<span class="ui label small basic"> <span class="ui label small basic">
{{domainName}} <span v-if="providerName != null && providerName.length > 0">{{providerName}} &raquo; </span> {{domainName}}
<a href="" @click.prevent="update"><i class="icon pencil small"></i></a> <a href="" @click.prevent="update"><i class="icon pencil small"></i></a>
<a href="" @click.prevent="remove()"><i class="icon remove"></i></a> <a href="" @click.prevent="remove()"><i class="icon remove"></i></a>
</span> </span>

View File

@@ -6462,16 +6462,22 @@ Vue.component("firewall-syn-flood-config-viewer", {
// 域名列表 // 域名列表
Vue.component("domains-box", { Vue.component("domains-box", {
props: ["v-domains"], props: ["v-domains", "name"],
data: function () { data: function () {
let domains = this.vDomains let domains = this.vDomains
if (domains == null) { if (domains == null) {
domains = [] domains = []
} }
let realName = "domainsJSON"
if (this.name != null && typeof this.name == "string") {
realName = this.name
}
return { return {
domains: domains, domains: domains,
isAdding: false, isAdding: false,
addingDomain: "" addingDomain: "",
realName: realName
} }
}, },
methods: { methods: {
@@ -6521,7 +6527,7 @@ Vue.component("domains-box", {
} }
}, },
template: `<div> template: `<div>
<input type="hidden" name="domainsJSON" :value="JSON.stringify(domains)"/> <input type="hidden" :name="realName" :value="JSON.stringify(domains)"/>
<div v-if="domains.length > 0"> <div v-if="domains.length > 0">
<span class="ui label small basic" v-for="(domain, index) in domains"> <span class="ui label small basic" v-for="(domain, index) in domains">
<span v-if="domain.length > 0 && domain[0] == '~'" class="grey" style="font-style: normal">[正则]</span> <span v-if="domain.length > 0 && domain[0] == '~'" class="grey" style="font-style: normal">[正则]</span>
@@ -14093,7 +14099,7 @@ Vue.component("inner-menu-item", {
}); });
Vue.component("health-check-config-box", { Vue.component("health-check-config-box", {
props: ["v-health-check-config"], props: ["v-health-check-config", "v-check-domain-url"],
data: function () { data: function () {
let healthCheckConfig = this.vHealthCheckConfig let healthCheckConfig = this.vHealthCheckConfig
let urlProtocol = "http" let urlProtocol = "http"
@@ -14170,7 +14176,9 @@ Vue.component("health-check-config-box", {
urlHost: urlHost, urlHost: urlHost,
urlPort: urlPort, urlPort: urlPort,
urlRequestURI: urlRequestURI, urlRequestURI: urlRequestURI,
urlIsEditing: healthCheckConfig.url.length == 0 urlIsEditing: healthCheckConfig.url.length == 0,
hostErr: ""
} }
}, },
watch: { watch: {
@@ -14194,6 +14202,7 @@ Vue.component("health-check-config-box", {
}, },
urlHost: function () { urlHost: function () {
this.changeURL() this.changeURL()
this.hostErr = ""
}, },
"healthCheck.countTries": function (v) { "healthCheck.countTries": function (v) {
let count = parseInt(v) let count = parseInt(v)
@@ -14241,6 +14250,24 @@ Vue.component("health-check-config-box", {
} }
}) })
}, },
onChangeURLHost: function () {
let checkDomainURL = this.vCheckDomainUrl
if (checkDomainURL == null || checkDomainURL.length == 0) {
return
}
let that = this
Tea.action(checkDomainURL)
.params({host: this.urlHost})
.success(function (resp) {
if (!resp.data.isOk) {
that.hostErr = "在当前集群中找不到此域名,可能会影响健康检查结果。"
} else {
that.hostErr = ""
}
})
.post()
},
editURL: function () { editURL: function () {
this.urlIsEditing = !this.urlIsEditing this.urlIsEditing = !this.urlIsEditing
} }
@@ -14279,8 +14306,8 @@ Vue.component("health-check-config-box", {
<tr> <tr>
<td>域名</td> <td>域名</td>
<td> <td>
<input type="text" v-model="urlHost"/> <input type="text" v-model="urlHost" @change="onChangeURLHost"/>
<p class="comment">已经部署到当前集群的一个域名如果为空则使用节点IP作为域名。<span class="red" v-if="urlProtocol == 'https' && urlHost.length == 0">如果协议是https这里必须填写一个已经设置了SSL证书的域名。</span></p> <p class="comment"><span v-if="hostErr.length > 0" class="red">{{hostErr}}</span>已经部署到当前集群的一个域名如果为空则使用节点IP作为域名。<span class="red" v-if="urlProtocol == 'https' && urlHost.length == 0">如果协议是https这里必须填写一个已经设置了SSL证书的域名。</span></p>
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -14828,7 +14855,7 @@ Vue.component("checkbox", {
}, },
template: `<div class="ui checkbox"> template: `<div class="ui checkbox">
<input type="checkbox" :name="name" :value="elementValue" :id="elementId" @change="change" v-model="newValue"/> <input type="checkbox" :name="name" :value="elementValue" :id="elementId" @change="change" v-model="newValue"/>
<label :for="elementId" style="font-size: 0.85em!important;"><slot></slot></label> <label :for="elementId"><slot></slot></label>
</div>` </div>`
}) })
@@ -16684,7 +16711,7 @@ Vue.component("dns-route-selector", {
}) })
Vue.component("dns-domain-selector", { Vue.component("dns-domain-selector", {
props: ["v-domain-id", "v-domain-name"], props: ["v-domain-id", "v-domain-name", "v-provider-name"],
data: function () { data: function () {
let domainId = this.vDomainId let domainId = this.vDomainId
if (domainId == null) { if (domainId == null) {
@@ -16694,9 +16721,16 @@ Vue.component("dns-domain-selector", {
if (domainName == null) { if (domainName == null) {
domainName = "" domainName = ""
} }
let providerName = this.vProviderName
if (providerName == null) {
providerName = ""
}
return { return {
domainId: domainId, domainId: domainId,
domainName: domainName domainName: domainName,
providerName: providerName
} }
}, },
methods: { methods: {
@@ -16706,6 +16740,7 @@ Vue.component("dns-domain-selector", {
callback: function (resp) { callback: function (resp) {
that.domainId = resp.data.domainId that.domainId = resp.data.domainId
that.domainName = resp.data.domainName that.domainName = resp.data.domainName
that.providerName = resp.data.providerName
that.change() that.change()
} }
}) })
@@ -16721,6 +16756,7 @@ Vue.component("dns-domain-selector", {
callback: function (resp) { callback: function (resp) {
that.domainId = resp.data.domainId that.domainId = resp.data.domainId
that.domainName = resp.data.domainName that.domainName = resp.data.domainName
that.providerName = resp.data.providerName
that.change() that.change()
} }
}) })
@@ -16736,7 +16772,7 @@ Vue.component("dns-domain-selector", {
<input type="hidden" name="dnsDomainId" :value="domainId"/> <input type="hidden" name="dnsDomainId" :value="domainId"/>
<div v-if="domainName.length > 0"> <div v-if="domainName.length > 0">
<span class="ui label small basic"> <span class="ui label small basic">
{{domainName}} <span v-if="providerName != null && providerName.length > 0">{{providerName}} &raquo; </span> {{domainName}}
<a href="" @click.prevent="update"><i class="icon pencil small"></i></a> <a href="" @click.prevent="update"><i class="icon pencil small"></i></a>
<a href="" @click.prevent="remove()"><i class="icon remove"></i></a> <a href="" @click.prevent="remove()"><i class="icon remove"></i></a>
</span> </span>