grafana/public/app/plugins/datasource/zipkin/ConfigEditor.tsx
Andre Pereira afd39c18ba
Explore: Refactor trace view and move to core (#61938)
* Move TraceView to core grafana

* Remove unused code

* yarn install

* Remove jaeger-ui-components from CODEOWNERS and other tools

* Type fixes

* yarn install

* Remove mock that we no longer need

* Fix merge conflicts

* Re-add Apache license for trace view components

* Use an exclamation-circle instead of triangle to denote errors

* Remove eslint disables and update betterer results instead
2023-01-27 14:13:17 +00:00

47 lines
1.6 KiB
TypeScript

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';
export type Props = DataSourcePluginOptionsEditorProps;
export const ConfigEditor = ({ options, onOptionsChange }: Props) => {
return (
<>
<DataSourceHttpSettings
defaultUrl="http://localhost:9411"
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">
<NodeGraphSettings options={options} onOptionsChange={onOptionsChange} />
</div>
<div className="gf-form-group">
<SpanBarSettings options={options} onOptionsChange={onOptionsChange} />
</div>
</>
);
};