Commit 5d2a6628 authored by nanahira's avatar nanahira

add resolvedMessage

parent be268655
......@@ -77,6 +77,12 @@ export class Instance {
})
title: string;
@SchemaProperty({
description: '解除警报的提示信息。',
default: '警报',
})
resolvedMessage: string;
formatAlert(dto: AlertDto) {
const { alerts } = dto;
let text = `${segment('markdown')}# ${this.title}`;
......@@ -89,7 +95,7 @@ export class Instance {
}
text += `\n`;
if (alert.status === 'resolved') {
text += '已解除警报。';
text += this.resolvedMessage;
continue;
}
text += `${alert.annotations.summary}\n\n${alert.annotations.description}`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment