From c3699889e2ab58861c0212e1de820ddbc7bcfbc7 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 16 Oct 2019 15:29:44 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9session=E6=94=AF?= =?UTF-8?q?=E6=8C=81protocol=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/static/js/jumpserver.js | 3 +++ apps/terminal/api/session.py | 2 +- apps/terminal/templates/terminal/session_list.html | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/static/js/jumpserver.js b/apps/static/js/jumpserver.js index d028743be..bb4409a37 100644 --- a/apps/static/js/jumpserver.js +++ b/apps/static/js/jumpserver.js @@ -579,6 +579,9 @@ jumpserver.initServerSideDataTable = function (options) { ajax: { url: options.ajax_url, error: function (jqXHR, textStatus, errorThrown) { + if (jqXHR.responseText && jqXHR.responseText.indexOf("%(value)s") ) { + return + } var msg = gettext("Unknown error occur"); if (jqXHR.responseJSON) { if (jqXHR.responseJSON.error) { diff --git a/apps/terminal/api/session.py b/apps/terminal/api/session.py index 7071ddd33..57120cbfe 100644 --- a/apps/terminal/api/session.py +++ b/apps/terminal/api/session.py @@ -27,7 +27,7 @@ class SessionViewSet(OrgBulkModelViewSet): queryset = Session.objects.all() serializer_class = serializers.SessionSerializer permission_classes = (IsOrgAdminOrAppUser, ) - filter_fields = [ + filterset_fields = [ "user", "asset", "system_user", "remote_addr", "protocol", "terminal", "is_finished", ] diff --git a/apps/terminal/templates/terminal/session_list.html b/apps/terminal/templates/terminal/session_list.html index d23d9be02..1393bd241 100644 --- a/apps/terminal/templates/terminal/session_list.html +++ b/apps/terminal/templates/terminal/session_list.html @@ -72,6 +72,7 @@
  • {% trans 'Asset' %}
  • {% trans 'System user' %}
  • {% trans 'Remote addr' %}
  • +
  • {% trans 'Protocol' %}
  • {#
  • {% trans 'Protocol' %}
  • #} {% endblock %}