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.

100 lines
4.9 KiB

  1. from django.urls import include, path
  2. from hc.front import views
  3. check_urls = [
  4. path("name/", views.update_name, name="hc-update-name"),
  5. path("details/", views.details, name="hc-details"),
  6. path("filtering_rules/", views.filtering_rules, name="hc-filtering-rules"),
  7. path("timeout/", views.update_timeout, name="hc-update-timeout"),
  8. path("pause/", views.pause, name="hc-pause"),
  9. path("resume/", views.resume, name="hc-resume"),
  10. path("remove/", views.remove_check, name="hc-remove-check"),
  11. path("log/", views.log, name="hc-log"),
  12. path("status/", views.status_single, name="hc-status-single"),
  13. path("last_ping/", views.ping_details, name="hc-last-ping"),
  14. path("transfer/", views.transfer, name="hc-transfer"),
  15. path("copy/", views.copy, name="hc-copy"),
  16. path(
  17. "channels/<uuid:channel_code>/enabled",
  18. views.switch_channel,
  19. name="hc-switch-channel",
  20. ),
  21. path("pings/<int:n>/", views.ping_details, name="hc-ping-details"),
  22. ]
  23. channel_urls = [
  24. path(
  25. "add_pushbullet/",
  26. views.add_pushbullet_complete,
  27. name="hc-add-pushbullet-complete",
  28. ),
  29. path("add_discord/", views.add_discord_complete, name="hc-add-discord-complete"),
  30. path("add_pushover/", views.pushover_help, name="hc-pushover-help"),
  31. path("telegram/", views.telegram_help, name="hc-telegram-help"),
  32. path("telegram/bot/", views.telegram_bot, name="hc-telegram-webhook"),
  33. path("add_pdc/", views.pdc_help, name="hc-pdc-help"),
  34. path("add_slack/", views.slack_help, name="hc-slack-help"),
  35. path("add_slack_btn/", views.add_slack_complete),
  36. path("add_telegram/", views.add_telegram, name="hc-add-telegram"),
  37. path("add_trello/settings/", views.trello_settings, name="hc-trello-settings"),
  38. path("<uuid:code>/checks/", views.channel_checks, name="hc-channel-checks"),
  39. path("<uuid:code>/name/", views.update_channel_name, name="hc-channel-name"),
  40. path("<uuid:code>/edit_webhook/", views.edit_webhook, name="hc-edit-webhook"),
  41. path("<uuid:code>/test/", views.send_test_notification, name="hc-channel-test"),
  42. path("<uuid:code>/remove/", views.remove_channel, name="hc-remove-channel"),
  43. path(
  44. "<uuid:code>/verify/<slug:token>/", views.verify_email, name="hc-verify-email"
  45. ),
  46. path(
  47. "<uuid:code>/unsub/<str:signed_token>/",
  48. views.unsubscribe_email,
  49. name="hc-unsubscribe-alerts",
  50. ),
  51. ]
  52. project_urls = [
  53. path("add_apprise/", views.add_apprise, name="hc-add-apprise"),
  54. path("add_call/", views.add_call, name="hc-add-call"),
  55. path("add_discord/", views.add_discord, name="hc-add-discord"),
  56. path("add_email/", views.add_email, name="hc-add-email"),
  57. path("add_matrix/", views.add_matrix, name="hc-add-matrix"),
  58. path("add_mattermost/", views.add_mattermost, name="hc-add-mattermost"),
  59. path("add_msteams/", views.add_msteams, name="hc-add-msteams"),
  60. path("add_opsgenie/", views.add_opsgenie, name="hc-add-opsgenie"),
  61. path("add_pagertree/", views.add_pagertree, name="hc-add-pagertree"),
  62. path("add_pd/", views.add_pd, name="hc-add-pd"),
  63. path("add_pdc/", views.add_pdc, name="hc-add-pdc"),
  64. path("add_pdc/<str:state>/", views.add_pdc_complete, name="hc-add-pdc-complete"),
  65. path("add_prometheus/", views.add_prometheus, name="hc-add-prometheus"),
  66. path("add_pushbullet/", views.add_pushbullet, name="hc-add-pushbullet"),
  67. path("add_pushover/", views.add_pushover, name="hc-add-pushover"),
  68. path("add_shell/", views.add_shell, name="hc-add-shell"),
  69. path("add_slack/", views.add_slack, name="hc-add-slack"),
  70. path("add_slack_btn/", views.add_slack_btn, name="hc-add-slack-btn"),
  71. path("add_sms/", views.add_sms, name="hc-add-sms"),
  72. path("add_trello/", views.add_trello, name="hc-add-trello"),
  73. path("add_victorops/", views.add_victorops, name="hc-add-victorops"),
  74. path("add_webhook/", views.add_webhook, name="hc-add-webhook"),
  75. path("add_whatsapp/", views.add_whatsapp, name="hc-add-whatsapp"),
  76. path("add_zulip/", views.add_zulip, name="hc-add-zulip"),
  77. path("add_spike/", views.add_spike, name="hc-add-spike"),
  78. path("badges/", views.badges, name="hc-badges"),
  79. path("checks/", views.my_checks, name="hc-checks"),
  80. path("checks/add/", views.add_check, name="hc-add-check"),
  81. path("checks/metrics/<slug:key>", views.metrics,),
  82. path("metrics/<slug:key>", views.metrics, name="hc-metrics",),
  83. path("checks/status/", views.status, name="hc-status"),
  84. path("integrations/", views.channels, name="hc-p-channels"),
  85. ]
  86. urlpatterns = [
  87. path("", views.index, name="hc-index"),
  88. path("checks/cron_preview/", views.cron_preview),
  89. path("checks/<uuid:code>/", include(check_urls)),
  90. path("integrations/", include(channel_urls)),
  91. path("projects/<uuid:code>/", include(project_urls)),
  92. path("docs/", views.serve_doc, name="hc-docs"),
  93. path("docs/cron/", views.docs_cron, name="hc-docs-cron"),
  94. path("docs/<slug:doc>/", views.serve_doc, name="hc-serve-doc"),
  95. ]