diff --git a/ogcp/templates/actions/client_search.html b/ogcp/templates/actions/client_search.html
index bace57a..3a0bfb7 100644
--- a/ogcp/templates/actions/client_search.html
+++ b/ogcp/templates/actions/client_search.html
@@ -19,9 +19,6 @@
-
-
-
@@ -50,7 +47,7 @@
}
const li = document.createElement('li');
- li.textContent = `${client.name} (IP: ${client.ip.join(', ')} | MAC: ${client.mac})`;
+ li.textContent = `${client.name} (IP: ${client.ip.join(', ')})`;
ul.appendChild(li);
});
}
@@ -58,13 +55,11 @@
function filterClients() {
const nameFilter = document.getElementById('name-filter').value.toLowerCase();
const ipFilter = document.getElementById('ip-filter').value;
- const macFilter = document.getElementById('mac-filter').value;
const filtered = clients.filter(client => {
const matchesName = nameFilter ? client.name.toLowerCase().includes(nameFilter) : true;
const matchesIP = ipFilter ? client.ip.some(ip => ip.includes(ipFilter)) : true;
- const matchesMAC = macFilter ? client.mac.includes(macFilter) : true;
- return matchesName && matchesIP && matchesMAC;
+ return matchesName && matchesIP;
});
renderClients(filtered);
@@ -74,7 +69,7 @@
document.getElementById('search-button').addEventListener('click', filterClients);
// Search on Enter key press
- document.querySelectorAll('#name-filter, #ip-filter, #mac-filter').forEach(input => {
+ document.querySelectorAll('#name-filter, #ip-filter').forEach(input => {
input.addEventListener('keydown', event => {
if (event.key === 'Enter') {
event.preventDefault();
diff --git a/ogcp/views.py b/ogcp/views.py
index 77c225c..e98243b 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -2007,12 +2007,6 @@ def action_client_delete():
def action_client_search():
scopes, clients = get_scopes()
clients = parse_scopes_from_tree(scopes, 'computer')
- for client in clients:
- payload = {'client': [client['ip'][0]]}
- info_response = multi_request('get', '/client/info', payload)
- for res in info_response:
- mac = res['json']['mac'].lower()
- client['mac'] = mac
return render_template('actions/client_search.html',
scopes=scopes,