Skip to content

Commit

Permalink
Increase the size of the CodeEditor used for additionalJsonData
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
  • Loading branch information
PhilippHeuer and simPod committed Oct 5, 2020
1 parent 08c9ef6 commit a5922b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/QueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { Format } from './format';

import { GenericOptions, GrafanaQuery } from './types';

import './css/json-editor.css';

type Props = QueryEditorProps<DataSource, GrafanaQuery, GenericOptions>;

const formatAsOptions = [
Expand Down Expand Up @@ -134,10 +136,10 @@ export const QueryEditor: ComponentType<Props> = ({ datasource, onChange, onRunQ
<div className="gf-form-label">
<Label>Additional JSON Data</Label>
</div>
<div className="gf-form">
<div className="gf-form grafana-json-datasource-editor">
<CodeEditor
width="500px"
height="100px"
width="100%"
height="175px"
language="json"
showLineNumbers={true}
showMiniMap={data.length > 100}
Expand Down
7 changes: 7 additions & 0 deletions src/css/json-editor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.grafana-json-datasource-editor {
width: 100%;
}

.grafana-json-datasource-editor div {
width: 100%;
}

0 comments on commit a5922b2

Please sign in to comment.