mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -06:00
* move the name finding logic for new data sources from frontend to backend * cleanup and fix test * linting * change the way the number after the ds type is incremented - keep incrementing it without adding more hyphens * enterprise spec updates (unrelated to the PR)
9 lines
424 B
TypeScript
9 lines
424 B
TypeScript
import { DataSourceJsonData, DataSourceSettings, urlUtil, locationUtil } from '@grafana/data';
|
|
|
|
export const constructDataSourceExploreUrl = (dataSource: DataSourceSettings<DataSourceJsonData, {}>) => {
|
|
const exploreState = JSON.stringify({ datasource: dataSource.name, context: 'explore' });
|
|
const exploreUrl = urlUtil.renderUrl(locationUtil.assureBaseUrl('/explore'), { left: exploreState });
|
|
|
|
return exploreUrl;
|
|
};
|