diff --git a/html/includes/port-edit.inc.php b/html/forms/update-ports.inc.php
similarity index 79%
rename from html/includes/port-edit.inc.php
rename to html/forms/update-ports.inc.php
index abfba6053..24754e246 100644
--- a/html/includes/port-edit.inc.php
+++ b/html/forms/update-ports.inc.php
@@ -1,5 +1,8 @@
$val) {
}//end foreach
if ($rows_updated > 0) {
- $update_message = $rows_updated.' Device record updated.';
- $updated = 1;
+ $message = $rows_updated.' Device record updated.';
+ $status = 'ok';
}
else if ($rows_updated = '-1') {
- $update_message = 'Device record unchanged. No update necessary.';
- $updated = -1;
+ $message = 'Device record unchanged. No update necessary.';
+ $status = 'ok';
}
else {
- $update_message = 'Device record update error.';
- $updated = 0;
+ $message = 'Device record update error.';
}
+
+$response = array(
+ 'status' => $status,
+ 'message' => $message,
+);
+echo _json_encode($response);
diff --git a/html/includes/table/edit-ports.inc.php b/html/includes/table/edit-ports.inc.php
new file mode 100644
index 000000000..d53a436d8
--- /dev/null
+++ b/html/includes/table/edit-ports.inc.php
@@ -0,0 +1,78 @@
+ "",
+ 'label' => '',
+ 'ifAdminStatus' => '',
+ 'ifOperStatus' => "",
+ 'disabled' => "",
+ 'ignore' => "",
+ 'ifAlias' => ''
+);
+
+foreach (dbFetchRows($sql, $param) as $port) {
+ $port = ifLabel($port);
+
+ // Mark interfaces which are OperDown (but not AdminDown) yet not ignored or disabled, or up yet ignored or disabled
+ // - as to draw the attention to a possible problem.
+
+
+ $isportbad = ($port['ifOperStatus'] == 'down' && $port['ifAdminStatus'] != 'down') ? 1 : 0;
+ $dowecare = ($port['ignore'] == 0 && $port['disabled'] == 0) ? $isportbad : !$isportbad;
+ $outofsync = $dowecare ? " class='red'" : '';
+
+ $response[] = array(
+ 'ifIndex' => $port['ifIndex'],
+ 'ifName' => $port['label'],
+ 'ifAdminStatus' => $port['ifAdminStatus'],
+ 'ifOperStatus' => ''.$port['ifOperStatus'].'',
+ 'disabled' => '
+ ',
+ 'ignore' => '
+ ',
+ 'ifAlias' => $port['ifAlias']
+ );
+
+}//end foreach
+
+$output = array(
+ 'current' => $current,
+ 'rowCount' => $rowCount,
+ 'rows' => $response,
+ 'total' => $total,
+);
+echo _json_encode($output);
\ No newline at end of file
diff --git a/html/pages/device/edit/ports.inc.php b/html/pages/device/edit/ports.inc.php
index d8dc562e4..002d4fb46 100644
--- a/html/pages/device/edit/ports.inc.php
+++ b/html/pages/device/edit/ports.inc.php
@@ -1,144 +1,113 @@
-