Changeset 676


Ignore:
Timestamp:
Jul 22, 2014, 10:25:19 PM (10 years ago)
Author:
chronos
Message:
  • Přidáno: U záznamu signálu také zapisovat, ze kterého zařízení se měřilo.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r675 r676  
    11<?php
    22
    3 $Revision = 675; // Subversion revision
    4 $DatabaseRevision = 674; // SQL structure revision
     3$Revision = 676; // Subversion revision
     4$DatabaseRevision = 676; // SQL structure revision
    55$ReleaseTime = strtotime('2014-07-22');
  • trunk/Common/Setup/Updates.php

    r674 r676  
    840840}
    841841
     842function UpdateTo676($Manager)
     843{
     844  $Manager->Execute('ALTER TABLE `NetworkSignal` ADD `Device` INT NULL ,
     845ADD INDEX ( `Device` ) ;');
     846  $Manager->Execute('ALTER TABLE `NetworkSignal` ADD FOREIGN KEY ( `Device` ) REFERENCES `centrala_big`.`NetworkDevice` (
     847`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;');
     848}
     849
    842850class Updates
    843851{
     
    885893      668 => array('Revision' => 671, 'Function' => 'UpdateTo671'),
    886894      671 => array('Revision' => 674, 'Function' => 'UpdateTo674'),
     895      674 => array('Revision' => 676, 'Function' => 'UpdateTo676'),
    887896    ));
    888897  }
  • trunk/Modules/Network/Network.php

    r675 r676  
    242242        'RateRx' => array('Type' => 'Integer', 'Caption' => 'Rychlost', 'Default' => '0', 'Suffix' => 'MHz'),
    243243        'RateTx' => array('Type' => 'Integer', 'Caption' => 'Rychlost', 'Default' => '0', 'Suffix' => 'MHz'),
     244        'Device' => array('Type' => 'TNetworkDevice', 'Caption' => 'Měřeno z', 'Default' => '0'),
    244245      ),
    245246    ));
  • trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php

    r674 r676  
    5858      $System->Database->insert('NetworkSignal', array('MAC' => $Properties['mac-address'],
    5959        'Value' => $Strength, 'RateRx' => $RateRx, 'RateTx' => $RateTx,
    60         'Time' => TimeToMysqlDateTime($Time), 'Interface' => $Interface));
     60        'Time' => TimeToMysqlDateTime($Time), 'Interface' => $Interface, 'Device' => $Device['Id']));
    6161      /*
    6262      $DbResult = $System->Database->select('Measure', 'Id', '`Name` = "'.$Properties['mac-address'].'"');
Note: See TracChangeset for help on using the changeset viewer.