2022-04-22 14:33:13 +01:00
|
|
|
import React from 'react';
|
|
|
|
|
|
2020-03-25 12:25:39 +01:00
|
|
|
import { DataSourcePluginOptionsEditorProps } from '@grafana/data';
|
2022-05-05 14:46:18 -06:00
|
|
|
import { config } from '@grafana/runtime';
|
2020-03-25 12:25:39 +01:00
|
|
|
import { DataSourceHttpSettings } from '@grafana/ui';
|
2022-07-06 08:14:03 +01:00
|
|
|
import { SpanBarSettings } from '@jaegertracing/jaeger-ui-components';
|
2021-10-06 13:39:14 -06:00
|
|
|
import { NodeGraphSettings } from 'app/core/components/NodeGraphSettings';
|
2022-02-22 15:17:45 -07:00
|
|
|
import { TraceToLogsSettings } from 'app/core/components/TraceToLogs/TraceToLogsSettings';
|
2022-05-05 14:46:18 -06:00
|
|
|
import { TraceToMetricsSettings } from 'app/core/components/TraceToMetrics/TraceToMetricsSettings';
|
2020-03-25 12:25:39 +01:00
|
|
|
|
|
|
|
|
export type Props = DataSourcePluginOptionsEditorProps;
|
|
|
|
|
|
|
|
|
|
export const ConfigEditor: React.FC<Props> = ({ options, onOptionsChange }) => {
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<DataSourceHttpSettings
|
2020-12-10 19:42:43 +01:00
|
|
|
defaultUrl="http://localhost:16686"
|
2020-03-25 12:25:39 +01:00
|
|
|
dataSourceConfig={options}
|
2021-01-18 17:30:39 +01:00
|
|
|
showAccessOptions={false}
|
2020-03-25 12:25:39 +01:00
|
|
|
onChange={onOptionsChange}
|
|
|
|
|
/>
|
2020-12-10 19:42:43 +01:00
|
|
|
|
2021-10-06 13:39:14 -06:00
|
|
|
<div className="gf-form-group">
|
|
|
|
|
<TraceToLogsSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
</div>
|
2022-05-05 14:46:18 -06:00
|
|
|
|
|
|
|
|
{config.featureToggles.traceToMetrics ? (
|
|
|
|
|
<div className="gf-form-group">
|
|
|
|
|
<TraceToMetricsSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
2021-10-06 13:39:14 -06:00
|
|
|
<div className="gf-form-group">
|
|
|
|
|
<NodeGraphSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
</div>
|
2022-07-06 08:14:03 +01:00
|
|
|
|
|
|
|
|
<div className="gf-form-group">
|
|
|
|
|
<SpanBarSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
</div>
|
2020-03-25 12:25:39 +01:00
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|