mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* Replace DataSourcesListItem with Card * Add tests * Remove unused styles * Make card heading semi bold * Make heading semi-bold * Show type name instead of type id * Fix key warning * Update Card * Fix tests * Make typeName optional * remove styling that was just a test * Make typeName non-optional and fix tests * Update list key Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
26 lines
564 B
TypeScript
26 lines
564 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',
|
|
typeName: 'Datasource',
|
|
access: 'server',
|
|
url: 'http://localhost',
|
|
password: '',
|
|
user: '',
|
|
database: '',
|
|
basicAuth: false,
|
|
basicAuthPassword: '',
|
|
basicAuthUser: '',
|
|
isDefault: false,
|
|
jsonData,
|
|
readOnly: false,
|
|
withCredentials: false,
|
|
secureJsonFields: {},
|
|
};
|
|
}
|