diff --git a/roundtable/dashboard/routes.py b/roundtable/dashboard/routes.py index b5ccfb0..36afebe 100644 --- a/roundtable/dashboard/routes.py +++ b/roundtable/dashboard/routes.py @@ -11,6 +11,7 @@ from roundtable.models.users import UserRole from roundtable.models.hosts import Host from roundtable.models.monitors import PingResult, DnsResult from roundtable.models.dashboard import Dashboard, DashboardWidget, DashboardShareToken +from roundtable.core.settings import public_base_url from roundtable.core.widgets import get_available_widgets, WIDGET_REGISTRY dashboard_bp = Blueprint("dashboard", __name__) @@ -522,12 +523,14 @@ async def create_share_token(dash_id: int): result = await db.execute(select(Dashboard).where(Dashboard.id == dash_id)) dash = result.scalar_one_or_none() + share_url = f"{public_base_url(request)}/share/{raw_token}" return await render_template( "dashboard/share_created.html", dashboard=dash, raw_token=raw_token, label=label, expires_at=expires_at, + share_url=share_url, ) diff --git a/roundtable/templates/dashboard/share_created.html b/roundtable/templates/dashboard/share_created.html index aaf59b2..e5ffeb9 100644 --- a/roundtable/templates/dashboard/share_created.html +++ b/roundtable/templates/dashboard/share_created.html @@ -9,7 +9,6 @@ Copy this link now — it cannot be shown again - {% set share_url = request.host_url.rstrip('/') + '/share/' + raw_token %}