Refactor HTTP function editor with Mithril components and new API endpoints

- Add new Mithril components for editor (editor.js), response view (responseView.js), and alerts (alert.js)
- Create new API endpoints for creating, updating, and deleting HTTP functions
- Update templates to use new Mithril editor component
- Improve header navigation with more consistent styling and active state indicators
- Remove old edit form route and template
- Add new dedicated editor route and template

cursor.ai
This commit is contained in:
Peter Stockings
2025-02-14 00:40:45 +11:00
parent abf3ca15d2
commit 5ec8bba9e8
15 changed files with 1230 additions and 131 deletions

View File

@@ -2,10 +2,14 @@
{% block page %}
{{ render_partial('dashboard/http_functions/header.html', title='History', user_id=user_id, function_id=function_id,
name=name,
refresh_url=url_for('get_http_function_history', function_id=function_id), show_logs=True, show_client=True,
show_edit_form=True) }}
{{ render_partial('dashboard/http_functions/header.html', user_id=user_id, function_id=function_id,
active_tab='history',
show_edit_form=True,
show_logs=True,
show_client=True,
show_history=True,
edit_url=url_for('http_function_editor', function_id=function_id),
cancel_url=url_for('dashboard_http_functions')) }}
<!-- Timeline -->
<div>
@@ -185,7 +189,6 @@ show_edit_form=True) }}
});
editor.setTheme("ace/theme/github_dark");
editor.session.setMode("ace/mode/javascript");
</script>
<!-- End Item -->