Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes related to label of KLC. #2

Merged
merged 3 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/auditlog/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin,MiddlewareMixinclass):
list_display = ['created','user_url','action','entity_type','object_repr','msg_short','remote_addr']
list_display = ['created','user_url','action','object_repr','msg_short','remote_addr']
search_fields = ['changes','remote_addr','object_repr']
list_filter = ['action',ResourceTypeFilter,'timestamp']
readonly_fields = ['created', 'resource_url', 'action', 'user_url', 'msg']
Expand Down
7 changes: 4 additions & 3 deletions src/auditlog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def get_for_model(self, model):
Get log entries for all objects of a specified type.

:param model: The model to get log entries for.

:type model: class
:return: QuerySet of log entries for the given model.
:rtype: QuerySet
Expand Down Expand Up @@ -165,14 +166,14 @@ class Action:
UPDATE = 1
DELETE = 2
DOWNLOAD = 3
KLC = 4
REMOTECONTROL = 4

choices = (
(CREATE, _("Create")),
(UPDATE, _("Update")),
(DELETE, _("Delete")),
(DOWNLOAD,_("Download")),
(KLC,_("KLC"))
( REMOTECONTROL,_("Remote Control"))
)

content_type = models.ForeignKey(to='contenttypes.ContentType', on_delete=models.CASCADE,related_name='+', verbose_name=_("content type"))
Expand Down Expand Up @@ -204,7 +205,7 @@ def __str__(self):
elif self.action == self.Action.DOWNLOAD:
fstring = _("Downloaded {repr:s}")
elif self.action == self.Action.KLC:
fstring = _("Kaseya Live Connect {repr:s}")
fstring = _("Remote Control with {repr:s} mode")
else:
fstring = _("Logged {repr:s}")

Expand Down