templates/index: Directly referencing config.REFRESH_RATE
Fixes https://github.com/voxpupuli/puppetboard/issues/213 Also changing the 'if' condition from '!=' to '>' since this application can only work with unsigned integers
This commit is contained in:
@@ -140,7 +140,6 @@ def index(env):
|
||||
# TODO: Would be great if we could parallelize this somehow, doing these
|
||||
# requests in sequence is rather pointless.
|
||||
prefix = 'puppetlabs.puppetdb.query.population'
|
||||
refreshrate = app.config['REFRESH_RATE']
|
||||
num_nodes = get_or_abort(
|
||||
puppetdb.metric,
|
||||
"{0}{1}".format(prefix, ':type=default,name=num-nodes'))
|
||||
@@ -198,7 +197,6 @@ def index(env):
|
||||
nodes=nodes_overview,
|
||||
stats=stats,
|
||||
envs=envs,
|
||||
refreshrate=refreshrate,
|
||||
current_env=env
|
||||
)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% import '_macros.html' as macros %}
|
||||
{% block content %}
|
||||
{% if refreshrate != 0 %}
|
||||
<meta http-equiv="refresh" content="{{refreshrate}}">
|
||||
{% if config.REFRESH_RATE > 0 %}
|
||||
<meta http-equiv="refresh" content="{{config.REFRESH_RATE}}">
|
||||
{% endif %}
|
||||
<div class="ui vertical grid">
|
||||
<div class="four column row">
|
||||
|
||||
Reference in New Issue
Block a user