Add feature to restore script content to a specific version on history page
This commit is contained in:
@@ -18,7 +18,11 @@ history_url=url_for('http.history', function_id=function_id)) }}
|
||||
<script>
|
||||
// Mount the Mithril component with versions as an attribute
|
||||
m.mount(document.getElementById("history-view"), {
|
||||
view: () => m(FunctionHistory, { versions: {{ versions| tojson | safe }} })
|
||||
view: () => m(FunctionHistory, {
|
||||
versions: {{ versions| tojson | safe }},
|
||||
function_id: {{ function_id }},
|
||||
restore_url: "{{ url_for('http.restore', function_id=function_id) }}"
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -20,7 +20,11 @@ history_url=url_for('timer.history', function_id=function_id))
|
||||
<script>
|
||||
// Mount the Mithril component with versions as an attribute
|
||||
m.mount(document.getElementById("history-view"), {
|
||||
view: () => m(FunctionHistory, { versions: {{ versions| tojson | safe }} })
|
||||
view: () => m(FunctionHistory, {
|
||||
versions: {{ versions| tojson | safe }},
|
||||
function_id: {{ function_id }},
|
||||
restore_url: "{{ url_for('timer.restore', function_id=function_id) }}"
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user