From 201eec0d76876077372023ee7f1305fdc58fc656 Mon Sep 17 00:00:00 2001 From: Jeremy Foster Date: Thu, 26 Sep 2024 08:28:49 -0700 Subject: [PATCH] Fix add to report --- app/subscriber/src/components/tool-bar/AddToReportMenu.tsx | 3 ++- openshift/kustomize/tekton/base/tasks/git-conditions.yaml | 2 +- tools/scripts/gen-env-files.sh | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/subscriber/src/components/tool-bar/AddToReportMenu.tsx b/app/subscriber/src/components/tool-bar/AddToReportMenu.tsx index aadaa4da98..8ce27ed848 100644 --- a/app/subscriber/src/components/tool-bar/AddToReportMenu.tsx +++ b/app/subscriber/src/components/tool-bar/AddToReportMenu.tsx @@ -55,13 +55,14 @@ export const AddToReportMenu: React.FC = ({ content, onCl if (!report.instances.length) { // Fetch the report because the one in memory has no instances. - currentReport = await getReport(report.id); + currentReport = await getReport(report.id, true); // The report does not have an instance, we must create one to add content. // This should only occur the first time after a new report is created. if (!currentReport?.instances.length) { currentReport = await generateReport(report.id, true); } + instance = currentReport.instances.length ? currentReport.instances[0] : undefined; } if ( diff --git a/openshift/kustomize/tekton/base/tasks/git-conditions.yaml b/openshift/kustomize/tekton/base/tasks/git-conditions.yaml index 90b46796eb..4cec4475cd 100644 --- a/openshift/kustomize/tekton/base/tasks/git-conditions.yaml +++ b/openshift/kustomize/tekton/base/tasks/git-conditions.yaml @@ -72,7 +72,7 @@ spec: buildVar="${1/\-/\_}" # convert to uppercase buildVar="${buildVar^^}" - BUILD_${buildVar}=true + BUILD=BUILD_${buildVar}=true if grep -s services/net/$folderName <<< $DIFF; then echo $BUILD >> build.env elif grep -s libs/net/services <<< $DIFF; then diff --git a/tools/scripts/gen-env-files.sh b/tools/scripts/gen-env-files.sh index 9a543fd55c..9c09993588 100755 --- a/tools/scripts/gen-env-files.sh +++ b/tools/scripts/gen-env-files.sh @@ -410,6 +410,7 @@ Auth__Keycloak__Secret={YOU WILL NEED TO GET THIS FROM KEYCLOAK} Auth__OIDC__Token=/realms/mmi/protocol/openid-connect/token Service__ApiUrl=http://host.docker.internal:$portApi/api +Service__DataLocation=Openshift CHES__AuthUrl=https://dev.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token CHES__HostUri=https://ches-dev.api.gov.bc.ca/api/v1 @@ -910,4 +911,4 @@ S3_ACCESS_KEY={Your S3_ACCESS_KEY} S3_SECRET_KEY={Your S3_SECRET_KEY} S3_BUCKET={Your Bucket Name}" >> ./tools/objects-backup/.env echo "./tools/objects-backup/.env created" -fi \ No newline at end of file +fi