From 9d0bfa02dc75d8af37fda3b423df5ef15a5f8c9d Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 22 Apr 2024 10:37:58 +0800 Subject: [PATCH] add `erda` orgName in selector when download logs --- internal/tools/monitor/core/log/query/log.query.service.go | 2 +- internal/tools/monitor/core/log/query/routes.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/tools/monitor/core/log/query/log.query.service.go b/internal/tools/monitor/core/log/query/log.query.service.go index 1644123ef37..4f8e79721dd 100644 --- a/internal/tools/monitor/core/log/query/log.query.service.go +++ b/internal/tools/monitor/core/log/query/log.query.service.go @@ -704,7 +704,7 @@ func toQuerySelector(req Request) (*storage.Selector, error) { } if meta := byExpressionRequest.GetQueryMeta(); meta != nil { sel.Meta = storage.QueryMeta{ - OrgNames: []string{meta.GetOrgName()}, + OrgNames: []string{meta.GetOrgName(), "erda"}, MspEnvIds: meta.GetMspEnvIds(), Highlight: meta.GetHighlight(), PreferredBufferSize: int(meta.GetPreferredBufferSize()), diff --git a/internal/tools/monitor/core/log/query/routes.go b/internal/tools/monitor/core/log/query/routes.go index 7710489d7d2..373c8f91586 100644 --- a/internal/tools/monitor/core/log/query/routes.go +++ b/internal/tools/monitor/core/log/query/routes.go @@ -136,7 +136,7 @@ func (p *provider) downloadLog(w http.ResponseWriter, r *http.Request, req *LogR if req.IsFallBack { sel.Options[storage.IsFallBack] = true } - p.logQueryService.tryFillQueryMeta(r.Context(), sel, r.Header.Get("org")) + p.logQueryService.tryFillQueryMeta(r.Context(), sel, r.Header.Get("org"), "erda") return sel, nil }, func(item *pb.LogItem) error {