louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
52.43k stars 4.72k forks source link

Implement Dropdown Menu for Accessing incident templates #4567

Open LeoThies opened 3 months ago

LeoThies commented 3 months ago

📑 I have found these related issues/pull requests

There are some incidents that often repeat. Therefore, we would like to implementing a dropdown menu for previous incidents.

🏷️ Feature Request Type

Status-page

🔖 Feature description

To streamline our process and reduce redundancy, we're would like to implement a feature that archives previous incidents. This will enable us to access past incidents with fewer clicks, eliminating the need to retype the same text repeatedly.

✔️ Solution

templates

Upon selecting 'Templates,' a list should appear featuring either previous incidents or saved incidents.

❓ Alternatives

No response

📝 Additional Context

No response

CommanderStorm commented 3 months ago

I would need to look up if we save incidents somewhere in the database. In any case this would be a larger feature. If you'd like to implement this, please first start of with a plan what you would like to add where ("How should this work") via annotated screenshots and what database modifications are needed to get there. Here is our contribution guide: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md

Note that for larger features our pipeline is currently quite full already => I don't know when we would get to this.

Note to self: I think the guidance on new features in our contribution guide is pretty lacking => we defintively need to improve that part ^^

Lanhild commented 2 months ago

@CommanderStorm There is a table named incident. The status page UI indeed could benefit from an incident history

Lanhild commented 2 months ago

In any case this would be a larger feature. If you'd like to implement this, please first start of with a plan what you would like to add where ("How should this work") via annotated screenshots and what database modifications are needed to get there.

For me, this issue should be divided in two;

  1. Ability to view past incident in the respective status page
  2. Ability to create incident templates

what database modifications are needed to get there.

@CommanderStorm should we open new issues to divide these like I explained?

CommanderStorm commented 2 months ago

Ability to view past incident in the respective status page

I am going to reference a related PR which did not work our mostly because of being too big to review

=> "stealing" (keep the authorship) incident list from said PR might be a good starting point (keep it simple, no 4k changed lines please, that is not reviewable) => the correct issue (forgot to deduplciate in the last comment) is https://github.com/louislam/uptime-kuma/issues/862

Lets forcus in this issue only on incident-templates keep this on-track ^^

CommanderStorm commented 2 months ago

incident_template table to store incident templates

Sounds good so far, what do you think would be a good modeling?

Lanhild commented 2 months ago

How is the template linked to the status page itself? The only relation I see is between the template and the incident?

CommanderStorm commented 2 months ago

Them being global is fine by me. Don't think there needs to be a relation between incidents and templates (what would we use it for?)

What I am currently a bit torn is if adding/removing of templates should be done in the settings or in the same modal to select the template.

Lanhild commented 2 months ago

What I am currently a bit torn is if adding/removing of templates should be done in the settings or in the same modal to select the template.

I think the better thing would be to have it in the same modal. When writing an incident, you'd fill whatever info and have the option to save it as a template