2020-12-11 02:42:43 +08:00
|
|
|
import React from 'react';
|
2022-04-22 21:33:13 +08:00
|
|
|
|
|
|
|
|
import { DataSourcePluginOptionsEditorProps } from '@grafana/data';
|
2021-08-17 21:48:29 +08:00
|
|
|
import { config } from '@grafana/runtime';
|
2023-01-25 23:39:17 +08:00
|
|
|
import { DataSourceHttpSettings, SecureSocksProxySettings } from '@grafana/ui';
|
2021-10-07 03:39:14 +08:00
|
|
|
import { NodeGraphSettings } from 'app/core/components/NodeGraphSettings';
|
2022-04-22 21:33:13 +08:00
|
|
|
import { TraceToLogsSettings } from 'app/core/components/TraceToLogs/TraceToLogsSettings';
|
2022-05-06 04:46:18 +08:00
|
|
|
import { TraceToMetricsSettings } from 'app/core/components/TraceToMetrics/TraceToMetricsSettings';
|
2023-01-27 22:13:17 +08:00
|
|
|
import { SpanBarSettings } from 'app/features/explore/TraceView/components';
|
2022-04-22 21:33:13 +08:00
|
|
|
|
2022-03-18 01:23:15 +08:00
|
|
|
import { LokiSearchSettings } from './LokiSearchSettings';
|
2022-10-21 22:38:10 +08:00
|
|
|
import { QuerySettings } from './QuerySettings';
|
2022-04-22 21:33:13 +08:00
|
|
|
import { SearchSettings } from './SearchSettings';
|
|
|
|
|
import { ServiceGraphSettings } from './ServiceGraphSettings';
|
2023-03-31 17:35:37 +08:00
|
|
|
import { TraceQLSearchSettings } from './TraceQLSearchSettings';
|
2020-10-14 01:12:49 +08:00
|
|
|
|
|
|
|
|
export type Props = DataSourcePluginOptionsEditorProps;
|
|
|
|
|
|
2022-08-25 04:54:34 +08:00
|
|
|
export const ConfigEditor = ({ options, onOptionsChange }: Props) => {
|
2020-10-14 01:12:49 +08:00
|
|
|
return (
|
2020-12-11 02:42:43 +08:00
|
|
|
<>
|
|
|
|
|
<DataSourceHttpSettings
|
2021-03-05 21:28:17 +08:00
|
|
|
defaultUrl="http://tempo"
|
2020-12-11 02:42:43 +08:00
|
|
|
dataSourceConfig={options}
|
|
|
|
|
showAccessOptions={false}
|
|
|
|
|
onChange={onOptionsChange}
|
|
|
|
|
/>
|
|
|
|
|
|
2023-01-25 23:39:17 +08:00
|
|
|
{config.featureToggles.secureSocksDatasourceProxy && (
|
|
|
|
|
<SecureSocksProxySettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
)}
|
|
|
|
|
|
2021-08-17 21:48:29 +08:00
|
|
|
<div className="gf-form-group">
|
|
|
|
|
<TraceToLogsSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
</div>
|
2022-05-06 04:46:18 +08:00
|
|
|
|
|
|
|
|
{config.featureToggles.traceToMetrics ? (
|
|
|
|
|
<div className="gf-form-group">
|
|
|
|
|
<TraceToMetricsSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
2022-07-19 15:00:58 +08:00
|
|
|
<div className="gf-form-group">
|
|
|
|
|
<ServiceGraphSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
</div>
|
2022-05-06 04:46:18 +08:00
|
|
|
|
2022-06-02 01:32:10 +08:00
|
|
|
<div className="gf-form-group">
|
2023-03-07 00:03:29 +08:00
|
|
|
<NodeGraphSettings options={options} onOptionsChange={onOptionsChange} />
|
2022-06-02 01:32:10 +08:00
|
|
|
</div>
|
2022-05-06 04:46:18 +08:00
|
|
|
|
2021-10-07 03:39:14 +08:00
|
|
|
<div className="gf-form-group">
|
2023-03-31 17:35:37 +08:00
|
|
|
{config.featureToggles.traceqlSearch ? (
|
|
|
|
|
<TraceQLSearchSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
) : (
|
|
|
|
|
<SearchSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
)}
|
2021-10-07 03:39:14 +08:00
|
|
|
</div>
|
2022-05-06 04:46:18 +08:00
|
|
|
|
2022-03-18 01:23:15 +08:00
|
|
|
<div className="gf-form-group">
|
|
|
|
|
<LokiSearchSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
</div>
|
2022-07-06 15:14:03 +08:00
|
|
|
|
2022-10-21 22:38:10 +08:00
|
|
|
<div className="gf-form-group">
|
|
|
|
|
<QuerySettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
</div>
|
|
|
|
|
|
2022-07-06 15:14:03 +08:00
|
|
|
<div className="gf-form-group">
|
|
|
|
|
<SpanBarSettings options={options} onOptionsChange={onOptionsChange} />
|
|
|
|
|
</div>
|
2020-12-11 02:42:43 +08:00
|
|
|
</>
|
2020-10-14 01:12:49 +08:00
|
|
|
);
|
|
|
|
|
};
|