File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export const VolumePageRSP = (props) => {
5454 const alertsVolume = useAlerts ( {
5555 persistentvolumeclaim : PVCName ,
5656 } ) ;
57- const alertlist = alertsVolume && alertsVolume . alerts ;
57+ const alertlist = alertsVolume ? .alerts ?? [ ] ;
5858 const criticalAlerts = alertlist . filter (
5959 ( alert ) => alert . severity === 'critical' ,
6060 ) ;
Original file line number Diff line number Diff line change @@ -121,13 +121,9 @@ export const useVolumesWithAlerts = (nodeName?: string) => {
121121 // @ts -expect-error - FIXME when you are working on it
122122 getVolumeListData ( state , null , nodeName ) ,
123123 ) ;
124- //This forces alerts to have been fetched at least once (watchdog alert should be present)
125- // before rendering volume list
126- // TODO enhance this using useAlerts status
127- if ( ! alerts || alerts . length === 0 ) return [ ] ;
128124 // @ts -expect-error - FIXME when you are working on it
129125 const volumeListWithStatus = volumeListData . map ( ( volume ) => {
130- const volumeAlerts = filterAlerts ( alerts , {
126+ const volumeAlerts = filterAlerts ( alerts || [ ] , {
131127 persistentvolumeclaim : volume . persistentvolumeclaim ,
132128 } ) ;
133129 // For the unbound volume, the health status should be none.
You can’t perform that action at this time.
0 commit comments