File tree Expand file tree Collapse file tree 3 files changed +29
-29
lines changed
Expand file tree Collapse file tree 3 files changed +29
-29
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export const JobsTable = () => {
9494 </ td >
9595 < td > { dayjs ( row . createdAt ) . format ( "M/D/YY HH:mm:ss" ) } </ td >
9696 < td className = "flex" >
97- {
97+ { row . links . rayHeadDashboardLink && (
9898 < IconButton
9999 variant = "plain"
100100 size = "sm"
@@ -112,7 +112,7 @@ export const JobsTable = () => {
112112 width = { 26 }
113113 />
114114 </ IconButton >
115- }
115+ ) }
116116 { row . links . rayGrafanaDashboardLink && (
117117 < IconButton
118118 variant = "plain"
@@ -130,31 +130,33 @@ export const JobsTable = () => {
130130 < Image priority src = { GrafanaIcon } alt = "Grafana Metrics" />
131131 </ IconButton >
132132 ) }
133- < IconButton
134- variant = "plain"
135- size = "sm"
136- sx = { {
137- minHeight : "1rem" ,
138- minWidth : "1rem" ,
139- px : 0.6 ,
140- } }
141- title = "Loki Logs"
142- href = { row . links . logsLink }
143- target = "_blank"
144- component = "a"
145- >
146- < Typography
133+ { row . links . logsLink && (
134+ < IconButton
135+ variant = "plain"
136+ size = "sm"
147137 sx = { {
148- fontFamily : "monospace" ,
149- letterSpacing : - 0.9 ,
150- fontSize : "small" ,
151- color : "#0b6bcb" ,
152- textDecoration : "underline" ,
138+ minHeight : "1rem" ,
139+ minWidth : "1rem" ,
140+ px : 0.6 ,
153141 } }
142+ title = "Loki Logs"
143+ href = { row . links . logsLink }
144+ target = "_blank"
145+ component = "a"
154146 >
155- Logs
156- </ Typography >
157- </ IconButton >
147+ < Typography
148+ sx = { {
149+ fontFamily : "monospace" ,
150+ letterSpacing : - 0.9 ,
151+ fontSize : "small" ,
152+ color : "#0b6bcb" ,
153+ textDecoration : "underline" ,
154+ } }
155+ >
156+ Logs
157+ </ Typography >
158+ </ IconButton >
159+ ) }
158160 </ td >
159161 < td className = "truncate" >
160162 < Tooltip variant = "outlined" title = { row . message } >
Original file line number Diff line number Diff line change @@ -50,10 +50,8 @@ const convertRayJobItemToJobRow = (item: RayJobItem): JobRow => {
5050 item . spec . rayClusterSpec . headGroupSpec ?. template ?. spec ?. containers ?. [ 0 ] . ports ?. find (
5151 ( port ) => port . name === "dashboard" ,
5252 ) ?. containerPort ;
53- if ( ! dashboardPort || ! config . coreApiUrl ) {
54- return {
55- rayHeadDashboardLink : "" ,
56- } ;
53+ if ( ! serviceName || ! dashboardPort || ! config . coreApiUrl ) {
54+ return { } ;
5755 }
5856 const rayHeadDashboardLink = `${ config . coreApiUrl } /namespaces/${ namespace } /services/${ serviceName } :${ dashboardPort } /proxy/#/jobs` ;
5957 const rayJobId = item . status ?. jobId ;
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export interface JobRow {
4444 createdAt : Date ;
4545 message : string ;
4646 links : {
47- rayHeadDashboardLink : string ;
47+ rayHeadDashboardLink ? : string ;
4848 rayGrafanaDashboardLink ?: string ;
4949 logsLink ?: string ;
5050 } ;
You can’t perform that action at this time.
0 commit comments