mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-11-02 02:57:56 +00:00
Load steps after setting flavor
This commit is contained in:
@@ -65,6 +65,11 @@ def build_app(path):
|
|||||||
def wizard():
|
def wizard():
|
||||||
return flask.render_template('wizard.html')
|
return flask.render_template('wizard.html')
|
||||||
|
|
||||||
|
@bp.route("/submit_flavor", methods=["POST"])
|
||||||
|
def submit_flavor():
|
||||||
|
data = flask.request.form.copy()
|
||||||
|
return flask.render_template('wizard.html', flavor=data["flavor"])
|
||||||
|
|
||||||
@bp.route("/submit", methods=["POST"])
|
@bp.route("/submit", methods=["POST"])
|
||||||
def submit():
|
def submit():
|
||||||
data = flask.request.form.copy()
|
data = flask.request.form.copy()
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro radio(name, value, emph, text) %}
|
{% macro radio(name, value, emph, text, current) %}
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" name="{{ name }}" value="{{ value }}">
|
<input type="radio" name="{{ name }}" value="{{ value }}"{% if current == value %} checked="checked"{% endif %}>
|
||||||
{% if emph %}
|
{% if emph %}
|
||||||
<strong>{{ emph }}</strong>,
|
<strong>{{ emph }}</strong>,
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ developpers, will mostly cover Compose and Stack, while other flavors are
|
|||||||
maintained by specific contributors.</p>
|
maintained by specific contributors.</p>
|
||||||
|
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
{{ macros.radio("flavor", "compose", "Compose", "simply using Docker Compose manager") }}
|
{{ macros.radio("flavor", "compose", "Compose", "simply using Docker Compose manager", flavor) }}
|
||||||
{{ macros.radio("flavor", "stack", "Stack", "using stack deployments in a Swarm cluster") }}
|
{{ macros.radio("flavor", "stack", "Stack", "using stack deployments in a Swarm cluster", flavor) }}
|
||||||
{{ macros.radio("flavor", "rancher", "Rancher", "on top of the Rancher container manager") }}
|
{{ macros.radio("flavor", "rancher", "Rancher", "on top of the Rancher container manager", flavor) }}
|
||||||
{{ macros.radio("flavor", "kubernetes", "Kubernetes", "on top of the Kubernetes container manager") }}
|
{{ macros.radio("flavor", "kubernetes", "Kubernetes", "on top of the Kubernetes container manager", flavor) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
@@ -8,13 +8,18 @@
|
|||||||
ready when using this wizard.
|
ready when using this wizard.
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|
||||||
|
<form method="post" action="{{ url_for(".submit_flavor") }}">
|
||||||
|
{% include "steps/flavor.html" %}
|
||||||
|
<input class="btn btn-primary" type="submit" value="Next >" style="margin-bottom: 15px">
|
||||||
|
</form>
|
||||||
|
{% if flavor %}
|
||||||
<form method="post" action="{{ url_for(".submit") }}">
|
<form method="post" action="{{ url_for(".submit") }}">
|
||||||
{% include "steps/compose/flavor.html" %}
|
<input type="hidden" name="flavor" value="{{ flavor }}">
|
||||||
{% include "steps/compose/config.html" %}
|
{% include "steps/" + flavor + "/config.html" %}
|
||||||
{% include "steps/compose/services.html" %}
|
{% include "steps/" + flavor + "/services.html" %}
|
||||||
{% include "steps/compose/expose.html" %}
|
{% include "steps/" + flavor + "/expose.html" %}
|
||||||
<!-- {% include "steps/compose/optional.html" %} -->
|
|
||||||
|
|
||||||
<input class="btn btn-primary" type="submit" value="Setup Mailu">
|
<input class="btn btn-primary" type="submit" value="Setup Mailu">
|
||||||
|
{% endif %}
|
||||||
|
<!-- {% include "steps/compose/optional.html" %} -->
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user