Skip to content
Snippets Groups Projects
Commit da15c877 authored by Andreas Valder's avatar Andreas Valder
Browse files

Merge branch 'master' of git.fsmpi.rwth-aachen.de:videoagwebsite/videoagwebsite

parents 47c63905 c180af0f
No related branches found
No related tags found
No related merge requests found
......@@ -647,6 +647,13 @@ def dbstatus():
clusters[cluster].append(host)
return render_template('dbstatus.html', clusters=clusters, statuses=status, vars=variables), 200
@app.template_global()
def is_readonly():
try:
return show('SHOW GLOBAL STATUS LIKE "wsrep_ready"')['wsrep_ready'] != 'ON'
except:
return True
import edit
import feeds
import importer
......
......@@ -150,6 +150,9 @@
<li class="pull-right">
<a target="_blank" href="https://git.fsmpi.rwth-aachen.de/videoagwebsite/videoagwebsite/commit/{{ gitversion.longhash }}"><span title="{{ gitversion.branch }} {{ gitversion.hash }}: {{ gitversion.msg }}" data-toggle="tooltip">{{ gitversion.hash }}</span></a>
<span>{{ gethostname() }}</span>
{% if is_readonly() %}
<span>(read-only)</span>
{% endif %}
</li>
{% endif %}
</ul>
......
......@@ -7,7 +7,7 @@
<li class="list-group-item"><strong>{{vars[clusternodes|first]['wsrep_cluster_name']}}</strong> ({{statuses[clusternodes|first]['wsrep_cluster_status']}}, Größe={{statuses[clusternodes|first]['wsrep_cluster_size']}}, Konfiguration={{statuses[clusternodes|first]['wsrep_cluster_conf_id']}})
<ul class="list-group">
{% for host in clusternodes %}
<li class="list-group-item list-group-item-{{{'1': 'warning', '2': 'warning', '3': 'info', '4': 'success'}.get(statuses[host]['wsrep_local_state'], 'danger')}}"><a href="#{{host|tagid}}">{{vars[host]['wsrep_node_name']}}</a> ({{statuses[host]['wsrep_local_state_comment']}}, Letzte Änderung={{statuses[host]['wsrep_last_committed']}}, Recv.-Avg.={{statuses[host]['wsrep_local_recv_queue_avg']}}, Send-Avg.={{statuses[host]['wsrep_local_send_queue_avg']}})</li>
<li class="list-group-item list-group-item-{{{'ON': 'success', 'OFF': 'warning'}.get(statuses[host]['wsrep_ready'], 'danger')}}"><a href="#{{host|tagid}}">{{vars[host]['wsrep_node_name']}}</a> ({{statuses[host]['wsrep_local_state_comment']}}, Schreibbar={{statuses[host]['wsrep_ready']}}, Letzte Änderung={{statuses[host]['wsrep_last_committed']}}, Recv.-Avg.={{statuses[host]['wsrep_local_recv_queue_avg']}}, Send-Avg.={{statuses[host]['wsrep_local_send_queue_avg']}})</li>
{% endfor %}
</ul>
</li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment