Changeset 868 for trunk/Modules/Network/Network.php
- Timestamp:
- Jan 13, 2020, 1:10:38 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Network/Network.php
r867 r868 816 816 $Output = ''; 817 817 $Condition = 'WHERE (`NetworkInterface`.`LastOnline` <= "'.TimeToMysqlDateTime($Time - $MinDuration).'")'; 818 if ($OnlineNow != null) $Condition .= ' AND (`NetworkInterface`.`Online` = '.$OnlineNow.')'; 819 if ($OnlinePrevious != null) $Condition .= ' AND (`NetworkInterface`.`OnlineNotify` = '.$OnlinePrevious.')'; 818 echo($OnlineNow); 819 if ($OnlineNow >= 0) $Condition .= ' AND (`NetworkInterface`.`Online` = '.$OnlineNow.')'; 820 echo($OnlinePrevious); 821 if ($OnlinePrevious >= 0) $Condition .= ' AND (`NetworkInterface`.`OnlineNotify` = '.$OnlinePrevious.')'; 822 echo($Condition."\n"); 820 823 $DbResult3 = $this->Database->query('SELECT CONCAT_WS("-", `NetworkDevice`.`Name`, NULLIF(`NetworkInterface`.`Name`, "")) AS `Name`, '. 821 824 '`NetworkInterface`.`Online`, `NetworkInterface`.`LastOnline` FROM `NetworkInterface` '. … … 854 857 $NewOffline = $this->OnlineList('Nově offline', 0, 1, $this->MinNotifyTime); 855 858 $Output .= $NewOffline['Report']; 856 if ($Output != '') 857 { 858 $StillOffline = $this->OnlineList('Stále offline', 0, 0, 0); 859 $Output .= $StillOffline['Report']; 860 } 861 $Offline = $this->OnlineList('Offline', 0, null, 0); 859 $StillOffline = $this->OnlineList('Stále offline', 0, 0, 0); 860 $Output .= $StillOffline['Report']; 861 $Offline = $this->OnlineList('Offline', 0, -1, 0); 862 862 return(array('Report' => $Output, 'Count' => $Offline['Count'], 'ShortTitle' => 'Odezva')); 863 863 } … … 869 869 $Output = ''; 870 870 $Condition = 'WHERE (`NetworkPort`.`LastOnline` <= "'.TimeToMysqlDateTime($Time - $MinDuration).'")'; 871 if ($OnlineNow != null) $Condition .= ' AND (`NetworkPort`.`Online` = '.$OnlineNow.')';872 if ($OnlinePrevious != null) $Condition .= ' AND (`NetworkPort`.`OnlineNotify` = '.$OnlinePrevious.')';871 if ($OnlineNow >= null) $Condition .= ' AND (`NetworkPort`.`Online` = '.$OnlineNow.')'; 872 if ($OnlinePrevious >= null) $Condition .= ' AND (`NetworkPort`.`OnlineNotify` = '.$OnlinePrevious.')'; 873 873 $DbResult3 = $this->Database->query('SELECT CONCAT(CONCAT_WS("-", `NetworkDevice`.`Name`, NULLIF(`NetworkInterface`.`Name`, "")), ":", `NetworkPort`.`Number`, "(", `NetworkPort`.`Name`, ")") AS `Name`, '. 874 874 '`NetworkPort`.`Online`, `NetworkPort`.`LastOnline` FROM `NetworkPort` '. … … 909 909 $NewOffline = $this->PortCheckList('Nově offline', 0, 1, $this->MinNotifyTime); 910 910 $Output .= $NewOffline['Report']; 911 if ($Output != '') 912 { 913 $StillOffline = $this->PortCheckList('Stále offline', 0, 0, 0); 914 $Output .= $StillOffline['Report']; 915 } 916 $Offline = $this->PortCheckList('Offline', 0, null, 0); 911 $StillOffline = $this->PortCheckList('Stále offline', 0, 0, 0); 912 $Output .= $StillOffline['Report']; 913 $Offline = $this->PortCheckList('Offline', 0, -1, 0); 917 914 return(array('Report' => $Output, 'Count' => $Offline['Count'], 'ShortTitle' => 'Port')); 918 915 }
Note:
See TracChangeset
for help on using the changeset viewer.