Explore: Reuse Dashboard's QueryRows component (#38942)

* WIP

* Functional without custom wrapper component, needs highlight

* Remove latency from explore

* Sync eventbus

* Some cleanup & removal of unused code

* Avoid clearing queries when running all empty queries

* Run remaining queries when removing one

* Update snapshots

* fix failing tests

* type cleanup

* Refactor QueryRows

* update snapshot

* Remove highlighter expressions

* minor fixes in queryrows

* remove unwanted change

* fix failing e2e test

* Persist refId in explore url state

* make traces test slightly more robust

* add test for query duplication
This commit is contained in:
Giordano Ricci
2021-09-15 16:26:23 +01:00
committed by GitHub
parent e251863085
commit f79173c99d
48 changed files with 310 additions and 920 deletions

View File

@@ -1,6 +1,6 @@
import React, { PureComponent } from 'react';
import { css } from '@emotion/css';
import { ExploreQueryFieldProps } from '@grafana/data';
import { QueryEditorProps } from '@grafana/data';
import { Button, Select } from '@grafana/ui';
import { MetricQueryEditor, SLOQueryEditor, QueryEditorRow } from './';
import { CloudMonitoringQuery, MetricQuery, QueryType, SLOQuery, EditorMode } from '../types';
@@ -10,7 +10,7 @@ import { defaultQuery as defaultSLOQuery } from './SLO/SLOQueryEditor';
import { toOption } from '../functions';
import CloudMonitoringDatasource from '../datasource';
export type Props = ExploreQueryFieldProps<CloudMonitoringDatasource, CloudMonitoringQuery>;
export type Props = QueryEditorProps<CloudMonitoringDatasource, CloudMonitoringQuery>;
export class QueryEditor extends PureComponent<Props> {
async UNSAFE_componentWillMount() {