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

This commit is contained in:
Sofia Papagiannaki
2020-08-03 09:28:03 +03:00
committed by GitHub
parent f9df580016
commit 41f7bccb24
+5 -1
View File
@@ -221,7 +221,11 @@ func (e *CloudMonitoringExecutor) executeTimeSeriesQuery(ctx context.Context, ts
break
}
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