Skip to content

Commit

Permalink
Replace sharing URL
Browse files Browse the repository at this point in the history
  • Loading branch information
copyhold committed Dec 21, 2023
1 parent 311aac8 commit 2a09acd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions public/app/features/playlist/ShareModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ShareModal = ({ playlistId, onDismiss }: ShareModalProps) => {
const modes: Array<SelectableValue<PlaylistMode>> = [
{ label: 'Normal', value: false },
{ label: 'TV', value: 'tv' },
{ label: 'Kiosk', value: 'true' },
{ label: 'Kiosk', value: true },
];

const onShareUrlCopy = () => {
Expand All @@ -29,13 +29,17 @@ export const ShareModal = ({ playlistId, onDismiss }: ShareModalProps) => {

const params: UrlQueryMap = {};
if (mode) {
params.kiosk = mode;
params.kiosk = mode.toString();
}
if (autoFit) {
params.autofitpanels = true;
}

const shareUrl = urlUtil.renderUrl(`${buildBaseUrl()}/grafana-app/play/${playlistId}`, params);
// LOGZ.IO GRAFANA CHANGE :: DEV-42761 fix playlist sharing url
const shareUrl = urlUtil.renderUrl(
`${buildBaseUrl().replace('playlist', 'grafana-app/playlist')}/play/${playlistId}`,
params
);

return (
<Modal isOpen={true} title="Share playlist" onDismiss={onDismiss}>
Expand Down

0 comments on commit 2a09acd

Please sign in to comment.