From ffb161cb2266094f86ff416bc52ec57c56ef7a80 Mon Sep 17 00:00:00 2001 From: Carina Ursu Date: Thu, 9 Mar 2023 12:07:34 -0800 Subject: [PATCH] fix: left nav doesn't accurately update on workflow version page (#718) 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 25a04b341..f348cf25c 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -1,6 +1,6 @@ { "name": "@flyteorg/console", - "version": "0.0.12", + "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 fa9394231..7d910a460 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 abd65f515..e90aba2b1 100644 --- a/website/package.json +++ b/website/package.json @@ -37,7 +37,7 @@ }, "dependencies": { "@flyteorg/common": "^0.0.3", - "@flyteorg/console": "^0.0.12", + "@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 24053c01d..43c7cf0cd 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.12 + "@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.12, @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: