From edf28555d888b18083fd0695b1082f9379f8fc84 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Tue, 15 Aug 2023 16:37:22 -0400 Subject: [PATCH 1/2] :seedling: Fix proxies for express server / prod build (#1288) The order request handlers are added to the express server matters much more than anticipated. This rearrangement allows POST requests etc through the proxy to work again. Signed-off-by: Scott J Dickerson --- server/src/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/index.js b/server/src/index.js index 7dda15757a..9091245408 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -17,17 +17,17 @@ const port = 8080; const app = express(); app.use(cookieParser()); -app.use(express.json()); -app.engine("ejs", ejs.renderFile); -app.set("views", pathToClientDist); - -app.use(express.static(pathToClientDist)); // Setup proxy handling for (const proxyPath in proxyMap) { app.use(proxyPath, createProxyMiddleware(proxyMap[proxyPath])); } +app.engine("ejs", ejs.renderFile); +app.use(express.json()); +app.set("views", pathToClientDist); +app.use(express.static(pathToClientDist)); + // Handle any request that hasn't already been handled by express.static or proxy app.get("*", (_, res) => { if (process.env.NODE_ENV === "development") { From 4e1ae617e9972dce64c246a34d870b2406d1e556 Mon Sep 17 00:00:00 2001 From: Dallas Date: Wed, 16 Aug 2023 12:48:15 -0500 Subject: [PATCH 2/2] :seedling: chore(tag-table): update from pf deprecated (#1289) closes #1284 Signed-off-by: gitdallas Co-authored-by: Ian Bolton --- .../controls/tags/components/tag-table.tsx | 69 +++++++++---------- 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/client/src/app/pages/controls/tags/components/tag-table.tsx b/client/src/app/pages/controls/tags/components/tag-table.tsx index 413111dc0a..ee9fcfc413 100644 --- a/client/src/app/pages/controls/tags/components/tag-table.tsx +++ b/client/src/app/pages/controls/tags/components/tag-table.tsx @@ -1,18 +1,19 @@ import React from "react"; import { useTranslation } from "react-i18next"; import { + Table, + Thead, + Tr, + Th, + Tbody, + Td, + ActionsColumn, + IAction, cellWidth, - IActions, ICell, IRow, IRowData, } from "@patternfly/react-table"; -import { - Table, - TableBody, - TableHeader, -} from "@patternfly/react-table/deprecated"; - import { Tag, TagCategory } from "@app/api/models"; import "./tag-table.css"; @@ -61,8 +62,6 @@ export const TagTable: React.FC = ({ }); }); - // Rows - const editRow = (row: Tag) => { onEdit(row); }; @@ -71,42 +70,40 @@ export const TagTable: React.FC = ({ onDelete(row); }; - const actions: IActions = [ + const defaultActions = (tag: IRowData): IAction[] => [ { title: t("actions.edit"), - onClick: ( - event: React.MouseEvent, - rowIndex: number, - rowData: IRowData - ) => { - const row: Tag = getRow(rowData); - editRow(row); - }, + onClick: () => editRow(getRow(tag)), }, { title: t("actions.delete"), - onClick: ( - event: React.MouseEvent, - rowIndex: number, - rowData: IRowData - ) => { - const row: Tag = getRow(rowData); - deleteRow(row); - }, + onClick: () => deleteRow(getRow(tag)), }, ]; return ( - - - +
+ + + + + + + + {rows.map((row: IRow) => { + const rowActions = defaultActions(row); + return ( + + {row.cells?.map((cell: any) => ( + + ))} + + + ); + })} +
{t("terms.tagName")}
{cell.title} + {rowActions && } +
); };