change the deployment misc tab to information
This commit is contained in:
parent
2c5d46d4b3
commit
12110949b3
3 changed files with 12 additions and 5 deletions
|
@ -38,7 +38,7 @@ def index():
|
|||
@fresh_login_required
|
||||
@admin_required
|
||||
def list_orders():
|
||||
AllOrders = Order.query.all()
|
||||
AllOrders = Order.query.filter_by(status='new').all()
|
||||
return render_template('admin/list_orders.html', orders=AllOrders)
|
||||
|
||||
@admin.route("/listdeployments", methods=['GET'])
|
||||
|
|
|
@ -26,7 +26,7 @@ def deploy():
|
|||
form = OrderForm()
|
||||
if form.validate_on_submit():
|
||||
recipe = Recipe.query.filter_by(category='deploy').first()
|
||||
new_order = Order(user_id=int(current_user.pid), recipe_id=int(recipe.pid), parameter1=str(form.alias.data), parameter2=str(form.cpu.data), parameter3=str(form.memory.data), parameter4=str(form.storage.data))
|
||||
new_order = Order(user_id=int(current_user.pid), recipe_id=int(recipe.pid), parameter1=str(form.alias.data), parameter2=str(form.cpu.data), parameter3=str(form.memory.data), parameter4=str(form.storage.data), status='new')
|
||||
db.session.add(new_order)
|
||||
db.session.commit()
|
||||
send_email(current_app.config['MAIL_USERNAME'], 'New order from {}'.format(current_user.email),
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#controls{{ deploy.machine_id }}">Control</a></li>
|
||||
<li><a data-toggle="tab" href="#graphs{{ deploy.machine_id }}">Monitoring</a></li>
|
||||
<li><a data-toggle="tab" href="#misc{{ deploy.machine_id }}">Misc.</a></li>
|
||||
<li><a data-toggle="tab" href="#nfo{{ deploy.machine_id }}">Information</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
@ -82,11 +82,18 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div id="misc{{ deploy.machine_id }}" class="tab-pane fade">
|
||||
<div id="nfo{{ deploy.machine_id }}" class="tab-pane fade">
|
||||
<p>
|
||||
Unit: {{ deploy.machine_id }}<br />
|
||||
<br />
|
||||
Date Created: {{ moment(deploy.date_created).format('lll') }}<br />
|
||||
{% if deploy.period == 1 %}
|
||||
{{ deploy.period }} month payment cycle<br />
|
||||
{% else %}
|
||||
{{ deploy.period }} months payment cycle<br />
|
||||
{% endif %}
|
||||
State: {{ status[deploy.machine_id] }}<br />
|
||||
Protected: {{ deploy.protected }}<br />
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue