From 8333c55beef2d39f1162a00109d88d2b4c87cb73 Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Thu, 6 May 2021 20:11:27 +0100 Subject: [PATCH] AzureMonitor: Create read-only React view for Insights Analytics (#33719) * AzureMonitor: Create read-only React view for Insights Analytics * Fix spacing --- .../InsightsAnalyticsEditor/index.tsx | 49 +++++++++++++++++++ .../components/QueryEditor/QueryEditor.tsx | 32 +++++++----- .../components/Space.tsx | 38 ++++++++++++++ .../query_ctrl.ts | 7 ++- 4 files changed, 112 insertions(+), 14 deletions(-) create mode 100644 public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsAnalyticsEditor/index.tsx create mode 100644 public/app/plugins/datasource/grafana-azure-monitor-datasource/components/Space.tsx diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsAnalyticsEditor/index.tsx b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsAnalyticsEditor/index.tsx new file mode 100644 index 00000000000..a4b4e171407 --- /dev/null +++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsAnalyticsEditor/index.tsx @@ -0,0 +1,49 @@ +import { Alert, CodeEditor, Select } from '@grafana/ui'; +import React from 'react'; +import { AzureMonitorOption, AzureMonitorQuery, AzureResultFormat } from '../../types'; +import { findOption } from '../../utils/common'; +import { Field } from '../Field'; +import { Space } from '../Space'; + +interface InsightsAnalyticsEditorProps { + query: AzureMonitorQuery; +} + +const FORMAT_OPTIONS: Array> = [ + { label: 'Time series', value: 'time_series' }, + { label: 'Table', value: 'table' }, +]; + +const InsightsAnalyticsEditor: React.FC = ({ query }) => { + return ( +
+ + + +