Changeset 208
- Timestamp:
- 02/14/07 16:25:17 (2 years ago)
- Files:
-
- trunk/webmin/lrs-inventory/agent/transfertNG.php (modified) (2 diffs)
- trunk/webmin/lrs-inventory/classes/Drivers/Sql/SqlDriver.php (modified) (4 diffs)
- trunk/webmin/lrs-inventory/classes/Drivers/Xml/Maps/OcsNGMap.xml (modified) (2 diffs)
- trunk/webmin/lrs-inventory/classes/Drivers/Xml/XmlDriver.php (modified) (2 diffs)
- trunk/webmin/lrs-inventory/config (modified) (1 diff)
- trunk/webmin/lrs-inventory/config.info (modified) (1 diff)
- trunk/webmin/lrs-inventory/config.info.fr (modified) (1 diff)
- trunk/webmin/lrs-inventory/debian/changelog (modified) (1 diff)
- trunk/webmin/lrs-inventory/debian/control (modified) (1 diff)
- trunk/webmin/lrs-inventory/hardware.cgi (modified) (1 diff)
- trunk/webmin/lrs-inventory/module.info (modified) (1 diff)
- trunk/webmin/lrs-inventory/peripherals.cgi (modified) (1 diff)
- trunk/webmin/lrs-inventory/sql/create-db.sh (modified) (1 diff)
- trunk/webmin/lrs-inventory/sql/schema.sql.v.6 (added)
- trunk/webmin/lrs-inventory/tmpl/en/BIOS.tpl (modified) (1 diff)
- trunk/webmin/lrs-inventory/tmpl/en/Port.tpl (added)
- trunk/webmin/lrs-inventory/tmpl/en/Sound.tpl (modified) (2 diffs)
- trunk/webmin/lrs-inventory/tmpl/en/SystemOCS.tpl (modified) (2 diffs)
- trunk/webmin/lrs-inventory/tmpl/fr/BIOS.tpl (modified) (1 diff)
- trunk/webmin/lrs-inventory/tmpl/fr/Port.tpl (added)
- trunk/webmin/lrs-inventory/tmpl/fr/Sound.tpl (modified) (2 diffs)
- trunk/webmin/lrs-inventory/tmpl/fr/SystemOCS.tpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/webmin/lrs-inventory/agent/transfertNG.php
r195 r208 49 49 $DEVICEID = $matches[1]; 50 50 51 //exec("echo \"$D ATA\" >>/tmp/log");51 //exec("echo \"$DEVICEID $DATA\" >>/tmp/log"); 52 52 //$DEBUG = true; 53 53 … … 68 68 69 69 $INVENTORY = '<?xml version="1.0" encoding="'.$enc.'" ?><Inventory>'. $matches[1] .'</Inventory>'; 70 // OCS client 4.0.3.0 added new tags ?! 71 $INVENTORY = preg_replace('/<\/?HISTORY>/i', '', $INVENTORY); 72 $INVENTORY = preg_replace('/<\/?DOWNLOAD>/i', '', $INVENTORY); 70 73 $resp = '<?xml version="1.0" encoding="utf-8" ?><REPLY><RESPONSE>no_account_update</RESPONSE></REPLY>'; 71 74 trunk/webmin/lrs-inventory/classes/Drivers/Sql/SqlDriver.php
r145 r208 116 116 function databaseCleanup($table, $inventoryid, $machineid) 117 117 { 118 // Only keep the latest 100 inventories 119 $keep = 100; 118 // Only keep the latest 20 inventories by default 119 $keep = 20; 120 121 @$config = parse_ini_file("/etc/webmin/lrs-inventory/config"); 122 if (intval($config['keep']) >= 1) { 123 $keep = intval($config['keep']); 124 } 120 125 121 126 // This cleanup should be done sometimes... (randomly or cron job? I don't like cron jobs) … … 270 275 271 276 // Look up in the cached queries if this search hasn't been yet performed. 272 if ( array_key_exists($cachekey, $this->m_CachedQueries) ) 277 if ( array_key_exists($cachekey, $this->m_CachedQueries) ) { 273 278 return $this->m_CachedQueries[$cachekey]; 274 279 } 275 280 $connection = $this->m_Connection; 276 281 … … 289 294 // Cache the query 290 295 $this->m_CachedQueries[$cachekey] = $id; 291 296 292 297 // Bye bye 293 298 return $id; 294 299 } 300 301 // Cache the query even if it's empty 302 $this->m_CachedQueries[$cachekey] = ""; 295 303 296 304 // Else, if it should be created … … 555 563 556 564 // If table name cache hasn't been created 557 if ( !isset($this->m_Table ) )565 if ( !isset($this->m_Tables) ) 558 566 { 559 567 // Create it trunk/webmin/lrs-inventory/classes/Drivers/Xml/Maps/OcsNGMap.xml
r145 r208 27 27 <MappedObject name="BIOS" class="Bios"> 28 28 29 <MappedField from="LETTER" to="DriveLetter" /> 30 <MappedField from="TYPE" to="DriveType" /> 31 <MappedField from="FILESYSTEM" to="FileSystem" /> 32 <MappedField from="TOTAL" to="TotalSpace" /> 33 <MappedField from="FREE" to="FreeSpace" /> 34 <MappedField from="NUMFILES" to="FileCount" /> 35 <MappedField from="VOLUMN" to="VolumeName" /> 29 <MappedField from="SMANUFACTURER" to="SmbManufacturer" /> 30 <MappedField from="SMODEL" to="SmbProduct" /> 31 <MappedField from="SSN" to="SmbSerial" /> 32 <MappedField from="BMANUFACTURER" to="BiosVendor" /> 33 <MappedField from="BVERSION" to="BiosVersion" /> 34 <MappedField from="BDATE" to="ChipSerial" /> 36 35 37 36 </MappedObject> … … 95 94 96 95 <MappedObject name="PORTS" class="Port"> 97 96 98 97 <MappedField from="TYPE" to="Type" /> 99 <MappedField from="NAME" to="Name" /> 100 98 <MappedField from="NAME" to="Stamp" /> 99 <MappedField from="CAPTION" to="Caption" /> 100 <MappedField from="DESCRIPTION" to="Description" /> 101 101 102 </MappedObject> 102 103 trunk/webmin/lrs-inventory/classes/Drivers/Xml/XmlDriver.php
r145 r208 324 324 function characterDataXmlParser($parser, $data) 325 325 { 326 exec("echo \"==D\" >>/tmp/log"); 326 327 if ( trim($data) != "" && $data!='N/A' && isset($GLOBALS['CURRENTOBJECT'])) 327 328 { … … 332 333 333 334 $machine = & $GLOBALS['CURRENTMACHINE']; 334 335 336 exec("echo \"==C\" >>/tmp/log"); 335 337 // Sets the machine name 336 338 if ( ($GLOBALS['CURRENTFIELD']=='Host' || $GLOBALS['CURRENTFIELD']=='NAME') && $GLOBALS['CURRENTTAG']=='HARDWARE') { trunk/webmin/lrs-inventory/config
r145 r208 4 4 showempty=1 5 5 genfromocs=0 6 keep=20 trunk/webmin/lrs-inventory/config.info
r145 r208 4 4 showempty=Show hosts with no inventory,1,1-Yes,0-No 5 5 genfromocs=Show general information using:,1,1-OCS Inventory,0-PXE Boot Inventory 6 keep=Number of inventories to keep in the database (by host),0 trunk/webmin/lrs-inventory/config.info.fr
r145 r208 4 4 showempty=Afficher les clients sans inventaire,1,1-Oui,0-Non 5 5 genfromocs=Afficher les informations générales en utilisant:,1,1-L'inventaire OCS,0-L'inventaire au boot PXE 6 keep=Nombre d'inventaires conservés dans la BDD (par machine),0 trunk/webmin/lrs-inventory/debian/changelog
r195 r208 1 webmin-lrs-inventory (2.1. 3) stable; urgency=low1 webmin-lrs-inventory (2.1.4) stable; urgency=low 2 2 3 3 * First package. Replaces webmin-lbs-inventory trunk/webmin/lrs-inventory/debian/control
r133 r208 9 9 Section: utils 10 10 Architecture: all 11 Depends: webmin, php4, php4-cgi, webmin-lbs-common, php4-mysql, mysql-client (>> 4.0.0) | mysql-client-4.1 11 Depends: webmin, php4, php4-cgi, webmin-lbs-common, php4-mysql, mysql-client (>> 4.0.0) | mysql-client-4.1, libcompress-zlib-perl 12 12 Suggests: lbs 13 13 Conflicts: mysql-server (<< 4.0.23) trunk/webmin/lrs-inventory/hardware.cgi
r158 r208 21 21 renderTable('Hardware', 'Memory.tpl', array('RamTotal'=>'MegaByte' , 'SwapSpace'=>'MegaByte') ); 22 22 renderTable('BootGeneral', 'BootMemory.tpl'); 23 renderTable('BootGeneral','BootBIOS.tpl', array(), '', "FilterSplitPipe"); 24 23 if ($config['genfromocs'] == "1") { 24 renderTable('Bios','BIOS.tpl'); 25 } else { 26 renderTable('BootGeneral','BootBIOS.tpl', array(), '', "FilterSplitPipe"); 27 } 25 28 renderTable('Sound', 'Sound.tpl'); 26 29 // for video card information get also PCI information trunk/webmin/lrs-inventory/module.info
r195 r208 3 3 desc_fr=LRS : Inventaire 4 4 depends=1.030 lbs_common 5 version=2.1. 35 version=2.1.4 trunk/webmin/lrs-inventory/peripherals.cgi
r135 r208 10 10 renderTable('Monitor'); 11 11 renderTable('Modem'); 12 renderTable('Port'); 12 13 13 14 print perl_exec("lbs_footer.cgi"); trunk/webmin/lrs-inventory/sql/create-db.sh
r145 r208 5 5 6 6 # lastest db version 7 TOVER= 57 TOVER=6 8 8 9 9 # trunk/webmin/lrs-inventory/tmpl/en/BIOS.tpl
r133 r208 11 11 </div> 12 12 13 <h3>BIOS </h3>13 <h3>BIOS (OCS)</h3> 14 14 15 15 <table> trunk/webmin/lrs-inventory/tmpl/en/Sound.tpl
r133 r208 15 15 <th>Nom {SORT_NAME}</th> 16 16 <th>Description {SORT_DESCRIPTION}</th> 17 <th>Manufacturer {SORT_MANUFACTURER}</th> 17 18 <th>Appearance {SORT_FIRSTAPPARITION}</th> 18 19 </tr> … … 23 24 <td class="{HOST_CLASS}">{HOSTL}</td> 24 25 <td class="{NAME_CLASS}">{NAME}</td> 25 <td class="{ DESCRIPTION_CLASS}">{DESCRIPTION}</td>26 <td class="{MANUFACTURER_CLASS}">{MANUFACTURER}</td> 26 27 <td class="{FIRSTAPPARITION_CLASS}">{FIRSTAPPARITION}</td> 27 28 </tr> trunk/webmin/lrs-inventory/tmpl/en/SystemOCS.tpl
r144 r208 15 15 <tr> 16 16 <th>Client {SORT_HOST}</th> 17 <th>Brand {SORT_ CHIPVENDOR}</th>18 <th>Model {SORT_ CHIPSET}</th>17 <th>Brand {SORT_SMBMANUFACTURER}</th> 18 <th>Model {SORT_SMBPRODUCT}</th> 19 19 <th>Version </th> 20 <th>Serial {SORT_S ERIAL}</th>20 <th>Serial {SORT_SMBSERIAL}</th> 21 21 <th>UUID </th> 22 22 <th>Chassis {SORT_TYPEMACHINE}</th> … … 28 28 <tr class="{ROWCLASS}"> 29 29 <td class="{HOST_CLASS}">{HOSTL}</td> 30 <td class="{ CHIPVENDOR_CLASS}">{CHIPVENDOR}</td>31 <td class="{ CHIPSET_CLASS}">{CHIPSET}</td>30 <td class="{SMBMANUFACTURER_CLASS}">{SMBMANUFACTURER}</td> 31 <td class="{SMBPRODUCT_CLASS}">{SMBPRODUCT}</td> 32 32 <td class="{CLASS}"></td> 33 <td class="{S ERIAL_CLASS}">{SERIAL}</td>33 <td class="{SMBSERIAL_CLASS}">{SMBSERIAL}</td> 34 34 <td class="{CLASS}"></td> 35 35 <td class="{TYPEMACHINE_CLASS}">{TYPEMACHINE}</td> trunk/webmin/lrs-inventory/tmpl/fr/BIOS.tpl
r133 r208 11 11 </div> 12 12 13 <h3>BIOS </h3>13 <h3>BIOS (OCS)</h3> 14 14 15 15 <table> trunk/webmin/lrs-inventory/tmpl/fr/Sound.tpl
r133 r208 15 15 <th>Nom {SORT_NAME}</th> 16 16 <th>Description {SORT_DESCRIPTION}</th> 17 <th>Fabricant {SORT_MANUFACTURER}</th> 17 18 <th>Apparition {SORT_FIRSTAPPARITION}</th> 18 19 </tr> … … 24 25 <td class="{NAME_CLASS}">{NAME}</td> 25 26 <td class="{DESCRIPTION_CLASS}">{DESCRIPTION}</td> 27 <td class="{MANUFACTURER_CLASS}">{MANUFACTURER}</td> 26 28 <td class="{FIRSTAPPARITION_CLASS}">{FIRSTAPPARITION}</td> 27 29 </tr> trunk/webmin/lrs-inventory/tmpl/fr/SystemOCS.tpl
r144 r208 15 15 <tr> 16 16 <th>Client {SORT_HOST}</th> 17 <th>Marque {SORT_ CHIPVENDOR}</th>18 <th>Modèle {SORT_ CHIPSET}</th>17 <th>Marque {SORT_SMBMANUFACTURER}</th> 18 <th>Modèle {SORT_SMBPRODUCT}</th> 19 19 <th>Version </th> 20 <th>Série {SORT_S ERIAL}</th>20 <th>Série {SORT_SMBSERIAL}</th> 21 21 <th>UUID </th> 22 22 <th>Type {SORT_TYPEMACHINE}</th> … … 28 28 <tr class="{ROWCLASS}"> 29 29 <td class="{HOST_CLASS}">{HOSTL}</td> 30 <td class="{ CHIPVENDOR_CLASS}">{CHIPVENDOR}</td>31 <td class="{ CHIPSET_CLASS}">{CHIPSET}</td>30 <td class="{SMBMANUFACTURER_CLASS}">{SMBMANUFACTURER}</td> 31 <td class="{SMBPRODUCT_CLASS}">{SMBPRODUCT}</td> 32 32 <td class="{CLASS}"></td> 33 <td class="{S ERIAL_CLASS}">{SERIAL}</td>33 <td class="{SMBSERIAL_CLASS}">{SMBSERIAL}</td> 34 34 <td class="{CLASS}"></td> 35 35 <td class="{TYPEMACHINE_CLASS}">{TYPEMACHINE}</td>
