allow reloading recipes

This commit is contained in:
Nicolò Balzarotti 2023-02-21 14:01:47 +01:00
parent 7c6c2fdc85
commit 645292d5a5
2 changed files with 7 additions and 0 deletions

5
app.py
View File

@ -117,6 +117,11 @@ def next_phase():
if done:
statemachine.done()
@socketio.on('reload recipes')
def reload_recipes():
statemachine.reloadRecipes()
updateState()
def run_recipes():
while True:
while statemachine.recipe is not None:

2
dist/server.js vendored
View File

@ -292,6 +292,8 @@ function render_load_recipe(data) {
<p class="card-header-title">
Load Recipe
</p>
<button class="button is-link"
onclick="reload_recipes();">Reload config</button>
</header>
<div class="card-content">
<div class="tabs is-centered">