mirror of https://github.com/grafana/grafana
TestDataDB: Raw frame input (#42209)
* test datasource raw-frame scenario added * typo fix in docpull/42242/head
parent
86a22a914d
commit
70bc0b86e2
@ -0,0 +1,21 @@ |
||||
import React from 'react'; |
||||
import { InlineField, TextArea } from '@grafana/ui'; |
||||
import { EditorProps } from '../QueryEditor'; |
||||
|
||||
export const RawFrameEditor = ({ onChange, query }: EditorProps) => { |
||||
const onContent = (rawFrameContent: string) => { |
||||
onChange({ ...query, rawFrameContent }); |
||||
}; |
||||
|
||||
return ( |
||||
<InlineField label="Frames" labelWidth={14}> |
||||
<TextArea |
||||
width="100%" |
||||
rows={10} |
||||
onBlur={(e) => onContent(e.currentTarget.value)} |
||||
placeholder="frames array (JSON)" |
||||
defaultValue={query.rawFrameContent ?? '[]'} |
||||
/> |
||||
</InlineField> |
||||
); |
||||
}; |
||||
Loading…
Reference in new issue