diff --git a/app.py b/app.py index b237a12..d884fe1 100644 --- a/app.py +++ b/app.py @@ -85,7 +85,7 @@ def client(user_id, function): return jsonify({'error': 'Function not found'}), 404 http_function = create_http_function_view_model(http_function) - return render_template("client.html", **http_function) + return render_template("dashboard/http_functions/client.html", **http_function) @ app.route("/dashboard", methods=["GET"]) @login_required @@ -101,7 +101,7 @@ def dashboard_http_functions(): user_id = current_user.id http_functions = db.get_http_functions_for_user(user_id) http_functions = create_http_functions_view_model(http_functions) - return render_template("dashboard/http_functions.html", http_functions=http_functions) + return render_template("dashboard/http_functions/overview.html", http_functions=http_functions) @ app.route("/dashboard/http_functions/add_form", methods=["GET"]) @login_required @@ -124,7 +124,7 @@ def create_http_function(): http_functions = db.get_http_functions_for_user(user_id) http_functions = create_http_functions_view_model(http_functions) - return render_template("dashboard/http_functions.html", http_functions=http_functions) + return render_template("dashboard/http_functions/overview.html", http_functions=http_functions) except Exception as e: print(e) return { "status": "error", "message": str(e) } @@ -172,7 +172,7 @@ def delete_http_function(): http_functions = db.get_http_functions_for_user(user_id) http_functions = create_http_functions_view_model(http_functions) - return render_template("dashboard/http_functions.html", http_functions=http_functions) + return render_template("dashboard/http_functions/overview.html", http_functions=http_functions) except Exception as e: return jsonify({"status": 'error', "message": str(e)}), 500 diff --git a/templates/dashboard.html b/templates/dashboard.html index 80105a4..86afcc4 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -88,7 +88,7 @@
- {{ render_partial('dashboard/http_functions.html', http_functions=http_functions) }} + {{ render_partial('dashboard/http_functions/overview.html', http_functions=http_functions) }}
diff --git a/templates/client.html b/templates/dashboard/http_functions/client.html similarity index 90% rename from templates/client.html rename to templates/dashboard/http_functions/client.html index 70b4efc..aa33e57 100644 --- a/templates/client.html +++ b/templates/dashboard/http_functions/client.html @@ -2,16 +2,10 @@ {% block content %} -
-

Try: {{ name }}

- -
+{{ render_partial('dashboard/http_functions/header.html', title='Try', user_id=user_id, name=name, +show_refresh=False, show_link=False, show_edit_form=True, show_client=True, show_logs=True) }} -
+