From 0b4c790e55f299c3855c119f3b4acd5d51c2c293 Mon Sep 17 00:00:00 2001 From: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com> Date: Fri, 26 May 2023 10:31:32 +0200 Subject: [PATCH] News Panel: Improve error message (#69060) Add alert with link to documentation --- public/app/plugins/panel/news/NewsPanel.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/news/NewsPanel.tsx b/public/app/plugins/panel/news/NewsPanel.tsx index 48542639d8c..127db56465c 100644 --- a/public/app/plugins/panel/news/NewsPanel.tsx +++ b/public/app/plugins/panel/news/NewsPanel.tsx @@ -2,7 +2,7 @@ import React, { useEffect } from 'react'; import { PanelProps } from '@grafana/data'; import { RefreshEvent } from '@grafana/runtime'; -import { CustomScrollbar } from '@grafana/ui'; +import { Alert, CustomScrollbar, Icon } from '@grafana/ui'; import { News } from './component/News'; import { DEFAULT_FEED_URL } from './constants'; @@ -32,7 +32,17 @@ export function NewsPanel(props: NewsPanelProps) { }, [getNews]); if (state.error) { - return
Error loading RSS feed.
; + return ( + + Make sure that the feed URL is correct and that CORS is configured correctly on the server. See{' '} + + News panel documentation. + + + ); } if (state.loading) { return
Loading...
;