Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking pull request to merge release-0.2.0 to main #73

Merged
merged 152 commits into from
Jun 6, 2024

Conversation

kuanfandevops
Copy link
Collaborator

No description provided.

kuanfandevops and others added 13 commits December 20, 2021 09:55
* pipeline

* pipeline

* Initial commit

* update pipeline

* add s2i for frontend

* add backend s2i

* update s2i

* update backend build

* add minio

* Changed migration and data to reflect zeva

* update minio

* update minio

* update minio dc

* update templates

* update dev

* Committing some missing files

* Re-enabled metabase in docker-compose. Fixed the name for ICBC Table

* Added more use of environment variables (#10)

* Removed hardcoded variables for keycloak

* Removed database url

* Test Login (#12)

* Removed hardcoded variables for keycloak

* Removed database url

* Temporary test for logging in

* Add gunicorn and update backend template (#11)

* Temp change to cthub-9 (#14)

* Reorganizing so it loads our application (#16)

* CTHUB-17: Set-up Login Page (#15)

* CTHUB-17: Set-up Login Page

* change hint to 'idir'

* remove extra styles

Co-authored-by: Richard <[email protected]>

* ctub 37 - set up jest (#13)

* -adds jest to package json under dev dependencies and scripts

* -removes coverage files

* -adds coverage to git ignore

* Major Refactor for keycloak (#17)

* update backend dc (#18)

* Development Settings for Webpack (#19)

* remove .s2i/bin (#21)

* Fixed hot keyword in webpack (#22)

* update ALLOWED_HOSTS (#23)

* Changed how we refresh tokens (#25)

* add gunicorn (#24)

* update websocket port

* update websocket port

* Update all package with the latest versions and updated some deprecated functions. (#20)

* Update all package with the latest versions and updated some depricated functions.

* Added node version to fix docker issue

* Auto-logout when refreshing the token doesn't work (#26)

* Removed hardcoded variables for keycloak

* Removed database url

* Temporary test for logging in

* Changed to cthub-9

* Reorganizing the code

* Removed ReactKeycloakProvider

* keycloak.json checks on host now

* Added a check to toggle development settings for webpack

* Moved hot into devServer

* Removed home.js

* Some cleanup

* Changed how refreshing the token works

* Minor comments

* Fixed the automatic logout on failing to refresh the token

* Fixed merge conflicts

* Fixed merge conflicts

* use artifactory (#27)

* roll back (#29)

* Metabase build (#28)

* update frontend build (#30)

* Allow environment variable for keycloak.json (#32)

* CHUB-56 - model for ldv rebates (#31)

* adds model for ldv rebates

* -removes db comments

* -adds migration for ldv rebates

* -adds company (dealer) city  to ldv rebates table

* Cthub 59/60: Vin decoder function and saving decoded data to the DB table. (#33)

* VIN Decoder Function

* Created command file to run decoder function

* CTHUB-60: VIN Decoder Function - Save Data

* Fix migration conflict

* Cthub 57 - ldv rebates service (#35)

* -adds service for parsing ldv rebates

* -creates service for parsing ldv rebates
-migration to update fields so they fit everything from ldv rebates
-adds pandas to requirements

* -removes conflicting migration

* -adds new migration for ldv rebates

* Cthub 57 - linting (#36)

* -adds service for parsing ldv rebates

* -creates service for parsing ldv rebates
-migration to update fields so they fit everything from ldv rebates
-adds pandas to requirements

* -removes conflicting migration

* -adds new migration for ldv rebates

* lints, updates  comments in import_ldv_rebates file

* Allowed multiple pages for parsing (#37)

* Redirect fix (#38)

* Fixed how redirect works

* Removed test code

* Removed unused code

* Made router file so its a bit more organized

* Added tracking of VIN for vin decoding information (#39)

* Model and Import function for SUVI Data (#40)

* Model and Import function for SUVI Data

* Check if fleet or indivisual columns contain string then put fleet or individual into applicant type column, else leave it blank

* Metabase 0.1.0 (#34)

* Patroni 0.1.0 (#42)

* update (#43)

* update (#44)

* Fix tags 0.1.0 (#45)

* update config

* create metabase service for backupcontainer

* update metabase service name

* CTHUB-81: Create models and migration - LCFS Credit Transfers (RLCF-017) (#41)

* CTHUB-81: Create models and migration - LCFS Credit Transfers (RLCF-017)

* Removed managers and other properties that are not needed for importing

* Removed unnecessary declaration AUTH_USER_MODEL in settings

Co-authored-by: Richard Tan <[email protected]>

* cleanup (#46)

* update clean up script

* Cthub 92 - frontend for upload (#47)

* -adds upload container

* -adds file drop area files,
-adds routes for upload,
-adds dropzone to package.json
-adds css files
-adds file size utility

* -lints
-aligns everything properly including button and table
-adds proptypes
-fixes capitization
-removes extra imports
-removes unused props

* -removes unused link syle

* -removes unused svg style

* CTHUB-107: Added Upload to Minio viewset (#48)

* Added minio to docker

* File cleanup. Installed minio for python

* Added upload functionality

* cthub 107 - backend upload (#49)

* -adds material ui icons, updates to use icons, adds css

* -adds backend viewset for uploading spreadsheet (grabs minio url and parses and inserts to database)
-some linting

* -passes dataset selected from frontend

* Code cleanup (#50)

* Added minio to docker

* File cleanup. Installed minio for python

* Added upload functionality

* Code cleanup

* Fixed merge conflicts

* Further cleanup

* Tekton 0.1.0 (#51)

* CTHUB - Add dataset Table, Dropdown (#52)

* -adds material ui icons, updates to use icons, adds css

* -adds backend viewset for uploading spreadsheet (grabs minio url and parses and inserts to database)
-some linting

* -passes dataset selected from frontend

* -adds model for datasets table to contain names of datasets that users will be able to import data into
-adds fixtures for datasets table
-adds serializer and viewset to retrieve a list of datasets
-displays list of datasets in frontend on a dropdown

* -fixes tabbing for "if done"

* -adds suvi dataset

* Setup prod (#54)

* Cthub 113 - import suvi data (#53)

* -imports function to parse suvi data

* -adds alias for import ldv
-initializes done variable

* update hostname

* Metabase resource 0.1.0 (#55)

* update metabase

* Update doc (#56)

* add condition to build

* Cthub 114 - replace or add to data (#58)

* -adds ability to replace existing ldv file

* -adds modal if records are being replaced

* -makes replacedata proptypes string or bool because radio button is inconsistant

* -renames alert file so it is less vague
-adds title to alertdialog props

* Charger Model and Migration (#59)

* Charger model

* The include

* Migration running

Documented process as the README was looking sad and lonely.😢

* Fixed duplicate column

* Set condition from artifactory (#57)

* Cthub 96/78 - import public charging data (#61)

* -adds model for public charging

* -adds migration for public charging

* -adds public charging service
-adds public charging fixture
-adds public charging to upload viewset so service gets used if it is selected

* -changes id for new fixture

* Tekton4 0.1.0 (#63)

* update assemble

* CTHUB-31: Trial VIN Decoder from DataOne (#62)

* Different vendor for the decode api

* Created a copy of the old vin decoder

* Added superset as part of docker compose (#64)

* CTHUB-106 login redirect (#65)

* -adds dashboard container and router
-adds dashboard container to app.js that redirects to /upload
-updates icbc router so it renders when user goes to /icbc

* -removes extra empty line

* moves dashboard switch to last place

* -switches redirect to usehistory

* Charger model

* The include

* Fixed duplicate column

* No date fields

* Removing migration that I'm re-writting

* Fixed migration

* Fixed migration again

* Import is running I think

* Working for real now

* Documentation

* Alternative method of accessing the spreadsheet.

* Rolling back charger rebate migration

* Charger Rebate table, model & migration (#67)

* Charger model

* The include

* Fixed duplicate column

* No date fields

* Removing migration that I'm re-writting

* Fixed migration

* Fixed migration again

* Import is running I think

* Working for real now

* Documentation

* Alternative method of accessing the spreadsheet.

* Rolling back charger rebate migration

* use minio secret

* CTHUB-95 - add option for uploading ev charging rebates (#66)

* -adds charger rebates to dropdown
-needs function still in the viewset (currently using import_ldv

* -adds import charger rebates service to upload viewset

* Fixed columns

* Superset 0.1.0 (#68)

* Fixed garbled columns (#69)

* Charger model

* The include

* Fixed duplicate column

* No date fields

* Removing migration that I'm re-writting

* Fixed migration

* Fixed migration again

* Import is running I think

* Working for real now

* Documentation

* Alternative method of accessing the spreadsheet.

* Rolling back charger rebate migration

* Fixed columns

* -adds migration for charger rebates model changes (#70)

* Hydrogen model

* Hydrogen loader function

* Hydrogen loading script

* Cthub 65/123 - hydrogen fueling model (#71)

* -adds decoder to git ignore

* Removing ignored files

* -adds hydrogen fueling model

* -adds migration for hydrogen fueling

* -updates hydrogen fueling model to add boolean fields for bar 700 and 350

* -adds function to parse spreadsheet and insert to hydrogen fueling table
-adds ability to call hydrogen fuelign and public charging parsers from command line
-adds viewset for calling hydrogen fueling
-fixture for adding hydrogen fueling to dropdown

* Hydrogen migration and loading script

Co-authored-by: Kuan Fan <[email protected]>
Co-authored-by: Richard Tan <[email protected]>
Co-authored-by: Kuan Fan <[email protected]>
Co-authored-by: NavpreetGrewal <[email protected]>
Co-authored-by: Emily <[email protected]>
* Model for Data Fleets

* Remaining columns for loader script

* New fixtures

* Data Fleets table migration and import

* Arc Project Tracking model
* Model for Data Fleets

* Remaining columns for loader script

* New fixtures

* Data Fleets table migration and import

* Arc Project Tracking model

* ARC table migration/service/command

* Data is loading

* Lost this file for some reason

* Scrap it model

* Scrap it service

* Data import working

* The dropdown for all new data imports
* -adds model for whitelisted users

* -adds migration for whitelisted users

* filters for usernames matching current user and gives 403 if not found

* -adds some frontend stuff for upload alert (unfinished)

* -fixes issue where post error wasnt getting caught, is now getting caught and updating alert state so error message appears

* -removes uneccessary line break

* -adds alert if upload succeeds

* -creates whitelisted users decorator, calls it for both minio and upload functions
-updates frontend to match new response from whitelisted_users

* -removes uneeded imports

* -fixes migration conflict
popkinj pushed a commit to popkinj/cthub that referenced this pull request Apr 25, 2022
-updates household form import in index
-adds spouse initial email to signals, restructures email function to accept more arguments
kuanfandevops and others added 12 commits April 5, 2024 10:50
* add formatters

* format python code with black

* format js code with prettier
* Writing backend tests for the uploader service

* Another test

* Successful upload test
* chore: adds tests for user permissions

* removes extra space
* Updating SUVI model to new GER model. Updating logic for null values to avoid incorrect error messages

* Adding in new model file and migration

* Removing new dataset from incomplete dataset list
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.


except Exception as e:
return Response(
f"An error occurred: {str(e)}", status=status.HTTP_400_BAD_REQUEST

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
)
return response
except ValueError as e:
return HttpResponse(str(e), status=400)

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
try:
update_permissions(user_permissions)
except Exception as e:
return Response(str(e), status=status.HTTP_400_BAD_REQUEST)

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
tim738745 and others added 3 commits May 14, 2024 10:39
* feat: 284 and 285 - vin decoding

* update migration

* add db table comments
* fix: adds messages to icbc vins upload in import data function, adds basic error messaging to frontend in case errors don't have our standard format

* feat: adds check for csv on backend
fix: updates frontend to catch keycloak logout and display message to user when attempting upload
create_vins_file(filename)
return Response({"success": True, "message": "File successfully uploaded!"}, status=status.HTTP_200_OK)
except Exception as error:
return Response({"success": False, "message": str(error)})

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
@kuanfandevops kuanfandevops merged commit a5edcc8 into main Jun 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants