File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {
2121import { Badge } from "@/components/ui/badge" ;
2222import { Skeleton } from "@/components/ui/skeleton" ;
2323import { getSeverityClassNames } from "@/components/common/Severity" ;
24- import { classNames } from "@/utils/common" ;
24+ import { classNames , truncateMiddle } from "@/utils/common" ;
2525import {
2626 ExclamationTriangleIcon ,
2727 ShieldExclamationIcon ,
@@ -289,7 +289,7 @@ export default forwardRef<InstanceDashboardHandle>(
289289 < div key = { p . slug } className = "flex items-end gap-3" >
290290 < div className = "min-w-0 flex-1" >
291291 < span className = "truncate text-sm font-medium" >
292- { p . name }
292+ { truncateMiddle ( p . name , 55 ) }
293293 </ span >
294294 < div className = "mt-1 h-2 w-full overflow-hidden rounded-xs bg-secondary" >
295295 < div
@@ -301,14 +301,19 @@ export default forwardRef<InstanceDashboardHandle>(
301301 </ div >
302302 </ div >
303303 < div className = "flex items-center gap-2" >
304- < span className = "text-sm font-medium tabular-nums" >
304+ < span
305+ className = "text-right text-sm font-medium tabular-nums"
306+ style = { {
307+ minWidth : `${ String ( maxProjectTotal ) . length } ch` ,
308+ } }
309+ >
305310 { total }
306311 </ span >
307- { p . critical > 0 && (
312+ { /* { p.critical > 0 && (
308313 <Badge variant="danger" className="text-xs">
309314 {p.critical} critical
310315 </Badge>
311- ) }
316+ )} */ }
312317 </ div >
313318 </ div >
314319 ) ;
You can’t perform that action at this time.
0 commit comments