mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Pass testing status to the data source plugin extension (#69988)
This commit is contained in:
parent
91272ee4f9
commit
12cd99ae8d
@ -121,6 +121,12 @@ export type PluginExtensionDataSourceConfigContext<JsonData extends DataSourceJs
|
||||
// Meta information about the datasource plugin
|
||||
dataSourceMeta: DataSourcePluginMeta;
|
||||
|
||||
// Testing status
|
||||
testingStatus?: {
|
||||
message?: string | null;
|
||||
status?: string | null;
|
||||
};
|
||||
|
||||
// Can be used to update the `jsonData` field on the datasource
|
||||
// (Only updates the form, it still needs to be saved by the user)
|
||||
setJsonData: (jsonData: JsonData) => void;
|
||||
|
@ -359,6 +359,7 @@ describe('<EditDataSource>', () => {
|
||||
expect(props.context.dataSource).toBeDefined();
|
||||
expect(props.context.dataSourceMeta).toBeDefined();
|
||||
expect(props.context.setJsonData).toBeDefined();
|
||||
expect(props.context.testingStatus).toBeDefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -217,6 +217,7 @@ export function EditDataSourceView({
|
||||
context={{
|
||||
dataSource: omit(dataSource, ['secureJsonData']),
|
||||
dataSourceMeta: dataSourceMeta,
|
||||
testingStatus,
|
||||
setJsonData: (jsonData) =>
|
||||
onOptionsChange({
|
||||
...dataSource,
|
||||
|
Loading…
Reference in New Issue
Block a user