Plugins: adds read-only props to DataSourcePluginSettings (#105713)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { createElement, PureComponent } from 'react';
|
||||
|
||||
import { DataSourcePluginMeta, DataSourceSettings } from '@grafana/data';
|
||||
import { readOnlyCopy } from 'app/features/plugins/extensions/utils';
|
||||
|
||||
import { GenericDataSourcePlugin } from '../types';
|
||||
|
||||
@@ -33,7 +34,7 @@ export class DataSourcePluginSettings extends PureComponent<Props> {
|
||||
<div>
|
||||
{plugin.components.ConfigEditor &&
|
||||
createElement(plugin.components.ConfigEditor, {
|
||||
options: dataSource,
|
||||
options: readOnlyCopy(dataSource),
|
||||
onOptionsChange: this.onModelChanged,
|
||||
})}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user