mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
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 commitc3e40d68fa. * Revert "Revert "Added functionality to show when a devices was last provisioned"" This reverts commit8c27a46565. * 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:
@@ -363,6 +363,21 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "phone_description";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "device_provisioned_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "device_provisioned_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "datetime";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "device_provisioned_method";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "device_provisioned_method";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "device_provisioned_ip";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "device_provisioned_ip";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
$y = 1; //table array index
|
||||
$z = 0; //field array index
|
||||
|
||||
@@ -1414,6 +1414,16 @@ $text['label-device_description']['de-at'] = "Beschreibung";
|
||||
$text['label-device_description']['ar-eg'] = "";
|
||||
$text['label-device_description']['he'] = "תאור";
|
||||
|
||||
$text['label-device_status']['en-us'] = "Status";
|
||||
$text['label-device_status']['es-cl'] = "Estado";
|
||||
$text['label-device_status']['pt-pt'] = "Estado";
|
||||
$text['label-device_status']['fr-fr'] = "Statut";
|
||||
$text['label-device_status']['pt-br'] = "Estado";
|
||||
$text['label-device_status']['pl'] = "Status ";
|
||||
$text['label-device_status']['sv-se'] = "Status";
|
||||
$text['label-device_status']['uk'] = "Стан";
|
||||
$text['label-device_status']['de-at'] = "Status";
|
||||
|
||||
$text['label-device']['en-us'] = "Device";
|
||||
$text['label-device']['es-cl'] = "Dispositivo";
|
||||
$text['label-device']['pt-pt'] = "Dispositivo";
|
||||
|
||||
@@ -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