From 8d2313c5b504e17c01158197bf8ea4bb6374e222 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 15 Jun 2022 05:42:11 -0400 Subject: [PATCH] Ayy1: Cannot save single dashboard link (#49075) (#50857) (cherry picked from commit 07535397212a98cec2e590795ab719815ee2cd5c) Co-authored-by: Chrysa Dikonimaki --- .../components/DashboardSettings/LinksSettings.test.tsx | 1 + .../dashboard/components/LinksSettings/LinkSettingsEdit.tsx | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard/components/DashboardSettings/LinksSettings.test.tsx b/public/app/features/dashboard/components/DashboardSettings/LinksSettings.test.tsx index f0156b67067..1430ae5b03b 100644 --- a/public/app/features/dashboard/components/DashboardSettings/LinksSettings.test.tsx +++ b/public/app/features/dashboard/components/DashboardSettings/LinksSettings.test.tsx @@ -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(); diff --git a/public/app/features/dashboard/components/LinksSettings/LinkSettingsEdit.tsx b/public/app/features/dashboard/components/LinksSettings/LinkSettingsEdit.tsx index 4a34e275335..70d5a3ade1e 100644 --- a/public/app/features/dashboard/components/LinksSettings/LinkSettingsEdit.tsx +++ b/public/app/features/dashboard/components/LinksSettings/LinkSettingsEdit.tsx @@ -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 = ({ editLinkIdx, dashboard }) => { +export const LinkSettingsEdit: React.FC = ({ 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 = ({ editLinkIdx, /> + ); };