-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Notification silence new fields (#2447)
* rearrange columns in notification silence list * feat: add name to the silence form * feat: display resource and the filter in the same column * feat: add indefinitely option to duration picker * feat: config hard parents * feat: rearrange columns and don't use Age component * feat: different form for notification silences * feat: show attributes in the silence form * feat: multiple selection of attributes and change tag display
- Loading branch information
1 parent
cf0987a
commit 8899739
Showing
21 changed files
with
691 additions
and
73 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { getHealthCheckByID } from "../services/check"; | ||
import { useQuery } from "@tanstack/react-query"; | ||
|
||
export function useCheckDetail(id: string) { | ||
return useQuery({ | ||
queryKey: ["check", id], | ||
queryFn: () => getHealthCheckByID(id), | ||
select: (data) => data?.data | ||
}); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { getTopologyByID } from "../services/topology"; | ||
import { useQuery } from "@tanstack/react-query"; | ||
|
||
export function useComponentDetail(id: string) { | ||
return useQuery({ | ||
queryKey: ["component", id], | ||
queryFn: () => getTopologyByID(id), | ||
select: (data) => data?.data | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { IncidentCommander } from "../axios"; | ||
import { HealthCheck } from "../types/health"; | ||
|
||
export const getHealthCheckByID = async (checkID: string) => { | ||
if (checkID === "") { | ||
return Promise.resolve({ data: [] }); // Ensure consistent return type | ||
} | ||
|
||
return IncidentCommander.get<HealthCheck[]>(`/checks?id=eq.${checkID}`); | ||
}; |
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
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
Oops, something went wrong.