Skip to content

Commit

Permalink
add app config and refactor card for iLert
Browse files Browse the repository at this point in the history
Signed-off-by: yacut <roman.rogozhnikov@gmail.com>
  • Loading branch information
yacut committed Apr 28, 2021
1 parent 7858971 commit 7ddf3ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
8 changes: 8 additions & 0 deletions app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 5 additions & 8 deletions plugins/ilert/src/components/ILertCard/ILertCardOnCall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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>
}
/>
Expand Down

0 comments on commit 7ddf3ef

Please sign in to comment.