2019-11-08 03:02:51 -06:00
|
|
|
import React from 'react';
|
|
|
|
import { DataSourceHttpSettings } from '@grafana/ui';
|
|
|
|
import { DataSourcePluginOptionsEditorProps } from '@grafana/data';
|
|
|
|
import { PromSettings } from './PromSettings';
|
|
|
|
import { PromOptions } from '../types';
|
2020-10-08 03:03:20 -05:00
|
|
|
import { config } from 'app/core/config';
|
2019-11-08 03:02:51 -06:00
|
|
|
|
|
|
|
export type Props = DataSourcePluginOptionsEditorProps<PromOptions>;
|
|
|
|
export const ConfigEditor = (props: Props) => {
|
|
|
|
const { options, onOptionsChange } = props;
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<DataSourceHttpSettings
|
|
|
|
defaultUrl="http://localhost:9090"
|
|
|
|
dataSourceConfig={options}
|
2020-02-04 01:42:26 -06:00
|
|
|
showAccessOptions={true}
|
2019-11-08 03:02:51 -06:00
|
|
|
onChange={onOptionsChange}
|
2020-10-08 03:03:20 -05:00
|
|
|
sigV4AuthToggleEnabled={config.sigV4AuthEnabled}
|
2019-11-08 03:02:51 -06:00
|
|
|
/>
|
|
|
|
|
2020-05-05 11:02:55 -05:00
|
|
|
<PromSettings options={options} onOptionsChange={onOptionsChange} />
|
2019-11-08 03:02:51 -06:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|