mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-07 15:20:25 +08:00
创建服务时如果选择了所属用户,则证书列表中默认显示该用户的证书
This commit is contained in:
@@ -6,7 +6,8 @@ Vue.component("ssl-certs-box", {
|
|||||||
"v-view-size", // 弹窗尺寸:normal, mini
|
"v-view-size", // 弹窗尺寸:normal, mini
|
||||||
"v-single-mode", // 单证书模式
|
"v-single-mode", // 单证书模式
|
||||||
"v-description", // 描述文字
|
"v-description", // 描述文字
|
||||||
"v-domains" // 搜索的域名列表或者函数
|
"v-domains", // 搜索的域名列表或者函数
|
||||||
|
"v-user-id" // 用户ID
|
||||||
],
|
],
|
||||||
data: function () {
|
data: function () {
|
||||||
let certs = this.vCerts
|
let certs = this.vCerts
|
||||||
@@ -73,8 +74,12 @@ Vue.component("ssl-certs-box", {
|
|||||||
let selectedCertIds = this.certs.map(function (cert) {
|
let selectedCertIds = this.certs.map(function (cert) {
|
||||||
return cert.id
|
return cert.id
|
||||||
})
|
})
|
||||||
|
let userId = this.vUserId
|
||||||
|
if (userId == null) {
|
||||||
|
userId = 0
|
||||||
|
}
|
||||||
|
|
||||||
teaweb.popup("/servers/certs/selectPopup?viewSize=" + viewSize + "&searchingDomains=" + window.encodeURIComponent(searchingDomains.join(",")) + "&selectedCertIds=" + selectedCertIds.join(","), {
|
teaweb.popup("/servers/certs/selectPopup?viewSize=" + viewSize + "&searchingDomains=" + window.encodeURIComponent(searchingDomains.join(",")) + "&selectedCertIds=" + selectedCertIds.join(",") + "&userId=" + userId, {
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
callback: function (resp) {
|
callback: function (resp) {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{tlsProtocolName.toUpperCase()}}证书</td>
|
<td>{{tlsProtocolName.toUpperCase()}}证书</td>
|
||||||
<td>
|
<td>
|
||||||
<ssl-certs-box :v-protocol="tlsProtocolName.toLowerCase()" :v-domains="findServerNames"></ssl-certs-box>
|
<ssl-certs-box :v-protocol="tlsProtocolName.toLowerCase()" :v-domains="findServerNames" :v-user-id="userId"></ssl-certs-box>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user