@@ -82,9 +82,11 @@ const ResultFilter = ({ hideFilters, runs, maxHeight = '600px' }) => {
8282 // Dynamic metadata values
8383 const [ valueOptions , setValueOptions ] = useState ( [ ] ) ;
8484 const [ isValueOpen , setIsValueOpen ] = useState ( false ) ;
85+ const [ loadError , setLoadError ] = useState ( null ) ;
8586
8687 useEffect ( ( ) => {
8788 if ( fieldSelection && fieldSelection . startsWith ( 'metadata.' ) ) {
89+ setLoadError ( null ) ;
8890 // Filter out project_id since we pass it as 'project' parameter
8991 const filtersWithoutProject = activeFilters . filter (
9092 ( f ) => f . field !== 'project_id' ,
@@ -96,16 +98,14 @@ const ResultFilter = ({ hideFilters, runs, maxHeight = '600px' }) => {
9698 const params = {
9799 group_field : fieldSelection ,
98100 project : projectId ,
101+ days : 90 ,
99102 } ;
100103
101104 // Only add additional_filters if there are filters to add
102105 if ( apiFilter ) {
103106 params . additional_filters = apiFilter ;
104107 }
105108
106- // Note: We don't include 'days' parameter to get all historical data
107- // If we want to limit to recent results, we could add: days: 30
108-
109109 HttpClient . get (
110110 [ Settings . serverUrl , 'widget' , 'result-aggregator' ] ,
111111 params ,
@@ -117,9 +117,11 @@ const ResultFilter = ({ hideFilters, runs, maxHeight = '600px' }) => {
117117 . catch ( ( error ) => {
118118 console . error ( 'Error fetching dynamic values:' , error ) ;
119119 setValueOptions ( [ ] ) ;
120+ setLoadError ( 'Error loading values' ) ;
120121 } ) ;
121122 } else {
122123 setValueOptions ( [ ] ) ;
124+ setLoadError ( null ) ;
123125 }
124126 } , [ fieldSelection , activeFilters , primaryObject ] ) ;
125127
@@ -606,6 +608,17 @@ const ResultFilter = ({ hideFilters, runs, maxHeight = '600px' }) => {
606608 </ SelectList >
607609 </ Select >
608610 ) }
611+ { loadError && (
612+ < div
613+ style = { {
614+ color : 'var(--pf-v6-global--danger-color--100)' ,
615+ fontSize : 'var(--pf-v6-global--FontSize--sm)' ,
616+ marginTop : '0.25rem' ,
617+ } }
618+ >
619+ { loadError }
620+ </ div >
621+ ) }
609622 </ FlexItem >
610623 </ Flex >
611624 < FlexItem >
0 commit comments