grafana/public/app/plugins/datasource/tempo/configuration/ConfigEditor.tsx

73 lines
2.6 KiB
TypeScript
Raw Normal View History

import React from 'react';
import { DataSourcePluginOptionsEditorProps } from '@grafana/data';
import { config } from '@grafana/runtime';
import { DataSourceHttpSettings, SecureSocksProxySettings } from '@grafana/ui';
import { NodeGraphSettings } from 'app/core/components/NodeGraphSettings';
import { TraceToLogsSettings } from 'app/core/components/TraceToLogs/TraceToLogsSettings';
import { TraceToMetricsSettings } from 'app/core/components/TraceToMetrics/TraceToMetricsSettings';
import { SpanBarSettings } from 'app/features/explore/TraceView/components';
import { LokiSearchSettings } from './LokiSearchSettings';
import { QuerySettings } from './QuerySettings';
import { SearchSettings } from './SearchSettings';
import { ServiceGraphSettings } from './ServiceGraphSettings';
import { TraceQLSearchSettings } from './TraceQLSearchSettings';
export type Props = DataSourcePluginOptionsEditorProps;
export const ConfigEditor = ({ options, onOptionsChange }: Props) => {
return (
<>
<DataSourceHttpSettings
defaultUrl="http://tempo"
dataSourceConfig={options}
showAccessOptions={false}
onChange={onOptionsChange}
/>
{config.featureToggles.secureSocksDatasourceProxy && (
<SecureSocksProxySettings options={options} onOptionsChange={onOptionsChange} />
)}
<div className="gf-form-group">
<TraceToLogsSettings options={options} onOptionsChange={onOptionsChange} />
</div>
{config.featureToggles.traceToMetrics ? (
<div className="gf-form-group">
<TraceToMetricsSettings options={options} onOptionsChange={onOptionsChange} />
</div>
) : null}
<div className="gf-form-group">
<ServiceGraphSettings options={options} onOptionsChange={onOptionsChange} />
</div>
<div className="gf-form-group">
Tempo: Config and doc updates (#64017) * Config and doc upgrades * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update tags text * Use service graph as a proper noun * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Yarn prettier --------- Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2023-03-07 00:03:29 +08:00
<NodeGraphSettings options={options} onOptionsChange={onOptionsChange} />
</div>
<div className="gf-form-group">
{config.featureToggles.traceqlSearch ? (
<TraceQLSearchSettings options={options} onOptionsChange={onOptionsChange} />
) : (
<SearchSettings options={options} onOptionsChange={onOptionsChange} />
)}
</div>
<div className="gf-form-group">
<LokiSearchSettings options={options} onOptionsChange={onOptionsChange} />
</div>
<div className="gf-form-group">
<QuerySettings options={options} onOptionsChange={onOptionsChange} />
</div>
<div className="gf-form-group">
<SpanBarSettings options={options} onOptionsChange={onOptionsChange} />
</div>
</>
);
};