增加若干操作日志/代理服务DNS CNAME显示的地方增加拷贝到剪贴板图标

This commit is contained in:
GoEdgeLab
2020-11-17 15:41:43 +08:00
parent 5af772a178
commit 8e0a8d45ec
32 changed files with 199 additions and 11 deletions

7
web/public/js/clipboard.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
Vue.component("copy-to-clipboard", {
props: ["v-target"],
created: function () {
let jsFile = document.createElement("script")
jsFile.setAttribute("src", "/js/clipboard.min.js")
document.head.appendChild(jsFile)
},
methods: {
copy: function () {
new ClipboardJS('[data-clipboard-target]');
teaweb.success("已复制到剪切板")
}
},
template: `<a href="" title="拷贝到剪切板" :data-clipboard-target="'#' + vTarget" @click.prevent="copy"><i class="ui icon copy small"></i></em></a>`
})

View File

@@ -6,8 +6,9 @@
<menu-item :href="'/servers/components/waf/groups?firewallPolicyId=' + firewallPolicyId + '&type=outbound'" code="outbound">出站规则({{countOutboundGroups}})</menu-item>
<menu-item :href="'/servers/components/waf/ipadmin?firewallPolicyId=' + firewallPolicyId" code="ipadmin">IP管理</menu-item>
<menu-item :href="'/servers/components/waf/log?firewallPolicyId=' + firewallPolicyId" code="log">拦截日志</menu-item>
<menu-item :href="'/servers/components/waf/test?firewallPolicyId=' + firewallPolicyId" code="test">测试</menu-item>
<!-- TODO -->
<!--<menu-item :href="'/servers/components/waf/test?firewallPolicyId=' + firewallPolicyId" code="test">测试</menu-item>
<menu-item :href="'/servers/components/waf/import?firewallPolicyId=' + firewallPolicyId" code="import">导入</menu-item>
<menu-item :href="'/servers/components/waf/export?firewallPolicyId=' + firewallPolicyId" code="export">导出</menu-item>
<menu-item :href="'/servers/components/waf/export?firewallPolicyId=' + firewallPolicyId" code="export">导出</menu-item>-->
<menu-item :href="'/servers/components/waf/update?firewallPolicyId=' + firewallPolicyId" code="update">修改</menu-item>
</second-menu>

View File

@@ -0,0 +1,15 @@
{$layout}
{$template "/left_menu"}
<div class="right-box">
<table class="ui table selectable definition">
<tr>
<td class="title">当前服务CNAME</td>
<td>
<span id="cname-text">{{dnsName}}.<span v-if="dnsDomain.length > 0">{{dnsDomain}}.</span><span v-else>根域名</span></span> &nbsp; <copy-to-clipboard :v-target="'cname-text'"></copy-to-clipboard>
<p class="comment">可以在DNS设置一个CNAME记录名字为你自己的域名值为上面这个值。</p>
</td>
</tr>
</table>
</div>

View File

@@ -76,7 +76,7 @@
<td>节点端口 *</td>
<td>
<input type="text" name="newPort" style="width:6em" maxlength="5" v-model="newAPINodePort"/>
<p class="comment">选一个在1024-65535之间并且没有正在使用的端口作为要启动的节点端口。</p>
<p class="comment">选一个在1024-65535之间并且没有正在使用的端口作为要启动的节点端口。如果你的服务器上有防火墙,请记得设置这个端口为通过。</p>
</td>
</tr>
<tr>