2018-08-18 11:41:59 +00:00
{% extends "base.html" %}
{% set active_page = "admin_settings" %}
{% block title %}
2018-08-18 15:42:18 +00:00
< title > PDNS Settings - {{ SITE_NAME }}< / title >
2018-08-18 11:41:59 +00:00
{% endblock %} {% block dashboard_stat %}
<!-- Content Header (Page header) -->
< section class = "content-header" >
< h1 >
Settings < small > PowerDNS-Admin settings< / small >
< / h1 >
< ol class = "breadcrumb" >
< li > < a href = "{{ url_for('dashboard') }}" > < i class = "fa fa-dashboard" > < / i > Home< / a > < / li >
< li > < a href = "#" > Setting< / a > < / li >
< li class = "active" > PDNS< / li >
< / ol >
< / section >
{% endblock %}
{% block content %}
< section class = "content" >
< div class = "row" >
< div class = "col-md-4" >
< div class = "box box-primary" >
< div class = "box-header with-border" >
< h3 class = "box-title" > PDNS Settings< / h3 >
< / div >
<!-- /.box - header -->
<!-- form start -->
2018-08-20 02:59:19 +00:00
< form role = "form" method = "post" data-toggle = "validator" >
2018-08-18 11:41:59 +00:00
< div class = "box-body" >
2018-08-20 02:59:19 +00:00
{% if not SETTING.get('pdns_api_url') or not SETTING.get('pdns_api_key') or not SETTING.get('pdns_version') %}
2018-08-18 11:41:59 +00:00
< div class = "alert alert-danger alert-dismissible" >
< button type = "button" class = "close" data-dismiss = "alert" aria-hidden = "true" > × < / button >
< h4 > < i class = "icon fa fa-ban" > < / i > Error!< / h4 >
2018-08-20 02:59:19 +00:00
Please complete your PowerDNS API configuration before continuing
2018-08-18 11:41:59 +00:00
< / div >
{% endif %}
< div class = "form-group has-feedback" >
< label class = "control-label" for = "pdns_api_url" > PDNS API URL< / label >
2018-08-20 02:59:19 +00:00
< input type = "url" class = "form-control" placeholder = "PowerDNS API url" name = "pdns_api_url" data-error = "Please input a valid PowerDNS API URL" required value = "{{ pdns_api_url }}" >
< span class = "help-block with-errors" > < / span >
2018-08-18 11:41:59 +00:00
< / div >
< div class = "form-group has-feedback" >
< label class = "control-label" for = "pdns_api_key" > PDNS API KEY< / label >
2018-09-04 01:57:41 +00:00
< input type = "password" class = "form-control" placeholder = "PowerDNS API key" name = "pdns_api_key" data-error = "Please input a valid PowerDNS API key" required value = "{{ pdns_api_key }}" >
2018-08-20 02:59:19 +00:00
< span class = "help-block with-errors" > < / span >
2018-08-18 11:41:59 +00:00
< / div >
< div class = "form-group has-feedback" >
< label class = "control-label" for = "pdns_version" > PDNS VERSION< / label >
2018-08-20 02:59:19 +00:00
< input type = "text" class = "form-control" placeholder = "PowerDNS version" name = "pdns_version" data-error = "Please input PowerDNS version" required value = "{{ pdns_version }}" >
< span class = "help-block with-errors" > < / span >
2018-08-18 11:41:59 +00:00
< / div >
< / div >
< div class = "box-footer" >
< button type = "submit" class = "btn btn-flat btn-primary" > Update< / button >
< / div >
< / form >
< / div >
< / div >
< div class = "col-md-8" >
< div class = "box box-primary" >
< div class = "box-header with-border" >
< h3 class = "box-title" > Help< / h3 >
< / div >
< div class = "box-body" >
2018-08-22 10:45:37 +00:00
< dl class = "dl-horizontal" >
< p > You must configure the API connection information before PowerDNS-Admiin can query your PowerDNS data. Following fields are required:< / p >
< dt > PDNS API URL< / dt >
< dd > Your PowerDNS API URL (eg. http://127.0.0.1:8081/).< / dd >
< dt > PDNS API KEY< / dt >
< dd > Your PowerDNS API key.< / dd >
< dt > PDNS VERSION< / dt >
< dd > Your PowerDNS version number (eg. 4.1.1).< / dd >
< / dl >
< p > Find more details at < a href = "https://doc.powerdns.com/md/httpapi/README/" > https://doc.powerdns.com/md/httpapi/README/< / a > < / p >
2018-08-18 11:41:59 +00:00
< / div >
< / div >
< / div >
< / div >
< / section >
{% endblock %}
{% block extrascripts %}
2018-08-20 02:59:19 +00:00
{% assets "js_validation" -%}
< script type = "text/javascript" src = "{{ ASSET_URL }}" > < / script >
{%- endassets %}
2018-08-18 11:41:59 +00:00
{% endblock %}