@@ -120,6 +120,8 @@ export default function Information() {
120120 const [ errorMessageText , setErrorMessageText ] = useState ( '' ) ;
121121 const [ deleteLoadingButton , setDeleteLoadingButton ] = useState ( false ) ;
122122 const [ openDeleteCluster , setOpenDeleteCluster ] = useState ( false ) ;
123+ const [ openUrlsDialog , setOpenUrlsDialog ] = useState ( false ) ;
124+ const [ currentUrls , setCurrentUrls ] = useState < string [ ] | null > ( null ) ;
123125
124126 const params = useParams ( ) ;
125127 const navigate = useNavigate ( ) ;
@@ -1012,26 +1014,56 @@ export default function Information() {
10121014 < Typography className = { styles . blacklistServiceTitle } > { serviceTypeGroup . serviceType } </ Typography >
10131015 </ Box >
10141016 < Table className = { styles . blacklistTable } >
1015- < TableHead className = { styles . blacklistTableHead } >
1017+ < TableHead
1018+ className = { styles . blacklistTableHead }
1019+ sx = { { backgroundColor : 'var(--palette-table-title-color)' } }
1020+ >
10161021 < TableRow >
1017- < TableCell className = { styles . blacklistTableHeader } > Task Type</ TableCell >
1018- < TableCell className = { styles . blacklistTableHeader } > Feature</ TableCell >
1019- < TableCell className = { styles . blacklistTableHeader } > Applications</ TableCell >
1020- < TableCell className = { styles . blacklistTableHeader } > Urls</ TableCell >
1021- < TableCell className = { styles . blacklistTableHeader } > Tags</ TableCell >
1022- < TableCell className = { styles . blacklistTableHeader } > Priorities</ TableCell >
1022+ < TableCell align = "center" className = { styles . blacklistTableHeader } >
1023+ < Typography variant = "subtitle1" className = { styles . blacklistTableHeaderText } >
1024+ Task Type
1025+ </ Typography >
1026+ </ TableCell >
1027+ < TableCell align = "center" className = { styles . blacklistTableHeader } >
1028+ < Typography variant = "subtitle1" className = { styles . blacklistTableHeaderText } >
1029+ Feature
1030+ </ Typography >
1031+ </ TableCell >
1032+ < TableCell align = "center" className = { styles . blacklistTableHeader } >
1033+ < Typography variant = "subtitle1" className = { styles . blacklistTableHeaderText } >
1034+ Applications
1035+ </ Typography >
1036+ </ TableCell >
1037+ < TableCell align = "center" className = { styles . blacklistTableHeader } >
1038+ < Typography variant = "subtitle1" className = { styles . blacklistTableHeaderText } >
1039+ Urls
1040+ </ Typography >
1041+ </ TableCell >
1042+ < TableCell align = "center" className = { styles . blacklistTableHeader } >
1043+ < Typography variant = "subtitle1" className = { styles . blacklistTableHeaderText } >
1044+ Tags
1045+ </ Typography >
1046+ </ TableCell >
1047+ < TableCell align = "center" className = { styles . blacklistTableHeader } >
1048+ < Typography variant = "subtitle1" className = { styles . blacklistTableHeaderText } >
1049+ Priorities
1050+ </ Typography >
1051+ </ TableCell >
10231052 </ TableRow >
10241053 </ TableHead >
10251054 < TableBody >
10261055 { serviceTypeGroup . rows . map ( ( row , rowIndex ) => (
10271056 < TableRow key = { `row-${ serviceIndex } -${ rowIndex } ` } className = { styles . blacklistTableRow } >
1028- < TableCell className = { `${ styles . blacklistTableCell } ${ styles . blacklistTableTaskType } ` } >
1057+ < TableCell
1058+ align = "center"
1059+ className = { `${ styles . blacklistTableCell } ${ styles . blacklistTableTaskType } ` }
1060+ >
10291061 { row . taskType }
10301062 </ TableCell >
1031- < TableCell className = { styles . blacklistTableCell } >
1063+ < TableCell align = "center" className = { styles . blacklistTableCell } >
10321064 < span className = { styles . blacklistTableFeature } > { row . feature } </ span >
10331065 </ TableCell >
1034- < TableCell className = { styles . blacklistTableCell } >
1066+ < TableCell align = "center" className = { styles . blacklistTableCell } >
10351067 < Typography variant = "body2" className = { styles . blacklistCellText } >
10361068 < MuiTooltip
10371069 title = { row . applications . length > 0 ? row . applications . join ( ', ' ) : '-' }
@@ -1047,20 +1079,35 @@ export default function Information() {
10471079 </ MuiTooltip >
10481080 </ Typography >
10491081 </ TableCell >
1050- < TableCell className = { styles . blacklistTableCell } >
1051- < Typography variant = "body2" className = { styles . blacklistCellText } >
1052- < MuiTooltip title = { row . urls . length > 0 ? row . urls . join ( ', ' ) : '-' } placement = "top" >
1053- < span >
1054- { row . urls . length > 0 ? (
1055- row . urls . join ( ', ' )
1056- ) : (
1057- < span className = { styles . blacklistOptionEmpty } > -</ span >
1082+ < TableCell align = "center" className = { styles . blacklistTableCell } >
1083+ < Box className = { styles . blacklistUrlCell } >
1084+ { row . urls . length === 0 ? (
1085+ < Typography variant = "body2" className = { styles . blacklistOptionEmpty } >
1086+ -
1087+ </ Typography >
1088+ ) : (
1089+ < >
1090+ { row . urls . slice ( 0 , 4 ) . map ( ( url , index ) => (
1091+ < Typography key = { index } variant = "body2" className = { styles . blacklistUrlItem } >
1092+ { url }
1093+ </ Typography >
1094+ ) ) }
1095+ { row . urls . length > 4 && (
1096+ < button
1097+ className = { styles . blacklistUrlMoreButton }
1098+ onClick = { ( ) => {
1099+ setCurrentUrls ( row . urls ) ;
1100+ setOpenUrlsDialog ( true ) ;
1101+ } }
1102+ >
1103+ More
1104+ </ button >
10581105 ) }
1059- </ span >
1060- </ MuiTooltip >
1061- </ Typography >
1106+ </ >
1107+ ) }
1108+ </ Box >
10621109 </ TableCell >
1063- < TableCell className = { styles . blacklistTableCell } >
1110+ < TableCell align = "center" className = { styles . blacklistTableCell } >
10641111 < Typography variant = "body2" className = { styles . blacklistCellText } >
10651112 < MuiTooltip title = { row . tags . length > 0 ? row . tags . join ( ', ' ) : '-' } placement = "top" >
10661113 < span >
@@ -1073,7 +1120,7 @@ export default function Information() {
10731120 </ MuiTooltip >
10741121 </ Typography >
10751122 </ TableCell >
1076- < TableCell className = { styles . blacklistTableCell } >
1123+ < TableCell align = "center" className = { styles . blacklistTableCell } >
10771124 < Typography variant = "body2" className = { styles . blacklistCellText } >
10781125 < MuiTooltip
10791126 title = {
@@ -1104,6 +1151,16 @@ export default function Information() {
11041151 ) }
11051152 </ Box >
11061153 </ Box >
1154+ < Dialog maxWidth = "sm" fullWidth open = { openUrlsDialog } onClose = { ( ) => setOpenUrlsDialog ( false ) } >
1155+ < DialogTitle > URLs</ DialogTitle >
1156+ < DialogContent dividers className = { styles . blacklistUrlDialogContainer } >
1157+ { currentUrls ?. map ( ( url , index ) => (
1158+ < Typography key = { index } className = { styles . blacklistUrlDialogItem } >
1159+ { url }
1160+ </ Typography >
1161+ ) ) }
1162+ </ DialogContent >
1163+ </ Dialog >
11071164 </ Box >
11081165 ) ;
11091166}
0 commit comments