mirror of
https://github.com/healthchecks/healthchecks.git
synced 2025-04-07 06:05:34 +00:00
parent
c498f2e047
commit
8dab5d8c36
3 changed files with 21 additions and 2 deletions
hc/api
|
@ -28,7 +28,7 @@ class ChecksAdmin(ModelAdmin[Check]):
|
||||||
css = {"all": ("css/admin/checks.css",)}
|
css = {"all": ("css/admin/checks.css",)}
|
||||||
|
|
||||||
search_fields = ["name", "code", "project__owner__email"]
|
search_fields = ["name", "code", "project__owner__email"]
|
||||||
readonly_fields = ("code",)
|
readonly_fields = ("code", "badge_key")
|
||||||
raw_id_fields = ("project",)
|
raw_id_fields = ("project",)
|
||||||
list_select_related = ("project",)
|
list_select_related = ("project",)
|
||||||
list_display = (
|
list_display = (
|
||||||
|
|
19
hc/api/migrations/0116_alter_check_badge_key.py
Normal file
19
hc/api/migrations/0116_alter_check_badge_key.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 5.1.4 on 2024-12-27 09:24
|
||||||
|
|
||||||
|
import uuid
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('api', '0115_flip_api_flip_owner_created'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='check',
|
||||||
|
name='badge_key',
|
||||||
|
field=models.UUIDField(default=uuid.uuid4, null=True, unique=True),
|
||||||
|
),
|
||||||
|
]
|
|
@ -195,7 +195,7 @@ class Check(models.Model):
|
||||||
failure_kw = models.CharField(max_length=200, blank=True)
|
failure_kw = models.CharField(max_length=200, blank=True)
|
||||||
methods = models.CharField(max_length=30, blank=True)
|
methods = models.CharField(max_length=30, blank=True)
|
||||||
manual_resume = models.BooleanField(default=False)
|
manual_resume = models.BooleanField(default=False)
|
||||||
badge_key = models.UUIDField(null=True, unique=True)
|
badge_key = models.UUIDField(default=uuid.uuid4, null=True, unique=True)
|
||||||
|
|
||||||
n_pings = models.IntegerField(default=0)
|
n_pings = models.IntegerField(default=0)
|
||||||
last_ping = models.DateTimeField(null=True, blank=True)
|
last_ping = models.DateTimeField(null=True, blank=True)
|
||||||
|
|
Loading…
Add table
Reference in a new issue