mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-01 17:30:26 +08:00
cc2增加忽略常见文件扩展名选项
This commit is contained in:
@@ -92,6 +92,7 @@ Vue.component("http-firewall-checkpoint-cc", {
|
|||||||
let keys = []
|
let keys = []
|
||||||
let period = 60
|
let period = 60
|
||||||
let threshold = 1000
|
let threshold = 1000
|
||||||
|
let ignoreCommonFiles = false
|
||||||
|
|
||||||
let options = {}
|
let options = {}
|
||||||
if (window.parent.UPDATING_RULE != null) {
|
if (window.parent.UPDATING_RULE != null) {
|
||||||
@@ -113,6 +114,9 @@ Vue.component("http-firewall-checkpoint-cc", {
|
|||||||
if (options.threshold != null) {
|
if (options.threshold != null) {
|
||||||
threshold = options.threshold
|
threshold = options.threshold
|
||||||
}
|
}
|
||||||
|
if (options.ignoreCommonFiles != null && typeof (options.ignoreCommonFiles) == "boolean") {
|
||||||
|
ignoreCommonFiles = options.ignoreCommonFiles
|
||||||
|
}
|
||||||
|
|
||||||
let that = this
|
let that = this
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
@@ -123,6 +127,7 @@ Vue.component("http-firewall-checkpoint-cc", {
|
|||||||
keys: keys,
|
keys: keys,
|
||||||
period: period,
|
period: period,
|
||||||
threshold: threshold,
|
threshold: threshold,
|
||||||
|
ignoreCommonFiles: ignoreCommonFiles,
|
||||||
options: {},
|
options: {},
|
||||||
value: threshold
|
value: threshold
|
||||||
}
|
}
|
||||||
@@ -133,6 +138,9 @@ Vue.component("http-firewall-checkpoint-cc", {
|
|||||||
},
|
},
|
||||||
threshold: function () {
|
threshold: function () {
|
||||||
this.change()
|
this.change()
|
||||||
|
},
|
||||||
|
ignoreCommonFiles: function () {
|
||||||
|
this.change()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -152,6 +160,11 @@ Vue.component("http-firewall-checkpoint-cc", {
|
|||||||
}
|
}
|
||||||
this.value = threshold
|
this.value = threshold
|
||||||
|
|
||||||
|
let ignoreCommonFiles = this.ignoreCommonFiles
|
||||||
|
if (typeof ignoreCommonFiles != "boolean") {
|
||||||
|
ignoreCommonFiles = false
|
||||||
|
}
|
||||||
|
|
||||||
this.vCheckpoint.options = [
|
this.vCheckpoint.options = [
|
||||||
{
|
{
|
||||||
code: "keys",
|
code: "keys",
|
||||||
@@ -164,6 +177,10 @@ Vue.component("http-firewall-checkpoint-cc", {
|
|||||||
{
|
{
|
||||||
code: "threshold",
|
code: "threshold",
|
||||||
value: threshold
|
value: threshold
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: "ignoreCommonFiles",
|
||||||
|
value: ignoreCommonFiles
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -193,6 +210,13 @@ Vue.component("http-firewall-checkpoint-cc", {
|
|||||||
<input type="text" v-model="threshold" style="width: 6em" maxlength="8"/>
|
<input type="text" v-model="threshold" style="width: 6em" maxlength="8"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>忽略常见文件</td>
|
||||||
|
<td>
|
||||||
|
<checkbox v-model="ignoreCommonFiles"></checkbox>
|
||||||
|
<p class="comment">忽略js、css、jpg等常见文件名。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>`
|
</div>`
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user