From 880b8fa74b2f365df54d0234d553212581f88d56 Mon Sep 17 00:00:00 2001 From: Carina Ursu Date: Thu, 9 Mar 2023 08:47:56 -0800 Subject: [PATCH] fix: left nav doesn't accurately update on workflow version page Signed-off-by: Carina Ursu --- packages/console/package.json | 2 +- .../console/src/components/Tables/PaginatedDataList.tsx | 9 ++++----- packages/console/src/routes/routes.ts | 2 +- website/package.json | 2 +- yarn.lock | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/console/package.json b/packages/console/package.json index 6583c2605..8b14be0bd 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -1,6 +1,6 @@ { "name": "@flyteorg/console", - "version": "0.0.10", + "version": "0.0.13", "description": "Flyteconsole main app module", "main": "./dist/index.js", "module": "./lib/index.js", diff --git a/packages/console/src/components/Tables/PaginatedDataList.tsx b/packages/console/src/components/Tables/PaginatedDataList.tsx index 7a27cb2ef..50bd00368 100644 --- a/packages/console/src/components/Tables/PaginatedDataList.tsx +++ b/packages/console/src/components/Tables/PaginatedDataList.tsx @@ -115,7 +115,7 @@ const PaginatedDataListHeader = ( className={column.className} key={column.key} align="left" - padding="default" + padding="normal" sortDirection={orderBy === column.key ? order : false} > ({ totalRows, showRadioButton, fillEmptyRows = true, - noDataString, }: PropsWithChildren>) => { const classes = useStyles(); const [order, setOrder] = React.useState('asc'); const [orderBy, setOrderBy] = React.useState('calories'); - const [page, setPage] = React.useState(0); - const [rowsPerPage, setRowsPerPage] = React.useState(5); + const [page] = React.useState(0); + const [rowsPerPage] = React.useState(5); const handleRequestSort = ( event: React.MouseEvent, @@ -198,7 +197,7 @@ const PaginatedDataList = ({ showRadioButton={showRadioButton} /> - {data.map((row, index) => { + {data.map((row, _index) => { return rowRenderer(row); })} {fillEmptyRows && !showRadioButton && emptyRows > 0 && ( diff --git a/packages/console/src/routes/routes.ts b/packages/console/src/routes/routes.ts index fb6ca3e65..ae2e6575a 100644 --- a/packages/console/src/routes/routes.ts +++ b/packages/console/src/routes/routes.ts @@ -81,7 +81,7 @@ export class Routes { static WorkflowDetails = { makeUrl: (project: string, domain: string, workflowName: string) => makeProjectDomainBoundPath(project, domain, `/workflows/${workflowName}`), - path: `${projectDomainBasePath}/workflows/:workflowName`, + path: `${projectDomainBasePath}/(workflows|workflow)/:workflowName`, }; // LaunchPlans diff --git a/website/package.json b/website/package.json index 4d2a22b6f..e90aba2b1 100644 --- a/website/package.json +++ b/website/package.json @@ -37,7 +37,7 @@ }, "dependencies": { "@flyteorg/common": "^0.0.3", - "@flyteorg/console": "^0.0.10", + "@flyteorg/console": "^0.0.13", "long": "^4.0.0", "protobufjs": "~6.11.3", "react-ga4": "^1.4.1", diff --git a/yarn.lock b/yarn.lock index 2362b626f..ef1454b8c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1995,7 +1995,7 @@ __metadata: resolution: "@flyteconsole/client-app@workspace:website" dependencies: "@flyteorg/common": ^0.0.3 - "@flyteorg/console": ^0.0.10 + "@flyteorg/console": ^0.0.13 "@types/long": ^3.0.32 long: ^4.0.0 protobufjs: ~6.11.3 @@ -2034,7 +2034,7 @@ __metadata: languageName: unknown linkType: soft -"@flyteorg/console@^0.0.10, @flyteorg/console@workspace:packages/console": +"@flyteorg/console@^0.0.13, @flyteorg/console@workspace:packages/console": version: 0.0.0-use.local resolution: "@flyteorg/console@workspace:packages/console" dependencies: