Implement timer functions with full CRUD functionality and enhanced UI
- Add comprehensive routes for creating, editing, deleting, and toggling timer functions - Create new HTML templates for timer function overview, new, and edit pages - Extend Mithril editor component to support timer-specific settings like trigger type, frequency, and enabled status - Implement database schema and versioning for timer functions - Add UI improvements for timer function listing with detailed schedule and status information
This commit is contained in:
42
templates/dashboard/timer_functions/new.html
Normal file
42
templates/dashboard/timer_functions/new.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{% extends 'dashboard.html' %}
|
||||
|
||||
{% block page %}
|
||||
|
||||
{{ render_partial('dashboard/http_functions/header.html',
|
||||
user_id=user_id,
|
||||
show_name=False,
|
||||
show_refresh=False,
|
||||
show_logs=False,
|
||||
show_client=False,
|
||||
show_link=False,
|
||||
dashboardUrl=url_for('timer.overview'),
|
||||
title='New Timer Function')
|
||||
}}
|
||||
|
||||
<div id="app" class="p-1">
|
||||
<!-- The Editor component will be mounted here -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Mount the component
|
||||
m.mount(document.getElementById("app"), {
|
||||
view: () => m(Editor, {
|
||||
name: '{{ name }}',
|
||||
jsValue: {{ script | tojson | safe }},
|
||||
jsonValue: {{ environment_info | tojson | safe }},
|
||||
isEdit: false,
|
||||
isAdd: true,
|
||||
showHeader: true,
|
||||
executeUrl: "{{ url_for('execute_code', playground='true') }}",
|
||||
saveUrl: "{{ url_for('timer.new') }}",
|
||||
showDeleteButton: false,
|
||||
dashboardUrl: "{{ url_for('timer.overview') }}",
|
||||
isTimer: true,
|
||||
showTimerSettings: true,
|
||||
triggerType: 'interval',
|
||||
frequencyMinutes: 60
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user