Crude "local launch" button
This commit is contained in:
parent
8a6a54b04d
commit
fa34d29a79
@ -100,6 +100,12 @@ async def config_unset(name: str) -> WerkzeugResponse:
|
||||
# return redirect(url_for("cli_logs"))
|
||||
|
||||
|
||||
@app.post("/cli/local/launch")
|
||||
async def cli_local_launch() -> WerkzeugResponse:
|
||||
tutorclient.CliPool.run_parallel(app, ["local", "launch", "--non-interactive"])
|
||||
return redirect(url_for("cli_logs"))
|
||||
|
||||
|
||||
@app.get("/cli/logs")
|
||||
async def cli_logs() -> str:
|
||||
return await render_template("cli_logs.html", **shared_template_context())
|
||||
|
||||
@ -1,2 +1 @@
|
||||
|
||||
SHORT_SLEEP_SECONDS = 0.1
|
||||
|
||||
@ -44,6 +44,9 @@
|
||||
{% for plugin in installed_plugins %}
|
||||
<li><a href="{{ url_for('plugin', name=plugin) }}">{{ plugin }} {% if plugin in enabled_plugins %} ✅{% endif %}</a></li>
|
||||
{% endfor %}
|
||||
<form action="{{ url_for('cli_local_launch') }}" method="POST">
|
||||
<button type="submit">Launch (local)</button>
|
||||
</form>
|
||||
<form action="{{ url_for('cli_stop') }}" method="POST">
|
||||
<button type="submit">Stop</button>
|
||||
</form>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user