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 = [ columns = [
Domain.name, Domain.dnssec, Domain.type, Domain.serial, Domain.master, Domain.name, Domain.dnssec, Domain.type, Domain.serial, Domain.master,
Domain.account Domain.account_id
] ]
# History.created_on.desc()
order_by = [] order_by = []
for i in range(len(columns)): for i in range(len(columns)):
column_index = request.args.get("order[{0}][column]".format(i)) column_index = request.args.get("order[{0}][column]".format(i))

View File

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

View File

@ -19,12 +19,12 @@
{% endmacro %} {% endmacro %}
{% macro master(domain) %} {% 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 %} {% endmacro %}
{% macro account(domain) %} {% macro account(domain) %}
{% if current_user.role.name in ['Administrator', 'Operator'] %} {% 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 %} {% endif %}
{% endmacro %} {% endmacro %}