mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(notifications): fix gotify style
This commit is contained in:
@@ -116,16 +116,16 @@ export const sendBuildErrorNotifications = async ({
|
|||||||
|
|
||||||
if (gotify) {
|
if (gotify) {
|
||||||
const decorate = (decoration: string, text: string) =>
|
const decorate = (decoration: string, text: string) =>
|
||||||
`${gotify.decoration ? decoration : ""} ${text}`.trim();
|
`${gotify.decoration ? decoration : ""} ${text}\n`;
|
||||||
await sendGotifyNotification(
|
await sendGotifyNotification(
|
||||||
gotify,
|
gotify,
|
||||||
decorate("⚠️", "Build Failed"),
|
decorate("⚠️", "Build Failed"),
|
||||||
`${decorate("🛠️", `Project: ${projectName}`)}
|
`${decorate("🛠️", `Project: ${projectName}`)}` +
|
||||||
${decorate("⚙️", `Application: ${applicationName}`)}
|
`${decorate("⚙️", `Application: ${applicationName}`)}` +
|
||||||
${decorate("❔", `Type: ${applicationType}`)}
|
`${decorate("❔", `Type: ${applicationType}`)}` +
|
||||||
${decorate("🕒", `Date: ${date.toLocaleString()}`)}
|
`${decorate("🕒", `Date: ${date.toLocaleString()}`)}` +
|
||||||
${decorate("⚠️", `Error:\n${errorMessage}`)}
|
`${decorate("⚠️", `Error:\n${errorMessage}`)}` +
|
||||||
${decorate("🔗", `Build details:\n${buildLink}`)}`,
|
`${decorate("🔗", `Build details:\n${buildLink}`)}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,15 +110,15 @@ export const sendBuildSuccessNotifications = async ({
|
|||||||
|
|
||||||
if (gotify) {
|
if (gotify) {
|
||||||
const decorate = (decoration: string, text: string) =>
|
const decorate = (decoration: string, text: string) =>
|
||||||
`${gotify.decoration ? decoration : ""} ${text}`.trim();
|
`${gotify.decoration ? decoration : ""} ${text}\n`;
|
||||||
await sendGotifyNotification(
|
await sendGotifyNotification(
|
||||||
gotify,
|
gotify,
|
||||||
decorate("✅", "Build Success"),
|
decorate("✅", "Build Success"),
|
||||||
`${decorate("🛠️", `Project: ${projectName}`)}
|
`${decorate("🛠️", `Project: ${projectName}`)}` +
|
||||||
${decorate("⚙️", `Application: ${applicationName}`)}
|
`${decorate("⚙️", `Application: ${applicationName}`)}` +
|
||||||
${decorate("❔", `Type: ${applicationType}`)}
|
`${decorate("❔", `Type: ${applicationType}`)}` +
|
||||||
${decorate("🕒", `Date: ${date.toLocaleString()}`)}
|
`${decorate("🕒", `Date: ${date.toLocaleString()}`)}` +
|
||||||
${decorate("🔗", `Build details:\n${buildLink}`)}`,
|
`${decorate("🔗", `Build details:\n${buildLink}`)}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ export const sendDatabaseBackupNotifications = async ({
|
|||||||
|
|
||||||
if (gotify) {
|
if (gotify) {
|
||||||
const decorate = (decoration: string, text: string) =>
|
const decorate = (decoration: string, text: string) =>
|
||||||
`${gotify.decoration ? decoration : ""} ${text}`.trim();
|
`${gotify.decoration ? decoration : ""} ${text}\n`;
|
||||||
|
|
||||||
await sendGotifyNotification(
|
await sendGotifyNotification(
|
||||||
gotify,
|
gotify,
|
||||||
@@ -133,11 +133,11 @@ export const sendDatabaseBackupNotifications = async ({
|
|||||||
type === "success" ? "✅" : "❌",
|
type === "success" ? "✅" : "❌",
|
||||||
`Database Backup ${type === "success" ? "Successful" : "Failed"}`,
|
`Database Backup ${type === "success" ? "Successful" : "Failed"}`,
|
||||||
),
|
),
|
||||||
`${decorate("🛠️", `Project: ${projectName}`)}
|
`${decorate("🛠️", `Project: ${projectName}`)}` +
|
||||||
${decorate("⚙️", `Application: ${applicationName}`)}
|
`${decorate("⚙️", `Application: ${applicationName}`)}` +
|
||||||
${decorate("❔", `Type: ${databaseType}`)}
|
`${decorate("❔", `Type: ${databaseType}`)}` +
|
||||||
${decorate("🕒", `Date: ${date.toLocaleString()}`)}
|
`${decorate("🕒", `Date: ${date.toLocaleString()}`)}` +
|
||||||
${type === "error" && errorMessage ? decorate("❌", `Error:\n${errorMessage}`) : ""}`,
|
`${type === "error" && errorMessage ? decorate("❌", `Error:\n${errorMessage}`) : ""}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,12 +83,12 @@ export const sendDockerCleanupNotifications = async (
|
|||||||
|
|
||||||
if (gotify) {
|
if (gotify) {
|
||||||
const decorate = (decoration: string, text: string) =>
|
const decorate = (decoration: string, text: string) =>
|
||||||
`${gotify.decoration ? decoration : ""} ${text}`.trim();
|
`${gotify.decoration ? decoration : ""} ${text}\n`;
|
||||||
await sendGotifyNotification(
|
await sendGotifyNotification(
|
||||||
gotify,
|
gotify,
|
||||||
decorate("✅", "Docker Cleanup"),
|
decorate("✅", "Docker Cleanup"),
|
||||||
`${decorate("🕒", `Date: ${date.toLocaleString()}`)}
|
`${decorate("🕒", `Date: ${date.toLocaleString()}`)}` +
|
||||||
${decorate("📜", `Message:\n${message}`)}`,
|
`${decorate("📜", `Message:\n${message}`)}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export const sendDokployRestartNotifications = async () => {
|
|||||||
|
|
||||||
if (gotify) {
|
if (gotify) {
|
||||||
const decorate = (decoration: string, text: string) =>
|
const decorate = (decoration: string, text: string) =>
|
||||||
`${gotify.decoration ? decoration : ""} ${text}`.trim();
|
`${gotify.decoration ? decoration : ""} ${text}\n`;
|
||||||
await sendGotifyNotification(
|
await sendGotifyNotification(
|
||||||
gotify,
|
gotify,
|
||||||
decorate("✅", "Dokploy Server Restarted"),
|
decorate("✅", "Dokploy Server Restarted"),
|
||||||
|
|||||||
Reference in New Issue
Block a user