Skip to content

feat(site): display version message #8435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 13, 2023
Prev Previous commit
Next Next commit
Fix link
  • Loading branch information
BrunoQuaresma committed Jul 12, 2023
commit 3936a13f33d71a7f0acd64062d4915672e1adedc
4 changes: 3 additions & 1 deletion site/src/components/Tooltips/WorkspaceOutdatedTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ export const Language = {
interface TooltipProps {
onUpdateVersion: () => void
templateId: string
templateName: string
ariaLabel?: string
}

export const WorkspaceOutdatedTooltip: FC<TooltipProps> = ({
onUpdateVersion,
ariaLabel,
templateId,
templateName,
}) => {
const styles = useStyles()
const { data: activeVersion } = useQuery({
Expand Down Expand Up @@ -75,7 +77,7 @@ export const WorkspaceOutdatedTooltip: FC<TooltipProps> = ({
<Box>
{activeVersion ? (
<Link
href={`/templates/docker/versions/${activeVersion.name}`}
href={`/templates/${templateName}/versions/${activeVersion.name}`}
target="_blank"
sx={{ color: (theme) => theme.palette.primary.light }}
>
Expand Down
1 change: 1 addition & 0 deletions site/src/components/WorkspaceStats/WorkspaceStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const WorkspaceStats: FC<WorkspaceStatsProps> = ({

{workspace.outdated && (
<WorkspaceOutdatedTooltip
templateName={workspace.template_name}
templateId={workspace.template_id}
onUpdateVersion={handleUpdate}
ariaLabel="update version"
Expand Down
1 change: 1 addition & 0 deletions site/src/components/WorkspacesTable/WorkspacesRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const WorkspacesRow: FC<{
{workspace.name}
{workspace.outdated && (
<WorkspaceOutdatedTooltip
templateName={workspace.template_name}
templateId={workspace.template_id}
onUpdateVersion={() => {
onUpdateWorkspace(workspace)
Expand Down