-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Object change logging #1898
Comments
Hey @jeremystretch will this enable API calls to be logged? CRUD via the API. |
@troxil Yes, the goal is to log every change to a model regardless of how it was effected (GUI, API, or shell). |
I've started work on this under the 1898-activity-logging branch. |
Implemented in #2198. Change logging will be included in the v2.4 beta. |
Stood up an instance (with blank data) using the
|
@jeremystretch: {
"custom_fields": {
"LastUpdate": "2018-06-27",
"OS_Version": "Ubuntu 14.04.5 LTS",
"bios_date": "2011-01-01",
"bios_version": "Bochs",
"cpu_dies": 0,
"cpus": 0,
"hdd_count": 0,
"kernel_version": "4.4.0-128-generic",
"operational_status": 3,
"ram_capacity": 64429
},
"device_role": 52,
"device_type": 71,
"name": "testsystem",
"serial": "",
"site": 1,
"status": 1
} Whereas the ChangeLog record shows: {
"asset_tag": null,
"cluster": null,
"comments": "",
"created": "2018-06-27",
"device_role": 52,
"device_type": 71,
"face": null,
"last_updated": "2018-06-27T17:46:25.599Z",
"name": "testsystem",
"platform": null,
"position": null,
"primary_ip4": null,
"primary_ip6": null,
"rack": null,
"serial": "",
"site": 1,
"status": 1,
"tenant": null,
"vc_position": null,
"vc_priority": null,
"virtual_chassis": null
} |
Custom fields aren't being captured because it's just using Django's built-in serializer for now. I've been toying with reusing the API serializers for this, but the representation of nested objects gets a little tricky. Although the feature branch has been merged into |
I will chime in and say I have been investigating #2137 with relation to Date type custom fields and serialization for webhooks. These are related so we might want to look into a particular serialization method to cover both use cases. |
@jeremystretch: Would you prefer a new issue filed to keep track, or keep it here? What works for your workflow? |
Please do not open issues against anything other than a release. The v2.4 beta has not been released yet. |
Issue type
[x] Feature request
[ ] Bug report
[ ] Documentation
Environment
Description
This issue seeks to unify and supersede the following open issues addressing different shortcomings of the current user activity logging function:
The new system should address all of the above points, as well as incorporate a more robust representation of object history, perhaps using JSON fields to record before and after versions of the object being modified.
The text was updated successfully, but these errors were encountered: