mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-27 13:40:25 +08:00
修复服务访问日志不能使用集群、节点筛选的Bug
This commit is contained in:
@@ -29,6 +29,9 @@ func (this *HistoryAction) RunGet(params struct {
|
|||||||
RequestId string
|
RequestId string
|
||||||
HasError int
|
HasError int
|
||||||
|
|
||||||
|
ClusterId int64
|
||||||
|
NodeId int64
|
||||||
|
|
||||||
PageSize int
|
PageSize int
|
||||||
}) {
|
}) {
|
||||||
if len(params.Day) == 0 {
|
if len(params.Day) == 0 {
|
||||||
@@ -44,6 +47,8 @@ func (this *HistoryAction) RunGet(params struct {
|
|||||||
this.Data["hasError"] = params.HasError
|
this.Data["hasError"] = params.HasError
|
||||||
this.Data["hasWAF"] = params.HasWAF
|
this.Data["hasWAF"] = params.HasWAF
|
||||||
this.Data["pageSize"] = params.PageSize
|
this.Data["pageSize"] = params.PageSize
|
||||||
|
this.Data["clusterId"] = params.ClusterId
|
||||||
|
this.Data["nodeId"] = params.NodeId
|
||||||
|
|
||||||
day := params.Day
|
day := params.Day
|
||||||
ipList := []string{}
|
ipList := []string{}
|
||||||
@@ -66,6 +71,8 @@ func (this *HistoryAction) RunGet(params struct {
|
|||||||
Keyword: params.Keyword,
|
Keyword: params.Keyword,
|
||||||
Ip: params.Ip,
|
Ip: params.Ip,
|
||||||
Domain: params.Domain,
|
Domain: params.Domain,
|
||||||
|
NodeId: params.NodeId,
|
||||||
|
NodeClusterId: params.ClusterId,
|
||||||
Size: size,
|
Size: size,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -102,6 +109,8 @@ func (this *HistoryAction) RunGet(params struct {
|
|||||||
Keyword: params.Keyword,
|
Keyword: params.Keyword,
|
||||||
Ip: params.Ip,
|
Ip: params.Ip,
|
||||||
Domain: params.Domain,
|
Domain: params.Domain,
|
||||||
|
NodeId: params.NodeId,
|
||||||
|
NodeClusterId: params.ClusterId,
|
||||||
Size: size,
|
Size: size,
|
||||||
Reverse: true,
|
Reverse: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
RequestId string
|
RequestId string
|
||||||
Ip string
|
Ip string
|
||||||
Domain string
|
Domain string
|
||||||
|
ClusterId int64
|
||||||
|
NodeId int64
|
||||||
Keyword string
|
Keyword string
|
||||||
}) {
|
}) {
|
||||||
this.Data["serverId"] = params.ServerId
|
this.Data["serverId"] = params.ServerId
|
||||||
@@ -30,6 +32,8 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
this.Data["domain"] = params.Domain
|
this.Data["domain"] = params.Domain
|
||||||
this.Data["keyword"] = params.Keyword
|
this.Data["keyword"] = params.Keyword
|
||||||
this.Data["path"] = this.Request.URL.Path
|
this.Data["path"] = this.Request.URL.Path
|
||||||
|
this.Data["clusterId"] = params.ClusterId
|
||||||
|
this.Data["nodeId"] = params.NodeId
|
||||||
|
|
||||||
// 记录最近使用
|
// 记录最近使用
|
||||||
_, err := this.RPC().LatestItemRPC().IncreaseLatestItem(this.AdminContext(), &pb.IncreaseLatestItemRequest{
|
_, err := this.RPC().LatestItemRPC().IncreaseLatestItem(this.AdminContext(), &pb.IncreaseLatestItemRequest{
|
||||||
@@ -50,6 +54,8 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
Keyword string
|
Keyword string
|
||||||
Ip string
|
Ip string
|
||||||
Domain string
|
Domain string
|
||||||
|
ClusterId int64
|
||||||
|
NodeId int64
|
||||||
|
|
||||||
Must *actions.Must
|
Must *actions.Must
|
||||||
}) {
|
}) {
|
||||||
@@ -62,6 +68,8 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
Keyword: params.Keyword,
|
Keyword: params.Keyword,
|
||||||
Ip: params.Ip,
|
Ip: params.Ip,
|
||||||
Domain: params.Domain,
|
Domain: params.Domain,
|
||||||
|
NodeId: params.NodeId,
|
||||||
|
NodeClusterId: params.ClusterId,
|
||||||
Reverse: isReverse,
|
Reverse: isReverse,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ func (this *TodayAction) RunGet(params struct {
|
|||||||
Keyword string
|
Keyword string
|
||||||
Ip string
|
Ip string
|
||||||
Domain string
|
Domain string
|
||||||
|
ClusterId int64
|
||||||
|
NodeId int64
|
||||||
|
|
||||||
PageSize int
|
PageSize int
|
||||||
}) {
|
}) {
|
||||||
@@ -40,6 +42,8 @@ func (this *TodayAction) RunGet(params struct {
|
|||||||
this.Data["ip"] = params.Ip
|
this.Data["ip"] = params.Ip
|
||||||
this.Data["domain"] = params.Domain
|
this.Data["domain"] = params.Domain
|
||||||
this.Data["hasWAF"] = params.HasWAF
|
this.Data["hasWAF"] = params.HasWAF
|
||||||
|
this.Data["clusterId"] = params.ClusterId
|
||||||
|
this.Data["nodeId"] = params.NodeId
|
||||||
|
|
||||||
resp, err := this.RPC().HTTPAccessLogRPC().ListHTTPAccessLogs(this.AdminContext(), &pb.ListHTTPAccessLogsRequest{
|
resp, err := this.RPC().HTTPAccessLogRPC().ListHTTPAccessLogs(this.AdminContext(), &pb.ListHTTPAccessLogsRequest{
|
||||||
RequestId: params.RequestId,
|
RequestId: params.RequestId,
|
||||||
@@ -50,6 +54,8 @@ func (this *TodayAction) RunGet(params struct {
|
|||||||
Keyword: params.Keyword,
|
Keyword: params.Keyword,
|
||||||
Ip: params.Ip,
|
Ip: params.Ip,
|
||||||
Domain: params.Domain,
|
Domain: params.Domain,
|
||||||
|
NodeId: params.NodeId,
|
||||||
|
NodeClusterId: params.ClusterId,
|
||||||
Size: size,
|
Size: size,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -87,6 +93,8 @@ func (this *TodayAction) RunGet(params struct {
|
|||||||
Keyword: params.Keyword,
|
Keyword: params.Keyword,
|
||||||
Ip: params.Ip,
|
Ip: params.Ip,
|
||||||
Domain: params.Domain,
|
Domain: params.Domain,
|
||||||
|
NodeId: params.NodeId,
|
||||||
|
NodeClusterId: params.ClusterId,
|
||||||
Size: size,
|
Size: size,
|
||||||
Reverse: true,
|
Reverse: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<input type="hidden" name="serverId" :value="serverId"/>
|
<input type="hidden" name="serverId" :value="serverId"/>
|
||||||
<input type="hidden" name="hasError" :value="hasError"/>
|
<input type="hidden" name="hasError" :value="hasError"/>
|
||||||
<input type="hidden" name="hasWAF" :value="hasWAF"/>
|
<input type="hidden" name="hasWAF" :value="hasWAF"/>
|
||||||
<http-access-log-search-box :v-ip="ip" :v-domain="domain" :v-keyword="keyword">
|
<http-access-log-search-box :v-ip="ip" :v-domain="domain" :v-keyword="keyword" :v-cluster-id="clusterId" :v-node-id="nodeId">
|
||||||
<div class="ui field">
|
<div class="ui field">
|
||||||
<input type="text" name="day" maxlength="10" placeholder="选择日期" style="width:7.8em" id="day-input" v-model="day"/>
|
<input type="text" name="day" maxlength="10" placeholder="选择日期" style="width:7.8em" id="day-input" v-model="day"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="right-box">
|
<div class="right-box">
|
||||||
<form method="get" class="ui form small" :action="path" autocomplete="off">
|
<form method="get" class="ui form small" :action="path" autocomplete="off">
|
||||||
<input type="hidden" name="serverId" :value="serverId"/>
|
<input type="hidden" name="serverId" :value="serverId"/>
|
||||||
<http-access-log-search-box :v-ip="ip" :v-domain="domain" :v-keyword="keyword"></http-access-log-search-box>
|
<http-access-log-search-box :v-ip="ip" :v-domain="domain" :v-keyword="keyword" :v-cluster-id="clusterId" :v-node-id="nodeId"></http-access-log-search-box>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<p class="comment" v-if="isLoaded && accessLogs.length == 0">今天暂时还没有访问日志。</p>
|
<p class="comment" v-if="isLoaded && accessLogs.length == 0">今天暂时还没有访问日志。</p>
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ Tea.context(function () {
|
|||||||
requestId: this.requestId,
|
requestId: this.requestId,
|
||||||
keyword: this.keyword,
|
keyword: this.keyword,
|
||||||
ip: this.ip,
|
ip: this.ip,
|
||||||
domain: this.domain
|
domain: this.domain,
|
||||||
|
clusterId: this.clusterId,
|
||||||
|
nodeId: this.nodeId
|
||||||
})
|
})
|
||||||
.success(function (resp) {
|
.success(function (resp) {
|
||||||
this.accessLogs = resp.data.accessLogs.concat(this.accessLogs)
|
this.accessLogs = resp.data.accessLogs.concat(this.accessLogs)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<input type="hidden" name="serverId" :value="serverId"/>
|
<input type="hidden" name="serverId" :value="serverId"/>
|
||||||
<input type="hidden" name="hasError" :value="hasError"/>
|
<input type="hidden" name="hasError" :value="hasError"/>
|
||||||
<input type="hidden" name="hasWAF" :value="hasWAF"/>
|
<input type="hidden" name="hasWAF" :value="hasWAF"/>
|
||||||
<http-access-log-search-box :v-ip="ip" :v-domain="domain" :v-keyword="keyword"></http-access-log-search-box>
|
<http-access-log-search-box :v-ip="ip" :v-domain="domain" :v-keyword="keyword" :v-cluster-id="clusterId" :v-node-id="nodeId"></http-access-log-search-box>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<p class="comment" v-if="accessLogs.length == 0">今天暂时还没有访问日志。</p>
|
<p class="comment" v-if="accessLogs.length == 0">今天暂时还没有访问日志。</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user