Skip to content

Commit

Permalink
feat(console): add send status to alarm record table (#2135)
Browse files Browse the repository at this point in the history
* feat(console): change alertRepeatInterval default time

* feat(console): add send status to alarm record table

* feat(console): change text

* feat(console): add failedReason
  • Loading branch information
jo-hnny authored Oct 28, 2022
1 parent 291a984 commit ae07ee3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
11 changes: 10 additions & 1 deletion web/console/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ export const AlarmRecordPanel = () => {
</Bubble>
);
}
},

{
key: 'status.failedReason',
header: t('发送状态'),
render: item => {
const failedReason = item?.status?.failedReason;

return (
<Bubble content={failedReason || ''}>
<Text theme={failedReason ? 'danger' : 'success'}>{failedReason ? t('发送失败') : t('已发送')}</Text>
</Bubble>
);
}
}
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function ConfigPromethus({ route, actions }: RootProps) {
},
runOnMaster: false,
notifyWebhook: '',
alertRepeatInterval: 20
alertRepeatInterval: 240
});

const {
Expand Down Expand Up @@ -168,7 +168,7 @@ export function ConfigPromethus({ route, actions }: RootProps) {
name="alertRepeatInterval"
render={({ field }) => (
<Form.Item label="重复告警的间隔">
<InputNumber {...field} min={0} precision={0} unit="m" size="l" />
<InputNumber {...field} min={0} precision={0} unit="minute" size="l" />
</Form.Item>
)}
/>
Expand Down

0 comments on commit ae07ee3

Please sign in to comment.