File tree Expand file tree Collapse file tree 2 files changed +30
-6
lines changed
src/features/dashboard/templates Expand file tree Collapse file tree 2 files changed +30
-6
lines changed Original file line number Diff line number Diff line change 77 useToast ,
88} from '@/lib/hooks/use-toast'
99import { cn } from '@/lib/utils'
10+ import { isVersionCompatible } from '@/lib/utils/version'
1011import {
1112 deleteTemplateAction ,
1213 updateTemplateAction ,
@@ -285,14 +286,37 @@ export function VisibilityCell({
285286 )
286287}
287288
289+ const INVALID_ENVD_VERSION = '0.0.1'
290+ const SDK_V2_MINIMAL_ENVD_VERSION = '0.2.0'
291+
288292export function EnvdVersionCell ( {
289293 getValue,
290294} : CellContext < Template | DefaultTemplate , unknown > ) {
291- const versionValue = getValue ( ) as string
295+ const valueString = getValue ( ) as string
296+ const versionValue =
297+ valueString && valueString !== INVALID_ENVD_VERSION ? valueString : null
292298
299+ const isNotV2Compatible =
300+ isVersionCompatible (
301+ versionValue ?? INVALID_ENVD_VERSION ,
302+ SDK_V2_MINIMAL_ENVD_VERSION
303+ ) === false
293304 return (
294- < span className = { cn ( 'text-fg-tertiary whitespace-nowrap font-mono' ) } >
295- { versionValue }
296- </ span >
305+ < div
306+ className = { cn (
307+ 'text-fg-tertiary whitespace-nowrap font-mono flex flex-row gap-1.5' ,
308+ {
309+ 'text-accent-error-highlight' : isNotV2Compatible ,
310+ }
311+ ) }
312+ >
313+ { versionValue ?? 'N/A' }
314+ { isNotV2Compatible && (
315+ < HelpTooltip >
316+ The envd version is not compatible with the SDK v2. To update the envd
317+ version, you need to rebuild the template.
318+ </ HelpTooltip >
319+ ) }
320+ </ div >
297321 )
298322}
Original file line number Diff line number Diff line change @@ -142,8 +142,8 @@ export const useColumns = (deps: unknown[]) => {
142142 {
143143 accessorKey : 'envdVersion' ,
144144 header : 'Envd Version' ,
145- size : 140 ,
146- minSize : 100 ,
145+ size : 125 ,
146+ minSize : 70 ,
147147 cell : EnvdVersionCell ,
148148 enableSorting : false ,
149149 } ,
You can’t perform that action at this time.
0 commit comments