mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prometheus: Flavor/version configuration (#57554)
* Revert "Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)"
This reverts commit 2432ce619a.
* Adds new fields and documentation for Prometheus datasource configuration: prometheus type, and version
This commit is contained in:
@@ -19,7 +19,7 @@ import { DataSourcePluginCategory, ThunkDispatch, ThunkResult } from 'app/types'
|
||||
import * as api from '../api';
|
||||
import { DATASOURCES_ROUTES } from '../constants';
|
||||
import { trackDataSourceCreated, trackDataSourceTested } from '../tracking';
|
||||
import { nameExits, findNewName } from '../utils';
|
||||
import { findNewName, nameExits } from '../utils';
|
||||
|
||||
import { buildCategories } from './buildCategories';
|
||||
import { buildNavModel } from './navModel';
|
||||
@@ -231,8 +231,8 @@ export function loadDataSourcePlugins(): ThunkResult<void> {
|
||||
};
|
||||
}
|
||||
|
||||
export function updateDataSource(dataSource: DataSourceSettings): ThunkResult<void> {
|
||||
return async (dispatch) => {
|
||||
export function updateDataSource(dataSource: DataSourceSettings) {
|
||||
return async (dispatch: (dataSourceSettings: ThunkResult<Promise<DataSourceSettings>>) => DataSourceSettings) => {
|
||||
await api.updateDataSource(dataSource);
|
||||
await getDatasourceSrv().reload();
|
||||
return dispatch(loadDataSource(dataSource.uid));
|
||||
|
||||
Reference in New Issue
Block a user