File tree Expand file tree Collapse file tree 3 files changed +21
-8
lines changed
Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,7 @@ const DatasetList: React.FC = () => {
339339 setEditTagsAnchorEl ( null ) ;
340340 setSelectedDataset ( null ) ;
341341 } ;
342+
342343 const handleEditTagsSave = async (
343344 dataset : Dataset ,
344345 tags : string [ ] ,
@@ -367,13 +368,25 @@ const DatasetList: React.FC = () => {
367368 } ;
368369
369370 await updateDataset ( { data : payload } ) ;
371+
372+ const updatedDatasets = datasets . map ( ( ds ) =>
373+ ds . dataset_id === dataset . dataset_id ? { ...ds , tags } : ds
374+ ) ;
375+ setDatasets ( updatedDatasets ) ;
376+
377+ const allTags = Array . from (
378+ new Set ( updatedDatasets . flatMap ( ( dataset ) => dataset . tags || [ ] ) )
379+ ) ;
380+
381+ const updatedFilters = {
382+ ...filters ,
383+ tag : _ . union ( defaultFilters . tag , allTags ) ,
384+ } ;
385+ setFilters ( updatedFilters ) ;
386+
370387 setLoading ( false ) ;
371388 showAlertMessage ( dataset . name , 'success' , 'Edit Tags' ) ;
372- setDatasets ( ( prevDatasets ) =>
373- prevDatasets . map ( ( ds ) =>
374- ds . dataset_id === dataset . dataset_id ? { ...ds , tags } : ds ,
375- ) ,
376- ) ;
389+ handleCloseEditTagsPopover ( ) ;
377390 } catch ( error ) {
378391 showAlertMessage ( dataset . name , 'error' , 'Edit Tags' ) ;
379392 setLoading ( false ) ;
Original file line number Diff line number Diff line change @@ -212,15 +212,15 @@ const DatasetlistCard: React.FC<DatasetlistCardProps> = ({
212212 Volume
213213 </ Typography >
214214 < Typography variant = "caption" >
215- 0
215+ { eventCounts . totalEvents }
216216 </ Typography >
217217 </ Grid >
218218 < Grid item xs = { 1 } className = { styles . gridItemNoBorder } >
219219 < Typography variant = "captionMedium" >
220220 Size
221221 </ Typography >
222222 < Typography variant = "caption" >
223- 0
223+ { prettyBytes ( datasetSize ) }
224224 </ Typography >
225225 </ Grid >
226226 </ >
Original file line number Diff line number Diff line change @@ -519,7 +519,7 @@ export const filterDatasets = (
519519export const useTotalEvents = ( datasetId : string , isMasterDataset : boolean ) => {
520520 const dateFormat = 'YYYY-MM-DDT00:00:00+05:30' ;
521521 const startDate = '2000-01-01' ;
522- const endDate = dayjs ( ) . add ( 1 , 'day' ) . format ( dateFormat ) ;
522+ const endDate = dayjs ( ) . format ( dateFormat ) ;
523523
524524 return useQueryWithLocalStorageFallback (
525525 [ 'totalEvents' , datasetId ] ,
You can’t perform that action at this time.
0 commit comments