Tracing: Remove feature flag (#23834)

This commit is contained in:
Andrej Ocenas
2020-04-23 20:46:42 +02:00
committed by GitHub
parent de1e70a474
commit 376765b3d7
7 changed files with 34 additions and 56 deletions

View File

@@ -3,14 +3,6 @@ import { shallow } from 'enzyme';
import { DerivedField } from './DerivedField';
import DataSourcePicker from '../../../../core/components/Select/DataSourcePicker';
jest.mock('app/core/config', () => ({
config: {
featureToggles: {
tracingIntegration: true,
},
},
}));
jest.mock('app/features/plugins/datasource_srv', () => ({
getDatasourceSrv() {
return {

View File

@@ -8,7 +8,6 @@ import { DataSourceSelectItem } from '@grafana/data';
import { DerivedFieldConfig } from '../types';
import DataSourcePicker from 'app/core/components/Select/DataSourcePicker';
import { getDatasourceSrv } from 'app/features/plugins/datasource_srv';
import { config } from 'app/core/config';
import { usePrevious } from 'react-use';
const getStyles = stylesFactory(() => ({
@@ -113,35 +112,33 @@ export const DerivedField = (props: Props) => {
`}
/>
{config.featureToggles.tracingIntegration && (
<div className={styles.row}>
<Switch
label="Internal link"
checked={showInternalLink}
onChange={() => {
if (showInternalLink) {
onChange({
...value,
datasourceUid: undefined,
});
}
setShowInternalLink(!showInternalLink);
}}
/>
<div className={styles.row}>
<Switch
label="Internal link"
checked={showInternalLink}
onChange={() => {
if (showInternalLink) {
onChange({
...value,
datasourceUid: undefined,
});
}
setShowInternalLink(!showInternalLink);
}}
/>
{showInternalLink && (
<DataSourceSection
onChange={datasourceUid => {
onChange({
...value,
datasourceUid,
});
}}
datasourceUid={value.datasourceUid}
/>
)}
</div>
)}
{showInternalLink && (
<DataSourceSection
onChange={datasourceUid => {
onChange({
...value,
datasourceUid,
});
}}
datasourceUid={value.datasourceUid}
/>
)}
</div>
</div>
);
};