Coverage for seedboxsync/front/forms/settings/ping.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.16.1, created at 2026-09-26 17:14 +0000

1# 

2# Copyright (C) 2015-2026 Guillaume Kulakowski <guillaume@kulakowski.fr> 

3# 

4# For the full copyright and license information, please view the LICENSE 

5# file that was distributed with this source code. 

6# 

7"""SeedboxSync WTForms form for settings ping services.""" 

8 

9from flask_wtf import FlaskForm 

10from wtforms import BooleanField, URLField 

11from seedboxsync.front.babel import gettext as _ 

12 

13 

14class SettingsPingForm(FlaskForm): # type: ignore[misc] 

15 """ 

16 Form for configuring external ping and health check services. 

17 

18 Manages enablement toggles and webhook target URLs for monitoring 

19 background synchronization tasks via external services (e.g., Healthchecks.io). 

20 """ 

21 

22 healthchecks_sync_blackhole_enabled = BooleanField(_("Enable for sync_blackhole task?")) 

23 healthchecks_sync_blackhole_ping_url = URLField( 

24 _("Ping URL for sync_blackhole task"), render_kw={"placeholder": "https://hc-ping.com/94db845e-bd7c-42af-9ca8-25e89556b814", "icon": "fa-globe"} 

25 ) 

26 healthchecks_sync_seedbox_enabled = BooleanField(_("Enable for sync_seedbox task?")) 

27 healthchecks_sync_seedbox_ping_url = URLField( 

28 _("Ping URL for sync_seedbox task"), render_kw={"placeholder": "https://hc-ping.com/826cb034-14fe-4965-a9d9-bc0bed7b034d", "icon": "fa-globe"} 

29 )