Commit 2226df9e authored by nanahira's avatar nanahira

add resolved mark

parent a764c104
......@@ -36,7 +36,8 @@ export class Instance {
let text = `${this.markdown ? segment('markdown') : ''}# ${this.title}`;
for (const alert of alerts) {
text += `\n\n## ${
const resolved = alert.status === 'resolved';
text += `\n\n## ${resolved ? '[RESOLVED] ' : ''}${
alert.annotations.summary || alert.labels.alertname
}\n\n`;
for (const [key, value] of Object.entries(alert.labels)) {
......@@ -44,7 +45,7 @@ export class Instance {
text += `* ${key}: \`${value}\`\n`;
}
text += `\n`;
if (alert.status === 'resolved') {
if (resolved) {
text += this.resolvedMessage;
continue;
}
......
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