| 50 | } |
| 51 | |
| 52 | func (i *imlStrategyModule) StrategyLogInfo(ctx context.Context, id string) (*strategy_dto.LogInfo, error) { |
| 53 | c, err := i.clusterService.Get(ctx, cluster.DefaultClusterID) |
| 54 | if err != nil { |
| 55 | return nil, fmt.Errorf("cluster %s not found", cluster.DefaultClusterID) |
| 56 | } |
| 57 | |
| 58 | info, err := i.logService.LogInfo(ctx, "loki", c.Cluster, id) |
| 59 | if err != nil { |
| 60 | return nil, err |
| 61 | } |
| 62 | return &strategy_dto.LogInfo{ |
| 63 | ID: info.ID, |
| 64 | ContentType: info.ContentType, |
| 65 | ProxyResponseBody: info.ProxyResponseBody, |
| 66 | ResponseBody: info.ResponseBody, |
| 67 | }, nil |
| 68 | } |
| 69 | |
| 70 | func (i *imlStrategyModule) GetStrategyLogs(ctx context.Context, keyword string, strategyID string, start time.Time, end time.Time, limit int64, offset int64) ([]*strategy_dto.LogItem, int64, error) { |
| 71 | if strategyID == "" { |