diff --git a/CHANGELOG.md b/CHANGELOG.md
index c13589a5..2f26e5f8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- Handle status callbacks from Twilio, show delivery failures in Integrations
- Removing unused /api/v1/notifications/{uuid}/bounce endpoint
- Less verbose output in the `senddeletionnotices` command
+- Host a read-only dashboard (from github.com/healthchecks/dashboard/)
## Bug Fixes
- Handle excessively long email addresses in the signup form.
diff --git a/hc/accounts/models.py b/hc/accounts/models.py
index 5a4af9c2..bd7cd909 100644
--- a/hc/accounts/models.py
+++ b/hc/accounts/models.py
@@ -1,5 +1,6 @@
from datetime import timedelta
from secrets import token_urlsafe
+from urllib.parse import quote, urlencode
import uuid
from django.conf import settings
@@ -359,6 +360,13 @@ class Project(models.Model):
def transfer_request(self):
return self.member_set.filter(transfer_request_date__isnull=False).first()
+ def dashboard_url(self):
+ if not self.api_key_readonly:
+ return None
+
+ frag = urlencode({self.api_key_readonly: str(self)}, quote_via=quote)
+ return reverse("hc-dashboard") + "#" + frag
+
class Member(models.Model):
user = models.ForeignKey(User, models.CASCADE, related_name="memberships")
diff --git a/hc/front/urls.py b/hc/front/urls.py
index bce15731..b99292b2 100644
--- a/hc/front/urls.py
+++ b/hc/front/urls.py
@@ -90,6 +90,7 @@ project_urls = [
urlpatterns = [
path("", views.index, name="hc-index"),
+ path("tv/", views.dashboard, name="hc-dashboard"),
path("checks/cron_preview/", views.cron_preview),
path("checks/
API key:
- {{ project.api_key }}
+ {{ project.api_key }}
API key (read-only):
- {{ project.api_key_readonly }}
-
- Prometheus metrics endpoint: - here +
{{ project.api_key_readonly }}+
Related links:
+