-
-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: include incident to public status (#484)
- Loading branch information
Showing
5 changed files
with
58 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ enum Status { | |
MajorOutage = "major_outage", | ||
UnderMaintenance = "under_maintenance", // currently not in use | ||
Unknown = "unknown", | ||
Incident = "incident", | ||
} | ||
``` | ||
|
||
|
@@ -54,6 +55,10 @@ function getStatus(ratio: number) { | |
|
||
We are caching the result for `30 seconds` to reduce the load on our database. | ||
|
||
The `Status.Incident` will always be returned when then status of any incident | ||
on your page is **not** _"monitoring"_ or _"resolved"_. You can attach an | ||
incident to a monitor (implicit) or a page (explicit). | ||
|
||
> If you have a doubt about the above calculation, feel free to contact us via | ||
> [[email protected]](mailto:[email protected]) or | ||
> [discord](https://openstatus.dev/discord). | ||
|
@@ -82,6 +87,7 @@ const statusEnum = z.enum([ | |
"major_outage", | ||
"under_maintenance", | ||
"unknown", | ||
"incident", | ||
]); | ||
|
||
const statusSchema = z.object({ status: statusEnum }); | ||
|
@@ -107,6 +113,10 @@ const dictionary = { | |
label: "Unknown", | ||
color: "bg-gray-500", | ||
}, | ||
incident: { | ||
label: "Incident", | ||
color: "bg-yellow-500", | ||
}, | ||
under_maintenance: { | ||
label: "Under Maintenance", | ||
color: "bg-gray-500", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters