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
This commit is contained in:
Peter Holmberg
2019-11-28 00:45:35 +01:00
committed by Torkel Ödegaard
parent 02d7d00560
commit c5ff7fa580
8 changed files with 156 additions and 111 deletions

View File

@@ -0,0 +1,20 @@
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} />
</>
);
};