Ready to perform helm command
This commit is contained in:
parent
a1db290bd3
commit
d9de373d3c
4
main.py
4
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__":
|
||||
|
||||
@ -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/<namespace>')
|
||||
@ -30,7 +29,10 @@ def namespaceLookup(namespace):
|
||||
charts = get_charts(namespace)
|
||||
return jsonify(charts)
|
||||
|
||||
@routes.route('/deployChartRevision/<revision>')
|
||||
def deployChartRevision(revision):
|
||||
@routes.route('/deployChartRevision/<revision>/<chart>/<namespace>', methods=['POST'])
|
||||
def deployChartRevision(revision, chart, namespace):
|
||||
print(revision)
|
||||
print(chart)
|
||||
print(namespace)
|
||||
charts = get_charts(namespace)
|
||||
return jsonify(charts)
|
||||
@ -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"})
|
||||
@ -20,6 +20,7 @@
|
||||
{% endwith %}
|
||||
</p>
|
||||
<table class="table table-bordered">
|
||||
<input id="namespace" name="namespace" type="hidden" value="{{ namespace }}">
|
||||
{{ table }}
|
||||
</table>
|
||||
<a class="btn btn-primary" href="/" role="button">Home</a>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user