mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +00:00
Make it possible again to use a different Zone Type than 'native', fixes #1501
This commit is contained in:
parent
1f6a0504c8
commit
a2429ad9d6
@ -66,7 +66,7 @@ def domain(domain_name):
|
||||
current_app.logger.debug("Fetched rrsets: \n{}".format(pretty_json(rrsets)))
|
||||
|
||||
# API server might be down, misconfigured
|
||||
if not rrsets and domain.type != 'Slave':
|
||||
if not rrsets and domain.type != 'slave':
|
||||
abort(500)
|
||||
|
||||
quick_edit = Setting().get('record_quick_edit')
|
||||
@ -206,7 +206,7 @@ def changelog(domain_name):
|
||||
current_app.logger.debug("Fetched rrsets: \n{}".format(pretty_json(rrsets)))
|
||||
|
||||
# API server might be down, misconfigured
|
||||
if not rrsets and domain.type != 'Slave':
|
||||
if not rrsets and domain.type != 'slave':
|
||||
abort(500)
|
||||
|
||||
records_allow_to_edit = Setting().get_records_allow_to_edit()
|
||||
@ -294,7 +294,7 @@ def record_changelog(domain_name, record_name, record_type):
|
||||
current_app.logger.debug("Fetched rrsets: \n{}".format(pretty_json(rrsets)))
|
||||
|
||||
# API server might be down, misconfigured
|
||||
if not rrsets and domain.type != 'Slave':
|
||||
if not rrsets and domain.type != 'slave':
|
||||
abort(500)
|
||||
|
||||
# get all changelogs for this domain, in descening order
|
||||
|
@ -76,11 +76,16 @@
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="radio_type" id="radio_type_secondary"
|
||||
value="secondary">
|
||||
value="slave">
|
||||
Secondary
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: none;" 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)">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="domain_template">Zone Template</label>
|
||||
<select class="form-control" id="domain_template" name="domain_template">
|
||||
@ -90,11 +95,6 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" style="display: none;" id="domain_primary_address_div">
|
||||
<input type="text" class="form-control" name="domain_primary_address"
|
||||
id="domain_primary_address"
|
||||
placeholder="Enter valid Primary Server IP addresses (separated by commas)">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>SOA-EDIT-API</label>
|
||||
<div class="radio">
|
||||
@ -228,10 +228,10 @@
|
||||
<script>
|
||||
$("input[name=radio_type]").change(function () {
|
||||
var type = $(this).val();
|
||||
if (type == "secondary") {
|
||||
$("#domain_primary_address_div").show();
|
||||
if (type == "slave") {
|
||||
$("#domain_master_address_div").show();
|
||||
} else {
|
||||
$("#domain_primary_address_div").hide();
|
||||
$("#domain_master_address_div").hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -220,12 +220,12 @@
|
||||
<select name="domain_type" class="form-control" style="width:15em;">
|
||||
<option selected value="0">- Unchanged -</option>
|
||||
<option value="native">Native</option>
|
||||
<option value="primary">Primary</option>
|
||||
<option value="secondary">Secondary</option>
|
||||
<option value="master">Primary</option>
|
||||
<option value="slave">Secondary</option>
|
||||
</select><br/>
|
||||
<div class="form-group" style="display: none;" id="domain_primary_address_div">
|
||||
<input type="text" class="form-control" name="domain_primary_address"
|
||||
id="domain_primary_address"
|
||||
<div class="form-group" style="display: none;" 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)">
|
||||
</div>
|
||||
<button type="submit" title="Update Zone Type" class="btn btn-primary" id="change_type">
|
||||
@ -422,10 +422,10 @@
|
||||
// zone primary address input handeling
|
||||
$("select[name=domain_type]").change(function () {
|
||||
var type = $(this).val();
|
||||
if (type == "secondary") {
|
||||
$("#domain_primary_address_div").show();
|
||||
if (type == "slave") {
|
||||
$("#domain_master_address_div").show();
|
||||
} else {
|
||||
$("#domain_primary_address_div").hide();
|
||||
$("#domain_master_address_div").hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user