diff --git a/openwisp_monitoring/device/templates/admin/config/device/change_form.html b/openwisp_monitoring/device/templates/admin/config/device/change_form.html
index 027af7ab4..862ccc027 100644
--- a/openwisp_monitoring/device/templates/admin/config/device/change_form.html
+++ b/openwisp_monitoring/device/templates/admin/config/device/change_form.html
@@ -393,7 +393,11 @@
{% trans 'Interface status' %}: {{ interface.name }}
+ {% if interface.wireless.mode == 'station' %}
+ {% trans 'Access Point' %}
+ {% else %}
{% trans 'Associated client' %}
+ {% endif %}
{% trans 'MAC address' %}
|
{% if MAC_VENDOR_DETECTION %}
diff --git a/openwisp_monitoring/device/tests/test_admin.py b/openwisp_monitoring/device/tests/test_admin.py
index c156ccc96..8ee14875c 100644
--- a/openwisp_monitoring/device/tests/test_admin.py
+++ b/openwisp_monitoring/device/tests/test_admin.py
@@ -142,6 +142,14 @@ def test_status_data(self):
],
}
)
+ data['interfaces'].append(deepcopy(data['interfaces'][0]))
+ data['interfaces'][2].update(
+ {
+ 'name': 'wlan2',
+ 'mac': '44:d1:fa:4b:38:45',
+ }
+ )
+ data['interfaces'][2]['wireless']['mode'] = 'station'
self._post_data(d.id, d.key, data)
url = reverse('admin:config_device_change', args=[d.pk])
r = self.client.get(url)
@@ -153,6 +161,19 @@ def test_status_data(self):
self.assertContains(r, '44:D1:FA:4B:00:02')
with self.subTest('Neighbor IP is shown'):
self.assertContains(r, 'fe80::9683:c4ff:fe02:c2bf')
+ with self.subTest('Wireless client table header is shown'):
+ self.assertContains(
+ r,
+ ('\n\n' 'Associated client\n\nMAC address\n\n' ' | '),
+ html=True,
+ count=2,
+ )
+ self.assertContains(
+ r,
+ ('\n\n' 'Access Point\n\nMAC address\n\n' ' | '),
+ html=True,
+ count=1,
+ )
def test_status_data_contains_wifi_version(self):
data = self._data()