bcgov / nr-silva Goto Github PK
View Code? Open in Web Editor NEWNR SILVA Web Application - With React TS
License: Apache License 2.0
NR SILVA Web Application - With React TS
License: Apache License 2.0
View the following link to download the report.
RunnerID:6237914745
Setup Dependabot CodeCL for scanning and alerts.
Tracking issue for:
After deployment to openshit and unsuccessful login the app kicks up access denied and redirects to localhost. This is a known issue that @RMCampos and @jazzgrewal are on top of. :)
Access denied
https://logontest7.gov.bc.ca/clp-cgi/accessDenied.cgi
Then directed to localhost (which doesn't work)
http://localhost:3000/dashboard?code=5e653e6d-4c4a-4dc8-bd0f-0fdab806944c&state=uZmAXhQFcoBusPOFET6s2Jd4uaaSxLWF
Fail? (job not done)
https://github.com/bcgov/nr-silva/actions/runs/7464778356
Tracking issue for:
frontend: npm run build
> tsc && vite build
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
FAM can only support a set of 50 PR numbers, so rotate through a set on PRs.
No coverage yet. Please generate and provide to sonarcloud in the testing action.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are pending. To force PRs open, click the checkbox below.
bcgov-nr/action-builder-ghcr
, caddy
, com.nimbusds:nimbus-jose-jwt
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
docker-compose.yml
node 20-bullseye
maven 3.9.4-amazoncorretto-21
backend/Dockerfile
quay.io/quarkus/quarkus-micro-image 2.0
frontend/Dockerfile
node 20-slim
caddy 2.7.4-alpine
.github/workflows/analysis.yml
bcgov-nr/action-test-and-analyse v1.1.0
bcgov-nr/action-test-and-analyse-java v1.0.0
actions/checkout v4
github/codeql-action v2
github/codeql-action v2
actions/setup-java v3
actions/cache v3
github/codeql-action v2
actions/checkout v4
aquasecurity/trivy-action 0.12.0
github/codeql-action v2
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
.github/workflows/merge.yml
actions/checkout v4
github/codeql-action v2
github/codeql-action v2
github/codeql-action v2
bcgov-nr/action-deployer-openshift v1.4.0
bcgov-nr/action-deployer-openshift v1.4.0
shrink/actions-docker-registry-tag v3
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
.github/workflows/pentests.yml
zaproxy/action-full-scan v0.7.0
.github/workflows/pr-close.yml
shrink/actions-docker-registry-tag v3
ubuntu 22.04
ubuntu 22.04
.github/workflows/pr-open.yml
bcgov-nr/action-pr-description-add v1.1.0
actions/checkout v4
bcgov-nr/action-builder-ghcr v1.2.1
bcgov-nr/action-deployer-openshift v1.4.0
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
backend/pom.xml
org.springframework.boot:spring-boot-starter-parent 3.1.4
org.projectlombok:lombok 1.18.30
org.springdoc:springdoc-openapi-starter-webmvc-ui 2.2.0
org.apache.maven.plugins:maven-failsafe-plugin 3.1.2
org.apache.maven.plugins:maven-surefire-plugin 3.1.2
org.jacoco:jacoco-maven-plugin 0.8.10
org.apache.maven.plugins:maven-enforcer-plugin 3.4.1
org.apache.maven.plugins:maven-checkstyle-plugin 3.3.0
com.puppycrawl.tools:checkstyle 10.12.4
com.nimbusds:nimbus-jose-jwt 9.35
backend/.mvn/wrapper/maven-wrapper.properties
maven 3.9.5
maven-wrapper 3.2.0
frontend/package.json
@aws-amplify/ui-react ^5.0.0
@bcgov-nr/nr-fsa-theme ^1.0.10
@carbon/react ^1.27.0
@testing-library/jest-dom ^6.1.2
@testing-library/react ^14.0.0
@testing-library/user-event ^14.0.0
@types/jest ^29.5.4
@types/node ^20.0.0
@types/react ^18.2.0
@types/react-dom ^18.2.1
@vitejs/plugin-react-swc ^3.3.2
aws-amplify ^5.3.10
lottie-react ^2.4.0
react ^18.2.0
react-dom ^18.2.0
react-redux ^8.1.0
react-router-dom ^6.10.0
redux ^4.2.1
redux-devtools-extension ^2.13.9
redux-thunk ^2.4.2
vite ^4.4.10
vite-plugin-svgr ^4.0.0
vite-tsconfig-paths ^4.2.0
web-vitals ^3.0.0
@typescript-eslint/eslint-plugin ^6.5.0
@typescript-eslint/parser ^6.5.0
@vitejs/plugin-react ^4.0.4
@vitest/coverage-v8 ^0.34.3
eslint ^8.48.0
eslint-config-standard-with-typescript ^39.0.0
eslint-plugin-import ^2.28.1
eslint-plugin-n ^16.0.2
eslint-plugin-promise ^6.1.1
eslint-plugin-react ^7.33.2
jsdom ^22.1.0
sass ^1.62.1
sass-loader ^13.2.2
typescript ^5.2.2
vitest ^0.34.6
Tracking issue for:
Docker build is using node 20, while this app was using types for node 16. Dep PR #36 bring types up to 18.
Node should be consistently lined up, including switching to a more obvious base, which node:alpine3.17
doesn't make versions clear.
Node 20 will become the new LTS in October 2023. This apps works fine, but one of the tests is failing with that upgrade. Just FYI, should be relatively painless.
Update RESULTS backend api to remove Postgres, Flyway and add Oracle access.
Architecture's recommendation is to use cloud native and Quarkus over springboot. There are a number of resource and security improvements, mostly stemming from the cloud native part. More examples are available.
https://github.com/bcgov/quickstart-openshift-backends/tree/main/backend-java
View the following link to download the report.
RunnerID:6411989963
These values are currently hard coded into docker-compose.yml, which is fine for us, but terrible for using this repo as a template. Please figure out how to consume them from environment variables. Try not to use env files unless absoltely necessary.
REACT_APP_USER_POOLS_ID
REACT_APP_USER_POOLS_WEB_CLIENT_ID
In an effort to work better with Oracle please investigate the nr-oracle-service. Best case scenario it can handle Oracle, lighting all resources in this project.
This repo is likely to use low-dev mode due to not having a full time developer. Plan and implement this.
Describe the task
Create initial backend service with Java 17 and Spring Boot.
Jira task: https://apps.nrs.gov.bc.ca/int/jira/browse/SILVA-180
Acceptance Criteria
Additional context
Bug Description
When running frontend locally with Docker (not Docker Compose) one can see error messages about Caddy preventing connection to FAM and AWS Cognito addresses, due to violation of Content Security Policy directives.
Expected Behaviour
No error messages and connections to both FAM and AWS Cognito working fine.
Actual Behaviour
Both FAM and AWS Cognito connection being blocked.
Steps To Reproduce
docker build -t frontend-silva ./frontend
docker run -it -p 3000:3000 --rm \
--name frontend-silva \
--env-file ./frontend/.env.local \
frontend-silva
Desktop:
Additional context
No additional notes;
PASS src/__test__/screens/Help.test.tsx
FAIL src/App.test.tsx
● Test suite failed to run
TypeError: Cannot set properties of null (setting 'fillStyle')
6 | import './Landing.scss';
7 | import '../../custom.scss';
> 8 | import { useLottie } from "lottie-react";
| ^
9 | import silvaLottie from "../../assets/lotties/silva-logo-lottie-1.json"
10 | import ThemeToggle from "../../components/ThemeToggle";
11 |
...
Test Suites: 1 failed, 1 passed, 2 total
Tests: 3 passed, 3 total
Snapshots: 0 total
Time: 2.992 s
Ran all test suites.
UPDATE: Failing tests commented out. Please reverse when addressed!
#25
> npm run lint
> [email protected] lint
> eslint src --ext .ts
/home/derek/Repos/nr-silva/frontend/src/actions/userAction.ts
1:54 warning 'USER_DETAILS_RESET' is defined but never used @typescript-eslint/no-unused-vars
/home/derek/Repos/nr-silva/frontend/src/services/AuthService.ts
45:11 warning 'userData' is assigned a value but never used @typescript-eslint/no-unused-vars
116:11 warning 'userData' is assigned a value but never used @typescript-eslint/no-unused-vars
✖ 3 problems (0 errors, 3 warnings)
Teams are encouraged to favour modern inclusive phrasing both in their communication as well as in any source checked into their repositories. You'll find a table at the end of this text with preferred phrasing to socialize with your team.
We're aligning our development community to favour inclusive phrasing for common technical expressions. There is a table below that outlines the phrases that are being retired along with the preferred alternatives.
During your team scrum, technical meetings, documentation, the code you write, etc. use the inclusive phrasing from the table below. That's it - it really is that easy.
For the curious mind, the Public Service Agency (PSA) has published a guide describing how Words Matter in our daily communication. Its an insightful read and a good reminder to be curious and open minded.
The word "master" is not inherently bad or non-inclusive. For example people get a masters degree; become a master of their craft; or master a skill. It's generally when the word "master" is used along side the word "slave" that it becomes non-inclusive.
Some teams choose to use the word main
for the default branch of a repo as opposed to the more commonly used master
branch. While it's not required or recommended, your team is empowered to do what works for them. If you do rename the master
branch consider using main
so that we have consistency among the repos within our organization.
Non-Inclusive | Inclusive | |
---|---|---|
Whitelist | => | Allowlist |
Blacklist | => | Denylist |
Master / Slave | => | Leader / Follower; Primary / Standby; etc |
Grandfathered | => | Legacy status |
Sanity check | => | Quick check; Confidence check; etc |
Dummy value | => | Placeholder value; Sample value; etc |
This list is not comprehensive. If you're aware of other outdated nomenclature please create an issue (PR preferred) with your suggestion.
Topics greatly improve the discoverability of repos; please add the short code from the table below to the topics of your repo so that ministries can use GitHub's search to find out what repos belong to them and other visitors can find useful content (and reuse it!).
In short order we'll add our 800th repo. This large number clearly demonstrates the success of using GitHub and our Open Source initiative. This huge success means it's critical that we work to make our content as discoverable as possible. Through discoverability, we promote code reuse across a large decentralized organization like the Government of British Columbia as well as allow ministries to find the repos they own.
Below is a table of abbreviation a.k.a short codes for each ministry; they're the ones used in all @gov.bc.ca
email addresses. Please add the short codes of the ministry or organization that "owns" this repo as a topic
.
That's it, you're done!!!
Once topics are added, you can use them in GitHub's search. For example, enter something like org:bcgov topic:citz
to find all the repos that belong to Citizens' Services. You can refine this search by adding key words specific to a subject you're interested in. To learn more about searching through repos check out GitHub's doc on searching.
If your org is not in the list below, or the table contains errors, please create an issue here.
While you're doing this, add additional topics
that would help someone searching for "something". These can be the language used javascript
or R
; something like opendata
or data
for data only repos; or any other key words that are useful.
Add a meaningful description to your repo. This is hugely valuable to people looking through our repositories.
If your application is live, add the production URL.
Short Code | Organization Name |
---|---|
AEST | Advanced Education, Skills & Training |
AGRI | Agriculture |
ALC | Agriculture Land Commission |
AG | Attorney General |
MCF | Children & Family Development |
CITZ | Citizens' Services |
DBC | Destination BC |
EMBC | Emergency Management BC |
EAO | Environmental Assessment Office |
EDUC | Education |
EMPR | Energy, Mines & Petroleum Resources |
ENV | Environment & Climate Change Strategy |
FIN | Finance |
FLNR | Forests, Lands, Natural Resource Operations & Rural Development |
HLTH | Health |
IRR | Indigenous Relations & Reconciliation |
JEDC | Jobs, Economic Development & Competitiveness |
LBR | Labour Policy & Legislation |
LDB | BC Liquor Distribution Branch |
MMHA | Mental Health & Addictions |
MAH | Municipal Affairs & Housing |
BCPC | Pension Corporation |
PSA | Public Service Agency |
PSSG | Public Safety and Solicitor General |
SDPR | Social Development & Poverty Reduction |
TCA | Tourism, Arts & Culture |
TRAN | Transportation & Infrastructure |
WLRS | Water, Land and Resource Stewardship |
NOTE See an error or omission? Please create an issue here to get it remedied.
Eventualy we could make this consumable by other quickstarts, like the upcoming AWS one.
CI setup. Will probably take a few PRs.
DEV project: d41ea0-dev
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Warning
These dependencies are deprecated:
Datasource | Name | Replacement PR? |
---|---|---|
npm | @types/react-leaflet |
These updates are awaiting their schedule. Click on a checkbox to get an update now.
These updates await pending status checks. To force their creation now, click the checkbox below.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
com.puppycrawl.tools:checkstyle
, org.apache.maven.plugins:maven-surefire-plugin
, org.apache.maven.plugins:maven-failsafe-plugin
, org.springframework.boot:spring-boot-starter-parent
)docker-compose.yml
node 20-bullseye
maven 3.9.9-eclipse-temurin-17
postgis/postgis 13-master
backend/Dockerfile
ghcr.io/graalvm/native-image 22.3.3
eclipse-temurin 17.0.12_7-jdk-jammy
database/Dockerfile
postgis/postgis 15-master
frontend/Dockerfile
node 20.17.0-bullseye-slim
caddy 2.8.4-alpine
.github/workflows/analysis.yml
bcgov-nr/action-test-and-analyse-java v1.0.2
bcgov-nr/action-test-and-analyse v1.2.1
bcgov-nr/action-test-and-analyse v1.2.1
actions/checkout v4
github/codeql-action v3
actions/setup-java v4
actions/cache v4
github/codeql-action v3
actions/checkout v4
aquasecurity/trivy-action 0.24.0
github/codeql-action v3
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
.github/workflows/merge.yml
bcgov-nr/action-deployer-openshift v3.0.0
bcgov-nr/action-deployer-openshift v3.0.0
bcgov-nr/action-deployer-openshift v3.0.0
shrink/actions-docker-registry-tag v4
bcgov-nr/action-deployer-openshift v3.0.0
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
.github/workflows/pentests.yml
zaproxy/action-full-scan v0.10.0
.github/workflows/pr-close.yml
shrink/actions-docker-registry-tag v4
ubuntu 22.04
ubuntu 22.04
.github/workflows/pr-open.yml
bcgov-nr/action-pr-description-add v1.1.2
bcgov-nr/action-deployer-openshift v3.0.0
actions/checkout v4
bcgov-nr/action-builder-ghcr v2.2.0
bcgov-nr/action-deployer-openshift v3.0.0
ubuntu 22.04
ubuntu 22.04
ubuntu 22.04
frontend/index.html
leaflet 1.9.4
backend/pom.xml
org.springframework.boot:spring-boot-starter-parent 3.3.2
org.projectlombok:lombok 1.18.34
org.ocpsoft.prettytime:prettytime 5.0.9.Final
org.springdoc:springdoc-openapi-starter-webmvc-ui 2.6.0
org.hibernate.orm.tooling:hibernate-enhance-maven-plugin 6.6.0.Final
org.apache.maven.plugins:maven-failsafe-plugin 3.4.0
org.apache.maven.plugins:maven-surefire-plugin 3.4.0
org.jacoco:jacoco-maven-plugin 0.8.12
org.apache.maven.plugins:maven-enforcer-plugin 3.5.0
org.apache.maven.plugins:maven-checkstyle-plugin 3.5.0
com.puppycrawl.tools:checkstyle 10.17.0
com.nimbusds:nimbus-jose-jwt 9.40
backend/.mvn/wrapper/maven-wrapper.properties
maven 3.9.9
frontend/package.json
@bcgov-nr/nr-theme ^1.7.0
@carbon/charts-react ^1.13.32
@carbon/pictograms-react ^11.49.0
@carbon/react ^1.27.0
@redux-devtools/extension ^3.3.0
@tanstack/react-query ^5.50.1
@types/node ^20.0.0
@vitejs/plugin-react ^4.0.4
@vitejs/plugin-react-swc ^3.3.2
amazon-cognito-identity-js ^6.3.13
aws-amplify ^6.5.0
axios ^1.6.8
leaflet ^1.9.4
lottie-react ^2.4.0
react ^18.2.0
react-dom ^18.2.0
react-esri-leaflet ^2.0.1
react-hash-string ^1.0.0
react-leaflet ^4.2.1
react-redux ^9.0.0
react-router-dom ^6.10.0
redux ^5.0.0
redux-thunk ^3.0.0
vite ^5.0.0
vite-plugin-svgr ^4.0.0
vite-tsconfig-paths ^5.0.0
web-vitals ^4.0.0
yaml ^2.3.2
@testing-library/dom ^10.2.0
@testing-library/jest-dom ^6.4.5
@testing-library/react ^16.0.0
@testing-library/user-event ^14.5.2
@types/jest ^29.5.12
@types/leaflet ^1.9.12
@types/react ^18.3.3
@types/react-dom ^18.3.0
@types/react-leaflet ^3.0.0
@vitest/coverage-v8 ^2.0.0
jsdom ^24.0.0
sass ^1.62.1
sass-loader ^16.0.0
typescript ^5.2.2
vitest ^2.0.0
Tracking issue for:
Get tests in place and passing for new backend.
nr-silva-31-frontend.apps.silver.devops.gov.bc.ca/:12 Refused to load the stylesheet 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.min.css' because it violates the following Content Security Policy directive: "style-src 'report-sample' 'self' https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
nr-silva-31-frontend.apps.silver.devops.gov.bc.ca/:1 Refused to load the stylesheet 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.min.css' because it violates the following Content Security Policy directive: "style-src 'report-sample' 'self' https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
ZAP issue generation is quite problematic, creating duplicates frequently. Noise (email, notifications) is also an issue. Attach artifacts silently instead.
Sonar Cloud is kicking up errors around the default branch. Investigate and fix.
New backend in place. Add penetration testing and reporting.
Monorepo with backend and frontend requested. We just responded with more/clarifying information.
Update aws-amplify. There are a number of package breaks and deprecations making this more difficult.
https://ui.docs.amplify.aws/react/getting-started/migration
https://docs.amplify.aws/react/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
Pipeline issue to test and prod. the fix/openingDesign commit change is not showing up on test or prod environment.
View the following link to download the report.
RunnerID:6237914745
Frontend and dark mode are not working? Investigate!
View the following link to download the report.
RunnerID:6237914745
Describe the task
Create CI/CD and required files for the back end workflows;
Acceptance Criteria
Additional context
Tracking issue for:
View the following link to download the report.
RunnerID:6237914745
View the following link to download the report.
RunnerID:6237914745
Describe the task
When building or running the webapp locally one can see warnings about packages that should be updated or replaced by new ones.
E.g.:
=> # npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
=> # npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
=> # npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
=> # npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
=> # npm WARN deprecated [email protected]: Package moved to @redux-devtools/extension.
=> # npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
=> # npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
Acceptance Criteria
Additional context
Set up to run in Docker Compose using a local server. Right now it's using a Docker file, which is switching to Caddy.
Move from webpack to Vite, which is our recommended path. (not 100% necessary)
View the following link to download the report.
RunnerID:7307897399
Today we have all environment variables exposed through Caddy web server on OpenShift. However two of them are secrets, we need to update our workflows to have a better use of secrets.
Jira task: https://apps.nrs.gov.bc.ca/int/jira/browse/SILVA-160
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.