Commit d6b889d8 authored by nanahira's avatar nanahira

use summary as title

parent efb21ef5
......@@ -94,9 +94,11 @@ export class Instance {
let text = `${this.markdown ? segment('markdown') : ''}# ${this.title}`;
for (const alert of alerts) {
text += `\n\n## ${alert.labels.alertname}\n\n`;
text += `\n\n## ${
alert.annotations.summary || alert.labels.alertname
}\n\n`;
for (const [key, value] of Object.entries(alert.labels)) {
if (key === 'alertname') continue;
// if (key === 'alertname') continue;
text += `* ${key}: \`${value}\`\n`;
}
text += `\n`;
......@@ -104,7 +106,7 @@ export class Instance {
text += this.resolvedMessage;
continue;
}
text += `${alert.annotations.summary}\n\n${alert.annotations.description}`;
text += `${alert.annotations.description}`;
}
return text;
}
......
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