From 3e0c04b6d1f3cd82d036b17631f90dec581a67ce Mon Sep 17 00:00:00 2001 From: D10S0VSkY-OSS <79284025+D10S0VSkY-OSS@users.noreply.github.com> Date: Tue, 21 Nov 2023 20:36:41 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=A8feat:=20set=20form=20edit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sld-dashboard/app/home/routes.py | 4 +++ .../app/home/templates/deploy-edit.html | 35 ++++++++++++++++++- .../app/home/templates/deploys-list.html | 13 +++---- .../app/home/templates/stacks-deploy.html | 2 +- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/sld-dashboard/app/home/routes.py b/sld-dashboard/app/home/routes.py index 7027c36f..cdc97787 100644 --- a/sld-dashboard/app/home/routes.py +++ b/sld-dashboard/app/home/routes.py @@ -35,6 +35,10 @@ def decrypt(secreto): external_api_dns = settings.EXTERNAL_DNS_API +def pretty_json(value): + return json.dumps(value, indent=4) + + @blueprint.route("/index") @login_required def index(): diff --git a/sld-dashboard/app/home/templates/deploy-edit.html b/sld-dashboard/app/home/templates/deploy-edit.html index c021bef9..7ade479d 100644 --- a/sld-dashboard/app/home/templates/deploy-edit.html +++ b/sld-dashboard/app/home/templates/deploy-edit.html @@ -72,9 +72,18 @@
{{key}}
{% if "passw" in key %} - {% else %} + {% elif value is number %} + + + + {% elif value is iterable and not value is string %} + + {% elif value is string %} + {% else %} {% endif %} {% endfor %} @@ -153,4 +162,28 @@
{{key}}
$(this).closest('#inputFormRow').remove(); }); + + + {% endblock javascripts %} diff --git a/sld-dashboard/app/home/templates/deploys-list.html b/sld-dashboard/app/home/templates/deploys-list.html index 220bd7d5..519e08ce 100644 --- a/sld-dashboard/app/home/templates/deploys-list.html +++ b/sld-dashboard/app/home/templates/deploys-list.html @@ -189,11 +189,11 @@

All Deploys

{% endif %} - - - - - + + + + + @@ -268,7 +268,6 @@

Variables

+

Variables

{% for key, value in data_json.items()|sort %}
@@ -76,11 +77,15 @@
{{key}}
placeholder={{key}} autocomplete="off"> {% elif value == "true" or value == "false" %} {% elif value is iterable and not value is string %} - + {% elif value is string %} @@ -88,7 +93,7 @@
{{key}}
{% endif %}
{% endfor %} - +
@@ -96,12 +101,13 @@
{{key}}
- +
- - {% endif %} + + {% endif %} {% if deploy.action == "DryRun"%}