diff --git a/main.py b/main.py
index aae7b26..820ca84 100644
--- a/main.py
+++ b/main.py
@@ -63,7 +63,9 @@ def get_chartdata(namespace, chart):
raise err
info(f"Output from command:\n{output}")
data = json.loads(output)
- print(data)
+ for revision in data:
+ revision["namespace"] = namespace
+ print(data[0])
return data
if __name__ == "__main__":
diff --git a/routes/kube_helm_routes.py b/routes/kube_helm_routes.py
index ada0ce4..6fd82ba 100644
--- a/routes/kube_helm_routes.py
+++ b/routes/kube_helm_routes.py
@@ -18,11 +18,10 @@ def chartVersions():
namespace = request.form['namespace']
chart = request.form['chart']
chartVersions = get_chartdata(namespace, chart)
- print(chartVersions)
table = chartVersionTable(chartVersions)
table.border = True
table.classes = ['table-striped', 'table-condensed', 'table-hover']
- return render_template('chartRevisionList.html', table=table, namespace=namespace, chart=chart)
+ return render_template('chartRevisionList.html', table=table, namespace=namespace)
@routes.route('/nsLookup/')
@@ -30,7 +29,10 @@ def namespaceLookup(namespace):
charts = get_charts(namespace)
return jsonify(charts)
-@routes.route('/deployChartRevision/')
-def deployChartRevision(revision):
+@routes.route('/deployChartRevision///', methods=['POST'])
+def deployChartRevision(revision, chart, namespace):
+ print(revision)
+ print(chart)
+ print(namespace)
charts = get_charts(namespace)
return jsonify(charts)
\ No newline at end of file
diff --git a/tables.py b/tables.py
index 3167480..d76d450 100644
--- a/tables.py
+++ b/tables.py
@@ -4,7 +4,8 @@ class chartVersionTable(Table):
revision = Col('Chart Revision')
updated = Col('Updated')
status = Col('Status')
+ namespace = Col('Namespace')
chart = Col('Chart Version')
app_version = Col('Application Version')
description = Col('Description')
- deploy = ButtonCol('Deploy', 'routes.deployChartRevision', url_kwargs=dict(revision='revision'), button_attrs={"type" : "submit", "class" : "btn btn-danger"})
+ deploy = ButtonCol('Deploy', 'routes.deployChartRevision', url_kwargs=dict(revision='revision', chart='chart', namespace='namespace'), button_attrs={"type" : "submit", "class" : "btn btn-danger"})
\ No newline at end of file
diff --git a/templates/chartRevisionList.html b/templates/chartRevisionList.html
index afd34d1..a3a891f 100644
--- a/templates/chartRevisionList.html
+++ b/templates/chartRevisionList.html
@@ -20,6 +20,7 @@
{% endwith %}
Home