coolify/resources/views/livewire/notifications/telegram.blade.php

185 lines
11 KiB
PHP
Raw Normal View History

2023-09-06 12:31:38 +00:00
<div>
2024-06-07 09:01:10 +00:00
<x-slot:title>
Notifications | MapleDeploy
2024-12-11 09:14:12 +00:00
</x-slot>
<x-notification.navbar />
<form wire:submit='submit' class="flex flex-col gap-4 pb-4">
<div class="flex items-center gap-2">
<h2>Telegram</h2>
<x-forms.button canGate="update" :canResource="$settings" type="submit">
2024-12-11 09:14:12 +00:00
Save
</x-forms.button>
@if ($telegramEnabled)
<x-forms.button canGate="sendTest" :canResource="$settings" class="normal-case dark:text-white btn btn-xs no-animation btn-primary"
2024-12-11 09:14:12 +00:00
wire:click="sendTestNotification">
Send Test Notification
</x-forms.button>
2024-12-11 09:14:12 +00:00
@else
<x-forms.button canGate="sendTest" :canResource="$settings" disabled class="normal-case dark:text-white btn btn-xs no-animation btn-primary">
2024-12-09 15:49:09 +00:00
Send Test Notification
2023-09-06 12:31:38 +00:00
</x-forms.button>
2024-12-11 09:14:12 +00:00
@endif
</div>
<div class="w-32">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="instantSaveTelegramEnabled" id="telegramEnabled" label="Enabled" />
2024-12-11 09:14:12 +00:00
</div>
<div class="flex gap-2">
<x-forms.input canGate="update" :canResource="$settings" type="password" autocomplete="new-password"
2024-12-11 09:14:12 +00:00
helper="Get it from the <a class='inline-block underline dark:text-white' href='https://t.me/botfather' target='_blank'>BotFather Bot</a> on Telegram."
2024-12-11 18:16:17 +00:00
required id="telegramToken" label="Bot API Token" />
<x-forms.input canGate="update" :canResource="$settings" type="password" autocomplete="new-password"
helper="Add your bot to a group chat and add its Chat ID here." required id="telegramChatId"
label="Chat ID" />
2024-12-11 09:14:12 +00:00
</div>
</form>
<h2 class="mt-4">Notification Settings</h2>
<p class="mb-4">
Select events for which you would like to receive Telegram notifications.
</p>
<div class="flex flex-col gap-4 ">
<div class="border dark:border-coolgray-300 border-neutral-200 p-4 rounded-lg">
2024-12-11 09:14:12 +00:00
<h3 class="text-lg font-medium mb-3">Deployments</h3>
<div class="flex flex-col gap-1.5 pl-1">
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="deploymentSuccessTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Deployment Success" />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsDeploymentSuccessThreadId" />
2024-12-11 09:14:12 +00:00
</div>
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="deploymentFailureTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Deployment Failure" />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsDeploymentFailureThreadId" />
2024-12-11 09:14:12 +00:00
</div>
2024-12-11 10:28:56 +00:00
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="statusChangeTelegramNotifications"
2024-12-11 10:28:56 +00:00
label="Container Status Changes"
helper="Send a notification when a container status changes. It will send a notification for Stopped and Restarted events of a container." />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" id="telegramNotificationsStatusChangeThreadId"
placeholder="Custom Telegram Thread ID" />
2024-12-11 10:28:56 +00:00
</div>
</div>
2024-12-11 09:14:12 +00:00
</div>
<div class="border dark:border-coolgray-300 border-neutral-200 p-4 rounded-lg">
2024-12-11 09:14:12 +00:00
<h3 class="text-lg font-medium mb-3">Backups</h3>
<div class="flex flex-col gap-1.5 pl-1">
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="backupSuccessTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Backup Success" />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsBackupSuccessThreadId" />
2024-12-11 09:14:12 +00:00
</div>
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="backupFailureTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Backup Failure" />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsBackupFailureThreadId" />
</div>
2024-12-11 09:14:12 +00:00
</div>
</div>
<div class="border dark:border-coolgray-300 border-neutral-200 p-4 rounded-lg">
2024-12-11 09:14:12 +00:00
<h3 class="text-lg font-medium mb-3">Scheduled Tasks</h3>
<div class="flex flex-col gap-1.5 pl-1">
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="scheduledTaskSuccessTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Scheduled Task Success" />
2023-12-07 18:06:32 +00:00
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsScheduledTaskSuccessThreadId" />
2023-12-07 18:06:32 +00:00
</div>
2024-12-09 15:49:09 +00:00
2024-12-11 09:14:12 +00:00
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="scheduledTaskFailureTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Scheduled Task Failure" />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsScheduledTaskFailureThreadId" />
2024-12-11 09:14:12 +00:00
</div>
</div>
</div>
<div class="border dark:border-coolgray-300 border-neutral-200 p-4 rounded-lg">
2024-12-11 09:14:12 +00:00
<h3 class="text-lg font-medium mb-3">Server</h3>
<div class="flex flex-col gap-1.5 pl-1">
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="dockerCleanupSuccessTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Docker Cleanup Success" />
2024-12-09 15:49:09 +00:00
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsDockerCleanupSuccessThreadId" />
</div>
2024-12-09 15:49:09 +00:00
2024-12-11 09:14:12 +00:00
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="dockerCleanupFailureTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Docker Cleanup Failure" />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsDockerCleanupFailureThreadId" />
2024-12-11 09:14:12 +00:00
</div>
2024-12-11 09:14:12 +00:00
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="serverDiskUsageTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Server Disk Usage" />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsServerDiskUsageThreadId" />
2024-12-11 09:14:12 +00:00
</div>
2024-12-11 09:14:12 +00:00
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="serverReachableTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Server Reachable" />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsServerReachableThreadId" />
2024-12-11 09:14:12 +00:00
</div>
2024-12-11 09:14:12 +00:00
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="serverUnreachableTelegramNotifications"
2024-12-11 09:14:12 +00:00
label="Server Unreachable" />
2024-12-09 15:49:09 +00:00
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsServerUnreachableThreadId" />
</div>
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="serverPatchTelegramNotifications"
label="Server Patching" />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsServerPatchThreadId" />
</div>
<div class="pl-1 flex gap-2">
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$settings" instantSave="saveModel" id="traefikOutdatedTelegramNotifications"
label="Traefik Proxy Outdated" />
</div>
<x-forms.input canGate="update" :canResource="$settings" type="password" placeholder="Custom Telegram Thread ID"
id="telegramNotificationsTraefikOutdatedThreadId" />
</div>
2023-09-08 12:15:28 +00:00
</div>
2024-12-11 09:14:12 +00:00
</div>
</div>
2023-09-06 12:31:38 +00:00
</div>