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

Local UI WIP #910

Draft
wants to merge 2 commits into
base: rc
Choose a base branch
from
Draft

Local UI WIP #910

wants to merge 2 commits into from

Conversation

TylerAldrich
Copy link
Contributor

@TylerAldrich TylerAldrich commented May 15, 2023

This uses the server that provides the overlay to also add a couple endpoints to view logs/restart a specific service. There's an extremely minimal UI as well available at the root route, and the overlay js was moved to /overlay.js.

Screenshot of the very awesome™ UI and the terminal running architect dev after clicking the restart button:
image

I also updated the overlay so the logs/restart buttons run the actions directly (logs will open a new window, restart will restart the service immediately).

This may not be the actual desired behavior, but that was my leaping off point - since this is just a draft I left it in for now, want to validate whether there's anything here we want to continue working on before going further. Lots of cleanup and improvements if we do want to go further, like making the server code not a mess, but it's functional for a proof-of-concept 😛

To test this:

  • Checkout the branch
  • Run architect dev on anything
  • Open localhost:60001 and you'll see the UI, click buttons

this.handleFavicon(res);
} else if (req.url?.startsWith('/restart/')) {
const [_, __, service_name] = req.url.split('/');
const restart_cmd = new DevRestart([service_name, '-e', this.environment], this.config);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this is a pretty cool idea!

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.

2 participants