mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 10:20:29 -06:00
Ayy1: Cannot save single dashboard link (#49075)
This commit is contained in:
parent
7499609897
commit
0753539721
@ -146,6 +146,7 @@ describe('LinksSettings', () => {
|
||||
expect(screen.queryByText('Type')).toBeInTheDocument();
|
||||
expect(screen.queryByText('Title')).toBeInTheDocument();
|
||||
expect(screen.queryByText('With tags')).toBeInTheDocument();
|
||||
expect(screen.queryByText('Apply')).toBeInTheDocument();
|
||||
|
||||
expect(screen.queryByText('Url')).not.toBeInTheDocument();
|
||||
expect(screen.queryByText('Tooltip')).not.toBeInTheDocument();
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import { SelectableValue } from '@grafana/data';
|
||||
import { CollapsableSection, TagsInput, Select, Field, Input, Checkbox } from '@grafana/ui';
|
||||
import { CollapsableSection, TagsInput, Select, Field, Input, Checkbox, Button } from '@grafana/ui';
|
||||
|
||||
import { DashboardLink, DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
@ -41,7 +41,7 @@ type LinkSettingsEditProps = {
|
||||
onGoBack: () => void;
|
||||
};
|
||||
|
||||
export const LinkSettingsEdit: React.FC<LinkSettingsEditProps> = ({ editLinkIdx, dashboard }) => {
|
||||
export const LinkSettingsEdit: React.FC<LinkSettingsEditProps> = ({ editLinkIdx, dashboard, onGoBack }) => {
|
||||
const [linkSettings, setLinkSettings] = useState(editLinkIdx !== null ? dashboard.links[editLinkIdx] : newLink);
|
||||
|
||||
const onUpdate = (link: DashboardLink) => {
|
||||
@ -142,6 +142,7 @@ export const LinkSettingsEdit: React.FC<LinkSettingsEditProps> = ({ editLinkIdx,
|
||||
/>
|
||||
</Field>
|
||||
</CollapsableSection>
|
||||
<Button onClick={onGoBack}>Apply</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user