Changeset 944


Ignore:
Timestamp:
Dec 6, 2022, 11:37:32 PM (17 months ago)
Author:
chronos
Message:
  • Added: Show offline devices number and link to filtered list from IS dashboard.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r939 r944  
    11<?php
    22
    3 $Revision = 939; // Subversion revision
     3$Revision = 943; // Subversion revision
    44$DatabaseRevision = 939; // SQL structure revision
    5 $ReleaseTime = strtotime('2022-08-01');
     5$ReleaseTime = strtotime('2022-12-06');
  • trunk/Modules/Network/Network.php

    r937 r944  
    853853  {
    854854    $Output = '';
     855
     856    // Devices
    855857    $DbResult = $this->Database->select('NetworkDevice', 'COUNT(*)', '1');
    856858    $DbRow = $DbResult->fetch_row();
     
    859861    $DbResult = $this->Database->select('NetworkDevice', 'COUNT(*)', '`Used`=1');
    860862    $DbRow = $DbResult->fetch_row();
    861     $Output .= ' použitých: <a href="'.$this->System->Link('/is/?a=list&amp;t=NetworkDevice&amp;filter=1&amp;FilterUsed=1').'">'.$DbRow['0'].'</a><br/>';
    862 
     863    $Output .= ' použitých: <a href="'.$this->System->Link('/is/?a=list&amp;t=NetworkDevice&amp;filter=1&amp;FilterUsed=1').'">'.$DbRow['0'].'</a>';
     864
     865    $DbResult = $this->Database->select('NetworkDevice', 'COUNT(*)', '`Used`=1 AND `PermanentOnline`=1 AND `Online`=0');
     866    $DbRow = $DbResult->fetch_row();
     867    $Output .= ' nedostupných: <a href="'.$this->System->Link('/is/?a=list&amp;t=NetworkDevice&amp;filter=1&amp;FilterUsed=1&amp;FilterOnline=0&amp;FilterPermanentOnline=1').'">'.$DbRow['0'].'</a>';
     868
     869    $Output .= '<br/>';
     870
     871    // Interfaces
    863872    $DbResult = $this->Database->select('NetworkInterface', 'COUNT(*)', '1');
    864873    $DbRow = $DbResult->fetch_row();
     
    867876    $DbResult = $this->Database->select('NetworkInterface', 'COUNT(*)', '`Enabled`=1');
    868877    $DbRow = $DbResult->fetch_row();
    869     $Output .= ' použitých: <a href="'.$this->System->Link('/is/?a=list&amp;t=NetworkInterface&amp;filter=1&amp;FilterEnabled=1').'">'.$DbRow['0'].'</a><br/>';
    870 
     878    $Output .= ' použitých: <a href="'.$this->System->Link('/is/?a=list&amp;t=NetworkInterface&amp;filter=1&amp;FilterEnabled=1').'">'.$DbRow['0'].'</a>';
     879
     880    //$DbResult = $this->Database->select('NetworkInterface', 'COUNT(*)', '`Enabled`=1 AND `PermanentOnline`=1 AND `Online`=0');
     881    //$DbRow = $DbResult->fetch_row();
     882    //$Output .= ' nedostupných: <a href="'.$this->System->Link('/is/?a=list&amp;t=NetworkInterface&amp;filter=1&amp;FilterEnabled=1&amp;FilterOnline=0&amp;FilterPermanentOnline=1').'">'.$DbRow['0'].'</a>';
     883
     884    $Output .= '<br/>';
     885
     886    // Subnets
    871887    $DbResult = $this->Database->select('NetworkSubnet', 'COUNT(*)', '1');
    872888    $DbRow = $DbResult->fetch_row();
    873889    $Output .= 'Síťových podsítí: <a href="'.$this->System->Link('/is/?a=list&amp;t=NetworkSubnet').'">'.$DbRow['0'].'</a><br/>';
     890
    874891    return $Output;
    875892  }
Note: See TracChangeset for help on using the changeset viewer.