Files
EdgeAdmin/web/public/js/components/ns/ns-access-log-ref-box.js

41 lines
1.1 KiB
JavaScript
Raw Normal View History

2021-06-02 11:53:08 +08:00
Vue.component("ns-access-log-ref-box", {
2021-08-05 16:08:18 +08:00
props: ["v-access-log-ref", "v-is-parent"],
2021-06-02 11:53:08 +08:00
data: function () {
let config = this.vAccessLogRef
if (config == null) {
config = {
isOn: false,
2021-08-05 16:08:18 +08:00
isPrior: false,
logMissingDomains: false
2021-06-02 11:53:08 +08:00
}
}
2021-08-05 16:08:18 +08:00
if (typeof (config.logMissingDomains) == "undefined") {
config.logMissingDomains = false
}
2021-06-02 11:53:08 +08:00
return {
config: config
}
},
template: `<div>
<input type="hidden" name="accessLogJSON" :value="JSON.stringify(config)"/>
<table class="ui table definition selectable">
2021-08-05 16:08:18 +08:00
<prior-checkbox :v-config="config" v-if="!vIsParent"></prior-checkbox>
<tbody v-show="vIsParent || config.isPrior">
<tr>
<td class="title">启用</td>
2021-08-05 16:08:18 +08:00
<td>
<checkbox name="isOn" value="1" v-model="config.isOn"></checkbox>
</td>
</tr>
<tr>
<td>记录所有访问</td>
<td>
<checkbox name="logMissingDomains" value="1" v-model="config.logMissingDomains"></checkbox>
<p class="comment">包括对没有在系统里创建的域名访问</p>
</td>
</tr>
</tbody>
2021-06-02 11:53:08 +08:00
</table>
<div class="margin"></div>
</div>`
})