Changeset 865
- Timestamp:
- Dec 23, 2019, 12:31:52 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r862 r865 1 1 <?php 2 2 3 $Revision = 86 2; // Subversion revision3 $Revision = 865; // Subversion revision 4 4 $DatabaseRevision = 862; // SQL structure revision 5 $ReleaseTime = strtotime('2019-1 0-04');5 $ReleaseTime = strtotime('2019-12-23'); -
trunk/Modules/Map/Map.php
r864 r865 277 277 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''), 278 278 'Pos' => array('Type' => 'MapPosition', 'Caption' => 'Poloha', 'Default' => '0;0'), 279 'Subjects' => array('Type' => 'TSubjectListMapPosition', 'Caption' => 'Subjekty', 'Default' => ''), 280 'NetworkDevices' => array('Type' => 'TNetworkDeviceListMapPosition', 'Caption' => 'Síťová zařízení', 'Default' => ''), 279 281 ), 280 282 'ItemActions' => array( … … 292 294 'Filter' => '1', 293 295 )); 296 $this->System->FormManager->RegisterFormType('TSubjectListMapPosition', array( 297 'Type' => 'ManyToOne', 298 'Table' => 'Subject', 299 'Id' => 'Id', 300 'Ref' => 'MapPosition', 301 'Filter' => '1', 302 )); 303 $this->System->FormManager->RegisterFormType('TNetworkDeviceListMapPosition', array( 304 'Type' => 'ManyToOne', 305 'Table' => 'NetworkDevice', 306 'Id' => 'Id', 307 'Ref' => 'MapPosition', 308 'Filter' => '1', 309 )); 294 310 } 295 311 -
trunk/Modules/Network/Network.php
r859 r865 193 193 'ShowOnline' => array('Type' => 'Boolean', 'Caption' => 'Ukázat online', 'Default' => '0'), 194 194 'IconName' => array('Type' => 'String', 'Caption' => 'Jméno ikony', 'Default' => '0'), 195 ), 195 'Devices' => array('Type' => 'TNetworkDeviceListType', 'Caption' => 'Síťová zařízení', 'Default' => ''), 196 ), 197 )); 198 $this->System->FormManager->RegisterFormType('TNetworkDeviceListType', array( 199 'Type' => 'ManyToOne', 200 'Table' => 'NetworkDevice', 201 'Id' => 'Id', 202 'Ref' => 'Type', 203 'Filter' => '1', 196 204 )); 197 205 $this->System->FormManager->RegisterClass('NetworkDeviceLog', array( … … 748 756 $this->Database->query('DELETE FROM `NetworkInterfaceLatency` WHERE `Interface`='.$Id); 749 757 } 750 758 751 759 function ImportNetworkLog($Parameters) 752 760 { 753 761 global $Config; 754 762 755 763 $DbResult = $this->System->Database->select('NetworkDeviceLog', 'Time', 756 764 '1 ORDER BY Time DESC LIMIT 1'); … … 762 770 763 771 $RemoteDb = new Database(); 764 $RemoteDb->Connect($Config['NetworkLog']['Host'], $Config['NetworkLog']['User'], 772 $RemoteDb->Connect($Config['NetworkLog']['Host'], $Config['NetworkLog']['User'], 765 773 $Config['NetworkLog']['Password'], $Config['NetworkLog']['Database']); 766 774 $DbResult = $RemoteDb->select('SystemEvents', '*', '`ReceivedAt`>"'. TimeToMysqlDate($StartTime).'"'.$WhereTime.' ORDER BY `Time` DESC'); … … 768 776 { 769 777 $DbResult2 = $this->System->Database->select('NetworkInterface', 'Device, CONCAT(CONCAT_WS("-", `NetworkDevice`.`Name`, NULLIF(`NetworkInterface`.`Name`, "")), ".") AS `Name` ', '`Name` LIKE "'.$DbRow['FromHost'].'"'); 770 if ($DbResult2->num_rows > 0) 778 if ($DbResult2->num_rows > 0) 771 779 { 772 780 $DbRow2 = $DbResult2->fetch_assoc(); 773 781 $DeviceID = $DbRow2['Device']; 774 $this->System->Database->insert('NetworkDeviceLog', array('Time' => $DbRow['ReceivedAt'], 782 $this->System->Database->insert('NetworkDeviceLog', array('Time' => $DbRow['ReceivedAt'], 775 783 'Device' => $DeviceId, 'Message' => $DbRow['Message'], 'Tags' => $DbRow['SysLogTag'])); 776 784 } else echo('Host '.$DbRow['Host'].' not paired with network device.'."\n");
Note:
See TracChangeset
for help on using the changeset viewer.