diff --git a/app.py b/app.py index b4bbd5e..585cc6d 100644 --- a/app.py +++ b/app.py @@ -124,7 +124,8 @@ def dashboard_http_functions(): @ app.route("/dashboard/http_functions/add_form", methods=["GET"]) @login_required def get_http_function_add_form(): - return render_template("dashboard/http_functions/new.html", name=DEFAULT_FUNCTION_NAME, script=DEFAULT_SCRIPT, environment_info=DEFAULT_ENVIRONMENT, is_public=False, log_request=True, log_response=False) + user_id = current_user.id + return render_template("dashboard/http_functions/new.html", user_id=user_id, name=DEFAULT_FUNCTION_NAME, script=DEFAULT_SCRIPT, environment_info=DEFAULT_ENVIRONMENT, is_public=False, log_request=True, log_response=False) @ app.route("/dashboard/http_functions/create", methods=["POST"]) @login_required diff --git a/templates/dashboard.html b/templates/dashboard.html index 10cf343..55da0c9 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -11,7 +11,8 @@ stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-6 w-6" data-id="6"> - Function Manager diff --git a/templates/dashboard/http_functions/new.html b/templates/dashboard/http_functions/new.html index 388df63..73fa762 100644 --- a/templates/dashboard/http_functions/new.html +++ b/templates/dashboard/http_functions/new.html @@ -1,11 +1,7 @@ -
-

New HTTP function

- -
+{{ render_partial('dashboard/http_functions/header.html', title='New HTTP function', user_id=user_id, show_name=False, +show_refresh=False, show_logs=False, +show_client=False, show_link=False) +}} {{ render_partial('function_editor.html', name=name, script=script, environment_info=environment_info, diff --git a/templates/dashboard/http_functions/overview.html b/templates/dashboard/http_functions/overview.html index 0d1b198..5cc982e 100644 --- a/templates/dashboard/http_functions/overview.html +++ b/templates/dashboard/http_functions/overview.html @@ -1,9 +1,14 @@
-

HTTP functions

+

HTTP functions

@@ -11,11 +16,11 @@ - - - @@ -23,9 +28,9 @@ {% for function in http_functions %}
NameActions
- {{ function.name }} + {{ function.name }} + class="inline-flex items-center justify-center w-5 h-5 ms-2 text-xs font-semibold text-blue-800 bg-blue-200 rounded-full ml-1"> {{ function.invoked_count }} {% if function.is_public %} @@ -60,22 +65,21 @@
diff --git a/templates/dashboard/timer_functions.html b/templates/dashboard/timer_functions.html index 8831255..ce3310b 100644 --- a/templates/dashboard/timer_functions.html +++ b/templates/dashboard/timer_functions.html @@ -1,5 +1,5 @@
-

Timer functions

+

Timer functions

-