mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: app specific query editors for Loki and Prometheus (#34365)
* 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.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import React, { memo } from 'react';
|
||||
import { CoreApp } from '@grafana/data';
|
||||
import { PromQueryEditorProps } from './types';
|
||||
import { PromQueryEditor } from './PromQueryEditor';
|
||||
import { PromQueryEditorForAlerting } from './PromQueryEditorForAlerting';
|
||||
|
||||
export function PromQueryEditorByApp(props: PromQueryEditorProps) {
|
||||
const { app } = props;
|
||||
|
||||
switch (app) {
|
||||
case CoreApp.CloudAlerting:
|
||||
return <PromQueryEditorForAlerting {...props} />;
|
||||
default:
|
||||
return <PromQueryEditor {...props} />;
|
||||
}
|
||||
}
|
||||
|
||||
export default memo(PromQueryEditorByApp);
|
||||
Reference in New Issue
Block a user