From 3335898979f860b750ce01100db1d11a40c57f6e Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Wed, 12 Nov 2025 16:57:24 -0500 Subject: [PATCH] feat(reaction_contribution_dashboard): added small web app to explore reaction contributions over time This is a static webpage which will view JSON files in a format which I use (and will build into GridFire) and let users investigate the contributions each reaction at each timestep makes to the overall abundance of each species. This is invaluable when debugging a newtowk BREAKING CHANGE: --- .../app/reaction_contributions/.dockerignore | 4 + utils/app/reaction_contributions/Dockerfile | 5 + utils/app/reaction_contributions/index.html | 682 ++++++++++++++++++ utils/app/reaction_contributions/readme.md | 20 + 4 files changed, 711 insertions(+) create mode 100644 utils/app/reaction_contributions/.dockerignore create mode 100644 utils/app/reaction_contributions/Dockerfile create mode 100644 utils/app/reaction_contributions/index.html create mode 100644 utils/app/reaction_contributions/readme.md diff --git a/utils/app/reaction_contributions/.dockerignore b/utils/app/reaction_contributions/.dockerignore new file mode 100644 index 00000000..521d55f5 --- /dev/null +++ b/utils/app/reaction_contributions/.dockerignore @@ -0,0 +1,4 @@ +.git +node_modules +docker-compose.yml +*.log diff --git a/utils/app/reaction_contributions/Dockerfile b/utils/app/reaction_contributions/Dockerfile new file mode 100644 index 00000000..dd74578f --- /dev/null +++ b/utils/app/reaction_contributions/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:alpine + +COPY . /usr/share/nginx/html + +EXPOSE 80 diff --git a/utils/app/reaction_contributions/index.html b/utils/app/reaction_contributions/index.html new file mode 100644 index 00000000..aa8878c1 --- /dev/null +++ b/utils/app/reaction_contributions/index.html @@ -0,0 +1,682 @@ + + + + + Reaction Contributions Explorer + + + + + + +
+ + + + +
+ + +
+
+
+
+ + + + diff --git a/utils/app/reaction_contributions/readme.md b/utils/app/reaction_contributions/readme.md new file mode 100644 index 00000000..a3c2e6ff --- /dev/null +++ b/utils/app/reaction_contributions/readme.md @@ -0,0 +1,20 @@ +# Reaction Contribution Web App +This small static web app allows you to load up a reactions contributions JSON file and visualize the contributions of different reactions to different species. This is useful for debugging. + +The JSON file must have the schema + +```json +{ + i: { + t: float, + dt: float, + reaction_contribution: { + Species: { + reaction: float + } + } + } +} + +``` +where i counts from 0 -> the number of timesteps, Species is the species name (so if at one timestep there are 10 species tracked there will be 10 species entries), and reaction is the projectile-ejectile name of a reaction.