@@ -30,12 +30,12 @@ import { subDays, isToday } from "date-fns"
30
30
import "react-date-range/dist/styles.css"
31
31
import "react-date-range/dist/theme/default.css"
32
32
import { DateRange , DateRangeValue } from "./DateRange"
33
- import OpenInNewOutlined from "@mui/icons-material/OpenInNewOutlined"
34
33
import Link from "@mui/material/Link"
35
34
import CheckCircleOutlined from "@mui/icons-material/CheckCircleOutlined"
36
35
import CancelOutlined from "@mui/icons-material/CancelOutlined"
37
36
import { getDateRangeFilter } from "./utils"
38
37
import Tooltip from "@mui/material/Tooltip"
38
+ import LinkOutlined from "@mui/icons-material/LinkOutlined"
39
39
40
40
export default function TemplateInsightsPage ( ) {
41
41
const now = new Date ( )
@@ -393,10 +393,6 @@ const ParameterUsageLabel = ({
393
393
usage : TemplateParameterValue
394
394
parameter : TemplateParameterUsage
395
395
} ) => {
396
- if ( usage . value . trim ( ) === "" ) {
397
- return < Box component = "span" > Not set</ Box >
398
- }
399
-
400
396
if ( parameter . options ) {
401
397
const option = parameter . options . find ( ( o ) => o . value === usage . value ) !
402
398
const icon = option . icon
@@ -441,8 +437,14 @@ const ParameterUsageLabel = ({
441
437
color : ( theme ) => theme . palette . text . primary ,
442
438
} }
443
439
>
444
- < OpenInNewOutlined sx = { { width : 14 , height : 14 } } />
445
- { usage . value }
440
+ < TextValue > { usage . value } </ TextValue >
441
+ < LinkOutlined
442
+ sx = { {
443
+ width : 14 ,
444
+ height : 14 ,
445
+ color : ( theme ) => theme . palette . primary . light ,
446
+ } }
447
+ />
446
448
</ Link >
447
449
)
448
450
}
@@ -506,7 +508,7 @@ const ParameterUsageLabel = ({
506
508
)
507
509
}
508
510
509
- return < Box > { usage . value } </ Box >
511
+ return < TextValue > { usage . value } </ TextValue >
510
512
}
511
513
512
514
const Panel = styled ( Box ) ( ( { theme } ) => ( {
@@ -553,6 +555,34 @@ const NoDataAvailable = (props: BoxProps) => {
553
555
)
554
556
}
555
557
558
+ const TextValue = ( { children } : { children : ReactNode } ) => {
559
+ return (
560
+ < Box component = "span" >
561
+ < Box
562
+ component = "span"
563
+ sx = { {
564
+ color : ( theme ) => theme . palette . text . secondary ,
565
+ weight : 600 ,
566
+ mr : 0.25 ,
567
+ } }
568
+ >
569
+ "
570
+ </ Box >
571
+ { children }
572
+ < Box
573
+ component = "span"
574
+ sx = { {
575
+ color : ( theme ) => theme . palette . text . secondary ,
576
+ weight : 600 ,
577
+ ml : 0.25 ,
578
+ } }
579
+ >
580
+ "
581
+ </ Box >
582
+ </ Box >
583
+ )
584
+ }
585
+
556
586
function mapToDAUsResponse (
557
587
data : TemplateInsightsResponse [ "interval_reports" ] ,
558
588
) : DAUsResponse {
0 commit comments