Conversation
wk9874
left a comment
There was a problem hiding this comment.
You'll need to show me how to actually use this so that I can test it :)
|
|
||
| @property | ||
| @staging_check | ||
| def delay(self) -> int: |
There was a problem hiding this comment.
Wait what is this? You can delay the start of an alert?
There was a problem hiding this comment.
If that's the case then we should also add this functionality into the Run class in another MR :)
There was a problem hiding this comment.
Not sure, this is just a value available in the RestAPI response, @alahiff ?
| limit the number of results, default of None returns all. | ||
| offset : int, optional | ||
| start index for returned results, default of None starts at 0. | ||
| sorting : list[dict] | None, optional |
There was a problem hiding this comment.
Not really clear what this would be, what does each item in the list correspond to? Wouldnt you just want one sorting parameter for all the things youre getting?
There was a problem hiding this comment.
This is the low level API so just mirrors the RestAPI which expects a list in the form [{"id": <column>, "desc": <if-descending-else-ascending>}]
| @pydantic.field_validator("column") | ||
| @classmethod | ||
| def check_column(cls, column: str) -> str: | ||
| if column and column not in ("name", "created"): |
There was a problem hiding this comment.
Would be really useful to have a column which sorts by time set to critical, no idea if thats possible
Sorting of Runs, Artifacts, Tags, Folders, Alerts
Issue: #766
Python Version(s) Tested: 3.13
Operating System(s): Ubuntu 24.10
Documentation PR: N/A
📝 Summary
Adds compatibility with the server side sorting when using
GETto retrieve objects.🔄 Changes
Added additional argument
sortingto relevant low level API classes where the user then provides the sorting list:Also adds same functionality to user API:
✔️ Checklist