diff --git a/apps/audits/backends/record/base.py b/apps/audits/backends/record/base.py
index 929937fc3..e96b8b131 100644
--- a/apps/audits/backends/record/base.py
+++ b/apps/audits/backends/record/base.py
@@ -12,6 +12,3 @@ class RecordBase(object):
@abc.abstractmethod
def filter(self, date_from_ts=None, proxy_log_id=None):
pass
-
-
-
diff --git a/apps/audits/models.py b/apps/audits/models.py
index 255c1dad5..25790f8a0 100644
--- a/apps/audits/models.py
+++ b/apps/audits/models.py
@@ -58,6 +58,10 @@ class ProxyLog(models.Model):
def __unicode__(self):
return '%s-%s-%s' % (self.user, self.asset, self.system_user)
+ def commands(self):
+ from audits.backends import command_store
+ return command_store.filter(proxy_log_id=self.id)
+
class Meta:
ordering = ['-date_start', 'user']
diff --git a/apps/audits/templates/audits/proxy_log_list.html b/apps/audits/templates/audits/proxy_log_list.html
index f2f983641..42e0ef097 100644
--- a/apps/audits/templates/audits/proxy_log_list.html
+++ b/apps/audits/templates/audits/proxy_log_list.html
@@ -98,7 +98,7 @@
{% else %}
-
+
|
diff --git a/apps/audits/urls/views_urls.py b/apps/audits/urls/views_urls.py
index 67d5d35c6..d28882704 100644
--- a/apps/audits/urls/views_urls.py
+++ b/apps/audits/urls/views_urls.py
@@ -4,11 +4,15 @@ from .. import views
app_name = 'audits'
urlpatterns = [
- url(r'^proxy-log$', views.ProxyLogListView.as_view(), name='proxy-log-list'),
- url(r'^proxy-log/(?P\d+)$', views.ProxyLogDetailView.as_view(), name='proxy-log-detail'),
- url(r'^proxy-log/(?P\d+)/commands$', views.ProxyLogCommandsListView.as_view(), name='proxy-log-commands-list'),
- url(r'^command-log$', views.CommandLogListView.as_view(), name='command-log-list'),
- url(r'^login-log$', views.LoginLogListView.as_view(), name='login-log-list'),
+ url(r'^proxy-log$', views.ProxyLogListView.as_view(),
+ name='proxy-log-list'),
+ url(r'^proxy-log/(?P\d+)$', views.ProxyLogDetailView.as_view(),
+ name='proxy-log-detail'),
+ # url(r'^proxy-log/(?P\d+)/commands$', views.ProxyLogCommandsListView.as_view(), name='proxy-log-commands-list'),
+ url(r'^command-log$', views.CommandLogListView.as_view(),
+ name='command-log-list'),
+ url(r'^login-log$', views.LoginLogListView.as_view(),
+ name='login-log-list'),
]
diff --git a/apps/audits/views.py b/apps/audits/views.py
index 144e8f35d..94039d1d8 100644
--- a/apps/audits/views.py
+++ b/apps/audits/views.py
@@ -110,19 +110,19 @@ class ProxyLogDetailView(AdminUserRequiredMixin,
return super(ProxyLogDetailView, self).get_context_data(**kwargs)
-class ProxyLogCommandsListView(AdminUserRequiredMixin,
- SingleObjectMixin,
- ListView):
- template_name = 'audits/proxy_log_commands_list_modal.html'
- object = ''
-
- def get(self, request, *args, **kwargs):
- self.object = self.get_object(queryset=ProxyLog.objects.all())
- return super(ProxyLogCommandsListView, self).\
- get(request, *args, **kwargs)
-
- def get_queryset(self):
- return list(self.object.command_log.all())
+# class ProxyLogCommandsListView(AdminUserRequiredMixin,
+# SingleObjectMixin,
+# ListView):
+# template_name = 'audits/proxy_log_commands_list_modal.html'
+# object = ''
+#
+# def get(self, request, *args, **kwargs):
+# self.object = self.get_object(queryset=ProxyLog.objects.all())
+# return super(ProxyLogCommandsListView, self).\
+# get(request, *args, **kwargs)
+#
+# def get_queryset(self):
+# return list(self.object.command_log.all())
class CommandLogListView(AdminUserRequiredMixin, ListView):
|