Changeset 736 for trunk/Modules/Network/Network.php
- Timestamp:
- Apr 6, 2015, 11:08:10 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Network/Network.php
r731 r736 186 186 'Online' => array('Type' => 'TOnlineState', 'Caption' => 'Běží', 'Default' => '0', 'ReadOnly' => true), 187 187 'LastOnline' => array('Type' => 'DateTime', 'Caption' => 'Naposledy běželo', 'Default' => '', 'ReadOnly' => true), 188 'Links1' => array('Type' => 'TNetworkLinkListInterface1', 'Caption' => 'Propojení 1', 'Default' => ''), 189 'Links2' => array('Type' => 'TNetworkLinkListInterface2', 'Caption' => 'Propojení 2', 'Default' => ''), 188 'Links' => array('Type' => 'TNetworkLinkListInterface', 'Caption' => 'Propojení', 'Default' => ''), 190 189 'UpDown' => array('Type' => 'TNetworkInterfaceUpDown', 'Caption' => 'Změny stavu', 'Default' => ''), 191 190 'Signal' => array('Type' => 'TNetworkSignalListInterface', 'Caption' => 'Signál', 'Default' => ''), … … 193 192 194 193 ), 195 )); 194 )); 196 195 $this->System->FormManager->RegisterClass('NetworkInterfaceType', array( 197 196 'Title' => 'Typ síťového rozhraní', … … 229 228 'Table' => 'NetworkLink', 230 229 'Items' => array( 231 'Type' => array('Type' => ' Integer', 'Caption' => 'Typ', 'Default' => '1'),230 'Type' => array('Type' => 'TNetworkLinkType', 'Caption' => 'Typ', 'Default' => '1'), 232 231 'Interface1' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 1', 'Default' => ''), 233 232 'Interface2' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 2', 'Default' => ''), 233 ), 234 )); 235 $this->System->FormManager->RegisterClass('NetworkLinkUnion', array( 236 'Title' => 'Síťové propojení', 237 'BaseTable' => 'NetworkLink', 238 'SQL' => '(SELECT `Id`, `Type`, `Interface1` AS `Interface`, `Interface2` AS `InterfaceOther` FROM `NetworkLink`) '. 239 'UNION (SELECT `Id`, `Type`, `Interface2` AS `Interface`, `Interface1` AS `InterfaceOther` FROM `NetworkLink`)', 240 'Items' => array( 241 'Type' => array('Type' => 'TNetworkLinkType', 'Caption' => 'Typ', 'Default' => '1', 'ReadOnly' => true), 242 'Interface' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 1', 'Default' => '', 'ReadOnly' => true), 243 'InterfaceOther' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 2', 'Default' => '', 'ReadOnly' => true), 244 ), 245 )); 246 247 $this->System->FormManager->RegisterClass('NetworkLinkType', array( 248 'Title' => 'Typ síťového propojení', 249 'Table' => 'NetworkLinkType', 250 'Items' => array( 251 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''), 234 252 ), 235 253 )); … … 369 387 'Type' => 'Reference', 370 388 'Table' => 'NetworkInterface', 371 'View' => '(SELECT NetworkInterface.*, CONCAT (NetworkDevice.Name, "-", NetworkInterface.Name) AS DeviceName FROM NetworkInterface '.389 'View' => '(SELECT NetworkInterface.*, CONCAT_WS("-", NetworkDevice.Name, NULLIF(NetworkInterface.Name, "")) AS DeviceName FROM NetworkInterface '. 372 390 'LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device) AS T', 373 391 'Id' => 'Id', … … 396 414 'Filter' => '1', 397 415 )); 416 $this->System->FormManager->RegisterFormType('TNetworkLinkType', array( 417 'Type' => 'Reference', 418 'Table' => 'NetworkLinkType', 419 'Id' => 'Id', 420 'Name' => 'Name', 421 'Filter' => '1', 422 )); 398 423 $this->System->FormManager->RegisterFormType('TDeviceAPIType', array( 399 424 'Type' => 'Reference', … … 417 442 'Filter' => '1', 418 443 )); 444 $this->System->FormManager->RegisterFormType('TNetworkLinkListInterface', array( 445 'Type' => 'ManyToOne', 446 'Table' => 'NetworkLinkUnion', 447 'Id' => 'Id', 448 'Ref' => 'Interface', 449 'Filter' => '1', 450 )); 451 $this->System->FormManager->RegisterFormType('TNetworkLinkListInterface1', array( 452 'Type' => 'ManyToOne', 453 'Table' => 'NetworkLink', 454 'Id' => 'Id', 455 'Ref' => 'Interface1', 456 'Filter' => '1', 457 )); 458 $this->System->FormManager->RegisterFormType('TNetworkLinkListInterface2', array( 459 'Type' => 'ManyToOne', 460 'Table' => 'NetworkLink', 461 'Id' => 'Id', 462 'Ref' => 'Interface2', 463 'Filter' => '1', 464 )); 465 $this->System->FormManager->RegisterFormType('TNetworkInterfaceUpDown', array( 466 'Type' => 'ManyToOne', 467 'Table' => 'NetworkInterfaceUpDown', 468 'Id' => 'Id', 469 'Ref' => 'Interface', 470 'Filter' => '1', 471 )); 472 419 473 } 420 474
Note:
See TracChangeset
for help on using the changeset viewer.