|
|
|
@ -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> |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|