Change domain(s) to zone(s) in the templates

This commit is contained in:
Stefan Ubbink 2023-03-12 20:40:19 +01:00
parent 73447d396a
commit 34902f6cf9
14 changed files with 46 additions and 46 deletions

View File

@ -96,7 +96,7 @@
</div> </div>
<!-- /.card-header --> <!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<p>Users on the right have access to manage records in all domains <p>Users on the right have access to manage records in all zones
associated with the account. associated with the account.
</p> </p>
<p>Click on users to move between columns.</p> <p>Click on users to move between columns.</p>
@ -113,12 +113,12 @@
</div> </div>
<!-- /.card-body --> <!-- /.card-body -->
<div class="card-body"> <div class="card-body">
<p>Domains on the right are associated with the account. Red marked domain names are <p>Zones on the right are associated with the account. Red marked zone names are
already associated with other accounts. already associated with other accounts.
Moving already associated domains to this account will overwrite the previous Moving already associated zones to this account will overwrite the previous
associated account. associated account.
</p> </p>
<p>Hover over the red domain names to show the associated account. Click on domains to <p>Hover over the red zone names to show the associated account. Click on zones to
move between columns.</p> move between columns.</p>
<div class="form-group col-2"> <div class="form-group col-2">
<select multiple="multiple" class="form-control" id="account_domains" <select multiple="multiple" class="form-control" id="account_domains"
@ -168,12 +168,12 @@
<!-- /.card-header --> <!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<p> <p>
An account allows grouping of domains belonging to a particular entity, such as a An account allows grouping of zones belonging to a particular entity, such as a
customer or customer or
department. department.
</p> </p>
<p> <p>
A domain can be assigned to an account upon domain creation or through the domain A zone can be assigned to an account upon zone creation or through the zone
administration administration
page. page.
</p> </p>
@ -242,6 +242,6 @@
} }
addMultiSelect("#account_multi_user", "Username") addMultiSelect("#account_multi_user", "Username")
addMultiSelect("#account_domains", "Domain") addMultiSelect("#account_domains", "Zone")
</script> </script>
{% endblock %} {% endblock %}

View File

@ -72,7 +72,7 @@
<!-- /.card-header --> <!-- /.card-header -->
<div class="card-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}> <div class="card-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
<p>This key will be linked to the accounts on the right,</p> <p>This key will be linked to the accounts on the right,</p>
<p>thus granting access to domains owned by the selected accounts.</p> <p>thus granting access to zones owned by the selected accounts.</p>
<p>Click on accounts to move between the columns.</p> <p>Click on accounts to move between the columns.</p>
<div class="form-group col-2"> <div class="form-group col-2">
<select multiple="multiple" class="form-control" id="key_multi_account" <select multiple="multiple" class="form-control" id="key_multi_account"
@ -87,12 +87,12 @@
</div> </div>
<!-- /.card-body --> <!-- /.card-body -->
<div class="card-header key-opts"{% if hide_opts %} style="display: none;"{% endif %}> <div class="card-header key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
<h3 class="card-title">Domain Access Control</h3> <h3 class="card-title">Zone Access Control</h3>
</div> </div>
<!-- /.card-header --> <!-- /.card-header -->
<div class="card-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}> <div class="card-body key-opts"{% if hide_opts %} style="display: none;"{% endif %}>
<p>This key will have access to the domains on the right.</p> <p>This key will have access to the zones on the right.</p>
<p>Click on domains to move between the columns.</p> <p>Click on zones to move between the columns.</p>
<div class="form-group col-2"> <div class="form-group col-2">
<select multiple="multiple" class="form-control" id="key_multi_domain" <select multiple="multiple" class="form-control" id="key_multi_domain"
name="key_multi_domain"> name="key_multi_domain">
@ -131,7 +131,7 @@
<p>Fill in all the fields in the form to the left.</p> <p>Fill in all the fields in the form to the left.</p>
<p><strong>Role</strong> The role of the key.</p> <p><strong>Role</strong> The role of the key.</p>
<p><strong>Description</strong> The key description.</p> <p><strong>Description</strong> The key description.</p>
<p><strong>Access Control</strong> The domains or accounts which the key has access to.</p> <p><strong>Access Control</strong> The zones or accounts which the key has access to.</p>
</div> </div>
<!-- /.card-body --> <!-- /.card-body -->
</div> </div>
@ -154,13 +154,13 @@
var warn_modal = $("#modal_warning"); var warn_modal = $("#modal_warning");
if (selectedRole != "User" && selectedDomains > 0 && selectedAccounts > 0) { if (selectedRole != "User" && selectedDomains > 0 && selectedAccounts > 0) {
var warning = "Administrator and Operators have access to all domains. Your domain an account selection won't be saved."; var warning = "Administrator and Operators have access to all zones. Your zone an account selection won't be saved.";
e.preventDefault(e); e.preventDefault(e);
warn_modal.modal('show'); warn_modal.modal('show');
} }
if (selectedRole == "User" && selectedDomains == 0 && selectedAccounts == 0) { if (selectedRole == "User" && selectedDomains == 0 && selectedAccounts == 0) {
var warning = "User role must have at least one account or one domain bound. None selected."; var warning = "User role must have at least one account or one zone bound. None selected.";
e.preventDefault(e); e.preventDefault(e);
warn_modal.modal('show'); warn_modal.modal('show');
} }
@ -203,8 +203,8 @@
} }
}); });
$("#key_multi_domain").multiSelect({ $("#key_multi_domain").multiSelect({
selectableHeader: "<input type='text' class='search-input' autocomplete='off' placeholder='Domain Name'>", selectableHeader: "<input type='text' class='search-input' autocomplete='off' placeholder='Zone Name'>",
selectionHeader: "<input type='text' class='search-input' autocomplete='off' placeholder='Domain Name'>", selectionHeader: "<input type='text' class='search-input' autocomplete='off' placeholder='Zone Name'>",
afterInit: function (ms) { afterInit: function (ms) {
var that = this, var that = this,
$selectableSearch = that.$selectableUl.prev(), $selectableSearch = that.$selectableUl.prev(),

View File

@ -135,9 +135,9 @@
<div class="card-body"> <div class="card-body">
<p>Fill in all the fields to the in the form to the left.</p> <p>Fill in all the fields to the in the form to the left.</p>
{% if create %} {% if create %}
<p><strong>Newly created users do not have access to any domains.</strong> You will need <p><strong>Newly created users do not have access to any zones.</strong> You will need
to grant to grant
access to the user once it is created via the domain management buttons on the access to the user once it is created via the zone management buttons on the
dashboard. dashboard.
</p> </p>
{% else %} {% else %}

View File

@ -38,7 +38,7 @@
<!-- /.card-header --> <!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<div class="callout callout-info"> <div class="callout callout-info">
<p>This tool can be used to search for domains, records, and comments via the PDNS <p>This tool can be used to search for zones, records, and comments via the PDNS
API.</p> API.</p>
</div> </div>
<!-- /.callout --> <!-- /.callout -->

View File

@ -49,7 +49,7 @@
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#tabs-domain" data-toggle="pill" role="tab"> <a class="nav-link" href="#tabs-domain" data-toggle="pill" role="tab">
Search By Domain Search By Zone
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
@ -71,13 +71,13 @@
</div> </div>
<div class="tab-pane" id="tabs-domain"> <div class="tab-pane" id="tabs-domain">
<td> <td>
<label>Domain Name</label> <label>Zone Name</label>
</td> </td>
<td> <td>
<div class="autocomplete" style="width:250px;"> <div class="autocomplete" style="width:250px;">
<input type="text" class="form-control" id="domain_name_filter" <input type="text" class="form-control" id="domain_name_filter"
name="domain_name_filter" name="domain_name_filter"
placeholder="Enter * to search for any domain" value=""> placeholder="Enter * to search for any zone" value="">
</div> </div>
</td> </td>
<td> <td>
@ -447,7 +447,7 @@
$('#auth_name_filter').val(''); $('#auth_name_filter').val('');
$('#user_name_filter').removeAttr('disabled'); $('#user_name_filter').removeAttr('disabled');
canSearch = false; canSearch = false;
main_field = "Domain Name" main_field = "Zone Name"
}); });
$('#account_tab').click(function () { $('#account_tab').click(function () {

View File

@ -48,7 +48,7 @@
<th>Contact</th> <th>Contact</th>
<th>Mail</th> <th>Mail</th>
<th>Member</th> <th>Member</th>
<th>Domain</th> <th>Zone(s)</th>
<th>Action</th> <th>Action</th>
</tr> </tr>
</thead> </thead>

View File

@ -43,7 +43,7 @@
<th>Id</th> <th>Id</th>
<th>Role</th> <th>Role</th>
<th>Description</th> <th>Description</th>
<th>Domains</th> <th>Zones</th>
<th>Accounts</th> <th>Accounts</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>

View File

@ -143,7 +143,7 @@
var modal = $("#modal_revoke"); var modal = $("#modal_revoke");
var username = $(this).prop('id'); var username = $(this).prop('id');
var info = "Are you sure you want to revoke all privileges for user " + username + var info = "Are you sure you want to revoke all privileges for user " + username +
"? They will not able to access any domain."; "? They will not able to access any zone.";
modal.find('.modal-body p').text(info); modal.find('.modal-body p').text(info);
modal.find('#button_revoke_confirm').click(function () { modal.find('#button_revoke_confirm').click(function () {
var postdata = { var postdata = {

View File

@ -564,7 +564,7 @@
have no valid "powerdns-admin" records to their have no valid "powerdns-admin" records to their
autoprovisioning field, will lose all their autoprovisioning field, will lose all their
associations associations
with any domain or account, also reverting to a with any zone or account, also reverting to a
User in User in
the process, despite their current role in the the process, despite their current role in the
local db.<br> local db.<br>
@ -1585,7 +1585,7 @@
document.getElementById('purge_on').checked = false; document.getElementById('purge_on').checked = false;
document.getElementById('purge_off').checked = true; document.getElementById('purge_off').checked = true;
var modal = $("#modal_confirm"); var modal = $("#modal_confirm");
var info = "Are you sure you want to do this? Users will lose their associated domains unless they already have their autoprovisioning field prepopulated."; var info = "Are you sure you want to do this? Users will lose their associated zones unless they already have their autoprovisioning field prepopulated.";
modal.find('.modal-body p').text(info); modal.find('.modal-body p').text(info);
modal.find('#button_confirm').click(function () { modal.find('#button_confirm').click(function () {
document.getElementById('purge_on').checked = true; document.getElementById('purge_on').checked = true;

View File

@ -269,7 +269,7 @@
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Sync Domains from backend</h4> <h4 class="modal-title">Sync Zones from backend</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>

View File

@ -162,7 +162,7 @@
<dt>Account</dt> <dt>Account</dt>
<dd>Specifies the PowerDNS account value to use for the zone.</dd> <dd>Specifies the PowerDNS account value to use for the zone.</dd>
<dt>Zone Type</dt> <dt>Zone Type</dt>
<dd>The type decides how the domain will be replicated across multiple DNS servers. <dd>The type decides how the zone will be replicated across multiple DNS servers.
<ul> <ul>
<li> <li>
<strong>Native</strong> - The server will not perform any Primary or Secondary <strong>Native</strong> - The server will not perform any Primary or Secondary
@ -186,7 +186,7 @@
<dt>SOA-EDIT-API</dt> <dt>SOA-EDIT-API</dt>
<dd>The SOA-EDIT-API setting defines how the SOA serial number will be updated after a <dd>The SOA-EDIT-API setting defines how the SOA serial number will be updated after a
change is change is
made to the domain. made to the zone.
<ul> <ul>
<li> <li>
<strong>DEFAULT</strong> - Generate a soa serial of YYYYMMDD01. If the current serial <strong>DEFAULT</strong> - Generate a soa serial of YYYYMMDD01. If the current serial
@ -273,4 +273,4 @@
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -15,7 +15,7 @@
{% if record_name and record_type %} {% if record_name and record_type %}
Record changelog: <b>{{ record_name}} &nbsp {{ record_type }}</b> Record changelog: <b>{{ record_name}} &nbsp {{ record_type }}</b>
{% else %} {% else %}
Domain changelog: <b>{{ domain.name | pretty_domain_name }}</b> Zone changelog: <b>{{ domain.name | pretty_domain_name }}</b>
{% endif %} {% endif %}
</h1> </h1>
</div> </div>
@ -41,7 +41,7 @@
<div class="card-body"> <div class="card-body">
<button type="button" class="btn btn-primary float-left button_show_records" id="{{ domain.name }}"> <button type="button" class="btn btn-primary float-left button_show_records" id="{{ domain.name }}">
<i class="fa-solid fa-arrow-left"></i> <i class="fa-solid fa-arrow-left"></i>
&nbsp;Manage Domain {{ domain.name }} &nbsp;Manage Zone {{ domain.name }}
</button> </button>
</div> </div>
<div class="card-body"> <div class="card-body">
@ -125,4 +125,4 @@
} }
</script> </script>
{% endblock %} {% endblock %}

View File

@ -37,7 +37,7 @@
<div class="form-group"> <div class="form-group">
<label for="domainid">Zone</label> <label for="domainid">Zone</label>
<select id=domainid class="form-control" style="width:15em;"> <select id=domainid class="form-control" style="width:15em;">
<option value="0">- Select Domain -</option> <option value="0">- Select Zone -</option>
{% for domain in domainss %} {% for domain in domainss %}
<option value="{{ domain.id }}">{{ domain.name }}</option> <option value="{{ domain.id }}">{{ domain.name }}</option>
{% endfor %} {% endfor %}
@ -83,7 +83,7 @@
$(document.body).on("click", ".button_delete", function (e) { $(document.body).on("click", ".button_delete", function (e) {
e.stopPropagation(); e.stopPropagation();
if ($("#domainid").val() == 0) { if ($("#domainid").val() == 0) {
showErrorModal("Please select domain to remove."); showErrorModal("Please select zone to remove.");
return; return;
} }

View File

@ -148,11 +148,11 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<p>Users on the right have access to manage the records in <p>Users on the right have access to manage the records in
the {{ domain.name | pretty_domain_name }} domain.</p> the {{ domain.name | pretty_domain_name }} zone.</p>
<p>Click on users to move from between columns.</p> <p>Click on users to move from between columns.</p>
<p> <p>
Users in <font style="color: red;">red</font> are Administrators Users in <font style="color: red;">red</font> are Administrators
and already have access to <b>ALL</b> domains. and already have access to <b>ALL</b> zones.
</p> </p>
</div> </div>
</div> </div>
@ -197,7 +197,7 @@
</div> </div>
<!-- /.card-header --> <!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<p>The type decides how the domain will be replicated across multiple DNS servers.</p> <p>The type decides how the zone will be replicated across multiple DNS servers.</p>
<ul> <ul>
<li> <li>
Native - PowerDNS will not perform any replication. Use this if you only have one Native - PowerDNS will not perform any replication. Use this if you only have one
@ -214,7 +214,7 @@
zone transfers (AXFRs) from other servers configured as primaries. zone transfers (AXFRs) from other servers configured as primaries.
</li> </li>
</ul> </ul>
<b>New Domain Type Setting:</b> <b>New Zone Type Setting:</b>
<form method="post" action="{{ url_for('domain.change_type', domain_name=domain.name) }}"> <form method="post" action="{{ url_for('domain.change_type', domain_name=domain.name) }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<select name="domain_type" class="form-control" style="width:15em;"> <select name="domain_type" class="form-control" style="width:15em;">
@ -251,7 +251,7 @@
<div class="card-body"> <div class="card-body">
<p>The SOA-EDIT-API setting defines how the SOA serial number will be updated after a change <p>The SOA-EDIT-API setting defines how the SOA serial number will be updated after a change
is made is made
to the domain.</p> to the zone.</p>
<ul> <ul>
<li> <li>
DEFAULT - Generate a soa serial of YYYYMMDD01. If the current serial is lower than DEFAULT - Generate a soa serial of YYYYMMDD01. If the current serial is lower than
@ -303,9 +303,9 @@
</div> </div>
<!-- /.card-header --> <!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<p>This function is used to remove a domain from PowerDNS-Admin <b>AND</b> PowerDNS. All <p>This function is used to remove a zone from PowerDNS-Admin <b>AND</b> PowerDNS. All
records and records and
user privileges associated with this domain will also be removed. This change cannot be user privileges associated with this zone will also be removed. This change cannot be
reverted.</p> reverted.</p>
<button type="button" title="Delete Zone" class="btn btn-danger float-left delete_domain" <button type="button" title="Delete Zone" class="btn btn-danger float-left delete_domain"
id="{{ domain.name }}"> id="{{ domain.name }}">
@ -402,7 +402,7 @@
applyChanges(postdata, $SCRIPT_ROOT + '/domain/' + domain + '/manage-setting', true); applyChanges(postdata, $SCRIPT_ROOT + '/domain/' + domain + '/manage-setting', true);
}); });
// handle deletion of domain // handle deletion of zone
$(document.body).on('click', '.delete_domain', function () { $(document.body).on('click', '.delete_domain', function () {
var modal = $("#modal_delete_domain"); var modal = $("#modal_delete_domain");
var domain = $(this).prop('id'); var domain = $(this).prop('id');
@ -419,7 +419,7 @@
modal.modal('show'); modal.modal('show');
}); });
// domain primary address input handeling // zone primary address input handeling
$("select[name=domain_type]").change(function () { $("select[name=domain_type]").change(function () {
var type = $(this).val(); var type = $(this).val();
if (type == "secondary") { if (type == "secondary") {