diff --git a/corporate/lib/activity.py b/corporate/lib/activity.py index b84c508779..ef849eccda 100644 --- a/corporate/lib/activity.py +++ b/corporate/lib/activity.py @@ -132,7 +132,7 @@ def realm_activity_link(realm_str: str) -> Markup: from corporate.views.realm_activity import get_realm_activity url = reverse(get_realm_activity, kwargs=dict(realm_str=realm_str)) - return Markup('{realm_str}').format(url=url, realm_str=realm_str) + return Markup('').format(url=url) def realm_stats_link(realm_str: str) -> Markup: @@ -153,7 +153,7 @@ def realm_support_link(realm_str: str) -> Markup: support_url = reverse("support") query = urlencode({"q": realm_str}) url = append_url_query_string(support_url, query) - return Markup('').format(url=url) + return Markup('{realm}').format(url=url, realm=realm_str) def realm_url_link(realm_str: str) -> Markup: diff --git a/corporate/views/installation_activity.py b/corporate/views/installation_activity.py index 72a6a27c93..5c487ac5b7 100644 --- a/corporate/views/installation_activity.py +++ b/corporate/views/installation_activity.py @@ -371,17 +371,17 @@ def get_integrations_activity(request: HttpRequest) -> HttpResponse: """ ) - cols = [ - "Client", - "Realm", - "Hits", - "Last time (UTC)", - ] - + cols = ["Client", "Realm", "Hits", "Last time (UTC)", "Links"] rows = get_query_data(query) + for row in rows: + realm_str = row[1] + activity = realm_activity_link(realm_str) + stats = realm_stats_link(realm_str) + row.append(activity + " " + stats) + for i, col in enumerate(cols): if col == "Realm": - fix_rows(rows, i, realm_activity_link) + fix_rows(rows, i, realm_support_link) elif col == "Last time (UTC)": fix_rows(rows, i, format_optional_datetime) diff --git a/templates/corporate/activity/installation_activity_table.html b/templates/corporate/activity/installation_activity_table.html index 7f5bad81e1..fcfe4569ab 100644 --- a/templates/corporate/activity/installation_activity_table.html +++ b/templates/corporate/activity/installation_activity_table.html @@ -71,11 +71,11 @@