Skip to content

Commit d26d5d3

Browse files
krowvinNobuNobuu
andauthored
[WebUI] Data Query Tool + Groundwork (#1205)
Solves #658 This is an initial working state for a data query tool page to allow users to download CSV/JSON from various timeseries, view location metadata, and plot/tabulate timeseries. This updates the site to use React/Vite for the client library and build tool. It borrows heavily from [Groundwork](https://usace.github.io/groundwork/#/) and [Groundwork-Water](https://usace-watermanagement.github.io/groundwork-water/) as well. It turns the site into a single page application with client-side routing. Will need to work to add it into tomcat. Possibly a step to `npm run build` and then push the `dist` files into the webapp for deployment? Might consider only running this action when the `cda-gui` directory is changed? There are a few improvements to be done to the data query tool, i.e. reworking the "guided mode". Had some issues with sublocations. ## Screenshots <img width="1196" height="1745" alt="image" src="https://github.com/user-attachments/assets/0d0713e1-039c-46ea-95b8-4a6f62b6a1f2" /> <img width="1181" height="1746" alt="image" src="https://github.com/user-attachments/assets/070d0db8-8f72-44a9-8bf1-f37b08c37f5a" /> Edit: Updated the footer/header and the screenshots to match --------- Co-authored-by: Wes Reagan <reaganwesley12@gmail.com>
1 parent a594b55 commit d26d5d3

72 files changed

Lines changed: 10102 additions & 1728 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cda-gui/.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CDA_API_ROOT=https://water.dev.cwbi.us/cwms-data

cda-gui/.env.production

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CDA_API_ROOT=https://cwms-data.usace.army.mil/cwms-data

cda-gui/.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CDA_API_ROOT=https://cwms-data-test.cwbi.us/cwms-data

cda-gui/.eslintrc.cjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:react/recommended',
7+
'plugin:react/jsx-runtime',
8+
'plugin:react-hooks/recommended',
9+
],
10+
ignorePatterns: ['dist', '.eslintrc.cjs'],
11+
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
12+
settings: { react: { version: '18.2' } },
13+
plugins: ['react-refresh'],
14+
rules: {
15+
'react/jsx-no-target-blank': 'off',
16+
'react-refresh/only-export-components': [
17+
'warn',
18+
{ allowConstantExport: true },
19+
],
20+
},
21+
}

cda-gui/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

cda-gui/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# CDA Landing Page Source
2+
3+
*The React+Vite project for CDA*
4+
5+
6+
To run the project in dev:
7+
`npm run dev`
8+
9+
To build the project:
10+
`npm run build`
11+
*NOTE*: Building the project will also deploy it to the required tomcat webapps directory `webapp`
12+
13+
To see the available scripts for this project, including how to run and deploy, look at the `package.json` file.

cda-gui/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>CDA - CWMS Data API</title>
8+
<meta name="Description" content="CDA CWMS Data API" />
9+
</head>
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="/src/main.jsx"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)