Changeset 849


Ignore:
Timestamp:
Sep 5, 2017, 10:52:31 PM (7 years ago)
Author:
chronos
Message:
  • Added: Show list of matching interfaces by LocalIP for viewed subnet.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r844 r849  
    11<?php
    22
    3 $Revision = 844; // Subversion revision
     3$Revision = 849; // Subversion revision
    44$DatabaseRevision = 844; // SQL structure revision
    5 $ReleaseTime = strtotime('2017-01-01');
     5$ReleaseTime = strtotime('2017-09-05');
  • trunk/Modules/IS/IS.php

    r846 r849  
    448448      if (($TabIndex == $I) or ($TabIndex == (count($Tabs) - 1)))
    449449      {
    450         $TabContent .= $this->ShowList($TypeItem['Table'], '`'.
     450        if ($TypeItem['Ref'] == null)
     451        {
     452          $Filter = $TypeItem['Filter'];
     453          $Filter = str_replace('#Id', $Id, $Filter);
     454          $TabContent .= $this->ShowList($TypeItem['Table'],
     455            $Filter, $Item['Caption']).'<br/>';
     456        } else $TabContent .= $this->ShowList($TypeItem['Table'], '`'.
    451457          $TypeItem['Ref'].'`='.$Id, $Item['Caption'],
    452           $TypeItem['Ref'], $Id).'<br/>';
     458          $TypeItem['Ref'], $Id).'<br/>';       
    453459      }
    454460      $I++;
  • trunk/Modules/Network/Network.php

    r835 r849  
    247247        'AddressRangeIPv6' => array('Type' => 'String', 'Caption' => 'Rozsah adres IPv6', 'Default' => ''),
    248248        'Configure' => array('Type' => 'Boolean', 'Caption' => 'Nastavovat', 'Default' => ''),
    249       ),
     249        'Interfaces' => array('Type' => 'TNetworkSubnetInterfaceList', 'Caption' => 'Rozhraní', 'Default' => ''),
     250      ),
     251    ));
     252    $this->System->FormManager->RegisterFormType('TNetworkSubnetInterfaceList', array(
     253      'Type' => 'ManyToOne',
     254      'Table' => 'NetworkInterface',
     255      'Id' => 'Id',
     256      'Ref' => null,
     257      'Filter' => '(`TX`.`LocalIP` != "") AND CompareNetworkPrefix(INET_ATON(`TX`.`LocalIP`), INET_ATON((SELECT `NetworkSubnet`.`AddressRange` FROM `NetworkSubnet` WHERE `NetworkSubnet`.`Id`=#Id)), '.
     258        '(SELECT `NetworkSubnet`.`Mask` FROM `NetworkSubnet` WHERE `NetworkSubnet`.`Id`=#Id))',
    250259    ));
    251260    $this->System->FormManager->RegisterClass('NetworkPort', array(
Note: See TracChangeset for help on using the changeset viewer.