Fix dashboard domain sorting

This commit is contained in:
Khanh Ngo 2019-12-17 13:34:52 +07:00
parent 4a3f121b02
commit 103bf176ed
No known key found for this signature in database
GPG Key ID: D5FAA6A16150E49E
3 changed files with 4 additions and 6 deletions

View File

@ -43,9 +43,9 @@ def domains_custom(boxId):
columns = [
Domain.name, Domain.dnssec, Domain.type, Domain.serial, Domain.master,
Domain.account
Domain.account_id
]
# History.created_on.desc()
order_by = []
for i in range(len(columns)):
column_index = request.args.get("order[{0}][column]".format(i))

View File

@ -169,8 +169,6 @@
{% endblock %}
{% block extrascripts %}
<script>
PDNS_VERSION = '{{ SETTING.get("pdns_version") }}';
//SYBPATCH START//
function setUpDomainList(id ,url){
$(id).DataTable({

View File

@ -19,12 +19,12 @@
{% endmacro %}
{% macro master(domain) %}
{% if domain.master == '[]'%}N/A{% else %}{{ domain.master|display_master_name }}{% endif %}
{% if domain.master == '[]'%}-{% else %}{{ domain.master|display_master_name }}{% endif %}
{% endmacro %}
{% macro account(domain) %}
{% if current_user.role.name in ['Administrator', 'Operator'] %}
{% if domain.account_description != "" %}{{ domain.account.description }} {% endif %}[{{ domain.account.name }}]
{{ domain.account.name if domain.account else '-' }}
{% endif %}
{% endmacro %}