grafana/public/app/plugins/datasource/graphite/configuration/ConfigEditor.tsx
Peter Holmberg c5ff7fa580 ReactMigration: Migrate Graphite config page to React (#20444)
* adding configeditor

* fix method signature and add state for metrictankhelper

* fix onChangeHandler

* prettier fix

* remove config and fix autoversion

* adding optional parameter to make this build

* set default version if none specified

* Graphite: removed version detection
2019-11-27 15:45:35 -08:00

21 lines
643 B
TypeScript

import React from 'react';
import { DataSourceHttpSettings } from '@grafana/ui';
import { DataSourcePluginOptionsEditorProps } from '@grafana/data';
import { GraphiteDetails } from './GraphiteDetails';
import { GraphiteOptions } from '../types';
export const ConfigEditor = (props: DataSourcePluginOptionsEditorProps<GraphiteOptions>) => {
const { options, onOptionsChange } = props;
return (
<>
<DataSourceHttpSettings
defaultUrl="http://localhost:8080"
dataSourceConfig={options}
onChange={onOptionsChange}
/>
<GraphiteDetails value={options} onChange={onOptionsChange} />
</>
);
};