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
  • Loading branch information
PhilippHeuer committed Sep 29, 2020
1 parent 69c923a commit 5f6eeba
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 @@ -84,10 +86,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 5f6eeba

Please sign in to comment.