+ { showConfigWarning && (
+
+
+
+
+
)}
- {
- // Time and LogLevel fields selection for Logs Volume histogram in the Explore mode
- builder.mode === BuilderMode.List && props.format === Format.LOGS && props.app === CoreApp.Explore && (
-
-
-
-
-
-
- )
- }
- {builder.mode !== BuilderMode.Trend && (
-
-
-
+ { !traceId && (
+
+
+ Trace ID is empty
+
+
)}
- {(builder.mode === BuilderMode.Aggregate || builder.mode === BuilderMode.Trend) && (
-
-
-
- )}
-
-
-
- {(builder.mode === BuilderMode.Aggregate || builder.mode === BuilderMode.Trend) && (
-
-
-
- )}
-
-
-
-
-
- ) : null;
-};
+ {traceId &&
{}} disabled /> }
+
+
+
+ );
+}
diff --git a/src/components/queryBuilder/QueryTypeSwitcher.test.tsx b/src/components/queryBuilder/QueryTypeSwitcher.test.tsx
new file mode 100644
index 00000000..a925fe71
--- /dev/null
+++ b/src/components/queryBuilder/QueryTypeSwitcher.test.tsx
@@ -0,0 +1,44 @@
+import React from 'react';
+import { fireEvent, render } from '@testing-library/react';
+import { QueryTypeSwitcher } from './QueryTypeSwitcher';
+import labels from 'labels';
+import { QueryType } from 'types/queryBuilder';
+
+const options = {
+ Table: labels.types.QueryType.table,
+ Logs: labels.types.QueryType.logs,
+ TimeSeries: labels.types.QueryType.timeseries,
+ Traces: labels.types.QueryType.traces,
+};
+
+describe('QueryTypeSwitcher', () => {
+ it('should render with default props', () => {
+ const result = render(
+