You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.7 KiB

  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.db import models, migrations
  4. import datetime
  5. class Migration(migrations.Migration):
  6. dependencies = [("api", "0001_initial")]
  7. operations = [
  8. migrations.AddField(
  9. model_name="check",
  10. name="alert_after",
  11. field=models.DateTimeField(null=True, blank=True),
  12. ),
  13. migrations.AddField(
  14. model_name="check", name="enabled", field=models.BooleanField(default=True)
  15. ),
  16. migrations.AddField(
  17. model_name="check",
  18. name="status",
  19. field=models.CharField(
  20. max_length=6,
  21. choices=[("up", "Up"), ("down", "Down"), ("new", "New")],
  22. default="new",
  23. ),
  24. ),
  25. migrations.AddField(
  26. model_name="check",
  27. name="timeout",
  28. field=models.DurationField(
  29. choices=[
  30. (datetime.timedelta(0, 300), "5 minutes"),
  31. (datetime.timedelta(0, 600), "10 minutes"),
  32. (datetime.timedelta(0, 1800), "30 minutes"),
  33. (datetime.timedelta(0, 3600), "1 hour"),
  34. (datetime.timedelta(0, 7200), "2 hours"),
  35. (datetime.timedelta(0, 21600), "6 hours"),
  36. (datetime.timedelta(0, 43200), "12 hours"),
  37. (datetime.timedelta(1), "1 day"),
  38. (datetime.timedelta(2), "2 days"),
  39. (datetime.timedelta(7), "1 week"),
  40. (datetime.timedelta(14), "2 weeks"),
  41. ],
  42. default=datetime.timedelta(1),
  43. ),
  44. ),
  45. ]