mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
Primarily- moving majority of the types and utils from @grafana/ui to @grafana/data * Move types from grafana-ui to grafana-data * Move valueFormats to grafana-data * Move utils from grafana-ui to grafana-data * Update imports in grafana-ui * revert data's tsconfig change * Update imports in grafana-runtime * Fix import paths in grafana-ui * Move rxjs to devDeps * Core import updates batch 1 * Import updates batch 2 * Imports fix batch 3 * Imports fixes batch i don't know * Fix imorts in grafana-toolkit * Fix imports after master merge
24 lines
510 B
TypeScript
24 lines
510 B
TypeScript
import { DataSourceSettings } from '@grafana/data';
|
|
|
|
export function createDatasourceSettings<T>(jsonData: T): DataSourceSettings<T> {
|
|
return {
|
|
id: 0,
|
|
orgId: 0,
|
|
name: 'datasource-test',
|
|
typeLogoUrl: '',
|
|
type: 'datasource',
|
|
access: 'server',
|
|
url: 'http://localhost',
|
|
password: '',
|
|
user: '',
|
|
database: '',
|
|
basicAuth: false,
|
|
basicAuthPassword: '',
|
|
basicAuthUser: '',
|
|
isDefault: false,
|
|
jsonData,
|
|
readOnly: false,
|
|
withCredentials: false,
|
|
};
|
|
}
|