Skip to content

Commit eace152

Browse files
authored
DEV-48786 grafana 10 broken link to dashboard and panel in alert edit form (#117)
* Fix the outgoing link * Add prefix * Add prefix * More fix
1 parent c947416 commit eace152

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

public/app/features/alerting/unified/components/rule-editor/DashboardAnnotationField.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const DashboardAnnotationField = ({
2626
}) => {
2727
const styles = useStyles2(getStyles);
2828

29-
const dashboardLink = makeDashboardLink(dashboard?.uid || dashboardUid);
30-
const panelLink = makePanelLink(dashboard?.uid || dashboardUid, panel?.id?.toString() || panelId);
29+
const dashboardLink = '/grafana-app/' + makeDashboardLink(dashboard?.uid || dashboardUid); // LOGZ.IO GRAFANA CHANGE :: DEV-48786 - broken dashboard links
30+
const panelLink = '/grafana-app/' + makePanelLink(dashboard?.uid || dashboardUid, panel?.id?.toString() || panelId); // LOGZ.IO GRAFANA CHANGE :: DEV-48786 - broken dashboard links
3131
return (
3232
<div className={styles.container}>
3333
{dashboard && (

public/app/features/alerting/unified/components/rule-editor/notificaton-preview/NotificationRouteDetailsModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function NotificationRouteDetailsModal({
100100
<Stack gap={1} direction="row" alignItems="center">
101101
<a
102102
href={makeAMLink(
103-
`/alerting/notifications/receivers/${encodeURIComponent(receiver.name)}/edit`,
103+
`/grafana-app/alerting/notifications/receivers/${encodeURIComponent(receiver.name)}/edit`, // LOGZ.IO GRAFANA CHANGE :: DEV-48786 - broken links
104104
alertManagerSourceName
105105
)}
106106
className={styles.link}

public/app/features/alerting/unified/components/rule-viewer/v2/RuleViewer.v2.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ const createMetadata = (rule: CombinedRule): PageInfoItem[] => {
157157
<WithReturnButton
158158
title={rule.name}
159159
component={
160-
<TextLink variant="bodySmall" href={makePanelLink(dashboardUID, panelID)}>
160+
// LOGZ.IO GRAFANA CHANGE :: DEV-48786 - broken links
161+
<TextLink variant="bodySmall" href={`/grafana-app/${makePanelLink(dashboardUID, panelID)}`}>
161162
View panel
162163
</TextLink>
163164
}
@@ -171,7 +172,8 @@ const createMetadata = (rule: CombinedRule): PageInfoItem[] => {
171172
<WithReturnButton
172173
title={rule.name}
173174
component={
174-
<TextLink title={rule.name} variant="bodySmall" href={makeDashboardLink(dashboardUID)}>
175+
// LOGZ.IO GRAFANA CHANGE :: DEV-48786 - broken links
176+
<TextLink title={rule.name} variant="bodySmall" href={`/grafana-app/${makeDashboardLink(dashboardUID)}`}>
175177
View dashboard
176178
</TextLink>
177179
}

0 commit comments

Comments
 (0)