Remove unused timer functions dashboard route and template

- Delete `/dashboard/timer_functions` route from `app.py`
- Remove `timer_functions.html` template
- Simplify application routing by eliminating unused dashboard view
This commit is contained in:
Peter Stockings
2025-02-21 00:19:22 +11:00
parent 3b7c630a44
commit f42c3257a8
2 changed files with 0 additions and 45 deletions

6
app.py
View File

@@ -250,12 +250,6 @@ def get_http_function_history(function_id):
return render_block(app.jinja_env, 'dashboard/http_functions/history.html', 'page', user_id=user_id, function_id=function_id, name=name, http_function=http_function, http_function_history=http_function_history, original_script=original_script) return render_block(app.jinja_env, 'dashboard/http_functions/history.html', 'page', user_id=user_id, function_id=function_id, name=name, http_function=http_function, http_function_history=http_function_history, original_script=original_script)
return render_template("dashboard/http_functions/history.html", user_id=user_id, name=name, function_id=function_id, http_function=http_function, http_function_history=http_function_history, original_script=original_script) return render_template("dashboard/http_functions/history.html", user_id=user_id, name=name, function_id=function_id, http_function=http_function, http_function_history=http_function_history, original_script=original_script)
@ app.route("/dashboard/timer_functions", methods=["GET"])
@login_required
def dashboard_timer_functions():
return render_template("dashboard/timer_functions.html")
@app.route('/execute', methods=['POST']) @app.route('/execute', methods=['POST'])
def execute_code(): def execute_code():
try: try:

View File

@@ -1,39 +0,0 @@
<div class="flex items-center" data-id="51">
<h1 class="leading-normal text-gray-800 text-base md:text-xl lg:text-2xl">Timer functions</h1>
<button
class="inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-9 rounded-md px-3 ml-auto">
Add Function
</button>
</div>
<div class="border shadow-sm rounded-lg" data-id="54">
<div class="relative w-full overflow-auto">
<table class="w-full caption-bottom text-sm" data-id="55">
<thead class="[&amp;_tr]:border-b" data-id="56">
<tr class="border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted" data-id="57">
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground [&amp;:has([role=checkbox])]:pr-0 max-w-[150px]"
data-id="59">Name</th>
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground [&amp;:has([role=checkbox])]:pr-0 hidden md:table-cell"
data-id="60">Schedule</th>
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground [&amp;:has([role=checkbox])]:pr-0 hidden md:table-cell"
data-id="61">Actions</th>
</tr>
</thead>
<tbody class="[&amp;_tr:last-child]:border-0" data-id="62">
<tr class="border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted" data-id="63">
<td class="p-4 align-middle [&amp;:has([role=checkbox])]:pr-0 font-medium cursor-pointer"
data-id="66">HelloWorld</td>
<td class="p-4 align-middle [&amp;:has([role=checkbox])]:pr-0 hidden md:table-cell" data-id="67">
every 2 minutes
</td>
<td class="p-4 align-middle [&amp;:has([role=checkbox])]:pr-0 hidden md:table-cell" data-id="68">
<button
class="inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-9 rounded-md px-3 mr-2"
data-id="69">Edit</button><button
class="inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 rounded-md px-3"
data-id="70">Delete</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>