2020-10-13 12:12:49 -05:00
|
|
|
import { DataSourcePluginOptionsEditorProps } from '@grafana/data';
|
|
|
|
import { DataSourceHttpSettings } from '@grafana/ui';
|
2020-12-10 12:42:43 -06:00
|
|
|
import { TraceToLogsSettings } from 'app/core/components/TraceToLogsSettings';
|
|
|
|
import React from 'react';
|
2021-08-17 08:48:29 -05:00
|
|
|
import { ServiceMapSettings } from './ServiceMapSettings';
|
|
|
|
import { config } from '@grafana/runtime';
|
2020-10-13 12:12:49 -05:00
|
|
|
|
|
|
|
export type Props = DataSourcePluginOptionsEditorProps;
|
|
|
|
|
|
|
|
export const ConfigEditor: React.FC<Props> = ({ options, onOptionsChange }) => {
|
|
|
|
return (
|
2020-12-10 12:42:43 -06:00
|
|
|
<>
|
|
|
|
<DataSourceHttpSettings
|
2021-03-05 07:28:17 -06:00
|
|
|
defaultUrl="http://tempo"
|
2020-12-10 12:42:43 -06:00
|
|
|
dataSourceConfig={options}
|
|
|
|
showAccessOptions={false}
|
|
|
|
onChange={onOptionsChange}
|
|
|
|
/>
|
|
|
|
|
2021-08-17 08:48:29 -05:00
|
|
|
<div className="gf-form-group">
|
|
|
|
<TraceToLogsSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
</div>
|
|
|
|
{config.featureToggles.tempoServiceGraph && (
|
|
|
|
<ServiceMapSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
)}
|
2020-12-10 12:42:43 -06:00
|
|
|
</>
|
2020-10-13 12:12:49 -05:00
|
|
|
);
|
|
|
|
};
|