Changeset 975


Ignore:
Timestamp:
Jun 30, 2025, 11:36:29 AM (17 hours ago)
Author:
chronos
Message:
  • Modified: Improved RouterOS signal logging.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r973 r975  
    11<?php
    22
    3 $Revision = 973; // Subversion revision
     3$Revision = 975; // Subversion revision
    44$DatabaseRevision = 970; // SQL structure revision
    55$ReleaseTime = strtotime('2025-06-30');
  • trunk/Modules/NetworkConfigAirOS/Generators/Signal.php

    r929 r975  
    1212    // Load netwatch status from all DHCP routers
    1313    $DbResult3 = $this->Database->query('SELECT `Id`, `LoginName`, `LoginPassword`, '.
    14       '(SELECT `LocalIP` FROM `NetworkInterface` WHERE `NetworkInterface`.`Device` = `NetworkDevice`.`Id` LIMIT 1) AS `LocalIP` '.
     14      '(SELECT `LocalIP` FROM `NetworkInterface` WHERE `NetworkInterface`.`Device` = `NetworkDevice`.`Id` LIMIT 1) AS `LocalIP`, `Name` '.
    1515      'FROM `NetworkDevice` WHERE (`API` = 2) AND (`Used` = 1)');
    1616    while ($Device = $DbResult3->fetch_assoc())
    1717    {
    18       echo($Device['LocalIP']."");
     18      echo($Device['LocalIP'].' ('.$Device['Name']."): ");
    1919      $SSHClient = new SSHClient($Device['LocalIP'], $Device['LoginName'], $Device['LoginPassword']);
    2020      //$SSHClient->Debug = true;
     
    2323      {
    2424        $Array = json_decode(implode("\n", $Result), true);
    25         echo('-');
    2625        foreach ($Array as $Properties)
    2726        {
  • trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php

    r973 r975  
    1616    while ($Device = $DbResult3->fetch_assoc())
    1717    {
    18       echo($Device['LocalIP'].' ('.$Device['Name'].")\n");
     18      echo($Device['LocalIP'].' ('.$Device['Name']."): ");
    1919      $Routerboard = new RouterosAPI();
    2020      //$Routerboard->SSL = true;
     
    2525      $Queries = array_merge($Queries, $this->ReadWireless($Device, $Routerboard));
    2626      $Queries = array_merge($Queries, $this->ReadWireless60G($Device, $Routerboard));
     27      echo("\n");
    2728    }
    2829    $this->Database->Transaction($Queries);
     
    3334  {
    3435    $Queries = array();
    35      
     36
    3637    $Routerboard->Write('/interface/wireless/registration-table/getall', false);
    3738    $Routerboard->Write('=.proplist=signal-strength,tx-signal-strength,mac-address,rx-rate,tx-rate', false);
     
    8485        '('.$MacRef.', '.$Strength.', '.$RemoteSignal.', '.$RateRx.', '.$RateTx.', "'.
    8586        TimeToMysqlDateTime($this->Time).'", '.$Interface.', '.$Device['Id'].')';
     87      echo('.');
    8688    }
    8789    return $Queries;
     
    129131      $Queries[] = 'INSERT INTO `NetworkSignal` (`MAC`, `Value`, `Remote`, `RateRx`, `RateTx`, `Time`, `Interface`, `Device`) VALUES '.
    130132        '('.$MacRef.', '.$Strength.', 0, 0, '.round($RateTx / 1000000).', "'.
    131         TimeToMysqlDateTime($this->Time).'", '.$Interface.', '.$Device['Id'].')';             
     133        TimeToMysqlDateTime($this->Time).'", '.$Interface.', '.$Device['Id'].')';
     134      echo('.');
    132135    }
    133136    return $Queries;
Note: See TracChangeset for help on using the changeset viewer.