From 3ca8e4513be1a70a470b49cfedcc46fbd91dda3c Mon Sep 17 00:00:00 2001 From: Ben Donnelly Date: Wed, 14 Feb 2024 12:15:55 +0000 Subject: [PATCH 1/2] feat(tempo): add setting for tempo links --- package.json | 1 + src/components/config/ExperimentalConfig.tsx | 28 +++++++++++++++++--- src/types.ts | 6 ++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 595f7f4..2959938 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "dependencies": { "@emotion/css": "^11.11.2", "@grafana/data": "10.2.2", + "@grafana/experimental": "^1.7.10", "@grafana/runtime": "10.2.2", "@grafana/ui": "10.2.2", "prismjs": "^1.29.0", diff --git a/src/components/config/ExperimentalConfig.tsx b/src/components/config/ExperimentalConfig.tsx index dffee12..31b87a6 100644 --- a/src/components/config/ExperimentalConfig.tsx +++ b/src/components/config/ExperimentalConfig.tsx @@ -17,12 +17,14 @@ import { InlineField, InlineFieldRow, InlineSwitch } from '@grafana/ui'; import React from 'react'; import { Props } from '../ConfigEditor'; -import { updateDatasourcePluginJsonDataOption } from '@grafana/data'; +import { DataSourceInstanceSettings, updateDatasourcePluginJsonDataOption } from '@grafana/data'; +import { ConfigSection } from '@grafana/experimental'; +import { DataSourcePicker } from '@grafana/runtime'; export function ExperimentalSettings({ onOptionsChange, options }: Props) { return ( <> -
+ -
+ + + ds.type === 'tempo'} + current={options.jsonData.experimental?.tempo?.datasource} + noDefault={true} + width={40} + onChange={(ds: DataSourceInstanceSettings) => + updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'experimental', { + ...options.jsonData.experimental, + tempo: { + ...options.jsonData.experimental.tempo, + datasource: ds.uid, + }, + }) + } + /> + + + ); } diff --git a/src/types.ts b/src/types.ts index 5484416..41a0e8c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -64,7 +64,11 @@ export const DEFAULT_QUERY: Partial = {}; * These are options configured for each DataSource instance */ export interface DeepDatasourceOptions extends DataSourceJsonData { - experimental: { deepql: boolean }; + experimental: { deepql: boolean; tempo?: TempoSettings }; +} + +export interface TempoSettings { + datasource: string; } /** From 963bc5c117dc8ecc18792f8aa9252a9c2174a752 Mon Sep 17 00:00:00 2001 From: Ben Donnelly Date: Wed, 14 Feb 2024 12:27:09 +0000 Subject: [PATCH 2/2] chore(changelog): update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad72927..50c53e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ + +# main (xx/xx/2024) + +- **[FEATURE]**: add links from snapshots to traces [#31](https://github.com/intergral/deep/pull/31) [@Umaaz](https://github.com/Umaaz) + + + # 1.0.2 (10/11/2023)