Changeset 785
- Timestamp:
- Jan 9, 2016, 1:08:20 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UpdateTrace.php
r782 r785 1788 1788 ADD CONSTRAINT `VPS_ibfk_2` FOREIGN KEY (`OSTemplate`) REFERENCES `OSTemplate` (`Id`), 1789 1789 ADD CONSTRAINT `VPS_ibfk_3` FOREIGN KEY (`Limits`) REFERENCES `VPSLimit` (`Id`);"); 1790 } 1791 1792 function UpdateTo785($Manager) 1793 { 1794 $Manager->Execute('DROP TABLE `NetworkInterfaceStat`'); 1790 1795 } 1791 1796 … … 1870 1875 765 => array('Revision' => 768, 'Function' => 'UpdateTo768'), 1871 1876 768 => array('Revision' => 770, 'Function' => 'UpdateTo770'), 1877 770 => array('Revision' => 785, 'Function' => 'UpdateTo785'), 1872 1878 )); 1873 1879 } -
trunk/Application/Version.php
r784 r785 1 1 <?php 2 2 3 $Revision = 78 4; // Subversion revision4 $DatabaseRevision = 7 70; // SQL structure revision3 $Revision = 786; // Subversion revision 4 $DatabaseRevision = 785; // SQL structure revision 5 5 $ReleaseTime = strtotime('2016-01-09'); -
trunk/Modules/Network/Network.php
r774 r785 2 2 3 3 include_once(dirname(__FILE__).'/HostList.php'); 4 include_once(dirname(__FILE__).'/Availability.php');5 4 include_once(dirname(__FILE__).'/Subnet.php'); 6 5 include_once(dirname(__FILE__).'/Hosting.php'); … … 92 91 { 93 92 $Output = '<a href="'.$this->System->Link('/network/frequency-plan/').'">Frekvenční plán</a><br />'; 94 $Output .= '<a href="'.$this->System->Link('/network/availability/').'">Měření dostupnosti zařízení</a><br />';95 93 $Output .= '<a href="'.$this->System->Link('/network/subnet/').'">Výpis registrovaných podsítí</a><br />'; 96 94 $Output .= '<a href="'.$this->System->Link('/network/hosts/').'">Registrované zařízení</a><br />'; … … 124 122 $this->System->RegisterPage('network', 'PageNetwork'); 125 123 $this->System->RegisterPage(array('network', 'administration'), 'PageNetworkAdministration'); 126 $this->System->RegisterPage(array('network', 'availability'), 'PageAvailability');127 124 $this->System->RegisterPage(array('network', 'subnet'), 'PageSubnet'); 128 125 $this->System->RegisterPage(array('network', 'user-hosts'), 'PageNetworkHostList'); … … 167 164 'LoginPassword' => array('Type' => 'String', 'Caption' => 'Přihlašovací heslo', 'Default' => '', 'Null' => true, 'NotInList' => true), 168 165 'API' => array('Type' => 'TDeviceAPIType', 'Caption' => 'API', 'Default' => '', 'Null' => true), 169 ),170 'Actions' => array(171 array('Caption' => 'Dostupnost zařízení', 'URL' => '/network/availability/'),172 166 ), 173 167 )); -
trunk/Modules/NetworkConfigRouterOS/Generators/NetwatchImport.php
r781 r785 87 87 } 88 88 $DbResult = $this->Database->update('NetworkDevice', '`LastOnline` < "'.TimeToMysqlDateTime($StartTime).'"', array('Online' => 0)); 89 90 // Update interface online statistics91 $DbResult = $this->Database->select('NetworkInterface', 'Id', '`Online` = 1');92 while($Interface = $DbResult->fetch_assoc())93 {94 $DbResult2 = $this->Database->select('NetworkInterfaceStat', '*', '(`NetworkInterface`="'.$Interface['Id'].'") AND (`Time` = DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))');95 if($DbResult2->num_rows == 0) $System->Database->query('REPLACE INTO `NetworkInterfaceStat` (`NetworkInterface`, `Time`, `PingCount`) VALUES ("'.$Interface['Id'].'", DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"), 1)');96 else $this->Database->query('UPDATE `NetworkInterfaceStat` SET `PingCount` = `PingCount` + 1 WHERE (`NetworkInterface`="'.$Interface['Id'].'") AND (`Time` = DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))');97 }98 89 } 99 90
Note:
See TracChangeset
for help on using the changeset viewer.