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

ForestGEO Pilot Application - First Iteration #163

Merged
merged 151 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
de768ca
creating intermediary modal to sit between login and actual access to…
siddheshraze Dec 15, 2023
0d03335
midpoint of rework of plot selection system. Because system needs to …
siddheshraze Dec 18, 2023
44e71b5
removing census and quadrat selection from menu. finished implementin…
siddheshraze Dec 19, 2023
a9f6f9d
separating user selection contexts into different component to allow …
siddheshraze Dec 21, 2023
b15818c
completing context reorganization. adding additional contexts for qua…
siddheshraze Dec 21, 2023
83f2464
completing context reorganization. adding additional contexts for qua…
siddheshraze Dec 21, 2023
66bfd00
completing context reorganization. adding additional contexts for qua…
siddheshraze Dec 21, 2023
9757c74
integrating quadrat and census list contexts into quadrat and census …
siddheshraze Dec 21, 2023
3900499
adding remaining CRUD commands to all other fixed data API routes
siddheshraze Dec 22, 2023
da78e50
personnel table grid implemented
siddheshraze Dec 23, 2023
5f8c38e
fixed data page population complete. Dynamic plotID population implem…
siddheshraze Jan 2, 2024
ce79400
adding plot-specific filtering on fixed data output
siddheshraze Jan 3, 2024
127dbaa
saving changes -->
siddheshraze Jan 3, 2024
4ba29cb
formatting changes and package updates. reworking file upload system …
siddheshraze Jan 3, 2024
cf91609
formatting changes
siddheshraze Jan 3, 2024
16f9a5e
saving changes. moving repos
siddheshraze Jan 4, 2024
377a16c
saving changes. moving repos
siddheshraze Jan 4, 2024
6714d57
not sure why but the rest of the subspecies contexts didn't get popul…
siddheshraze Jan 5, 2024
a241ca5
saving changes. currently attempting to resolve issues with 500 ISE e…
siddheshraze Jan 5, 2024
a87c594
optimization/formatting
siddheshraze Jan 5, 2024
0b17935
reformatting directory. created coremeasurements API endpoint and dat…
siddheshraze Jan 6, 2024
35225f7
amending sidebar to disable all nav buttons if plot is not selected
siddheshraze Jan 6, 2024
8d20985
addressing sonarlint issues
siddheshraze Jan 6, 2024
b55de9f
adding windows-compatible build & start command
siddheshraze Jan 6, 2024
4f990c3
making sure login system runs EntryModal regardless of whether or not…
siddheshraze Jan 6, 2024
2276368
removing tooltip from sidebar.tsx, adding sql commands that'll come i…
siddheshraze Jan 7, 2024
c6ef23c
full restructuring --> implementing multiple form types and readaptin…
siddheshraze Jan 9, 2024
34def27
continuing full restructure of system --> generated API update code a…
siddheshraze Jan 11, 2024
00335fe
created new Census object that will sit alongside the Plot object for…
siddheshraze Jan 11, 2024
bd9f47c
continuing to make wide-scale updates to the system. adding census se…
siddheshraze Jan 12, 2024
0ce0b58
minor adjustment to container client creation/selection system to add…
siddheshraze Jan 12, 2024
b0453ab
saving changes. updating route and validation table system to incorpo…
siddheshraze Jan 13, 2024
057f923
created an environmental variable to hold a given schema name, and mo…
siddheshraze Jan 13, 2024
f33c9fd
saving changes. may end up rewinding some of these once I get a chang…
siddheshraze Jan 13, 2024
2000098
incorporating changes. file upload system is still unverified. going …
siddheshraze Jan 14, 2024
07b4108
finished implementing the remaining special processing forms. still n…
siddheshraze Jan 15, 2024
affdae4
saving changes
siddheshraze Jan 15, 2024
a96a43f
AI-generated skeleton test files. incorporated into the file structur…
siddheshraze Jan 16, 2024
732df8c
1. reimplementing API routes to use JSON request.body instead of sear…
siddheshraze Jan 21, 2024
04abf02
wide-scale changes. full context loading has been disabled, and repla…
siddheshraze Jan 25, 2024
6fdcd94
removing duplicate console.log statements. adding additional clarific…
siddheshraze Jan 25, 2024
68655d8
attribute data grid testing complete. a similar system has been repli…
siddheshraze Jan 26, 2024
a2fc53a
saving progress. created generic styled data grid type and starting e…
siddheshraze Jan 26, 2024
6644c86
completed the common datagrid component, and confirmed functionality …
siddheshraze Jan 26, 2024
2016316
disabled census selection system. applied common datagrid usage acros…
siddheshraze Jan 26, 2024
402bf85
saving changes. Beginning rework of user file upload system to maximi…
siddheshraze Jan 28, 2024
c13417a
revamped upload system is complete, error handling and reworked API r…
siddheshraze Jan 31, 2024
d591358
updated mysql schemaa generation script
siddheshraze Feb 1, 2024
c8a77d4
adding indexing to ensure that queries move a little faster
siddheshraze Feb 1, 2024
4e543c1
created view for full database, but it is too large to process. Incre…
siddheshraze Feb 1, 2024
5b5c571
second update to schema
siddheshraze Feb 1, 2024
7278af2
full structure updates -- table has been modified and all respective …
siddheshraze Feb 5, 2024
e52d50a
removing properties page and respective references. Re-adding census …
siddheshraze Feb 5, 2024
a754030
large-scale changes. implemented simple census input form that uses a…
siddheshraze Feb 8, 2024
1c3e4d6
minor edits and adjustments to form input system
siddheshraze Feb 8, 2024
41c16b1
large-scale changes continued. Skeleton files implemented to enforce …
siddheshraze Feb 9, 2024
df6984e
adding strict typing. additional large-scale changes.
siddheshraze Feb 10, 2024
65457b8
continuing to implement and build out the upload system. Full-scope t…
siddheshraze Feb 10, 2024
af221a9
additional changes. need to continue building test cases for each upl…
siddheshraze Feb 12, 2024
8c301c4
testing commenced using small sample sets and rollback to ensure that…
siddheshraze Feb 15, 2024
7859077
saving changes. census upload is successful. currently attempting to …
siddheshraze Feb 16, 2024
124b7e8
temporary change. changing all non-react-version packages to use late…
siddheshraze Feb 18, 2024
d4fc455
validation system has received broad-scale updates. census CSV has be…
siddheshraze Feb 21, 2024
657fe12
corrections to processor functions, beginning dashboard instruction p…
siddheshraze Feb 22, 2024
583120e
added more clarification to dashboard page. uploadvalidation system r…
siddheshraze Feb 22, 2024
b9f2d37
saving changes. creating web app focused on this branch for testing
siddheshraze Feb 23, 2024
65744d9
Add or update the Azure App Service build and deployment workflow config
siddheshraze Feb 23, 2024
00de331
live site testing
siddheshraze Feb 23, 2024
b2b890f
trying to see if I can force system to look in frontend dir for packa…
siddheshraze Feb 23, 2024
90e129b
fixing build errors. live site deployment testing
siddheshraze Feb 23, 2024
19e15b0
adding missing .pem file
siddheshraze Feb 23, 2024
4c5b2bd
attempting to add .env file
siddheshraze Feb 23, 2024
11d9edf
adding environment reference -- secrets. not referencing correctly
siddheshraze Feb 23, 2024
2a2abba
just added development slot and updated publish profile reference. re…
siddheshraze Feb 23, 2024
acd27fd
attempting to update workflow by pushing zip file to azure instead of…
siddheshraze Feb 23, 2024
144e326
removing storybook usage and setup. trimming contents of package.json…
siddheshraze Feb 23, 2024
d509b91
not sure why, but compression -9 causes errors in Azure deployment. r…
siddheshraze Feb 23, 2024
4303ce2
removing caching command to simplify things
siddheshraze Feb 23, 2024
7670c8b
adding .next to gitignore. updating zipper system to unzip files befo…
siddheshraze Feb 23, 2024
2ecc515
trying to manually create env vars instead of just creating a .env do…
siddheshraze Feb 23, 2024
cab650e
specifying package in workflow -- realizing that the system is portin…
siddheshraze Feb 23, 2024
f0fabca
trying to deploy to prod slot instead of custom dev slot
siddheshraze Feb 23, 2024
5b731de
adding standalone export statement.
siddheshraze Feb 26, 2024
3312bde
correcting next start command to use node standalone server JS file -…
siddheshraze Feb 26, 2024
4596546
reverting package spec to azure deployment to . instead of frontend/
siddheshraze Feb 26, 2024
e2fed9a
found tutorial online. applying changes noted there
siddheshraze Feb 26, 2024
f66daf0
forgot to remove unnecessary upload stage from workflow
siddheshraze Feb 26, 2024
aec0886
changes to the workflow should trigger a new build
siddheshraze Feb 26, 2024
b5dfb29
Add or update the Azure App Service build and deployment workflow config
siddheshraze Feb 26, 2024
058233b
port specification
siddheshraze Feb 26, 2024
845cd02
fixing merge conflicts from workflow for new application (deleted old…
siddheshraze Feb 26, 2024
f950a42
not sure why generated env file is not being recognized
siddheshraze Feb 26, 2024
3d90fd1
welp forgot to set environment in workflow
siddheshraze Feb 26, 2024
803f16e
specifying frontend directory for packaging in workflow
siddheshraze Feb 26, 2024
7dfbb8b
reworking system start/app login flow. changes made ot the workflow.
siddheshraze Feb 26, 2024
7288db0
continuing full system updates. reworking validation system to operat…
siddheshraze Feb 27, 2024
98ccef4
trying to see if changing the port statement here will change there
siddheshraze Feb 27, 2024
75689ec
attempting to change port in build to get the azure container to conn…
siddheshraze Feb 27, 2024
f030736
attempting to change ecosystem.config.js file to see if that will all…
siddheshraze Feb 27, 2024
5c52ac3
removing next build cache statement
siddheshraze Feb 27, 2024
65fd181
testing restructuring as part of build process
siddheshraze Feb 27, 2024
7bf0a72
trying something new
siddheshraze Feb 27, 2024
9d15642
messed up build instructions
siddheshraze Feb 27, 2024
c7888e8
trying to move frontend into main dir failed. trying this again with …
siddheshraze Feb 27, 2024
8862856
live site is online, but nextauth callback url is still referencing l…
siddheshraze Feb 27, 2024
c1c6182
checking to see if resetting port to 3000 in ecosystem file will keep…
siddheshraze Feb 27, 2024
18fcd99
not sure why, but API calls to the fetchall endpoints are failing for…
siddheshraze Feb 27, 2024
b11660a
forgot to make sure that the .pem signin file is also added to the st…
siddheshraze Feb 27, 2024
1c81f3c
clerical error
siddheshraze Feb 27, 2024
00bb8fb
saving progress. Currently, the error validation display is incomplet…
siddheshraze Feb 28, 2024
a996a80
saving changes -- live site update
siddheshraze Mar 4, 2024
0aa8413
updated view implementation done. test error rows checkbox implemented.
siddheshraze Mar 5, 2024
beedd1f
build failure -- forgot to add missing parameter to deprecated page
siddheshraze Mar 6, 2024
a7027f8
live site's downloadallfiles route is failing? tracing error back see…
siddheshraze Mar 6, 2024
d49148f
receiving the following error: TypeError: Expected signal to be an in…
siddheshraze Mar 6, 2024
6a9f70b
after research, it seems that a now-default setting to next's serverM…
siddheshraze Mar 6, 2024
40d8df9
missing column headers and data from viewuploadedfiles table
siddheshraze Mar 6, 2024
f5bda59
saving progress. email-based authentication is still incomplete
siddheshraze Mar 6, 2024
be77180
full-scale changes. Added the following changes:
Mar 11, 2024
7fc64f5
full-scale changes and code reformatting.
Mar 12, 2024
6ee51e0
forgot to update UploadFireAzure component reference in uploadparent.tsx
siddheshraze Mar 12, 2024
b0b530c
removing throw new error statement here
siddheshraze Mar 12, 2024
0a0b8d0
saving changes -- datagridcommons testing is ongoing. Integration of …
siddheshraze Mar 20, 2024
c7a3637
QuadratPersonnel junction table has been successfully integrated into…
siddheshraze Mar 22, 2024
4e344a9
confirmation dialogs added to generic datagrid functions before savin…
siddheshraze Mar 22, 2024
2d220cb
Adding function to clarify dialog text when personnel are being added…
siddheshraze Mar 22, 2024
d15f5df
package versions updated. Had to do some reworking to make sure that …
siddheshraze Mar 25, 2024
57eb0de
promise.all seems to be breaking things. Removing and trying again.
siddheshraze Mar 25, 2024
c9bfc9a
removing hash access. seems to be breaking (throwing 500)
siddheshraze Mar 25, 2024
77d00ca
forgot to add azure catalog schema to github environmental variable. …
siddheshraze Mar 25, 2024
95cf274
hashing was breaking because catalog environmental schema reference w…
siddheshraze Mar 25, 2024
23cbe74
never mind hashing still doesn't work
siddheshraze Mar 25, 2024
8f90031
adding secret to new env being generated in live site
siddheshraze Mar 25, 2024
d9bec02
fixing breakage in live site
siddheshraze Mar 25, 2024
34f8776
the changes to the yml file were not actually included because I was …
siddheshraze Mar 25, 2024
0d8f85a
params null check added
siddheshraze Mar 25, 2024
4ae4494
I think I've worked the problem with the census datagrid
siddheshraze Mar 26, 2024
75b0eb3
continuing tinkering with the census grid columns -- changing system …
siddheshraze Mar 26, 2024
5477e04
reverting this change super fast -- restoring null formatting
siddheshraze Mar 26, 2024
23a23f6
removing excess columns n stuff from utilized grid columns, accidenta…
siddheshraze Mar 26, 2024
e529fa7
formatting. adding null startdate formatting b/c mpala census selecti…
siddheshraze Mar 26, 2024
5df0ee1
forgot extra condition in login system. adding some extra filtering t…
siddheshraze Mar 26, 2024
0f8b3aa
saving changes. Opening PR here shortly.
siddheshraze Mar 27, 2024
b80519d
changelog file added
siddheshraze Apr 1, 2024
59ace55
removing sample data, sql scripts, and scripts from project
siddheshraze Apr 3, 2024
ff3d34f
removing sampledata from git
siddheshraze Apr 3, 2024
de8ac6f
removing sqlscripting and scripts from git
siddheshraze Apr 3, 2024
abe15c5
removing certificate from git
siddheshraze Apr 3, 2024
3850b8b
updates needed to workflow -- since the certificate has been removed …
siddheshraze Apr 3, 2024
ea23e91
syntax error from workflow change, testing fix
siddheshraze Apr 3, 2024
d502e3d
Merge branch 'main' into new-file-upload-system
siddheshraze Apr 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 0 additions & 62 deletions .github/workflows/frontend.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Live Site Deployment (testing)

on:
push:
branches:
- new-file-upload-system
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: development

steps:
- uses: actions/checkout@v4

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: create env file (in frontend/ directory)
run: |
touch frontend/.env
echo AZURE_AD_CLIENT_SECRET=${{ secrets.AZURE_AD_CLIENT_SECRET }} >> frontend/.env
echo AZURE_AD_CLIENT_ID=${{ secrets.AZURE_AD_CLIENT_ID }} >> frontend/.env
echo AZURE_AD_TENANT_ID=${{ secrets.AZURE_AD_TENANT_ID }} >> frontend/.env
echo NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }} >> frontend/.env
echo NEXTAUTH_URL=${{ secrets.NEXTAUTH_URL }} >> frontend/.env
echo AZURE_SQL_USER=${{ secrets.AZURE_SQL_USER }} >> frontend/.env
echo AZURE_SQL_PASSWORD=${{ secrets.AZURE_SQL_PASSWORD }} >> frontend/.env
echo AZURE_SQL_SERVER=${{ secrets.AZURE_SQL_SERVER }} >> frontend/.env
echo AZURE_SQL_DATABASE=${{ secrets.AZURE_SQL_DATABASE }} >> frontend/.env
echo AZURE_SQL_PORT=${{ secrets.AZURE_SQL_PORT }} >> frontend/.env
echo AZURE_STORAGE_SAS_CONNECTION_STRING=${{ secrets.AZURE_STORAGE_SAS_CONNECTION_STRING }} >> frontend/.env
echo AZURE_SQL_SCHEMA=${{ secrets.AZURE_SQL_SCHEMA }} >> frontend/.env
echo AZURE_SQL_CATALOG_SCHEMA=${{ secrets.AZURE_SQL_CATALOG_SCHEMA }} >> frontend/.env
echo AZURE_STORAGE_CONNECTION_STRING=${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} >> frontend/.env
echo NODE_ENV=development >> frontend/.env
echo PORT=3000 >> frontend/.env

- name: Write Certificate to File
run: |
echo "${{ secrets.CERTIFICATE }}" > frontend/DigiCertGlobalRootCA.crt.pem

- name: Cache node modules
uses: actions/cache@v2
with:
path: frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: move into frontend --> npm install, build, and test
run: |
cd frontend/
npm install
npm run build
npm run test --if-present

- name: Move directories into build/standalone to reduce app load
run: |
mv ./frontend/build/static ./frontend/build/standalone/build
mv ./frontend/public ./frontend/build/standalone
mv ./frontend/*.pem ./frontend/build/standalone/

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'forestgeo-livesite'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_852346BD764D45D08854E6679137F844 }}
package: ./frontend/build/standalone
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ yarn-error.log*
next-env.d.ts
.idea/*
.vscode/*
/*.zip
.github/workflows/new-file-upload-system_forestgeo-livesite.yml
.fleet/*
45 changes: 45 additions & 0 deletions backend/cminsertdbhhom_getemptytables.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
-- SELECT
-- ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS CoreMeasurementID,
-- MetricType AS MeasurementTypeID,
-- MetricValue AS Measurement,
-- ctfsweb.dbh.ExactDate as MeasurementDate
-- FROM ctfsweb.dbh
-- CROSS APPLY (
-- VALUES
-- ('1', DBH),
-- ('2', HOM)
-- ) AS CrossAppliedTable(MetricType, MetricValue);

-- DECLARE @SchemaName NVARCHAR(255) = 'forestgeo';
--
-- DECLARE @TableName NVARCHAR(255);
-- DECLARE @RowCount INT;
-- DECLARE @Sql NVARCHAR(MAX);
--
-- DECLARE EmptyTablesCursor CURSOR FOR
-- SELECT t.name
-- FROM sys.tables t
-- INNER JOIN sys.schemas s ON t.schema_id = s.schema_id
-- WHERE s.name = @SchemaName;
--
-- OPEN EmptyTablesCursor;
--
-- FETCH NEXT FROM EmptyTablesCursor INTO @TableName;
--
-- WHILE @@FETCH_STATUS = 0
-- BEGIN
-- SET @Sql = N'SELECT @RowCount = COUNT(*) FROM ' + QUOTENAME(@SchemaName) + '.' + QUOTENAME(@TableName);
-- EXEC sp_executesql @Sql, N'@RowCount INT OUTPUT', @RowCount OUTPUT;
--
-- IF @RowCount = 0
-- BEGIN
-- PRINT 'Table ' + QUOTENAME(@SchemaName) + '.' + QUOTENAME(@TableName) + ' is empty.';
-- -- You can replace the PRINT statement with any action you want to perform for empty tables.
-- END
--
-- FETCH NEXT FROM EmptyTablesCursor INTO @TableName;
-- END
--
-- CLOSE EmptyTablesCursor;
-- DEALLOCATE EmptyTablesCursor;

11 changes: 11 additions & 0 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "next",
"settings": {
"next": {
"rootDir": "."
}
},
"rules": {
"react-hooks/exhaustive-deps": "off"
}
}
11 changes: 8 additions & 3 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

# production
/build
/sampledata
/sqlscripting
/scripts
DigiCertGlobalRootCA.crt.pem

# misc
.DS_Store
Expand All @@ -28,12 +32,13 @@ yarn-error.log*

# local env files
.env_jpac_deprecated.local
.env*
.env.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
.idea/*
.idea/*
/.swc/
/public/
37 changes: 37 additions & 0 deletions frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Changelog

## New Features

- **Generic MUI X DataGrid Component:** Centralized in the components directory for initializing different fixed data endpoints, simplifying CRUD logic.
- **CRUD API Endpoints:** Fully implemented for each fixed data endpoint.
- **Server-Side Pagination:** Updated for datagrid view and API endpoints, enhancing loading speeds by not loading full datasets at once.
- **Context/Reducer System:** Fully integrated into the app's lifecycle. Saves users' selections and propagates changes throughout the application. Includes:
- User selections like plot, census, quadrat, and site.
- List selection and core data retrieval/storage for certain data types.
- A universal loading context with a fullscreen disable, progress component, and custom message.
- **Login System Reorganization:** Improved user experience by removing the repetitive EntryModal component.
- **File Upload System:** Fully implemented with several phases including Upload Start, Upload Parse, Upload Review, Upload Fire (SQL), Upload Validation, Upload Update Validation, and Upload Fire (Azure).
- **Catalog Database Implementation and Integration:** For multi-tenant database structuring with users, sites, and plots identification.
- **Site Selection Implementation:** Allows dynamic site loading and data separation.
- **Azure Web Application Connection:** With reduced build and deployment times.
- **Schema Changes:** Updated core schema setup.
- **Database Connection System Updates:** Incorporates a PoolMonitor class wrapper for better management and logging.

## Enhancements

- **Contextual System Expansion:** To handle more user selections and data types.
- **Generic, Type-Agnostic Reducer Functions:** Enhanced dispatch systems in contexts.
- **User-Friendly Core Measurements View:** Updated to use a dedicated view.
- **Autocomplete Components:** Customized for manual input and other application parts.

## Fixes

- **Database Connection Monitoring:** Improved with a new wrapper and a shell script for consistent monitoring.
- **Session Resume Dialog:** Added in the sidebar for convenient session resumption or restart.
- **Validation System Improvements:** Including refinement of procedures and error handling.
- **Load Handling Enhancements:** For better user experience during data retrieval and dispatch.

## Future Updates

- **Manual Input Census Form Completion:** Slated for the next round of core updates.
- **Further Refinements in Validation and Site Selection Systems:** To enhance user experience and application reliability.
9 changes: 0 additions & 9 deletions frontend/app/(hub)/coremeasurementshub/page.tsx

This file was deleted.

Loading
Loading