Commit c180af0f authored by Julian Rother's avatar Julian Rother
Browse files

Added marker for read-only databases

parent 48c91176
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment