mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Monaco: option to hide line numbers (#25920)
This commit is contained in:
@@ -116,7 +116,7 @@ export class InspectJSONTab extends PureComponent<Props, State> {
|
||||
|
||||
render() {
|
||||
const { dashboard } = this.props;
|
||||
const { show } = this.state;
|
||||
const { show, text } = this.state;
|
||||
const selected = options.find(v => v.value === show);
|
||||
const isPanelJSON = show === ShowContent.PanelJSON;
|
||||
const canEdit = dashboard.meta.canEdit;
|
||||
@@ -141,7 +141,9 @@ export class InspectJSONTab extends PureComponent<Props, State> {
|
||||
width="100%"
|
||||
height={height}
|
||||
language="json"
|
||||
value={this.state.text}
|
||||
showLineNumbers={true}
|
||||
showMiniMap={text && text.length > 100}
|
||||
value={text || ''}
|
||||
readOnly={!isPanelJSON}
|
||||
onBlur={this.onTextChanged}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user