mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +00:00
Show the current zone type and soa-edit-api settings on the zone settings page
This commit is contained in:
parent
cacfc042e2
commit
bae746cffe
@ -560,13 +560,17 @@ def setting(domain_name):
|
||||
d = Domain(name=domain_name)
|
||||
domain_user_ids = d.get_user()
|
||||
account = d.get_account()
|
||||
domain_info = d.get_domain_info(domain_name)
|
||||
|
||||
return render_template('domain_setting.html',
|
||||
domain=domain,
|
||||
users=users,
|
||||
domain_user_ids=domain_user_ids,
|
||||
accounts=accounts,
|
||||
domain_account=account)
|
||||
domain_account=account,
|
||||
zone_type=domain_info["kind"].lower(),
|
||||
masters=','.join(domain_info["masters"]),
|
||||
soa_edit_api=domain_info["soa_edit_api"].upper())
|
||||
|
||||
if request.method == 'POST':
|
||||
# username in right column
|
||||
|
@ -218,15 +218,16 @@
|
||||
<form method="post" action="{{ url_for('domain.change_type', domain_name=domain.name) }}">
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||
<select name="domain_type" class="form-control" style="width:15em;">
|
||||
<option selected value="0">- Unchanged -</option>
|
||||
<option value="native">Native</option>
|
||||
<option value="master">Primary</option>
|
||||
<option value="slave">Secondary</option>
|
||||
<option value="0">- Unchanged -</option>
|
||||
{% for type in ["native", "master", "slave"] %}
|
||||
<option {% if zone_type == type %}selected{% endif %} value="{{ type }}">{{ type | format_zone_type }}</option>
|
||||
{% endfor %}
|
||||
</select><br/>
|
||||
<div class="form-group" style="display: none;" id="domain_master_address_div">
|
||||
<div class="form-group" style="{% if zone_type != 'slave' %}display: none;{% endif %}" id="domain_master_address_div">
|
||||
<input type="text" class="form-control" name="domain_master_address"
|
||||
id="domain_master_address"
|
||||
placeholder="Enter valid Primary Server IP addresses (separated by commas)">
|
||||
placeholder="Enter valid Primary Server IP addresses (separated by commas)"
|
||||
value="{{ masters }}">
|
||||
</div>
|
||||
<button type="submit" title="Update Zone Type" class="btn btn-primary" id="change_type">
|
||||
<i class="fa-solid fa-floppy-disk"></i> Update Zone Type
|
||||
@ -276,10 +277,9 @@
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
||||
<select name="soa_edit_api" class="form-control" style="width:15em;">
|
||||
<option selected value="0">- Unchanged -</option>
|
||||
<option>DEFAULT</option>
|
||||
<option>INCREASE</option>
|
||||
<option>EPOCH</option>
|
||||
<option>OFF</option>
|
||||
{% for edit_type in ["DEFAULT", "INCREASE", "EPOCH", "OFF"] %}
|
||||
<option {% if soa_edit_api == edit_type %}selected{% endif %}>{{ edit_type }}</option>
|
||||
{% endfor %}
|
||||
</select><br/>
|
||||
<button type="submit" title="Update SOA-EDIT-API" class="btn btn-primary"
|
||||
id="change_soa_edit_api">
|
||||
|
Loading…
Reference in New Issue
Block a user