server-status-project/server-status

Add impacted services to incident view

Closed this issue · 4 comments

With the current incident layout it is impossible to see which services the incident is impacting, unless it is written as part of the incident text.

I would suggest that a section is added to each incident to list all services linked to the incident.
image

Commit c75f83c is a possible solution to display this data.

Pryx commented

This is a nice idea, although I don't really like how it looks. Maybe we could remove posted by as it doesn't really matter and impacted services are of more valuable info to the user?

I will make the change to replace "poster by".
The other part I think we could do better is how the services are fetched per incident. Would it make sense to have that data included as part of the constellation->get_incidents() class? Would save having to do more sql calls to fetch service ids and names outside of the get_incidents() function.

Code changed. As you will see from the code I also added service_id and service_name to the Incident class to avoid having to manually get the data. I hope it makes sense.

image

Pryx commented

Looks neat, looking forward to a PR!