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.

87 lines
4.2 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("remove/", views.remove_check, name="hc-remove-check"),
  10. path("log/", views.log, name="hc-log"),
  11. path("status/", views.status_single, name="hc-status-single"),
  12. path("last_ping/", views.ping_details, name="hc-last-ping"),
  13. path("transfer/", views.transfer, name="hc-transfer"),
  14. path("copy/", views.copy, name="hc-copy"),
  15. path(
  16. "channels/<uuid:channel_code>/enabled",
  17. views.switch_channel,
  18. name="hc-switch-channel",
  19. ),
  20. path("pings/<int:n>/", views.ping_details, name="hc-ping-details"),
  21. ]
  22. channel_urls = [
  23. path("", views.channels, name="hc-channels"),
  24. path("add_shell/", views.add_shell, name="hc-add-shell"),
  25. path("add_pd/", views.add_pd, name="hc-add-pd"),
  26. path("add_pdc/", views.add_pdc, name="hc-add-pdc"),
  27. path("add_pdc/<str:state>/", views.add_pdc, name="hc-add-pdc-state"),
  28. path("add_slack/", views.add_slack, name="hc-add-slack"),
  29. path("add_slack_btn/", views.add_slack_btn, name="hc-add-slack-btn"),
  30. path("add_pushbullet/", views.add_pushbullet, name="hc-add-pushbullet"),
  31. path("add_discord/", views.add_discord, name="hc-add-discord"),
  32. path("add_pushover/", views.add_pushover, name="hc-add-pushover"),
  33. path("add_victorops/", views.add_victorops, name="hc-add-victorops"),
  34. path("telegram/bot/", views.telegram_bot, name="hc-telegram-webhook"),
  35. path("add_telegram/", views.add_telegram, name="hc-add-telegram"),
  36. path("add_whatsapp/", views.add_whatsapp, name="hc-add-whatsapp"),
  37. path("add_trello/", views.add_trello, name="hc-add-trello"),
  38. path("add_trello/settings/", views.trello_settings, name="hc-trello-settings"),
  39. path("add_apprise/", views.add_apprise, name="hc-add-apprise"),
  40. path("<uuid:code>/checks/", views.channel_checks, name="hc-channel-checks"),
  41. path("<uuid:code>/name/", views.update_channel_name, name="hc-channel-name"),
  42. path("<uuid:code>/test/", views.send_test_notification, name="hc-channel-test"),
  43. path("<uuid:code>/remove/", views.remove_channel, name="hc-remove-channel"),
  44. path(
  45. "<uuid:code>/verify/<slug:token>/", views.verify_email, name="hc-verify-email"
  46. ),
  47. path(
  48. "<uuid:code>/unsub/<str:signed_token>/",
  49. views.unsubscribe_email,
  50. name="hc-unsubscribe-alerts",
  51. ),
  52. ]
  53. project_urls = [
  54. path("add_email/", views.add_email, name="hc-add-email"),
  55. path("add_matrix/", views.add_matrix, name="hc-add-matrix"),
  56. path("add_mattermost/", views.add_mattermost, name="hc-add-mattermost"),
  57. path("add_msteams/", views.add_msteams, name="hc-add-msteams"),
  58. path("add_opsgenie/", views.add_opsgenie, name="hc-add-opsgenie"),
  59. path("add_pagerteam/", views.add_pagerteam, name="hc-add-pagerteam"),
  60. path("add_pagertree/", views.add_pagertree, name="hc-add-pagertree"),
  61. path("add_prometheus/", views.add_prometheus, name="hc-add-prometheus"),
  62. path("add_sms/", views.add_sms, name="hc-add-sms"),
  63. path("add_webhook/", views.add_webhook, name="hc-add-webhook"),
  64. path("badges/", views.badges, name="hc-badges"),
  65. path("checks/", views.my_checks, name="hc-checks"),
  66. path("checks/add/", views.add_check, name="hc-add-check"),
  67. path("checks/metrics/<slug:key>", views.metrics,),
  68. path("metrics/<slug:key>", views.metrics, name="hc-metrics",),
  69. path("checks/status/", views.status, name="hc-status"),
  70. path("integrations/", views.channels, name="hc-p-channels"),
  71. ]
  72. urlpatterns = [
  73. path("", views.index, name="hc-index"),
  74. path("checks/cron_preview/", views.cron_preview),
  75. path("checks/<uuid:code>/", include(check_urls)),
  76. path("integrations/", include(channel_urls)),
  77. path("projects/<uuid:code>/", include(project_urls)),
  78. path("docs/", views.serve_doc, name="hc-docs"),
  79. path("docs/api/", views.docs_api, name="hc-docs-api"),
  80. path("docs/cron/", views.docs_cron, name="hc-docs-cron"),
  81. path("docs/<slug:doc>/", views.serve_doc, name="hc-serve-doc"),
  82. ]