Add syntax highlighting for different runtimes in function history for timer & http functions

This commit is contained in:
Peter Stockings
2025-11-30 00:26:33 +11:00
parent 6c55eaa930
commit bb20146143
5 changed files with 15 additions and 7 deletions

View File

@@ -561,7 +561,7 @@ def logs(function_id):
def history(function_id):
# Fetch the timer function to verify ownership
timer_function = db.execute("""
SELECT id, name, code AS script, version_number
SELECT id, name, code AS script, version_number, runtime
FROM timer_functions
WHERE id = %s AND user_id = %s
""", [function_id, current_user.id], one=True)
@@ -587,7 +587,8 @@ def history(function_id):
'function_id': function_id,
'timer_function': timer_function,
'versions': versions,
'title': timer_function['name']
'title': timer_function['name'],
'runtime': timer_function.get('runtime', 'node'),
}
if htmx: