Changeset 818 for trunk/Modules/Network/Network.php
- Timestamp:
- Mar 16, 2016, 10:01:02 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Network/Network.php
r817 r818 244 244 'Items' => array( 245 245 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''), 246 'Protocol' => array('Type' => 'TNetworkProtocol', 'Caption' => 'Protokol', 'Default' => '0'), 246 247 'Number' => array('Type' => 'Integer', 'Caption' => 'Číslo', 'Default' => ''), 247 248 'Interface' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní', 'Default' => ''), … … 249 250 'Online' => array('Type' => 'TOnlineState', 'Caption' => 'Běží', 'Default' => '0', 'ReadOnly' => true), 250 251 'LastOnline' => array('Type' => 'DateTime', 'Caption' => 'Naposledy běželo', 'Default' => '', 'ReadOnly' => true), 252 'UpDown' => array('Type' => 'TNetworkPortUpDown', 'Caption' => 'Změny stavu', 'Default' => ''), 251 253 ), 252 254 )); … … 490 492 ), 491 493 )); 494 $this->System->FormManager->RegisterClass('NetworkInterfaceUpDown', array( 495 'Title' => 'Změny stavu rozhraní', 496 'Table' => 'NetworkInterfaceUpDown', 497 'DefaultSortColumn' => 'Time', 498 'DefaultSortOrder' => 1, 499 'Items' => array( 500 'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas', 'Default' => '', 'ReadOnly' => true), 501 'Interface' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní', 'Default' => '', 'ReadOnly' => true), 502 'State' => array('Type' => 'TOnlineState', 'Caption' => 'Stav', 'Default' => '', 'ReadOnly' => true), 503 'Duration' => array('Type' => 'TimeDiff', 'Caption' => 'Trvání', 'Default' => '', 'ReadOnly' => true), 504 ), 505 )); 506 $this->System->FormManager->RegisterClass('NetworkPortUpDown', array( 507 'Title' => 'Změny stavu portů', 508 'Table' => 'NetworkPortUpDown', 509 'DefaultSortColumn' => 'Time', 510 'DefaultSortOrder' => 1, 511 'Items' => array( 512 'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas', 'Default' => '', 'ReadOnly' => true), 513 'Port' => array('Type' => 'TNetworkPort', 'Caption' => 'Port', 'Default' => '', 'ReadOnly' => true), 514 'State' => array('Type' => 'TOnlineState', 'Caption' => 'Stav', 'Default' => '', 'ReadOnly' => true), 515 'Duration' => array('Type' => 'TimeDiff', 'Caption' => 'Trvání', 'Default' => '', 'ReadOnly' => true), 516 ), 517 )); 518 $this->System->FormManager->RegisterFormType('TNetworkProtocol', array( 519 'Type' => 'Enumeration', 520 'States' => array('TCP', 'UDP'), 521 )); 492 522 $this->System->FormManager->RegisterFormType('TNetworkDevice', array( 493 523 'Type' => 'Reference', … … 513 543 'Filter' => '1', 514 544 )); 545 $this->System->FormManager->RegisterFormType('TNetworkPort', array( 546 'Type' => 'Reference', 547 'Table' => 'NetworkPort', 548 'View' => '(SELECT `NetworkPort`.*, CONCAT(CONCAT_WS("-", `NetworkDevice`.`Name`, NULLIF(`NetworkInterface`.`Name`, "")), ":", `NetworkPort`.`Number`) AS `PortName` FROM `NetworkPort` '. 549 'LEFT JOIN `NetworkInterface` ON `NetworkInterface`.`Id` = `NetworkPort`.`Interface` '. 550 'LEFT JOIN `NetworkDevice` ON `NetworkDevice`.`Id` = `NetworkInterface`.`Device`) AS `T`', 551 'Id' => 'Id', 552 'Name' => 'PortName', 553 'Filter' => '1', 554 )); 515 555 $this->System->FormManager->RegisterFormType('TNetworkInterfaceType', array( 516 556 'Type' => 'Reference', … … 597 637 'Filter' => '1', 598 638 )); 599 639 $this->System->FormManager->RegisterFormType('TNetworkPortUpDown', array( 640 'Type' => 'ManyToOne', 641 'Table' => 'NetworkPortUpDown', 642 'Id' => 'Id', 643 'Ref' => 'Port', 644 'Filter' => '1', 645 )); 646 600 647 $this->System->ModuleManager->Modules['IS']->RegisterDashboardItem('Network', 601 648 array('ModuleNetwork', 'ShowDashboardItem'));
Note:
See TracChangeset
for help on using the changeset viewer.