mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-04-13 07:28:20 +00:00
Export PDNS version to frontend
This commit is contained in:
parent
83475ae17c
commit
d5d0948ab8
2
.gitignore
vendored
2
.gitignore
vendored
@ -31,3 +31,5 @@ db_repository/*
|
|||||||
upload/avatar/*
|
upload/avatar/*
|
||||||
tmp/*
|
tmp/*
|
||||||
.ropeproject
|
.ropeproject
|
||||||
|
.sonarlint/*
|
||||||
|
pdns.db
|
||||||
|
@ -206,6 +206,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
|
PDNS_VERSION = '{{ pdns_version }}'
|
||||||
// set up history data table
|
// set up history data table
|
||||||
$("#tbl_history").DataTable({
|
$("#tbl_history").DataTable({
|
||||||
"paging" : false,
|
"paging" : false,
|
||||||
|
@ -109,6 +109,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
|
PDNS_VERSION = '{{ pdns_version }}'
|
||||||
// superglobals
|
// superglobals
|
||||||
window.records_allow_edit = {{ editable_records|tojson }};
|
window.records_allow_edit = {{ editable_records|tojson }};
|
||||||
window.nEditing = null;
|
window.nEditing = null;
|
||||||
|
@ -439,7 +439,7 @@ def dashboard():
|
|||||||
uptime = filter(lambda uptime: uptime['name'] == 'uptime', statistics)[0]['value']
|
uptime = filter(lambda uptime: uptime['name'] == 'uptime', statistics)[0]['value']
|
||||||
else:
|
else:
|
||||||
uptime = 0
|
uptime = 0
|
||||||
return render_template('dashboard.html', domains=domains, domain_count=domain_count, users=users, history_number=history_number, uptime=uptime, histories=history)
|
return render_template('dashboard.html', domains=domains, domain_count=domain_count, users=users, history_number=history_number, uptime=uptime, histories=history,pdns_version=app.config['PDNS_VERSION'])
|
||||||
|
|
||||||
|
|
||||||
@app.route('/domain/<path:domain_name>', methods=['GET', 'POST'])
|
@app.route('/domain/<path:domain_name>', methods=['GET', 'POST'])
|
||||||
@ -479,7 +479,7 @@ def domain(domain_name):
|
|||||||
editable_records = app.config['FORWARD_RECORDS_ALLOW_EDIT']
|
editable_records = app.config['FORWARD_RECORDS_ALLOW_EDIT']
|
||||||
else:
|
else:
|
||||||
editable_records = app.config['REVERSE_RECORDS_ALLOW_EDIT']
|
editable_records = app.config['REVERSE_RECORDS_ALLOW_EDIT']
|
||||||
return render_template('domain.html', domain=domain, records=records, editable_records=editable_records)
|
return render_template('domain.html', domain=domain, records=records, editable_records=editable_records,pdns_version=app.config['PDNS_VERSION'])
|
||||||
|
|
||||||
|
|
||||||
@app.route('/admin/domain/add', methods=['GET', 'POST'])
|
@app.route('/admin/domain/add', methods=['GET', 'POST'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user