moar dashboard eyecandy
This commit is contained in:
parent
8efe280735
commit
c653c27509
3 changed files with 8 additions and 4 deletions
|
@ -53,7 +53,11 @@ def dashboard():
|
||||||
for invcls in inv_deployments:
|
for invcls in inv_deployments:
|
||||||
if invcls.user_id == cuser.pid:
|
if invcls.user_id == cuser.pid:
|
||||||
inv_deploycubeids.extend([invcls.machine_id])
|
inv_deploycubeids.extend([invcls.machine_id])
|
||||||
|
#warning detector
|
||||||
|
if invcls.warning == True or invcls.enabled == False:
|
||||||
|
warnflag = True
|
||||||
|
else:
|
||||||
|
warnflag = False
|
||||||
inv_services = cuser.inv_services.filter_by(deleted=False).order_by(Service.date_last_charge.asc()).all()
|
inv_services = cuser.inv_services.filter_by(deleted=False).order_by(Service.date_last_charge.asc()).all()
|
||||||
inv_domains = cuser.inv_domains.filter_by(deleted=False).order_by(Domain.date_created.desc()).all()
|
inv_domains = cuser.inv_domains.filter_by(deleted=False).order_by(Domain.date_created.desc()).all()
|
||||||
|
|
||||||
|
@ -89,5 +93,5 @@ def dashboard():
|
||||||
send_email(current_app.config['MAIL_USERNAME'], 'Cube {} is unreachable'.format(unit_id),
|
send_email(current_app.config['MAIL_USERNAME'], 'Cube {} is unreachable'.format(unit_id),
|
||||||
'vmanager/email/adm_unreachable', user=current_user, unit_id=unit_id, error=str(e))
|
'vmanager/email/adm_unreachable', user=current_user, unit_id=unit_id, error=str(e))
|
||||||
|
|
||||||
return render_template('panel/dashboard.html', form=form, sys_regions=sys_regions, inv_deployments=inv_deployments, inv_services=inv_services, inv_domains=inv_domains, inv_addresses=inv_addresses, rrd=rrd, status=statuses, regions=regions)
|
return render_template('panel/dashboard.html', form=form, sys_regions=sys_regions, inv_deployments=inv_deployments, inv_services=inv_services, inv_domains=inv_domains, inv_addresses=inv_addresses, rrd=rrd, status=statuses, warnflag=warnflag, regions=regions)
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% block outside_container %}{% endblock %}
|
{% block outside_container %}{% endblock %}
|
||||||
<div class="custom-container">
|
<div class="custom-container">
|
||||||
|
<div class="container-fluid">
|
||||||
{% for message in get_flashed_messages() %}
|
{% for message in get_flashed_messages() %}
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<button type="button" class="close" data-dismiss="alert">x</button>
|
<button type="button" class="close" data-dismiss="alert">x</button>
|
||||||
|
@ -42,7 +43,6 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
{% block page_content %}{% endblock %}
|
{% block page_content %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
{% if deploy.enabled == False or deploy.warning == True %}
|
{% if deploy.enabled == False or deploy.warning == True %}
|
||||||
<div id="cube{{ deploy.machine_id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading{{ deploy.machine_id }}" style="border:3px solid #faebcc; border-top: none; margin-bottom: 10px;">
|
<div id="cube{{ deploy.machine_id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading{{ deploy.machine_id }}" style="border:3px solid #faebcc; border-top: none; margin-bottom: 10px;">
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="cube{{ deploy.machine_id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading{{ deploy.machine_id }}" style="border:3px solid #d6e9c6; border-top: none; margin-bottom: 10px;">
|
<div id="cube{{ deploy.machine_id }}" class="panel-collapse collapse {% if not warnflag %}in{% endif %}" role="tabpanel" aria-labelledby="heading{{ deploy.machine_id }}" style="border:3px solid #d6e9c6; border-top: none; margin-bottom: 10px;">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
|
|
Loading…
Reference in a new issue