fix: pushover

This commit is contained in:
Andras Bacsai
2024-12-12 08:40:34 +01:00
parent f88438edd3
commit e5f534b6ef
2 changed files with 72 additions and 70 deletions

View File

@@ -1,84 +1,86 @@
<div> <div>
<x-slot:title> <x-slot:title>
Notifications | Coolify Notifications | Coolify
</x-slot> </x-slot>
<x-notification.navbar /> <x-notification.navbar />
<form wire:submit='submit' class="flex flex-col gap-4 pb-4"> <form wire:submit='submit' class="flex flex-col gap-4 pb-4">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<h2>Pushover</h2> <h2>Pushover</h2>
<x-forms.button type="submit"> <x-forms.button type="submit">
Save Save
</x-forms.button> </x-forms.button>
@if ($pushoverEnabled) @if ($pushoverEnabled)
<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>
@else @else
<x-forms.button disabled class="normal-case dark:text-white btn btn-xs no-animation btn-primary"> <x-forms.button disabled class="normal-case dark:text-white btn btn-xs no-animation btn-primary">
Send Test Notification Send Test Notification
</x-forms.button> </x-forms.button>
@endif @endif
</div> </div>
<div class="w-32"> <div class="w-32">
<x-forms.checkbox instantSave="instantSavePushoverEnabled" id="pushoverEnabled" label="Enabled" /> <x-forms.checkbox instantSave="instantSavePushoverEnabled" id="pushoverEnabled" label="Enabled" />
</div> </div>
<div class="flex gap-2">
<x-forms.input type="password" <x-forms.input type="password"
helper="Get your User Key in Pushover. You need to be logged in to Pushover to see your user key in the top right corner. <br><a class='inline-block underline dark:text-white' href='https://pushover.net/' target='_blank'>Pushover Dashboard</a>" required helper="Get your User Key in Pushover. You need to be logged in to Pushover to see your user key in the top right corner. <br><a class='inline-block underline dark:text-white' href='https://pushover.net/' target='_blank'>Pushover Dashboard</a>"
id="pushoverUserKey" label="User Key" /> required id="pushoverUserKey" label="User Key" />
<x-forms.input type="password" <x-forms.input type="password"
helper="Generate an API Token/Key in Pushover by creating a new application. <br><a class='inline-block underline dark:text-white' href='https://pushover.net/apps/build' target='_blank'>Create Pushover Application</a>" required helper="Generate an API Token/Key in Pushover by creating a new application. <br><a class='inline-block underline dark:text-white' href='https://pushover.net/apps/build' target='_blank'>Create Pushover Application</a>"
id="pushoverApiToken" label="API Token" /> required id="pushoverApiToken" label="API Token" />
</form> </div>
<h2 class="mt-4">Notification Settings</h2> </form>
<p class="mb-4"> <h2 class="mt-4">Notification Settings</h2>
Select events for which you would like to receive Pushover notifications. <p class="mb-4">
</p> Select events for which you would like to receive Pushover notifications.
<div class="flex flex-col gap-4 max-w-2xl"> </p>
<div class="border dark:border-coolgray-300 p-4 rounded-lg"> <div class="flex flex-col gap-4 max-w-2xl">
<h3 class="font-medium mb-3">Deployments</h3> <div class="border dark:border-coolgray-300 p-4 rounded-lg">
<div class="flex flex-col gap-1.5 pl-1"> <h3 class="font-medium mb-3">Deployments</h3>
<x-forms.checkbox instantSave="saveModel" id="deploymentSuccessPushoverNotifications" <div class="flex flex-col gap-1.5 pl-1">
label="Deployment Success" /> <x-forms.checkbox instantSave="saveModel" id="deploymentSuccessPushoverNotifications"
<x-forms.checkbox instantSave="saveModel" id="deploymentFailurePushoverNotifications" label="Deployment Success" />
label="Deployment Failure" /> <x-forms.checkbox instantSave="saveModel" id="deploymentFailurePushoverNotifications"
<x-forms.checkbox instantSave="saveModel" label="Deployment Failure" />
helper="Send a notification when a container status changes. It will notify for Stopped and Restarted events of a container." <x-forms.checkbox instantSave="saveModel"
id="statusChangePushoverNotifications" label="Container Status Changes" /> helper="Send a notification when a container status changes. It will notify for Stopped and Restarted events of a container."
</div> id="statusChangePushoverNotifications" label="Container Status Changes" />
</div>
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
<h3 class="font-medium mb-3">Backups</h3>
<div class="flex flex-col gap-1.5 pl-1">
<x-forms.checkbox instantSave="saveModel" id="backupSuccessPushoverNotifications"
label="Backup Success" />
<x-forms.checkbox instantSave="saveModel" id="backupFailurePushoverNotifications"
label="Backup Failure" />
</div>
</div>
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
<h3 class="font-medium mb-3">Scheduled Tasks</h3>
<div class="flex flex-col gap-1.5 pl-1">
<x-forms.checkbox instantSave="saveModel" id="scheduledTaskSuccessPushoverNotifications"
label="Scheduled Task Success" />
<x-forms.checkbox instantSave="saveModel" id="scheduledTaskFailurePushoverNotifications"
label="Scheduled Task Failure" />
</div>
</div>
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
<h3 class="font-medium mb-3">Server</h3>
<div class="flex flex-col gap-1.5 pl-1">
<x-forms.checkbox instantSave="saveModel" id="dockerCleanupSuccessPushoverNotifications"
label="Docker Cleanup Success" />
<x-forms.checkbox instantSave="saveModel" id="dockerCleanupFailurePushoverNotifications"
label="Docker Cleanup Failure" />
<x-forms.checkbox instantSave="saveModel" id="serverDiskUsagePushoverNotifications"
label="Server Disk Usage" />
<x-forms.checkbox instantSave="saveModel" id="serverReachablePushoverNotifications"
label="Server Reachable" />
<x-forms.checkbox instantSave="saveModel" id="serverUnreachablePushoverNotifications"
label="Server Unreachable" />
</div>
</div> </div>
</div> </div>
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
<h3 class="font-medium mb-3">Backups</h3>
<div class="flex flex-col gap-1.5 pl-1">
<x-forms.checkbox instantSave="saveModel" id="backupSuccessPushoverNotifications"
label="Backup Success" />
<x-forms.checkbox instantSave="saveModel" id="backupFailurePushoverNotifications"
label="Backup Failure" />
</div>
</div>
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
<h3 class="font-medium mb-3">Scheduled Tasks</h3>
<div class="flex flex-col gap-1.5 pl-1">
<x-forms.checkbox instantSave="saveModel" id="scheduledTaskSuccessPushoverNotifications"
label="Scheduled Task Success" />
<x-forms.checkbox instantSave="saveModel" id="scheduledTaskFailurePushoverNotifications"
label="Scheduled Task Failure" />
</div>
</div>
<div class="border dark:border-coolgray-300 p-4 rounded-lg">
<h3 class="font-medium mb-3">Server</h3>
<div class="flex flex-col gap-1.5 pl-1">
<x-forms.checkbox instantSave="saveModel" id="dockerCleanupSuccessPushoverNotifications"
label="Docker Cleanup Success" />
<x-forms.checkbox instantSave="saveModel" id="dockerCleanupFailurePushoverNotifications"
label="Docker Cleanup Failure" />
<x-forms.checkbox instantSave="saveModel" id="serverDiskUsagePushoverNotifications"
label="Server Disk Usage" />
<x-forms.checkbox instantSave="saveModel" id="serverReachablePushoverNotifications"
label="Server Reachable" />
<x-forms.checkbox instantSave="saveModel" id="serverUnreachablePushoverNotifications"
label="Server Unreachable" />
</div>
</div>
</div>
</div> </div>

View File

@@ -12,9 +12,9 @@ use App\Livewire\Destination\Show as DestinationShow;
use App\Livewire\ForcePasswordReset; use App\Livewire\ForcePasswordReset;
use App\Livewire\Notifications\Discord as NotificationDiscord; use App\Livewire\Notifications\Discord as NotificationDiscord;
use App\Livewire\Notifications\Email as NotificationEmail; use App\Livewire\Notifications\Email as NotificationEmail;
use App\Livewire\Notifications\Pushover as NotificationPushover;
use App\Livewire\Notifications\Slack as NotificationSlack; use App\Livewire\Notifications\Slack as NotificationSlack;
use App\Livewire\Notifications\Telegram as NotificationTelegram; use App\Livewire\Notifications\Telegram as NotificationTelegram;
use App\Livewire\Notifications\Pushover as NotificationPushover;
use App\Livewire\Profile\Index as ProfileIndex; use App\Livewire\Profile\Index as ProfileIndex;
use App\Livewire\Project\Application\Configuration as ApplicationConfiguration; use App\Livewire\Project\Application\Configuration as ApplicationConfiguration;
use App\Livewire\Project\Application\Deployment\Index as DeploymentIndex; use App\Livewire\Project\Application\Deployment\Index as DeploymentIndex;