Skip to content
Snippets Groups Projects
Commit c180af0f authored by Julian Rother's avatar Julian Rother
Browse files

Added marker for read-only databases

parent 48c91176
Branches
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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment