From 6c9c560b86a06a27b3e64f33540d2a53e23ea7bb Mon Sep 17 00:00:00 2001 From: halcyon <864072399@qq.com> Date: Sat, 7 Mar 2015 17:50:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=84=E7=A7=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jasset/views.py | 1 - jlog/views.py | 8 +++--- templates/jasset/group_list.html | 45 +------------------------------- templates/jasset/host_list.html | 45 +------------------------------- templates/jasset/idc_list.html | 45 +------------------------------- templates/jlog/log_offline.html | 26 ++---------------- templates/jlog/log_online.html | 24 +---------------- templates/paginator.html | 44 +++++++++++++++++++++++++++++++ 8 files changed, 54 insertions(+), 184 deletions(-) create mode 100644 templates/paginator.html diff --git a/jasset/views.py b/jasset/views.py index 1c94a49ee..757c9770c 100644 --- a/jasset/views.py +++ b/jasset/views.py @@ -247,7 +247,6 @@ def list_idc(request): header_title, path1, path2 = u'查看IDC', u'资产管理', u'查看IDC' posts = IDC.objects.all().order_by('id') contact_list, p, contacts, page_range, current_page, show_first, show_end = pages(posts, request) - print contact_list, p, contacts, page_range, current_page, show_first, show_end return render_to_response('jasset/idc_list.html', locals(), context_instance=RequestContext(request)) diff --git a/jlog/views.py b/jlog/views.py index 829747184..62a7071a0 100644 --- a/jlog/views.py +++ b/jlog/views.py @@ -20,7 +20,7 @@ def log_list_online(request): header_title, path1, path2 = u'查看日志', u'查看日志', u'在线用户' web_socket_host = CONF.get('websocket', 'web_socket_host') posts = Log.objects.filter(is_finished=0).order_by('-start_time') - contact_list, p, contacts, page_range, current_page = pages(posts, request) + contact_list, p, contacts, page_range, current_page, show_first, show_end = pages(posts, request) return render_to_response('jlog/log_online.html', locals()) @@ -29,7 +29,7 @@ def log_list_offline(request): header_title, path1, path2 = u'查看日志', u'查看日志', u'历史记录' web_socket_host = CONF.get('websocket', 'web_socket_host') posts = Log.objects.filter(is_finished=1).order_by('-start_time') - contact_list, p, contacts, page_range, current_page = pages(posts, request) + contact_list, p, contacts, page_range, current_page, show_first, show_end = pages(posts, request) return render_to_response('jlog/log_offline.html', locals()) @@ -60,10 +60,10 @@ def log_search(request): if env == 'online': posts = contact_list = Log.objects.filter(Q(user__contains=keyword) | Q(host__contains=keyword)) \ .filter(is_finished=0).order_by('-start_time') - contact_list, p, contacts, page_range, current_page = pages(posts, request) + contact_list, p, contacts, page_range, current_page, show_first, show_end = pages(posts, request) elif env == 'offline': posts = contact_list = Log.objects.filter(Q(user__contains=keyword) | Q(host__contains=keyword)) \ .filter(is_finished=1).order_by('-start_time') - contact_list, p, contacts, page_range, current_page = pages(posts, request) + contact_list, p, contacts, page_range, current_page, show_first, show_end = pages(posts, request) return render_to_response('jlog/log_search.html', locals()) diff --git a/templates/jasset/group_list.html b/templates/jasset/group_list.html index 3f54241e2..b427266ca 100644 --- a/templates/jasset/group_list.html +++ b/templates/jasset/group_list.html @@ -38,50 +38,7 @@ {% endfor %} -