Changeset 829 for trunk/Modules/Network/Network.php
- Timestamp:
- Apr 29, 2016, 11:54:31 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Network/Network.php
r825 r829 100 100 { 101 101 var $MinNotifyTime; 102 102 103 103 function __construct($System) 104 104 { … … 110 110 $this->Description = 'Networking related tools'; 111 111 $this->Dependencies = array('Notify'); 112 112 113 113 // TODO: Make notify time configurable 114 $this->MinNotify time = 2 * 60;114 $this->MinNotifyTime = 2 * 60; 115 115 } 116 116 … … 125 125 function DoStart() 126 126 { 127 $this->System->ModuleManager->Modules['Notify']->RegisterCheck('NetworkReachability', 127 $this->System->ModuleManager->Modules['Notify']->RegisterCheck('NetworkReachability', 128 128 array($this, 'ReachabilityCheck')); 129 $this->System->ModuleManager->Modules['Notify']->RegisterCheck('NetworkPort', 129 $this->System->ModuleManager->Modules['Notify']->RegisterCheck('NetworkPort', 130 130 array($this, 'PortCheck')); 131 132 131 132 133 133 $this->System->RegisterPage('network', 'PageNetwork'); 134 134 $this->System->RegisterPage(array('network', 'administration'), 'PageNetworkAdministration'); … … 297 297 'Items' => array( 298 298 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''), 299 'MaxLinkSpeed' => array('Type' => 'Integer', 'Caption' => 'Maximální spojová rychlost', 'Default' => '0', 'Suffix' => 'bits/s'), 300 'MaxRealSpeed' => array('Type' => 'Integer', 'Caption' => 'Maximální reálná rychlost', 'Default' => '0', 'Suffix' => 'bits/s'), 301 'FullDuplex' => array('Type' => 'Boolean', 'Caption' => 'Plně duplexní', 'Default' => '0'), 302 'Color' => array('Type' => 'Color', 'Caption' => 'Barva', 'Default' => '0'), 299 303 ), 300 304 )); … … 669 673 'Filter' => '1', 670 674 )); 671 675 672 676 $this->System->ModuleManager->Modules['IS']->RegisterDashboardItem('Network', 673 677 array('ModuleNetwork', 'ShowDashboardItem')); … … 680 684 )); 681 685 } 682 686 683 687 function AfterInsertNetworkDevice($Form) 684 688 { … … 690 694 $this->System->Models['NetworkDevice']->DoOnChange(); 691 695 } 692 696 693 697 function AfterInsertNetworkInterface($Form) 694 698 { … … 700 704 $this->System->Models['NetworkInterface']->DoOnChange(); 701 705 } 702 706 703 707 function BeforeDeleteNetworkInterface($Form, $Id) 704 708 { … … 734 738 { 735 739 } 736 740 737 741 function OnlineList($Title, $OnlineNow, $OnlinePrevious, $MinDuration) 738 742 { … … 748 752 '(`NetworkInterface`.`LocalIP` != "") AND (`NetworkInterface`.`Enabled`=1)'. 749 753 'ORDER BY `Name` ASC'); 750 if($DbResult3->num_rows > 0) 754 if($DbResult3->num_rows > 0) 751 755 { 752 756 $Output .= $Title.'<br/>'; … … 780 784 return($Output); 781 785 } 782 786 783 787 function PortCheckList($Title, $OnlineNow, $OnlinePrevious, $MinDuration) 784 788 { … … 808 812 $Days = floor($Duration / (60 * 60 * 24)); 809 813 if($Days > 0) $DurationText = $Days.' dnů '.$DurationText; 810 814 811 815 $Output .= '<tr><td>'.$Item['Name'].'</td><td>'.$OnlineText[$Item['Online']]. 812 816 '</td><td>'.$Item['LastOnline'].'</td><td>'.$DurationText.'</td></tr>'."\n"; … … 818 822 return $Output; 819 823 } 820 824 821 825 function PortCheck() 822 826 {
Note:
See TracChangeset
for help on using the changeset viewer.