ui: pick series by name if no id exist

This commit is contained in:
nick-delirium 2025-02-27 09:41:49 +01:00
parent 6873f1c56b
commit 1c1a41bb55
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -50,10 +50,10 @@ function WidgetSessions(props: Props) {
if (!widget.series) return;
const seriesOptions = widget.series.map((item: any) => ({
label: item.name,
value: item.seriesId
value: item.seriesId ?? item.name
}));
setSeriesOptions([{ label: 'All', value: 'all' }, ...seriesOptions]);
}, [widget.series]);
}, [widget.series.length]);
const fetchSessions = (metricId: any, filter: any) => {
if (!isMounted()) return;