Update function history view

This commit is contained in:
Peter Stockings
2025-07-24 23:00:22 +10:00
parent 54347ded89
commit 8f2838f920
7 changed files with 378 additions and 190 deletions

View File

@@ -2,7 +2,7 @@
{% block page %}
{{ render_partial('dashboard/http_functions/header.html',
{{ render_partial('dashboard/timer_functions/header.html',
user_id=user_id,
function_id=function_id,
active_tab='history',
@@ -15,12 +15,12 @@ logs_url=url_for('timer.logs', function_id=function_id),
history_url=url_for('timer.history', function_id=function_id))
}}
<div id="version-diff"></div>
<div id="history-view"></div>
<script>
// Mount the Mithril component with versions as an attribute
m.mount(document.getElementById("version-diff"), {
view: () => m(DiffView, { versions: {{ versions| tojson }} })
m.mount(document.getElementById("history-view"), {
view: () => m(FunctionHistory, { versions: {{ versions| tojson | safe }} })
});
</script>
{% endblock %}