mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-30 16:52:16 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -266,8 +266,10 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
api.notification.testGotifyConnection.useMutation();
|
api.notification.testGotifyConnection.useMutation();
|
||||||
const { mutateAsync: testNtfyConnection, isPending: isLoadingNtfy } =
|
const { mutateAsync: testNtfyConnection, isPending: isLoadingNtfy } =
|
||||||
api.notification.testNtfyConnection.useMutation();
|
api.notification.testNtfyConnection.useMutation();
|
||||||
const { mutateAsync: testMattermostConnection, isPending: isLoadingMattermost } =
|
const {
|
||||||
api.notification.testMattermostConnection.useMutation();
|
mutateAsync: testMattermostConnection,
|
||||||
|
isPending: isLoadingMattermost,
|
||||||
|
} = api.notification.testMattermostConnection.useMutation();
|
||||||
const { mutateAsync: testLarkConnection, isPending: isLoadingLark } =
|
const { mutateAsync: testLarkConnection, isPending: isLoadingLark } =
|
||||||
api.notification.testLarkConnection.useMutation();
|
api.notification.testLarkConnection.useMutation();
|
||||||
const { mutateAsync: testTeamsConnection, isPending: isLoadingTeams } =
|
const { mutateAsync: testTeamsConnection, isPending: isLoadingTeams } =
|
||||||
|
|||||||
@@ -51,8 +51,16 @@ export const sendServerThresholdNotifications = async (
|
|||||||
const typeColor = 0xff0000; // Rojo para indicar alerta
|
const typeColor = 0xff0000; // Rojo para indicar alerta
|
||||||
|
|
||||||
for (const notification of notificationList) {
|
for (const notification of notificationList) {
|
||||||
const { discord, telegram, slack, mattermost, custom, lark, pushover, teams } =
|
const {
|
||||||
notification;
|
discord,
|
||||||
|
telegram,
|
||||||
|
slack,
|
||||||
|
mattermost,
|
||||||
|
custom,
|
||||||
|
lark,
|
||||||
|
pushover,
|
||||||
|
teams,
|
||||||
|
} = notification;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (discord) {
|
if (discord) {
|
||||||
|
|||||||
@@ -225,7 +225,9 @@ export const sendVolumeBackupNotifications = async ({
|
|||||||
const errorMsg = isError
|
const errorMsg = isError
|
||||||
? `\n\n<b>Error:</b>\n<pre>${errorMessage}</pre>`
|
? `\n\n<b>Error:</b>\n<pre>${errorMessage}</pre>`
|
||||||
: "";
|
: "";
|
||||||
const sizeInfo = backupSize ? `\n<b>Backup Size:</b> ${backupSize}` : "";
|
const sizeInfo = backupSize
|
||||||
|
? `\n<b>Backup Size:</b> ${backupSize}`
|
||||||
|
: "";
|
||||||
|
|
||||||
const messageText = `<b>${statusEmoji} Volume Backup ${typeStatus}</b>\n\n<b>Project:</b> ${projectName}\n<b>Application:</b> ${applicationName}\n<b>Volume Name:</b> ${volumeName}\n<b>Service Type:</b> ${serviceType}${sizeInfo}\n<b>Date:</b> ${format(date, "PP")}\n<b>Time:</b> ${format(date, "pp")}${isError ? errorMsg : ""}`;
|
const messageText = `<b>${statusEmoji} Volume Backup ${typeStatus}</b>\n\n<b>Project:</b> ${projectName}\n<b>Application:</b> ${applicationName}\n<b>Volume Name:</b> ${volumeName}\n<b>Service Type:</b> ${serviceType}${sizeInfo}\n<b>Date:</b> ${format(date, "PP")}\n<b>Time:</b> ${format(date, "pp")}${isError ? errorMsg : ""}`;
|
||||||
|
|
||||||
@@ -449,7 +451,10 @@ export const sendVolumeBackupNotifications = async ({
|
|||||||
{ name: "Volume Name", value: volumeName },
|
{ name: "Volume Name", value: volumeName },
|
||||||
{ name: "Service Type", value: serviceType },
|
{ name: "Service Type", value: serviceType },
|
||||||
{ name: "Date", value: format(date, "PP pp") },
|
{ name: "Date", value: format(date, "PP pp") },
|
||||||
{ name: "Status", value: type === "success" ? "Successful" : "Failed" },
|
{
|
||||||
|
name: "Status",
|
||||||
|
value: type === "success" ? "Successful" : "Failed",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
if (backupSize) {
|
if (backupSize) {
|
||||||
facts.push({ name: "Backup Size", value: backupSize });
|
facts.push({ name: "Backup Size", value: backupSize });
|
||||||
|
|||||||
Reference in New Issue
Block a user