Update logging level for parsed workflow and add refresh button to recipe controls

- Changed logging from info to debug for parsed workflow in RecipeRoutes to reduce log verbosity.
- Added a refresh button in the recipe controls section of the HTML template to allow users to reload the recipe list easily.
This commit is contained in:
Will Miao
2025-03-21 21:38:02 +08:00
parent fce58f3206
commit 30e9e7168f
2 changed files with 4 additions and 1 deletions

View File

@@ -777,7 +777,7 @@ class RecipeRoutes:
# load_extensions=False to avoid loading extensions for now # load_extensions=False to avoid loading extensions for now
parsed_workflow = parse_workflow(workflow_json, load_extensions=False) parsed_workflow = parse_workflow(workflow_json, load_extensions=False)
logger.info(f"Parsed workflow: {parsed_workflow}") logger.debug(f"Parsed workflow: {parsed_workflow}")
if not parsed_workflow or not parsed_workflow.get("gen_params"): if not parsed_workflow or not parsed_workflow.get("gen_params"):
return web.json_response({"error": "Could not extract generation parameters from workflow"}, status=400) return web.json_response({"error": "Could not extract generation parameters from workflow"}, status=400)

View File

@@ -26,6 +26,9 @@
<!-- Recipe controls --> <!-- Recipe controls -->
<div class="controls"> <div class="controls">
<div class="action-buttons"> <div class="action-buttons">
<div title="Refresh recipe list" class="control-group">
<button onclick="recipeManager.loadRecipes(true)"><i class="fas fa-sync"></i> Refresh</button>
</div>
<div title="Import recipes" class="control-group"> <div title="Import recipes" class="control-group">
<button onclick="importManager.showImportModal()"><i class="fas fa-file-import"></i> Import</button> <button onclick="importManager.showImportModal()"><i class="fas fa-file-import"></i> Import</button>
</div> </div>