mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-06 06:40:27 +08:00
增加API节点安装配置界面
This commit is contained in:
33
web/public/js/components/server/ssl-certs-view.js
Normal file
33
web/public/js/components/server/ssl-certs-view.js
Normal file
@@ -0,0 +1,33 @@
|
||||
Vue.component("ssl-certs-view", {
|
||||
props: ["v-certs"],
|
||||
data: function () {
|
||||
let certs = this.vCerts
|
||||
if (certs == null) {
|
||||
certs = []
|
||||
}
|
||||
return {
|
||||
certs: certs
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 格式化时间
|
||||
formatTime: function (timestamp) {
|
||||
return new Date(timestamp * 1000).format("Y-m-d")
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
viewCert: function (certId) {
|
||||
teaweb.popup("/servers/components/ssl/certPopup?certId=" + certId, {
|
||||
height: "28em",
|
||||
width: "48em"
|
||||
})
|
||||
}
|
||||
},
|
||||
template: `<div>
|
||||
<div v-if="certs != null && certs.length > 0">
|
||||
<div class="ui label small" v-for="(cert, index) in certs">
|
||||
{{cert.name}} / {{cert.dnsNames}} / 有效至{{formatTime(cert.timeEndAt)}} <a href="" title="查看" @click.prevent="viewCert(cert.id)"><i class="icon external alternate"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>`
|
||||
})
|
||||
Reference in New Issue
Block a user