fix: add missing deployment notifications to telegram

This commit is contained in:
peaklabs-dev
2024-12-10 15:31:00 +01:00
parent ba6d05b563
commit b4dd7cd263

View File

@@ -10,8 +10,7 @@
Save Save
</x-forms.button> </x-forms.button>
@if ($telegramEnabled) @if ($telegramEnabled)
<x-forms.button class="normal-case dark:text-white btn btn-xs no-animation btn-primary" <x-forms.button class="normal-case dark:text-white btn btn-xs no-animation btn-primary" wire:click="sendTestNotification">
wire:click="sendTestNotification">
Send Test Notification Send Test Notification
</x-forms.button> </x-forms.button>
@endif @endif
@@ -20,11 +19,8 @@
<x-forms.checkbox instantSave="instantSaveTelegramEnabled" id="telegramEnabled" label="Enabled" /> <x-forms.checkbox instantSave="instantSaveTelegramEnabled" id="telegramEnabled" label="Enabled" />
</div> </div>
<div class="flex gap-2"> <div class="flex gap-2">
<x-forms.input type="password" autocomplete="new-password" <x-forms.input type="password" autocomplete="new-password" 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." required id="telegramToken" label="Token" />
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." <x-forms.input helper="Recommended to add your bot to a group chat and add its Chat ID here." required id="telegramChatId" label="Chat ID" />
required id="telegramToken" label="Token" />
<x-forms.input helper="Recommended to add your bot to a group chat and add its Chat ID here." required
id="telegramChatId" label="Chat ID" />
</div> </div>
@if ($telegramEnabled) @if ($telegramEnabled)
<h2 class="mt-8 mb-4">Notification Settings</h2> <h2 class="mt-8 mb-4">Notification Settings</h2>
@@ -32,21 +28,39 @@
Select events for which you would like to receive Telegram notifications. Select events for which you would like to receive Telegram notifications.
</p> </p>
<div class="flex flex-col gap-4 max-w-2xl"> <div class="flex flex-col gap-4 max-w-2xl">
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
<h3 class="text-lg font-medium mb-3">Deployment</h3>
<div class="flex flex-col gap-1.5 pl-1">
<h4 class="font-medium mt-2">Deployment Success</h4>
<div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="deploymentSuccessTelegramNotifications" label="Enabled" />
<x-forms.input helper="Topic ID for deployment success notifications" id="telegramNotificationsDeploymentSuccessTopicId" label="Success Topic ID" />
</div>
<h4 class="font-medium mt-3">Deployment Failure</h4>
<div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="deploymentFailureTelegramNotifications" label="Enabled" />
<x-forms.input helper="Topic ID for deployment failure notifications" id="telegramNotificationsDeploymentFailureTopicId" label="Failure Topic ID" />
</div>
{{-- <h4 class="font-medium mt-3">Container Status Changes</h4>
<div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="statusChangeTelegramNotifications" label="Enabled" helper="Send a notification when a container status changes. It will send a notification for Stopped and Restarted events of a container." />
<x-forms.input helper="Topic ID for container status notifications" id="telegramNotificationsStatusChangeTopicId" label="Container Status Topic ID" />
</div> --}}
</div>
</div>
<div class="border dark:border-coolgray-300 p-4 rounded-lg"> <div class="border dark:border-coolgray-300 p-4 rounded-lg">
<h3 class="text-lg font-medium mb-3">Backups</h3> <h3 class="text-lg font-medium mb-3">Backups</h3>
<div class="flex flex-col gap-1.5 pl-1"> <div class="flex flex-col gap-1.5 pl-1">
<h4 class="font-medium mt-2">Backup Success</h4> <h4 class="font-medium mt-2">Backup Success</h4>
<div class="pl-1"> <div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="backupSuccessTelegramNotifications" label="Enabled" /> <x-forms.checkbox instantSave="saveModel" id="backupSuccessTelegramNotifications" label="Enabled" />
<x-forms.input helper="Topic ID for backup success notifications" <x-forms.input helper="Topic ID for backup success notifications" id="telegramNotificationsBackupSuccessTopicId" label="Success Topic ID" />
id="telegramNotificationsBackupSuccessTopicId" label="Success Topic ID" />
</div> </div>
<h4 class="font-medium mt-3">Backup Failure</h4> <h4 class="font-medium mt-3">Backup Failure</h4>
<div class="pl-1"> <div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="backupFailureTelegramNotifications" label="Enabled" /> <x-forms.checkbox instantSave="saveModel" id="backupFailureTelegramNotifications" label="Enabled" />
<x-forms.input helper="Topic ID for backup failure notifications" <x-forms.input helper="Topic ID for backup failure notifications" id="telegramNotificationsBackupFailureTopicId" label="Failure Topic ID" />
id="telegramNotificationsBackupFailureTopicId" label="Failure Topic ID" />
</div> </div>
</div> </div>
</div> </div>
@@ -57,15 +71,13 @@
<h4 class="font-medium mt-2">Scheduled Task Success</h4> <h4 class="font-medium mt-2">Scheduled Task Success</h4>
<div class="pl-1"> <div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="scheduledTaskSuccessTelegramNotifications" label="Enabled" /> <x-forms.checkbox instantSave="saveModel" id="scheduledTaskSuccessTelegramNotifications" label="Enabled" />
<x-forms.input helper="Topic ID for scheduled task success notifications" <x-forms.input helper="Topic ID for scheduled task success notifications" id="telegramNotificationsScheduledTaskSuccessTopicId" label="Success Topic ID" />
id="telegramNotificationsScheduledTaskSuccessTopicId" label="Success Topic ID" />
</div> </div>
<h4 class="font-medium mt-3">Scheduled Task Failure</h4> <h4 class="font-medium mt-3">Scheduled Task Failure</h4>
<div class="pl-1"> <div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="scheduledTaskFailureTelegramNotifications" label="Enabled" /> <x-forms.checkbox instantSave="saveModel" id="scheduledTaskFailureTelegramNotifications" label="Enabled" />
<x-forms.input helper="Topic ID for scheduled task failure notifications" <x-forms.input helper="Topic ID for scheduled task failure notifications" id="telegramNotificationsScheduledTaskFailureTopicId" label="Failure Topic ID" />
id="telegramNotificationsScheduledTaskFailureTopicId" label="Failure Topic ID" />
</div> </div>
</div> </div>
</div> </div>
@@ -76,29 +88,25 @@
<h4 class="font-medium mt-2">Docker Cleanup</h4> <h4 class="font-medium mt-2">Docker Cleanup</h4>
<div class="pl-1"> <div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="dockerCleanupTelegramNotifications" label="Enabled" /> <x-forms.checkbox instantSave="saveModel" id="dockerCleanupTelegramNotifications" label="Enabled" />
<x-forms.input helper="Topic ID for Docker cleanup notifications" <x-forms.input helper="Topic ID for Docker cleanup notifications" id="telegramNotificationsDockerCleanupTopicId" label="Docker Cleanup Topic ID" />
id="telegramNotificationsDockerCleanupTopicId" label="Docker Cleanup Topic ID" />
</div> </div>
<h4 class="font-medium mt-3">Server Disk Usage</h4> <h4 class="font-medium mt-3">Server Disk Usage</h4>
<div class="pl-1"> <div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="serverDiskUsageTelegramNotifications" label="Enabled" /> <x-forms.checkbox instantSave="saveModel" id="serverDiskUsageTelegramNotifications" label="Enabled" />
<x-forms.input helper="Topic ID for disk usage notifications" <x-forms.input helper="Topic ID for disk usage notifications" id="telegramNotificationsServerDiskUsageTopicId" label="Disk Usage Topic ID" />
id="telegramNotificationsServerDiskUsageTopicId" label="Disk Usage Topic ID" />
</div> </div>
<h4 class="font-medium mt-3">Server Reachable</h4> <h4 class="font-medium mt-3">Server Reachable</h4>
<div class="pl-1"> <div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="serverReachableTelegramNotifications" label="Enabled" /> <x-forms.checkbox instantSave="saveModel" id="serverReachableTelegramNotifications" label="Enabled" />
<x-forms.input helper="Topic ID for server reachable notifications" <x-forms.input helper="Topic ID for server reachable notifications" id="telegramNotificationsServerReachableTopicId" label="Server Reachable Topic ID" />
id="telegramNotificationsServerReachableTopicId" label="Server Reachable Topic ID" />
</div> </div>
<h4 class="font-medium mt-3">Server Unreachable</h4> <h4 class="font-medium mt-3">Server Unreachable</h4>
<div class="pl-1"> <div class="pl-1">
<x-forms.checkbox instantSave="saveModel" id="serverUnreachableTelegramNotifications" label="Enabled" /> <x-forms.checkbox instantSave="saveModel" id="serverUnreachableTelegramNotifications" label="Enabled" />
<x-forms.input helper="Topic ID for server unreachable notifications" <x-forms.input helper="Topic ID for server unreachable notifications" id="telegramNotificationsServerUnreachableTopicId" label="Server Unreachable Topic ID" />
id="telegramNotificationsServerUnreachableTopicId" label="Server Unreachable Topic ID" />
</div> </div>
</div> </div>
</div> </div>