mirror of
https://github.com/grafana/grafana.git
synced 2025-09-26 00:04:40 +08:00

* Adding simplified version of query editor based on app flag. * cleaned up the absolute time range. * changing placeholder text. * updated snapshot. * added some tests. * adding loki query editor tests. * updating snapshots.
26 lines
625 B
TypeScript
26 lines
625 B
TypeScript
import React from 'react';
|
|
import PromQueryField from './PromQueryField';
|
|
import { PromQueryEditorProps } from './types';
|
|
|
|
export function PromQueryEditorForAlerting(props: PromQueryEditorProps) {
|
|
const { datasource, query, range, data, onChange, onRunQuery } = props;
|
|
|
|
return (
|
|
<PromQueryField
|
|
datasource={datasource}
|
|
query={query}
|
|
onRunQuery={onRunQuery}
|
|
onChange={onChange}
|
|
history={[]}
|
|
range={range}
|
|
data={data}
|
|
placeholder="Enter a PromQL query"
|
|
data-testid={testIds.editor}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export const testIds = {
|
|
editor: 'prom-editor-cloud-alerting',
|
|
};
|