From b6cc80b92c34e88080cfa1304a1ffdbcd64a3d52 Mon Sep 17 00:00:00 2001 From: Julien Acroute Date: Tue, 19 Sep 2023 14:44:41 +0200 Subject: [PATCH] feat: display policy manifest --- builder.py | 4 ++++ templates/index.html | 24 ++++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/builder.py b/builder.py index 738a501..0ffbf29 100644 --- a/builder.py +++ b/builder.py @@ -431,4 +431,8 @@ def remove_policy(): analyzers[ns].deletePolicy(wl) return redirect(url_for('home')) +@app.route("/show_policy//") +def get_policy(ns, wl): + return yaml.dump(analyzers[ns].generatePolicy(wl)) + app.run(host="0.0.0.0", port=5000) diff --git a/templates/index.html b/templates/index.html index 58b4447..7361792 100644 --- a/templates/index.html +++ b/templates/index.html @@ -50,13 +50,13 @@

Workload: {{ wl }}