diff --git a/otterdog/webapp/filters.py b/otterdog/webapp/filters.py index d94852da..b7fce6a3 100644 --- a/otterdog/webapp/filters.py +++ b/otterdog/webapp/filters.py @@ -5,6 +5,7 @@ # which is available at http://www.eclipse.org/legal/epl-v20.html # SPDX-License-Identifier: EPL-2.0 # ******************************************************************************* +import json def register_filters(app): @@ -22,6 +23,17 @@ def status_color(status): case _: return "info" + @app.template_filter("int_status") + def int_status_color(value): + if value == 0: + return "success" + else: + return "warning" + + @app.template_filter("from_json") + def from_json(value): + return json.loads(value) + @app.template_filter("is_dict") def is_dict(value): return isinstance(value, dict) diff --git a/otterdog/webapp/templates/home/organization.html b/otterdog/webapp/templates/home/organization.html index a82bc9c6..abaa018d 100644 --- a/otterdog/webapp/templates/home/organization.html +++ b/otterdog/webapp/templates/home/organization.html @@ -138,7 +138,7 @@

General

-
+

Secret Scanning

@@ -148,7 +148,7 @@

Secret Scanning

-
+

Branch Protections

diff --git a/otterdog/webapp/templates/home/pullrequests.html b/otterdog/webapp/templates/home/pullrequests.html index 2592eb45..75f1239c 100644 --- a/otterdog/webapp/templates/home/pullrequests.html +++ b/otterdog/webapp/templates/home/pullrequests.html @@ -71,13 +71,13 @@

Currently open Pull Requests:

{% for pr in open_pull_requests %} - + {{ pr.org_id }} {{ pr.repo_name }} #{{ pr.pull_request }} {{ pr.created_at }} {{ pr.status }} - {{ pr.draft }} + {{ pr.draft }} {{ pr.in_sync }} {{ pr.requires_manual_apply }} {{ pr.apply_status }}