Prometheus: Show executed query in inspector (#45362)

* Prometheus: Show executed query in inspector

* Loki: Improving test
This commit is contained in:
Torkel Ödegaard
2022-02-15 15:02:03 +01:00
committed by GitHub
parent b9e5bae51f
commit a757a57c6e
14 changed files with 59 additions and 26 deletions

View File

@@ -11,6 +11,7 @@ import { config, RefreshEvent } from '@grafana/runtime';
import { css } from '@emotion/css';
import { Subscription } from 'rxjs';
import { backendSrv } from 'app/core/services/backend_srv';
import { Stack } from '@grafana/experimental';
interface DsQuery {
isLoading: boolean;
@@ -236,14 +237,14 @@ export class QueryInspector extends PureComponent<Props, State> {
<div>
{executedQueries.map((info) => {
return (
<div key={info.refId}>
<Stack key={info.refId} gap={1} direction="column">
<div>
<span className={styles.refId}>{info.refId}:</span>
{info.frames > 1 && <span>{info.frames} frames, </span>}
<span>{info.rows} rows</span>
</div>
<pre>{info.query}</pre>
</div>
</Stack>
);
})}
</div>