Merge pull request #609 from ngoduykhanh/domain_sort_fixes

Fix dashboard domain sorting
This commit is contained in:
Khanh Ngo 2019-12-17 13:57:11 +07:00 committed by GitHub
commit ea8531dd3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 %}