diff --git a/html/includes/table/edit-ports.inc.php b/html/includes/table/edit-ports.inc.php
index 5a935b2bff..d53a436d83 100644
--- a/html/includes/table/edit-ports.inc.php
+++ b/html/includes/table/edit-ports.inc.php
@@ -7,6 +7,10 @@ $device_id = $_POST['device_id'];
$sql = 'FROM `ports` WHERE `device_id` = ?';
$param = array($device_id);
+if (isset($searchPhrase) && !empty($searchPhrase)) {
+ $sql .= " AND (`ifName` LIKE '%$searchPhrase%' OR `ifAlias` LIKE '%$searchPhrase%' OR `ifDescr` LIKE '%$searchPhrase%')";
+}
+
$count_sql = "SELECT COUNT(`port_id`) $sql";
$total = dbFetchCell($count_sql, $param);
if (empty($total)) {
@@ -53,7 +57,7 @@ foreach (dbFetchRows($sql, $param) as $port) {
$response[] = array(
'ifIndex' => $port['ifIndex'],
- 'label' => $port['label'],
+ 'ifName' => $port['label'],
'ifAdminStatus' => $port['ifAdminStatus'],
'ifOperStatus' => ''.$port['ifOperStatus'].'',
'disabled' => '
diff --git a/html/pages/device/edit/ports.inc.php b/html/pages/device/edit/ports.inc.php
index 00a2d52c45..037160d087 100644
--- a/html/pages/device/edit/ports.inc.php
+++ b/html/pages/device/edit/ports.inc.php
@@ -8,11 +8,11 @@
Index |
- Name |
+ Name |
Admin |
Oper |
- Disable |
- Ignore |
+ Disable |
+ Ignore |
Description |