invalid annotation logic better reflects component logic
The EntitySplunkOnCallCard gives precedence to a `splunk.com/on-call-team` annotation. Therefore, the InvalidAnnotation component messaging should reflect that precedence, even in instances where _both_ supported annotations are provided and both are deemed invalid. Signed-off-by: Mike Ball <mikedball@gmail.com>
This commit is contained in:
@@ -68,14 +68,14 @@ export const InvalidAnnotation = ({
|
||||
}) => {
|
||||
let titleSuffix = 'provided annotation';
|
||||
|
||||
if (teamName) {
|
||||
titleSuffix = `"${teamName}" team name`;
|
||||
}
|
||||
|
||||
if (routingKey) {
|
||||
titleSuffix = `"${routingKey}" routing key`;
|
||||
}
|
||||
|
||||
if (teamName) {
|
||||
titleSuffix = `"${teamName}" team name`;
|
||||
}
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader title="Splunk On-Call" />
|
||||
|
||||
Reference in New Issue
Block a user