Hello,
my feature is a gui to setup which reports display the wanted details. For example does "Systems Discovered in the last 5 Days" imho needs to display the last audited time, and the discovered time. Also there might be the need to specify additional reports (read different sql-querys) and not just the provided ones. In order to stay up-to-date with current svn-build, i would also like to have personal additions keept in custom files - maybe like index_data_custom.php, which can override the defaults given. In the example here is simply an additional column added for "Systems Discovered in the last 5 Days" displaying the last audit time for the listed systems.
Regards Falko
-> file: index_data.php change: function GetDiscoveredSystemsData($id) added: 2 lines, altered 3 lines
[code] // ****** Get systems discovered in the last $system_detected days ***************************************************** // $id = ID of the HTML element that this data is "bound" to function GetDiscoveredSystemsData($id) { global $db, $system_detected; $tr_class='npb_highlight_row';
$sql = "SELECT system_name, net_ip_address, system_uuid, system_first_timestamp, system_timestamp FROM system "; $sql .= "WHERE system_first_timestamp > '" . adjustdate(0,0,-$system_detected) . "000000' "; $sql .= "ORDER BY system_timestamp DESC"; $result = mysql_query($sql, $db); $count=mysql_numrows($result);
echo "<div class='npb_content_data' id='".$id."' style='display: none;'>"; if ($myrow = mysql_fetch_array($result)) { echo "<table>"; echo " <tr>"; echo " <th>".__("IP Address")."</td>"; echo " <th>".__("Hostname")."</td>"; echo " <th>".__("Last Audit")."</td>"; echo " <th>".__("Discovered")."</td>"; echo " </tr>"; do { echo "<tr class='".alternate_tr_class($tr_class)."'>"; echo " <td>".ip_trans($myrow["net_ip_address"])."</td>"; echo " <td><a href=\"system.php?pc=".$myrow["system_uuid"]."&view=summary\">".$myrow["system_name"]."</a></td>"; echo " <td>".return_date_time($myrow["system_timestamp"])."</td>"; echo " <td>".return_date_time($myrow["system_first_timestamp"])."</td>"; echo "</tr>"; } while ($myrow = mysql_fetch_array($result)); } echo "</table>"; echo "</div>"; echo "<p class='npb_section_summary'>".__("Systems").": ".$count."</p>";
return; } [/code]
|