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

Use Quarkus Quinoa for serving web UI #165

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

fabianishere
Copy link
Member

Summary

This commit updates the OpenDC web application to use Quarkus Quinoa for serving the web UI. Quarkus Quinoa is the way to integrate single page apps (such as React/Next.js apps) into Quarkus. By moving to Quinoa, we can move away from our own custom Quarkus extension which was rather fragile.

Test plan

Launch OpenDC web server as follows:

$ ./gradlew :opendc-web:opendc-web-server:quarkusDev

Nagivate to web UI (in dev mode) at http://localhost:8080, create a project, a topology, a portfolio, and a scenario. Confirm that the simulation job finishes and can be seen in the UI.

This commit updates the OpenDC web server to use Quarkus 3, which
changes annotations to use the Jakarta namespace for annotations.
This commit updates the web UI to propagate runtime variables via the
next-runtime-env package. Before, we would need to replace the variables
in the generated sources by Next.js, next-runtime-env works by loading a
JavaScript file when opening the OpenDC web UI which contains the
configuration of the web app.
@fabianishere fabianishere added kind/cleanup Cleaning up code, process, or technical debt area/web Changes related to OpenDC web components labels Oct 29, 2023
@fabianishere fabianishere added this to the v3.0 milestone Oct 29, 2023
@fabianishere fabianishere self-assigned this Oct 29, 2023
This commit updates the OpenDC web server to make use of Quarkus Quinoa
for serving the web UI. This allows us to deprecate the complex Quarkus
extension for serving the web UI.
This commit moves the web UI into the Quarkus web server module to
ensure we follow Quarkus Quinoa's conventions.
This commit merges the existing Quarkus extensions into a single module
to prevent build complexity.
This commit migrates the web protocol to Java and removes the dependency
on Jandex Gradle.
@codecov
Copy link

codecov bot commented Oct 29, 2023

Codecov Report

Merging #165 (f0c12a1) into master (aa9149b) will increase coverage by 0.52%.
The diff coverage is 29.45%.

@@             Coverage Diff              @@
##             master     #165      +/-   ##
============================================
+ Coverage     76.55%   77.08%   +0.52%     
+ Complexity     2246     2176      -70     
============================================
  Files           351      351              
  Lines          9628     9408     -220     
  Branches       1032     1023       -9     
============================================
- Hits           7371     7252     -119     
+ Misses         1942     1841     -101     
  Partials        315      315              
Files Coverage Δ
...o/src/main/java/org/opendc/web/proto/JobState.java 100.00% <100.00%> (ø)
...ava/org/opendc/web/proto/OperationalPhenomena.java 100.00% <100.00%> (ø)
.../main/java/org/opendc/web/proto/ProtocolError.java 100.00% <100.00%> (ø)
...to/src/main/java/org/opendc/web/proto/Targets.java 100.00% <100.00%> (ø)
...roto/src/main/java/org/opendc/web/proto/Trace.java 100.00% <100.00%> (ø)
...o/src/main/java/org/opendc/web/proto/Workload.java 100.00% <100.00%> (ø)
...src/main/java/org/opendc/web/proto/runner/Job.java 100.00% <100.00%> (ø)
...in/java/org/opendc/web/proto/runner/Portfolio.java 100.00% <100.00%> (ø)
...ain/java/org/opendc/web/proto/runner/Scenario.java 100.00% <100.00%> (ø)
...ain/java/org/opendc/web/proto/runner/Topology.java 100.00% <100.00%> (ø)
... and 52 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/web Changes related to OpenDC web components kind/cleanup Cleaning up code, process, or technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant