Deployed site: https://swxtrec.github.io/msis
This is a frontend for interacting with the MSIS model.
- Product Owner: Greg Lucas, greg.lucas@lasp.colorado.edu
- Experienced Devs: Front end: Jennifer Knuth, jennifer.knuth@lasp.colorado.edu Back end: Greg Lucas, greg.lucas@lasp.coloardo.edu
- SWT: Main project for the Space Weather Testbed codebase.
- MSIS Website: Epic for MSIS visualizer
VECTOR and the SWx TREC Model Staging Platform.
https://swxtrec.github.io/msis
This is the frontend code that sets the parameters to run the MSIS model in AWS.
A serverless backend has been set up to create an API that receives POST requests with the model parameters and returns a POST response with the results.
See 'Development server' below.
MSIS backend is needed in production.
Run npm start
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
Run npm run build
to build the project. The build artifacts will be stored in the dist/
directory. Run npm run build:prod
for a production build.
Run npm run lint
to lint your code, or run npm run lint:watch
to automatically lint every time you change a file.
Automatically fix many linter warnings by running npm run lint:fix
.
Run npm test
to execute the unit tests via Karma.
Run npm run e2e
to execute the end-to-end tests via Protractor.
You can run ./docker-build.sh
to build a new image locally
Once you have built your image using the command above, you can ./docker-run.sh
to start a local development image. This image will be served at http://localhost:8080/dev
To stop your image run docker stop {{Project-name}}
Cleaning up old images is also a good idea from time to time. To clean up your unused docker resources run docker system prune
MSIS was originally hosted by GitHub in the SWxTREC organization. It now has a place on AWS at msis.swx-trec.com Deploy to both places for now (but soon the GitHub site will redirect to swx-trec.com).
From the main branch, run npm version <major | minor | patch>
where major indicates a breaking change, minor is noticeable but non-breaking interface change, and patch is a non-breaking, under-the-hood refinement.
This will:
- run the linter and unit tests, and abort if they fail
- increment the version, commit the change, and create a git tag
- push the changes and the new tag to the remote repo
From main, npm run build:prod
to create the dist/
folder. Upload the contents of dist/
to AWS. (The plan is to get a Jenkins job to automate this part.)
After a few minutes, you will see the changes at https://msis.swx-trec.com.
You can run this script from any branch, but the deployed production site should reflect the content of the current main
branch.
From the main branch, run npm run deploy
This will:
- Run
npm run build:pages
to create the/docs
directory that will be deployed - Make a copy of
docs/index.html
and name itdocs/404.html
(for some reason the angular instructions say to do this) - Take the current build of
/docs
from the current branch and push it up to the remotegh-pages
branch were it will be served
After a few minutes, you will see the changes at the GitHub-hosted site https://swxtrec.github.io/msis.
You can run this script from any branch, but the site should reflect the content of the current main branch.
Useful documentation that isn't ours (for example, in LaTiS, maybe links to Scala documentation, or higher level topics like RDB and Data Model articles/resources) -->