I understand that this is a way to show what the changes were, but this format is only usable for display in HTML, not for parsing the exported audit via any tools.
Would it be possible to export this as JSON and indicate the change in some other, structural way?
E.g.
At the moment there is no way of doing this via Octopus as far as I’m, aware but, this could be a suggestion for a UserVoice, I will also point this out to the engineers as a possible feature request.
@Ziaul.Islam I’m sorry, but how does stripping HTML tags help here? Actually it does exactly the opposite, as it removes the <del> and <ins> tags (see my example!) so my example becomes this JSON which in just plain wrong and unusable:
Hi, does Octopus actually store the old and new configuration somewhere? How is this audit view generated? I’d like to extract the JSON that was in effect after a specific configuration change, but even the API just returns this HTML-annotated version which is not very helpful. I wrote a tool that downloads the audit trail from the API and removes the del tags, which should be enough, but it seems strange that only the diff view is available.
Sorry we didn’t notice this response on the end of an existing thread.
To answer your question. No at the moment that diff is what we store. A decision was made to store it in a format that would display easily. It was only for record keeping, not intended to be used to recover/restore previous versions.
We have thought about re-working it to make it more usable / friendly but it’s still in the ideas stage.
In the end I wrote a CLI tool that produces the old and new JSON from this HTML view (using the REST API), but I’m not 100% sure it will work in all cases (haven’t tested it with special characters, etc.).
I wonder why you decided to go with this pre-rendered diff though. Anything larger than a screen worth of lines is horrible to analyse this way, and even if you manage to see the difference in all that noise, it’s not helpful without a restore option, is it?