From 52205fbf4fabf16a669acda2f4e7de974c9e465d Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Tue, 16 Dec 2025 15:56:16 +0100 Subject: [PATCH] CustomVariable: Remove dead code and incorrect label (#115340) * CustomVariable: Remove dead code and incorrect label * Update i18n translations --- .../CustomVariableEditor.tsx | 20 +------------------ .../getCustomVariableOptions.tsx | 2 -- public/locales/en-US/grafana.json | 3 +-- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/public/app/features/dashboard-scene/settings/variables/editors/CustomVariableEditor/CustomVariableEditor.tsx b/public/app/features/dashboard-scene/settings/variables/editors/CustomVariableEditor/CustomVariableEditor.tsx index 8dfc7b3eac1..1d73d5a6f2b 100644 --- a/public/app/features/dashboard-scene/settings/variables/editors/CustomVariableEditor/CustomVariableEditor.tsx +++ b/public/app/features/dashboard-scene/settings/variables/editors/CustomVariableEditor/CustomVariableEditor.tsx @@ -1,13 +1,9 @@ import { FormEvent, useCallback } from 'react'; -import { t } from '@grafana/i18n'; -import { CustomVariable, SceneVariable } from '@grafana/scenes'; +import { CustomVariable } from '@grafana/scenes'; -import { OptionsPaneItemDescriptor } from '../../../../../dashboard/components/PanelEditor/OptionsPaneItemDescriptor'; import { CustomVariableForm } from '../../components/CustomVariableForm'; -import { PaneItem } from './PaneItem'; - interface CustomVariableEditorProps { variable: CustomVariable; onRunQuery: () => void; @@ -67,17 +63,3 @@ export function CustomVariableEditor({ variable, onRunQuery }: CustomVariableEdi /> ); } - -export function getCustomVariableOptions(variable: SceneVariable): OptionsPaneItemDescriptor[] { - if (!(variable instanceof CustomVariable)) { - return []; - } - - return [ - new OptionsPaneItemDescriptor({ - title: t('dashboard.edit-pane.variable.custom-options.values', 'Values separated by comma'), - id: 'custom-variable-values', - render: ({ props }) => , - }), - ]; -} diff --git a/public/app/features/dashboard-scene/settings/variables/editors/CustomVariableEditor/getCustomVariableOptions.tsx b/public/app/features/dashboard-scene/settings/variables/editors/CustomVariableEditor/getCustomVariableOptions.tsx index 5033ebb1407..7dea9f83ec3 100644 --- a/public/app/features/dashboard-scene/settings/variables/editors/CustomVariableEditor/getCustomVariableOptions.tsx +++ b/public/app/features/dashboard-scene/settings/variables/editors/CustomVariableEditor/getCustomVariableOptions.tsx @@ -1,4 +1,3 @@ -import { t } from '@grafana/i18n'; import { CustomVariable, SceneVariable } from '@grafana/scenes'; import { OptionsPaneItemDescriptor } from '../../../../../dashboard/components/PanelEditor/OptionsPaneItemDescriptor'; @@ -12,7 +11,6 @@ export function getCustomVariableOptions(variable: SceneVariable): OptionsPaneIt return [ new OptionsPaneItemDescriptor({ - title: t('dashboard.edit-pane.variable.custom-options.values', 'Values separated by comma'), id: 'custom-variable-values', render: ({ props }) => , }), diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index b3b6ce2c8db..eef8a1bdd7d 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -4821,8 +4821,7 @@ "apply": "Apply", "change-value": "Change variable value", "discard": "Discard", - "modal-title": "Custom Variable", - "values": "Values separated by comma" + "modal-title": "Custom Variable" }, "datasource-options": { "name-filter": "Name filter",