Open-AudIT
https://www.open-audit.org/phpBB3/

PATCH: Systems Not Audited in the last 3 Days with descripti
https://www.open-audit.org/phpBB3/viewtopic.php?f=9&t=3822
Page 1 of 1

Author:  jonbendtsen [ Wed Oct 13, 2010 11:13 pm ]
Post subject:  PATCH: Systems Not Audited in the last 3 Days with descripti

Hi

Here is a patch for "Systems Not Audited in the last 3 Days" which also lists the system_description field which might make it easier for you to identify a computer. I removed the IP address field as it gives me no important information.

Patch using diff
[code]dkopen-audit:/var/www/open-audit# diff -u index_data.php ../index_data.php_pre_description
--- index_data.php 2010-10-13 15:05:08.000000000 +0200
+++ ../index_data.php_pre_description 2010-10-13 14:55:24.000000000 +0200
@@ -304,7 +304,7 @@
$tr_class='npb_highlight_row';

$sql =
- "SELECT system_name, system_description, net_ip_address, net_domain, system_uuid, system_timestamp,
+ "SELECT system_name, net_ip_address, net_domain, system_uuid, system_timestamp,
IFNULL(ldap_computer_status, 'deleted') as ldap_status, ldap_connections_name
FROM system
LEFT JOIN (
@@ -338,16 +338,16 @@
{
echo "<table>";
echo " <tr>";
- echo " <th>".__("Hostname")."</td>";
- echo " <th>".__("Description")."</td>";
+ echo " <th>".__("IP Address")."</td>";
+ echo " <th>".__("Hostname")."</td>";
echo " <th>".__("Date Audited")."</td>";
echo " <th>".__("LDAP Status")."</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"]."&amp;view=summary\">".$myrow["system_name"]."</a></td>";
- echo " <td>".$myrow["system_description"]."</td>";
echo " <td>".return_date_time($myrow["system_timestamp"])."</td>";
echo " <td><img src='../images/computer_".$myrow['ldap_status'].".gif'></td>";
echo "</tr>";
[/code]

Patch using svn diff which also includes 1 other patch which I previously posted here [url=http://www.open-audit.org/phpBB3/viewtopic.php?f=9&t=3740]PATCH: Partition free space less than 1000 MB AND size > 0[/url] therefore you get the pure diff above.
[code]dkopen-audit:/var/www/open-audit# svn diff index_data.php
Index: index_data.php
===================================================================
--- index_data.php (revision 1247)
+++ index_data.php (working copy)
@@ -304,7 +304,7 @@
$tr_class='npb_highlight_row';

$sql =
- "SELECT system_name, net_ip_address, net_domain, system_uuid, system_timestamp,
+ "SELECT system_name, system_description, net_ip_address, net_domain, system_uuid, system_timestamp,
IFNULL(ldap_computer_status, 'deleted') as ldap_status, ldap_connections_name
FROM system
LEFT JOIN (
@@ -338,16 +338,16 @@
{
echo "<table>";
echo " <tr>";
- echo " <th>".__("IP Address")."</td>";
- echo " <th>".__("Hostname")."</td>";
+ echo " <th>".__("Hostname")."</td>";
+ echo " <th>".__("Description")."</td>";
echo " <th>".__("Date Audited")."</td>";
echo " <th>".__("LDAP Status")."</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"]."&amp;view=summary\">".$myrow["system_name"]."</a></td>";
+ echo " <td>".$myrow["system_description"]."</td>";
echo " <td>".return_date_time($myrow["system_timestamp"])."</td>";
echo " <td><img src='../images/computer_".$myrow['ldap_status'].".gif'></td>";
echo "</tr>";
@@ -1471,4 +1471,4 @@
return;
}

-?>
\ No newline at end of file
+?>
[/code]

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/