normalized deviceLog messages
This commit is contained in:
parent
5783a00318
commit
60b1e394e5
|
@ -27,7 +27,7 @@ class ChangeStateView(View):
|
|||
institution=self.request.user.institution,
|
||||
)
|
||||
|
||||
message = _("State changed from '{}' to '{}'.".format(previous_state, new_state) )
|
||||
message = _("<Created> State '{}'. Previous State: '{}' ".format(new_state, previous_state) )
|
||||
DeviceLog.objects.create(
|
||||
snapshot_uuid=snapshot_uuid,
|
||||
event=message,
|
||||
|
@ -68,7 +68,7 @@ class AddNoteView(View):
|
|||
institution=self.request.user.institution,
|
||||
)
|
||||
|
||||
message = _("Note: '{}' ".format(note) )
|
||||
message = _("<Created> Note: '{}' ".format(note) )
|
||||
DeviceLog.objects.create(
|
||||
snapshot_uuid=snapshot_uuid,
|
||||
event=message,
|
||||
|
|
|
@ -190,7 +190,7 @@ class AddUserPropertyView(DashboardView, CreateView):
|
|||
form.instance.uuid = self.property.uuid
|
||||
form.instance.type = UserProperty.Type.USER
|
||||
|
||||
message = _("New annotation: {}: {}".format(form.instance.key, form.instance.value))
|
||||
message = _("<Created> UserProperty: {}: {}".format(form.instance.key, form.instance.value))
|
||||
DeviceLog.objects.create(
|
||||
snapshot_uuid=form.instance.uuid,
|
||||
event=message,
|
||||
|
@ -247,7 +247,7 @@ class UpdateUserPropertyView(DashboardView, UpdateView):
|
|||
response = super().form_valid(form)
|
||||
messages.success(self.request, _("User property updated successfully."))
|
||||
|
||||
message = _("Update annotation: {}: {} to {}:{}".format(old_key, old_value, new_key, new_value ))
|
||||
message = _("<Updated> UserProperty: {}: {} to {}: {}".format(old_key, old_value, new_key, new_value ))
|
||||
DeviceLog.objects.create(
|
||||
snapshot_uuid=form.instance.uuid,
|
||||
event=message,
|
||||
|
@ -274,7 +274,7 @@ class DeleteUserPropertyView(DashboardView, DeleteView):
|
|||
pk=self.pk,
|
||||
owner=self.request.user.institution
|
||||
)
|
||||
message = _("deleted annotation: {}:{}".format(self.object.key, self.object.value ))
|
||||
message = _("<Deleted> User Property: {}:{}".format(self.object.key, self.object.value ))
|
||||
DeviceLog.objects.create(
|
||||
snapshot_uuid=self.object.uuid,
|
||||
event=message,
|
||||
|
|
Loading…
Reference in a new issue