File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed
app/(keep)/dashboard/widget-types/preset Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ const WidgetAlertsTable: React.FC<WidgetAlertsTableProps> = ({
6767 renderHeader : ( ) => < div className = "min-w-4" > </ div > ,
6868 renderValue : ( alert : any ) => (
6969 < Icon
70- icon = { getStatusIcon ( alert . status ) }
70+ icon = { getStatusIcon ( alert . status , alert . isNoisy ) }
7171 size = "sm"
7272 color = { getStatusColor ( alert . status ) }
7373 className = "!p-0"
Original file line number Diff line number Diff line change @@ -3,23 +3,25 @@ import {
33 CheckCircleIcon ,
44 CircleStackIcon ,
55 PauseIcon ,
6+ SpeakerWaveIcon ,
67} from "@heroicons/react/24/outline" ;
78import { IoIosGitPullRequest } from "react-icons/io" ;
89
910/**
1011 * Maps an alert/incident status string to the appropriate icon component
1112 *
1213 * @param status - The status string to convert to an icon
14+ * @param isNoisy - Whether the alert is noisy (optional)
1315 * @returns A React icon component based on the status
1416 *
1517 * @example
1618 * const AlertIcon = getStatusIcon("firing");
1719 * // Returns ExclamationCircleIcon
1820 */
19- export const getStatusIcon = ( status : string ) => {
21+ export const getStatusIcon = ( status : string , isNoisy ?: boolean ) => {
2022 switch ( status . toLowerCase ( ) ) {
2123 case "firing" :
22- return ExclamationCircleIcon ;
24+ return isNoisy ? SpeakerWaveIcon : ExclamationCircleIcon ;
2325 case "resolved" :
2426 return CheckCircleIcon ;
2527 case "acknowledged" :
Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ export const useAlertTableCols = (
453453 cell : ( context ) => (
454454 < div className = "flex items-center justify-center" >
455455 < Icon
456- icon = { getStatusIcon ( context . getValue ( ) ) }
456+ icon = { getStatusIcon ( context . getValue ( ) , context . row . original . isNoisy ) }
457457 size = "sm"
458458 color = { getStatusColor ( context . getValue ( ) ) }
459459 className = "!p-0 h-32px w-32px"
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " keep"
3- version = " 0.46.3 "
3+ version = " 0.46.4 "
44description = " Alerting. for developers, by developers."
55authors = [" Keep Alerting LTD" ]
66packages = [{include = " keep" }]
You can’t perform that action at this time.
0 commit comments