-
-
-
+ if (config.featureToggles.azureMonitorExperimentalUI) {
+ return (
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ } else {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- );
+
+ );
+ }
};
export default MetricsQueryEditor;
diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/QueryEditor/QueryEditor.test.tsx b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/QueryEditor/QueryEditor.test.tsx
index 9b602d04215..766abdc1085 100644
--- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/QueryEditor/QueryEditor.test.tsx
+++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/QueryEditor/QueryEditor.test.tsx
@@ -108,4 +108,16 @@ describe('Azure Monitor QueryEditor', () => {
config.featureToggles.azureMonitorExperimentalUI = originalConfigValue;
});
+
+ it('should not render the experimental QueryHeader when feature toggle is disabled', async () => {
+ const mockDatasource = createMockDatasource();
+ const mockQuery = {
+ ...createMockQuery(),
+ queryType: AzureQueryType.AzureMonitor,
+ };
+
+ render(