Story #5522

Updated by bmbouter about 2 years ago

h3. Problem

Each time the user fetches logging output from <code>GALAXY_API_ROOT/v3/imports/collections/<uuid:pk>/</code> it comes from "this viewset":

The issue is that the user wants to receive new log messages, but they get all logs every time.

h3. Solution

Rework the "CollectionImport": Model by:

1. removing the "messages" attribute
2. creating three new attributes
* message <--- long string, required.
* level. <--- this should be
Add a choice field w/ FilterSpec to that viewset that allow the standard "Python logging levels": enumerated
* time. This one can be configured
user to auto-record at save using specify the django ORM syntax <code>since</code> as an optional attribute. If unspecified you get all the logs for that.

3. The "add_log_record" method should be removed
4. Port
that CollectionImport. If specified you get data formatted the "logutils.CollectionImportHandler": same way, except filtered to create only include messages with a CollectionImport for each call to <code>emit()</code>
timestamp greater than <code>since</code>.