Skip to content

Embed dashboard UI.#29

Open
simonbuchan wants to merge 2 commits into
huseyinbabal:mainfrom
simonbuchan:embed-ui
Open

Embed dashboard UI.#29
simonbuchan wants to merge 2 commits into
huseyinbabal:mainfrom
simonbuchan:embed-ui

Conversation

@simonbuchan

Copy link
Copy Markdown

Related Issue

Closes #28

Description

Uses the serve_static approach I described in the issue, since I'm lazy:

  • Uses build.rs to build the UI automatically, which should make cargo install work (I guess we'll find out?)
  • Replace the tower_http middleware with the serve_static router.
  • Also tack on a not found fallback route so e.g. /dashboard/whatever doesn't try to load s3:://dashboard/whatever which I feel would be confusing.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • I have linked this PR to an existing issue
  • My code follows the project's code style
  • I have tested my changes locally
  • I have added/updated relevant documentation (if applicable)
  • My changes don't introduce new warnings

Additional Notes

This (unsurprisingly) means building the binary now requires the ability to do the UI build, e.g. have a node install. This is true for Github Actions runners, so that should be fine, but I suppose it would be reasonable to be able to disable the dashboard by making it a default feature to unblock people that don't need it?

If that's desired I could take a look at doing so in a separate PR.

Uses the `static_serve` approach since I'm lazy...

Fixes huseyinbabal#28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/dashboard 404s

1 participant