add llama sugestions

This commit is contained in:
karenvicent committed 2025-09-12 10:13:38 -04:00
1 parent fb84a79a04
commit 041a261540
2 files changed
+5 -5

No files matched your search

@@ -16,7 +16,7 @@ class NotificationService {
return NotificationService.SERVICE_NAME;
}
sendNotification = async ({ notification, subject, content, html, discordContent }) => {
sendNotification = async ({ notification, subject, content, html, discordContent = null }) => {
const { type, address } = notification;
if (type === "email") {
@@ -79,7 +79,7 @@ class NotificationService {
return success;
}
async notifyAll({ notificationIDs, subject, html, content, discordContent }) {
async notifyAll({ notificationIDs, subject, html, content, discordContent = null }) {
const notifications = await this.db.notificationModule.getNotificationsByIds(notificationIDs);
// Map each notification to a test promise
const promises = notifications.map(async (notification) => {
@@ -74,7 +74,7 @@ class NotificationUtils {
let discordMessageText = {
embeds: [
{
title: status ? "Uptime Alert: One of your monitors is back online" : "Downtime Alert: One of your monitors went offline",
title: status ? dn.uptimeAlert : dn.downtimeAlert,
color: status ? 5763719 : 15548997,
fields: [
@@ -129,9 +129,9 @@ class NotificationUtils {
description: `Your current disk usage is above your threshold (${(diskThreshold * 100).toFixed(0)}%)`,
color: 15548997,
footer: { text: "Checkmate" },
fields: disk.map((d, idx) => ({
fields: (Array.isArray(disk) ? disk : []).map((d, idx) => ({
name: `Disk ${idx}`,
value: `${(d.usage_percent * 100).toFixed(0)}%`,
value: `${(d?.usage_percent * 100).toFixed(0)}%`,
inline: true,
})),
}),