From 4796b7d8d145cdf0690cbc57c48ba876647a2168 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Sat, 16 Dec 2023 18:19:48 +1100 Subject: [PATCH] Add views (static for now) for http and timer functions on dashboard --- app.py | 10 ++- templates/dashboard.html | 86 ++++-------------------- templates/dashboard/http_functions.html | 52 ++++++++++++++ templates/dashboard/timer_functions.html | 40 +++++++++++ 4 files changed, 113 insertions(+), 75 deletions(-) create mode 100644 templates/dashboard/http_functions.html create mode 100644 templates/dashboard/timer_functions.html diff --git a/app.py b/app.py index c35ea86..5b54fa8 100644 --- a/app.py +++ b/app.py @@ -53,7 +53,7 @@ def map_isolator_response_to_flask_response(response): @ app.route("/", methods=["GET"]) -def index(): +def home(): return render_template("home.html", script=DEFAULT_SCRIPT) @ app.route("/client", methods=["GET"]) @@ -64,6 +64,14 @@ def client(): def dashboard(): return render_template("dashboard.html") +@ app.route("/dashboard/http_functions", methods=["GET"]) +def dashboard_http_functions(): + return render_template("dashboard/http_functions.html") + +@ app.route("/dashboard/timer_functions", methods=["GET"]) +def dashboard_timer_functions(): + return render_template("dashboard/timer_functions.html") + @app.route('/execute', methods=['POST']) def execute_code(): diff --git a/templates/dashboard.html b/templates/dashboard.html index 788446a..336da2b 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -21,8 +21,8 @@ Toggle notifications
diff --git a/templates/dashboard/http_functions.html b/templates/dashboard/http_functions.html new file mode 100644 index 0000000..7147c95 --- /dev/null +++ b/templates/dashboard/http_functions.html @@ -0,0 +1,52 @@ +
+

HTTP functions

+ +
+
+
+ + + + + + + + + + + + + + + +
Name
HelloWorld
+
+
\ No newline at end of file diff --git a/templates/dashboard/timer_functions.html b/templates/dashboard/timer_functions.html new file mode 100644 index 0000000..c0d144c --- /dev/null +++ b/templates/dashboard/timer_functions.html @@ -0,0 +1,40 @@ +
+

Timer functions

+ +
+
+
+ + + + + + + + + + + + + + + +
Name
HelloWorld
+
+
\ No newline at end of file