ConfigEditor.tsx 646 B

1234567891011121314151617181920212223
  1. import React from 'react';
  2. import { DataSourcePluginOptionsEditorProps } from '@grafana/data';
  3. import { DataSourceHttpSettings } from '@grafana/ui';
  4. import { OpenTsdbOptions } from '../types';
  5. import { OpenTsdbDetails } from './OpenTsdbDetails';
  6. export const ConfigEditor = (props: DataSourcePluginOptionsEditorProps<OpenTsdbOptions>) => {
  7. const { options, onOptionsChange } = props;
  8. return (
  9. <>
  10. <DataSourceHttpSettings
  11. defaultUrl="http://localhost:4242"
  12. dataSourceConfig={options}
  13. onChange={onOptionsChange}
  14. />
  15. <OpenTsdbDetails value={options} onChange={onOptionsChange} />
  16. </>
  17. );
  18. };