Commit 41f7bccb by Sofia Papagiannaki Committed by GitHub

Cloud monitoring: do not create deep link if there are no timeseries (#26737)

parent f9df5800
...@@ -221,7 +221,11 @@ func (e *CloudMonitoringExecutor) executeTimeSeriesQuery(ctx context.Context, ts ...@@ -221,7 +221,11 @@ func (e *CloudMonitoringExecutor) executeTimeSeriesQuery(ctx context.Context, ts
break break
} }
query.Params.Set("resourceType", resourceType) query.Params.Set("resourceType", resourceType)
queryRes.Meta.Set("deepLink", query.buildDeepLink()) dl := ""
if len(resp.TimeSeries) > 0 {
dl = query.buildDeepLink()
}
queryRes.Meta.Set("deepLink", dl)
} }
return result, nil return result, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment