Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
kiekerjan committed Nov 2, 2024
1 parent 24d6ecb commit def9482
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions management/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,11 @@ def dns_get_zonefile(zone):
@app.route('/dns/advanced-dns')
@authorized_personnel_only
def dns_get_advanced_dns_options():
# Is hidden master available?

# If yes, provide current value of hidden master in JSON response

# Provide current value of short TTL

return json_response({ "hiddenmaster_enabled": False, "hiddenmaster_selected": True, "short_ttl_selected": True })

Expand All @@ -414,6 +419,14 @@ def dns_get_advanced_dns_options():
def dns_set_advanced_dns_options():

try:
# Is hidden master available?

# If yes, store the hidden master selection in configuration

# Store the value of short TTL selected

# If anything changed, kick a DNS update

# We do nothing yet
logging.debug(f"Hidden master selected value {request.form.get('hiddenmaster_selected')} of type {type(request.form.get('hiddenmaster_selected'))}")
logging.debug(f"Short ttl selected value {request.form.get('short_ttl_selected')} of type {type(request.form.get('hiddenmaster_selected'))}")
Expand Down
2 changes: 1 addition & 1 deletion management/templates/custom-dns.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h4>Short TTL</h4>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-11">
<p id="hiddendns-not-available-instructions" style="display: none" class="small">
Hidden DNS is not available. First make sure at least two secondary DNS servers are configured in the Using a secondary nameserver section.
Hidden Master is not available. First make sure at least two secondary DNS servers are configured in the Using a secondary nameserver section.
</p>
</div>
</div>
Expand Down

0 comments on commit def9482

Please sign in to comment.