diff --git a/web/public/js/components.js b/web/public/js/components.js index 8721e723..f2a64fad 100644 --- a/web/public/js/components.js +++ b/web/public/js/components.js @@ -2456,24 +2456,39 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio -`}),Vue.component("http-access-log-box",{props:["v-access-log","v-keyword","v-show-server-link"],data:function(){let e=this.vAccessLog;return null!=e.header&&null!=e.header.Upgrade&&null!=e.header.Upgrade.values&&e.header.Upgrade.values.$contains("websocket")&&("http"==e.scheme?e.scheme="ws":"https"==e.scheme&&(e.scheme="wss")),{accessLog:e}},methods:{formatCost:function(e){var e=(1e3*e).toString(),t=e.split(".");return t.length<2?e:t[0]+"."+t[1].substr(0,3)},showLog:function(){let e=this;var t=this.accessLog.requestId;this.$parent.$children.forEach(function(e){null!=e.deselect&&e.deselect()}),this.select(),teaweb.popup("/servers/server/log/viewPopup?requestId="+t,{width:"50em",height:"28em",onClose:function(){e.deselect()}})},select:function(){this.$refs.box.parentNode.style.cssText="background: rgba(0, 0, 0, 0.1)"},deselect:function(){this.$refs.box.parentNode.style.cssText=""}},template:`
- [{{accessLog.node.name}}节点] - [服务] - [{{accessLog.region}}] {{accessLog.remoteAddr}} [{{accessLog.timeLocal}}] "{{accessLog.requestMethod}} {{accessLog.scheme}}://{{accessLog.host}}{{accessLog.requestURI}} {{accessLog.proto}}" {{accessLog.status}} cache {{accessLog.attrs['cache.status'].toLowerCase()}} waf {{accessLog.firewallActions}} - {{tag}} - 耗时:{{formatCost(accessLog.requestTime)}} ms   ({{accessLog.humanTime}}) -   +
`}),Vue.component("http-access-log-box",{props:["v-access-log","v-keyword","v-show-server-link"],data:function(){let e=this.vAccessLog;return null!=e.header&&null!=e.header.Upgrade&&null!=e.header.Upgrade.values&&e.header.Upgrade.values.$contains("websocket")&&("http"==e.scheme?e.scheme="ws":"https"==e.scheme&&(e.scheme="wss")),{accessLog:e}},methods:{formatCost:function(e){if(null==e)return"0";let t=(1e3*e).toString(),i=t.split(".");return i.length<2?t:i[0]+"."+i[1].substring(0,3)},showLog:function(){let e=this;var t=this.accessLog.requestId;this.$parent.$children.forEach(function(e){null!=e.deselect&&e.deselect()}),this.select(),teaweb.popup("/servers/server/log/viewPopup?requestId="+t,{width:"50em",height:"28em",onClose:function(){e.deselect()}})},select:function(){this.$refs.box.parentNode.style.cssText="background: rgba(0, 0, 0, 0.1)"},deselect:function(){this.$refs.box.parentNode.style.cssText=""}},template:`
+
+ [{{accessLog.node.name}}节点] + [服务] + [{{accessLog.region}}] {{accessLog.remoteAddr}} [{{accessLog.timeLocal}}] "{{accessLog.requestMethod}} {{accessLog.scheme}}://{{accessLog.host}}{{accessLog.requestURI}} {{accessLog.proto}}" {{accessLog.status}} cache {{accessLog.attrs['cache.status'].toLowerCase()}} waf {{accessLog.firewallActions}} - {{tag}} + + + + + + WAF -- + {{accessLog.wafInfo.group.name}} -- + {{accessLog.wafInfo.set.name}} + + + + + + - 耗时:{{formatCost(accessLog.requestTime)}} ms   ({{accessLog.humanTime}}) +   +
`}),Vue.component("http-access-log-config-box",{props:["v-access-log-config","v-fields","v-default-field-codes","v-is-location","v-is-group"],data:function(){let t=this,i=(setTimeout(function(){t.changeFields()},100),{isPrior:!1,isOn:!1,fields:[1,2,6,7],status1:!0,status2:!0,status3:!0,status4:!0,status5:!0,firewallOnly:!1,enableClientClosed:!1});return null!=this.vAccessLogConfig&&(i=this.vAccessLogConfig),this.vFields.forEach(function(e){null==t.vAccessLogConfig?e.isChecked=t.vDefaultFieldCodes.$contains(e.code):e.isChecked=i.fields.$contains(e.code)}),{accessLog:i,hasRequestBodyField:this.vFields.$contains(8)}},methods:{changeFields:function(){this.accessLog.fields=this.vFields.filter(function(e){return e.isChecked}).map(function(e){return e.code}),this.hasRequestBodyField=this.accessLog.fields.$contains(8)}},template:`
- + @@ -2536,7 +2551,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio

WAF相关

是否开启访问日志存储开启访问日志
-

关闭访问日志,并不影响统计的运行。

- + - - - + + + @@ -3682,7 +3697,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio - + @@ -7403,7 +7421,7 @@ Vue.component("http-access-log-config-box", {

WAF相关

是否只记录WAF相关日志只记录WAF相关日志

选中后只记录WAF相关的日志。通过此选项可有效减少访问日志数量,降低网络带宽和存储压力。

@@ -3666,9 +3681,9 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
IP类型级别过期时间类型级别过期时间 备注 操作
- + {{item.ipFrom}}  New   - {{item.ipTo}} * @@ -3851,7 +3866,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio

常用时间:  1天  |  3天  |  一周  |  30天 

-`}),Vue.component("label-on",{props:["v-is-on"],template:'
已启用已停用
'}),Vue.component("code-label",{methods:{click:function(e){this.$emit("click",e)}},template:''}),Vue.component("tiny-label",{template:''}),Vue.component("tiny-basic-label",{template:''}),Vue.component("micro-basic-label",{template:''}),Vue.component("grey-label",{props:["color"],data:function(){let e="grey";return{labelColor:e=null!=this.color&&0
'}),Vue.component("optional-label",{template:'(可选)'}),Vue.component("plus-label",{template:'Plus专属功能。'}),Vue.component("first-menu",{props:[],template:' \t\t
\t\t\t \t\t\t
\t\t
'}),Vue.component("more-options-indicator",{data:function(){return{visible:!1}},methods:{changeVisible:function(){this.visible=!this.visible,null!=Tea.Vue&&(Tea.Vue.moreOptionsVisible=this.visible),this.$emit("change",this.visible)}},template:'更多选项收起选项 '}),Vue.component("page-size-selector",{data:function(){let t=window.location.search,i=10;if(0 +`}),Vue.component("label-on",{props:["v-is-on"],template:'
已启用已停用
'}),Vue.component("code-label",{methods:{click:function(e){this.$emit("click",e)}},template:''}),Vue.component("code-label-plain",{template:''}),Vue.component("tiny-label",{template:''}),Vue.component("tiny-basic-label",{template:''}),Vue.component("micro-basic-label",{template:''}),Vue.component("grey-label",{props:["color"],data:function(){let e="grey";return{labelColor:e=null!=this.color&&0'}),Vue.component("optional-label",{template:'(可选)'}),Vue.component("plus-label",{template:'Plus专属功能。'}),Vue.component("first-menu",{props:[],template:' \t\t
\t\t\t \t\t\t
\t\t
'}),Vue.component("more-options-indicator",{data:function(){return{visible:!1}},methods:{changeVisible:function(){this.visible=!this.visible,null!=Tea.Vue&&(Tea.Vue.moreOptionsVisible=this.visible),this.$emit("change",this.visible)}},template:'更多选项收起选项 '}),Vue.component("page-size-selector",{data:function(){let t=window.location.search,i=10;if(0 `}),Vue.component("second-menu",{template:' \t\t
\t\t\t \t\t\t
\t\t
'}),Vue.component("loading-message",{template:`
  diff --git a/web/public/js/components.src.js b/web/public/js/components.src.js index 38b03715..0c7a7374 100755 --- a/web/public/js/components.src.js +++ b/web/public/js/components.src.js @@ -7238,13 +7238,16 @@ Vue.component("http-access-log-box", { }, methods: { formatCost: function (seconds) { - var s = (seconds * 1000).toString(); - var pieces = s.split("."); + if (seconds == null) { + return "0" + } + let s = (seconds * 1000).toString(); + let pieces = s.split("."); if (pieces.length < 2) { return s; } - return pieces[0] + "." + pieces[1].substr(0, 3); + return pieces[0] + "." + pieces[1].substring(0, 3); }, showLog: function () { let that = this @@ -7271,10 +7274,26 @@ Vue.component("http-access-log-box", { } }, template: `
- [{{accessLog.node.name}}节点] - [服务] - [{{accessLog.region}}] {{accessLog.remoteAddr}} [{{accessLog.timeLocal}}] "{{accessLog.requestMethod}} {{accessLog.scheme}}://{{accessLog.host}}{{accessLog.requestURI}} {{accessLog.proto}}" {{accessLog.status}} cache {{accessLog.attrs['cache.status'].toLowerCase()}} waf {{accessLog.firewallActions}} - {{tag}} - 耗时:{{formatCost(accessLog.requestTime)}} ms   ({{accessLog.humanTime}}) -   +
+ [{{accessLog.node.name}}节点] + [服务] + [{{accessLog.region}}] {{accessLog.remoteAddr}} [{{accessLog.timeLocal}}] "{{accessLog.requestMethod}} {{accessLog.scheme}}://{{accessLog.host}}{{accessLog.requestURI}} {{accessLog.proto}}" {{accessLog.status}} cache {{accessLog.attrs['cache.status'].toLowerCase()}} waf {{accessLog.firewallActions}} - {{tag}} + + + + + + WAF -- + {{accessLog.wafInfo.group.name}} -- + {{accessLog.wafInfo.set.name}} + + + + + + - 耗时:{{formatCost(accessLog.requestTime)}} ms   ({{accessLog.humanTime}}) +   +
` }) @@ -7334,13 +7353,12 @@ Vue.component("http-access-log-config-box", {
是否开启访问日志存储开启访问日志
-

关闭访问日志,并不影响统计的运行。

- + - - - + + + @@ -10614,7 +10632,7 @@ Vue.component("ip-list-table", {
是否只记录WAF相关日志只记录WAF相关日志

选中后只记录WAF相关的日志。通过此选项可有效减少访问日志数量,降低网络带宽和存储压力。

@@ -10598,9 +10616,9 @@ Vue.component("ip-list-table", {
IP类型级别过期时间类型级别过期时间 备注 操作
- + {{item.ipFrom}}  New   - {{item.ipTo}} * @@ -11587,6 +11605,11 @@ Vue.component("code-label", { template: `` }) +Vue.component("code-label-plain", { + template: `` +}) + + // tiny标签 Vue.component("tiny-label", { template: ``