diff --git a/analytics/views.py b/analytics/views.py index 6695d45d10..e8b63e7ac7 100644 --- a/analytics/views.py +++ b/analytics/views.py @@ -806,10 +806,15 @@ def get_realm_activity(request, realm): content = sent_messages_report(realm) data += [(page_title, content)] + fix_name = lambda realm: realm.replace('.', '_') + + realm_link = 'https://stats1.zulip.net:444/render/?from=-7days' + realm_link += '&target=stats.gauges.staging.users.active.%s.0_16hr' % (fix_name(realm),) + title = realm return render_to_response( 'analytics/activity.html', - dict(data=data, realm=realm, title=title), + dict(data=data, realm_link=realm_link, title=title), context_instance=RequestContext(request) ) diff --git a/templates/analytics/activity.html b/templates/analytics/activity.html index 0f8d9fa283..dbfe3ee4e6 100644 --- a/templates/analytics/activity.html +++ b/templates/analytics/activity.html @@ -25,6 +25,9 @@

{{ title }}

+{% if realm_link %} +Graph
+{% endif %}