-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated Alertmanager Critical, Default, and Watchdog Receiver InfoTips #4795
Updated Alertmanager Critical, Default, and Watchdog Receiver InfoTips #4795
Conversation
I just realized that the copy for the default receiver doesn't really make sense now that we provide multiple receivers at the same time; there isn't really a "first" one anymore. I'll work on some updated text. Looks good other than that though |
/hold |
Thanks @cshinn |
Hi @cshinn, wondering if Watchdog should end with "...this receiver should remain in its current state with no Receiver Type selected." -or something to that extent -thanks |
10b97a8
to
432fd50
Compare
@dtaylor113 Watchdog: |
432fd50
to
289d8f3
Compare
@cshinn, thanks for the updates. Latest screenshots: |
/hold cancel |
@@ -279,7 +286,7 @@ const ReceiverTableRow: React.FC<ReceiverTableRowProps> = ({ | |||
<TableRow id={index} index={index} trKey={key} style={style}> | |||
<TableData className={tableColumnClasses[0]}>{receiver.name}</TableData> | |||
<TableData className={tableColumnClasses[1]}> | |||
{!integrationTypesLabel ? ( | |||
{(receiver.name === 'Critical' || receiver.name === 'Default') && !integrationTypesLabel ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see .name === 'Critical'
several times across these files. Do you want to extract into a isCritical(thingWithName)
func, and then make the Critical
and Default
an enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added InitialReceivers enum. Not sure isCritical()
is needed as the conditional seems easier to read to me, is only used in two places, and matches how we test for Default initial receiver.
@@ -173,6 +173,37 @@ const getRouteLabelsForEditor = ( | |||
: routeLabels; | |||
}; | |||
|
|||
const ReceiverInfoTip: React.FC<ReceiverInfoTipProps> = ({ type }) => { | |||
let msg: string = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about dropping the let
and the break
statements:
case 'Default':
return 'Your default receiver will automatically receive al.....'
case 'Critical':
return 'The routing labels for this receiv....'
case 'Watchdog':
return 'The Watchdog alert fires consta....'
via an alertMsg()
func?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, much cleaner -thanks
frontend/public/components/monitoring/receiver-forms/alert-manager-receiver-forms.tsx
Show resolved
Hide resolved
289d8f3
to
bbcbb2d
Compare
/retest |
2 similar comments
/retest |
/retest |
@@ -580,3 +600,7 @@ type SaveAsDefaultCheckboxProps = { | |||
dispatchFormChange: Function; | |||
tooltip: string; | |||
}; | |||
|
|||
type ReceiverInfoTipProps = { | |||
type: InitialReceivers.Watchdog | InitialReceivers.Critical | InitialReceivers.Default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this just be:
type: InitialReceivers.Watchdog | InitialReceivers.Critical | InitialReceivers.Default; | |
type: InitialReceivers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, thanks, fixed :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small nit.
bbcbb2d
to
65decc4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benjaminapetersen, dtaylor113, TheRealJon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
Updated InfoTips for Alertmanager Receiver configuration.
Design Doc
Receivers Table InfoTip
Configure Multiple Receivers
Configure Single Receiver
All Required Receivers Configured (no InfoTip)
Default Receiver InfoTip
InfoTip remains after Default Receiver configured
Critical Receiver InfoTip
InfoTip not shown after receiver configured
Watchdog Receiver InfoTip
InfoTip not shown after receiver configured
JIRA: https://issues.redhat.com/browse/CONSOLE-2055