CustomVariable: Remove dead code and incorrect label (#115340)
* CustomVariable: Remove dead code and incorrect label * Update i18n translations
This commit is contained in:
+1
-19
@@ -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} />,
|
||||
}),
|
||||
];
|
||||
}
|
||||
|
||||
-2
@@ -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} />,
|
||||
}),
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user