From a6a9969cbaf78b38b19139768c17c2706c7a4bd2 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Mon, 5 Jun 2023 16:49:34 -0500 Subject: [PATCH 1/2] Post filter & fields as formParam instead of queryParam, to avoid 431 err --- src/qqq/pages/records/query/RecordQuery.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/qqq/pages/records/query/RecordQuery.tsx b/src/qqq/pages/records/query/RecordQuery.tsx index 86d2f7f..3269b4a 100644 --- a/src/qqq/pages/records/query/RecordQuery.tsx +++ b/src/qqq/pages/records/query/RecordQuery.tsx @@ -970,7 +970,9 @@ function RecordQuery({table, launchProcess}: Props): JSX.Element const d = new Date(); const dateString = `${d.getFullYear()}-${zp(d.getMonth() + 1)}-${zp(d.getDate())} ${zp(d.getHours())}${zp(d.getMinutes())}`; const filename = `${tableMetaData.label} Export ${dateString}.${format}`; - const url = `/data/${tableMetaData.name}/export/${filename}?filter=${encodeURIComponent(JSON.stringify(buildQFilter(tableMetaData, filterModel)))}&fields=${visibleFields.join(",")}`; + const url = `/data/${tableMetaData.name}/export/${filename}`; + + const encodedFilterJSON = encodeURIComponent(JSON.stringify(buildQFilter(tableMetaData, filterModel))); ////////////////////////////////////////////////////////////////////////////////////// // open a window (tab) with a little page that says the file is being generated. // @@ -987,6 +989,11 @@ function RecordQuery({table, launchProcess}: Props): JSX.Element @@ -995,6 +1002,8 @@ function RecordQuery({table, launchProcess}: Props): JSX.Element Generating file ${filename}${totalRecords ? " with " + totalRecords.toLocaleString() + " record" + (totalRecords == 1 ? "" : "s") : ""}...
+ +
`); From b7addd315bf4658491c69cb5073a6ca7f9a3c164 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Mon, 5 Jun 2023 16:49:51 -0500 Subject: [PATCH 2/2] Don't push onto history when launching process --- src/qqq/pages/records/view/RecordView.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/qqq/pages/records/view/RecordView.tsx b/src/qqq/pages/records/view/RecordView.tsx index 546648b..3b7b490 100644 --- a/src/qqq/pages/records/view/RecordView.tsx +++ b/src/qqq/pages/records/view/RecordView.tsx @@ -318,13 +318,16 @@ function RecordView({table, launchProcess}: Props): JSX.Element setPageHeader(record.recordLabel); - try + if(!launchingProcess) { - HistoryUtils.push({label: `${tableMetaData?.label}: ${record.recordLabel}`, path: location.pathname, iconName: table.iconName}); - } - catch(e) - { - console.error("Error pushing history: " + e); + try + { + HistoryUtils.push({label: `${tableMetaData?.label}: ${record.recordLabel}`, path: location.pathname, iconName: table.iconName}); + } + catch(e) + { + console.error("Error pushing history: " + e); + } } /////////////////////////////////////////////////