Skip to content
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

Make it possible to change sorting method via UI #128

Merged
merged 10 commits into from
Jun 20, 2024
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,10 @@ Sorting method can be changed under the ``[howitz]``-section by adding::

Valid sorting methods are:

* *raw* - Unchanged order in which Zino server sends events (by ID ascending).
* *raw* - The same order in which Zino server sends events (by ID, ascending).
* *lasttrans* - Newest transaction first, all IGNORED at the bottom. Default sorting in curitz.

* *severity* - Events of same color grouped together. The most severe (red) at the top and ignored at the bottom. Existing method in Ritz TK, but it is called 'default' there.
* *severity* - Events with highest priority first, grouped by event type. Priority takes into account both whether event signifies any disturbance, event's administartive phase and event's type, so there might not be continuous blocks of color. Existing method in Ritz TK, but it is called 'default' there.
hmpf marked this conversation as resolved.
Show resolved Hide resolved
* *down-rev* - Shortest/none downtime first. Identical to an existing method in Ritz TK.
* *down* - Longest downtime first. Identical to an existing method in Ritz TK.
* *upd-rev* - Events with the most recent update date first. Identical to an existing method in Ritz TK.
Expand Down
4 changes: 2 additions & 2 deletions src/howitz/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class EventSort(Enum):

LASTTRANS = ("lasttrans", "updated", True, "Last transaction",
"Events with the most recent update date first, all IGNORED events are at the bottom")
SEVERITY = "severity", "", True, "Severity", "Events with highest priority first, grouped by event type"
DEFAULT = "raw", "", None, "Raw", "Unchanged order in which Zino server sends events (by ID ascending)"
SEVERITY = "severity", "", True, "Severity", "Events with highest priority first, grouped by event type. Priority takes into account both whether event signifies any disturbance, event's administartive phase and event's type, so there might not be continuous blocks of color"
hmpf marked this conversation as resolved.
Show resolved Hide resolved
DEFAULT = "raw", "", None, "Raw", "The same order in which Zino server sends events (by ID, ascending)"

def __new__(cls, *args, **kwds):
obj = object.__new__(cls)
Expand Down