Added functionality to show when a devices was last provisioned (#1831)
* Added functionality to show when a devices was last provisioned Added functionality to show when a devices was last provisioned Need addition to database: v_devices table: device_provisioned_on -> datetime device_provisioned_by -> char(10) * Revert "Added functionality to show when a devices was last provisioned" This reverts commit c3e40d68fa0b3c965a6db88528dcf89b1aab90f2. * Revert "Revert "Added functionality to show when a devices was last provisioned"" This reverts commit 8c27a46565c4c4ecd6d9989c56fbf4cc3e1ab70e. * Changed field names as requested Changed field names as requested for last provisioned data * Added database fields for device provisoned functionality Added provisioned_date, provisioned_method, provisioned_ip * Added ability to search device provisioned info * Added ip tracking to device provisoned functionality Added ip tracking to device provisoned functionality and moved the code to before rendering to register the contact even on unseccessful render * Added IP address to status column
This commit is contained in:
@@ -88,6 +88,8 @@
|
||||
$sql .= " or d.device_enabled like '%".$search."%' ";
|
||||
$sql .= " or d.device_template like '%".$search."%' ";
|
||||
$sql .= " or d.device_description like '%".$search."%' ";
|
||||
$sql .= " or d.device_provisioned_method like '%".$search."%' ";
|
||||
$sql .= " or d.device_provisioned_ip like '%".$search."%' ";
|
||||
$sql .= ") ";
|
||||
}
|
||||
$prep_statement = $db->prepare($sql);
|
||||
@@ -139,6 +141,8 @@
|
||||
$sql .= " or d.device_enabled like '%".$search."%' ";
|
||||
$sql .= " or d.device_template like '%".$search."%' ";
|
||||
$sql .= " or d.device_description like '%".$search."%' ";
|
||||
$sql .= " or d.device_provisioned_method like '%".$search."%' ";
|
||||
$sql .= " or d.device_provisioned_ip like '%".$search."%' ";
|
||||
$sql .= ") ";
|
||||
}
|
||||
if (strlen($order_by) == 0) {
|
||||
@@ -214,6 +218,7 @@
|
||||
echo th_order_by('device_vendor', $text['label-device_vendor'], $order_by, $order);
|
||||
echo th_order_by('device_template', $text['label-device_template'], $order_by, $order);
|
||||
echo th_order_by('device_enabled', $text['label-device_enabled'], $order_by, $order);
|
||||
echo th_order_by('device_status', $text['label-device_status'], $order_by, $order);
|
||||
echo th_order_by('device_description', $text['label-device_description'], $order_by, $order);
|
||||
echo "<td class='list_control_icons'>\n";
|
||||
if (permission_exists('device_add')) {
|
||||
@@ -248,6 +253,7 @@
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_vendor']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_template']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['device_enabled']]." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_provisioned_date']." - ".$row['device_provisioned_method']." - ".$row['device_provisioned_ip']." </td>\n";
|
||||
echo " <td valign='top' class='row_stylebg'>".$row['device_description']." </td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('device_edit')) {
|
||||
|
||||
Reference in New Issue
Block a user