add app config and refactor card for iLert

Signed-off-by: yacut <roman.rogozhnikov@gmail.com>
This commit is contained in:
yacut
2021-04-18 05:03:39 +02:00
parent 78589718b8
commit 7ddf3ef3b4
2 changed files with 13 additions and 8 deletions
+8
View File
@@ -82,6 +82,14 @@ proxy:
Authorization:
$env: SENTRY_TOKEN
'/ilert':
target: https://api.ilert.com
allowedMethods: ['GET', 'POST', 'PUT']
allowedHeaders: ['Authorization']
headers:
Authorization:
$env: ILERT_AUTH_HEADER
organization:
name: My Company
@@ -55,11 +55,10 @@ export const ILertCardOnCall = ({
const repeatInfo = () => {
if (
!onCalls ||
!onCalls.length ||
!onCalls[onCalls.length - 1].escalationPolicy ||
!onCalls[onCalls.length - 1].escalationPolicy.repeating ||
!onCalls[onCalls.length - 1].escalationPolicy.frequency
!alertSource ||
!alertSource.escalationPolicy ||
!alertSource.escalationPolicy.repeating ||
!alertSource.escalationPolicy.frequency
) {
return null;
}
@@ -76,9 +75,7 @@ export const ILertCardOnCall = ({
color="textSecondary"
className={classes.repeatText}
>
{`Repeat ${
onCalls[onCalls.length - 1].escalationPolicy.frequency
} times`}
{`Repeat ${alertSource.escalationPolicy.frequency} times`}
</Typography>
}
/>