CustomVariable: Remove dead code and incorrect label (#115340)

* CustomVariable: Remove dead code and incorrect label

* Update i18n translations
This commit is contained in:
Dominik Prokop
2025-12-16 15:56:16 +01:00
committed by GitHub
parent 321e60e69c
commit 52205fbf4f
3 changed files with 2 additions and 23 deletions
@@ -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 }) => <PaneItem id={props.id} variable={variable} />,
}),
];
}
@@ -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 }) => <PaneItem id={props.id} variable={variable} />,
}),
+1 -2
View File
@@ -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",