mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06: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.
19 lines
562 B
TypeScript
19 lines
562 B
TypeScript
import React, { memo } from 'react';
|
|
import { CoreApp } from '@grafana/data';
|
|
import { LokiQueryEditorProps } from './types';
|
|
import { LokiQueryEditor } from './LokiQueryEditor';
|
|
import { LokiQueryEditorForAlerting } from './LokiQueryEditorForAlerting';
|
|
|
|
export function LokiQueryEditorByApp(props: LokiQueryEditorProps) {
|
|
const { app } = props;
|
|
|
|
switch (app) {
|
|
case CoreApp.CloudAlerting:
|
|
return <LokiQueryEditorForAlerting {...props} />;
|
|
default:
|
|
return <LokiQueryEditor {...props} />;
|
|
}
|
|
}
|
|
|
|
export default memo(LokiQueryEditorByApp);
|