powerdns-admin/powerdnsadmin/templates/dashboard_domain.html

80 lines
3.5 KiB
HTML
Raw Normal View History

2017-09-04 13:34:01 +00:00
{% macro name(domain) %}
<a href="{{ url_for('domain.domain', domain_name=domain.name) }}"><strong>{{ domain.name | pretty_domain_name }}</strong></a>
2017-09-04 13:34:01 +00:00
{% endmacro %}
{% macro dnssec(domain) %}
{% if domain.dnssec %}
<td>
<button class="btn badge btn-success button_dnssec" title="Edit DNSSEC" id="{{ domain.name }}"><i
class="fa-solid fa-lock"></i></button>
</td>
{% else %}
<td>
<button class="btn badge btn-danger button_dnssec" title="Enable DNSSEC" id="{{ domain.name }}"><i
class="fa-solid fa-lock-open"></i></button>
</td>
{% endif %}
2017-09-04 13:34:01 +00:00
{% endmacro %}
{% macro type(domain) %}
{{ domain.type | format_zone_type }}
2017-09-04 13:34:01 +00:00
{% endmacro %}
{% macro serial(domain) %}
2021-06-04 13:24:49 +00:00
{% if domain.serial == '0' %}{{ domain.notified_serial }}{% else %}{{ domain.serial }}{% endif %}
2017-09-04 13:34:01 +00:00
{% endmacro %}
{% macro master(domain) %}
{% if domain.master == '[]' %}N/A{% else %}{{ domain.master | display_master_name }}{% endif %}
2017-09-04 13:34:01 +00:00
{% endmacro %}
{% macro account(domain) %}
2018-08-31 04:57:06 +00:00
{% if current_user.role.name in ['Administrator', 'Operator'] %}
{{ domain.account.name if domain.account else 'None' }}
{% else %}
None
{% endif %}
{% endmacro %}
2017-09-04 13:34:01 +00:00
{% macro actions(domain) %}
<td>
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="fa-solid fa-bars"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenu">
<button class="dropdown-item btn-success" type="button"
onclick="window.location.href='{{ url_for('domain.domain', domain_name=domain.name) }}'">
<i class="fa-solid fa-pencil"></i>&nbsp;Edit Records
</button>
{% if current_user.role.name in ['Administrator', 'Operator'] %}
<button class="dropdown-item btn-danger" type="button"
onclick="window.location.href='{{ url_for('domain.setting', domain_name=domain.name) }}'">
<i class="fa-solid fa-cog"></i>&nbsp;Zone Settings
</button>
<button class="dropdown-item btn-success button_template" id="{{ domain.name }}" type="button">
<i class="fa-solid fa-clone"></i>&nbsp;Create Template
</button>
{% endif %}
{% if current_user.role.name in ['Administrator', 'Operator'] or allow_user_view_history %}
<button class="dropdown-item btn-primary" type="button"
onclick="window.location.href='{{ url_for('domain.changelog', domain_name=domain.name) }}'">
<i class="fa-solid fa-history" aria-hidden="true"></i>&nbsp;Zone Changelog
</button>
{% endif %}
{% if current_user.role.name in ['Administrator', 'Operator'] or allow_user_remove_domain %}
<div class="dropdown-divider"></div>
<button type="button" class="dropdown-item btn-secondary button_delete"
onclick="window.location.href='{{ url_for('domain.remove') }}'">
<span style="color: red;"><i class="fa-solid fa-trash"></i>&nbsp;Remove Zone</span>
</button>
{% endif %}
</div>
</div>
</td>
2017-09-04 13:34:01 +00:00
{% endmacro %}