mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Datasources: Pass down the edit-form errors (#69830)
feat: pass the error to the event handler
This commit is contained in:
parent
32ff712e98
commit
324b33146a
@ -130,10 +130,10 @@ export function EditDataSourceView({
|
||||
|
||||
try {
|
||||
await onUpdate({ ...dataSource });
|
||||
trackDsConfigUpdated('success');
|
||||
trackDsConfigUpdated({ item: 'success' });
|
||||
appEvents.publish(new DataSourceUpdatedSuccessfully());
|
||||
} catch (err) {
|
||||
trackDsConfigUpdated('fail');
|
||||
} catch (error) {
|
||||
trackDsConfigUpdated({ item: 'fail', error });
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -83,6 +83,6 @@ export const trackDsConfigClicked = (item: string) => {
|
||||
reportInteraction('connections_datasources_settings_clicked', { item });
|
||||
};
|
||||
|
||||
export const trackDsConfigUpdated = (item: string) => {
|
||||
reportInteraction('connections_datasources_ds_configured', { item });
|
||||
export const trackDsConfigUpdated = (props: { item: string; error?: unknown }) => {
|
||||
reportInteraction('connections_datasources_ds_configured', props);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user