mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
@@ -214,14 +214,7 @@ export function getPanelFrameCategory2(
|
||||
value: panel.state.title,
|
||||
popularRank: 1,
|
||||
render: function renderTitle() {
|
||||
const { title } = panel.useState();
|
||||
return (
|
||||
<Input
|
||||
id="PanelFrameTitle"
|
||||
value={title}
|
||||
onChange={(e) => panel.setState({ title: e.currentTarget.value })}
|
||||
/>
|
||||
);
|
||||
return <PanelFrameTitle panel={panel} />;
|
||||
},
|
||||
addon: config.featureToggles.dashgpt && (
|
||||
<GenAIPanelTitleButton
|
||||
@@ -237,14 +230,7 @@ export function getPanelFrameCategory2(
|
||||
title: 'Description',
|
||||
value: panel.state.description,
|
||||
render: function renderDescription() {
|
||||
const { description } = panel.useState();
|
||||
return (
|
||||
<TextArea
|
||||
id="description-text-area"
|
||||
value={description}
|
||||
onChange={(e) => panel.setState({ description: e.currentTarget.value })}
|
||||
/>
|
||||
);
|
||||
return <DescriptionTextArea panel={panel} />;
|
||||
},
|
||||
addon: config.featureToggles.dashgpt && (
|
||||
<GenAIPanelDescriptionButton
|
||||
@@ -369,3 +355,23 @@ function ScenePanelLinksEditor({ panelLinks }: ScenePanelLinksEditorProps) {
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function PanelFrameTitle({ panel }: { panel: VizPanel }) {
|
||||
const { title } = panel.useState();
|
||||
|
||||
return (
|
||||
<Input id="PanelFrameTitle" value={title} onChange={(e) => panel.setState({ title: e.currentTarget.value })} />
|
||||
);
|
||||
}
|
||||
|
||||
function DescriptionTextArea({ panel }: { panel: VizPanel }) {
|
||||
const { description } = panel.useState();
|
||||
|
||||
return (
|
||||
<TextArea
|
||||
id="description-text-area"
|
||||
value={description}
|
||||
onChange={(e) => panel.setState({ description: e.currentTarget.value })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user