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

@@ -29,7 +29,7 @@ describe('buildCategories', () => {
const categories = buildCategories(plugins);
it('should group plugins into categories', () => {
expect(categories.length).toBe(6);
expect(categories.length).toBe(7);
expect(categories[0].title).toBe('Time series databases');
expect(categories[0].plugins.length).toBe(2);
expect(categories[1].title).toBe('Logging & document databases');
@@ -40,17 +40,17 @@ describe('buildCategories', () => {
});
it('should add phantom plugin for Grafana cloud', () => {
expect(categories[3].title).toBe('Cloud');
expect(categories[3].plugins.length).toBe(2);
expect(categories[3].plugins[1].id).toBe('gcloud');
expect(categories[4].title).toBe('Cloud');
expect(categories[4].plugins.length).toBe(2);
expect(categories[4].plugins[1].id).toBe('gcloud');
});
it('should set module to phantom on phantom plugins', () => {
expect(categories[4].plugins[0].module).toBe('phantom');
expect(categories[5].plugins[0].module).toBe('phantom');
});
it('should add enterprise phantom plugins', () => {
expect(categories[4].title).toBe('Enterprise plugins');
expect(categories[4].plugins.length).toBe(6);
expect(categories[5].title).toBe('Enterprise plugins');
expect(categories[5].plugins.length).toBe(6);
});
});

View File

@@ -1,12 +1,11 @@
import { DataSourcePluginMeta, PluginType } from '@grafana/data';
import { DataSourcePluginCategory } from 'app/types';
import { config } from '@grafana/runtime';
export function buildCategories(plugins: DataSourcePluginMeta[]): DataSourcePluginCategory[] {
const categories: DataSourcePluginCategory[] = [
{ id: 'tsdb', title: 'Time series databases', plugins: [] },
{ id: 'logging', title: 'Logging & document databases', plugins: [] },
config.featureToggles.tracingIntegration ? { id: 'tracing', title: 'Distributed tracing', plugins: [] } : null,
{ id: 'tracing', title: 'Distributed tracing', plugins: [] },
{ id: 'sql', title: 'SQL', plugins: [] },
{ id: 'cloud', title: 'Cloud', plugins: [] },
{ id: 'enterprise', title: 'Enterprise plugins', plugins: [] },