mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Google Cloud Monitor: Prom query editor (#73503)
* revert * works but needs clean up and tests * clean up * remove any * change confusing query var to expr * oops * add test * lint * cleanup * update docs * Update public/app/plugins/datasource/cloud-monitoring/components/PromQLEditor.tsx Co-authored-by: Andreas Christou <andreas.christou@grafana.com> * nit * lint fix? * remove comment from cue * go linter * removing parsing stuff parseresponse func --------- Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
This commit is contained in:
@@ -28,7 +28,7 @@ func (timeSeriesQuery *cloudMonitoringTimeSeriesQuery) appendGraphPeriod(req *ba
|
||||
}
|
||||
|
||||
func (timeSeriesQuery *cloudMonitoringTimeSeriesQuery) run(ctx context.Context, req *backend.QueryDataRequest,
|
||||
s *Service, dsInfo datasourceInfo, tracer tracing.Tracer) (*backend.DataResponse, cloudMonitoringResponse, string, error) {
|
||||
s *Service, dsInfo datasourceInfo, tracer tracing.Tracer) (*backend.DataResponse, any, string, error) {
|
||||
timeSeriesQuery.parameters.Query += timeSeriesQuery.appendGraphPeriod(req)
|
||||
from := req.Queries[0].TimeRange.From
|
||||
to := req.Queries[0].TimeRange.To
|
||||
@@ -41,7 +41,8 @@ func (timeSeriesQuery *cloudMonitoringTimeSeriesQuery) run(ctx context.Context,
|
||||
}
|
||||
|
||||
func (timeSeriesQuery *cloudMonitoringTimeSeriesQuery) parseResponse(queryRes *backend.DataResponse,
|
||||
response cloudMonitoringResponse, executedQueryString string) error {
|
||||
res any, executedQueryString string) error {
|
||||
response := res.(cloudMonitoringResponse)
|
||||
frames := data.Frames{}
|
||||
|
||||
for _, series := range response.TimeSeriesData {
|
||||
|
||||
Reference in New Issue
Block a user