Ignore:
Timestamp:
Jan 5, 2026, 6:38:18 PM (3 days ago)
Author:
chronos
Message:
  • Modfied: Allow to add measurements with different min, avg and max values.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Measure/Page.php

    r95 r96  
    33class PageMain extends Page
    44{
    5   var $Months;
    6   var $GraphTimeRanges;
     5  var int $Time;
     6  var array $Months;
     7  var array $GraphTimeRanges;
    78
    89  function __construct(System $System)
     
    6162  }
    6263
    63   function EditTime($Time): string
     64  function EditTime(int $Time): string
    6465  {
    6566    $Output = '<form style="display: inline;" action="?Operation=SetTime&amp;Time='.$Time.'" method="post">';
     
    120121  }
    121122
    122   function GetFirstMeasure($Measure): array
     123  function GetFirstMeasure(array $Measure): array
    123124  {
    124125    $Result2 = $this->Database->select($Measure['DataTable'], '`Time`, `Avg`', '(`Measure`='.$Measure['Id'].') AND (`Level`=0) ORDER BY `Time` ASC LIMIT 1');
     
    135136  }
    136137
    137   function GetLastMeasure($Measure): array
     138  function GetLastMeasure(array $Measure): array
    138139  {
    139140    $Result2 = $this->Database->select($Measure['DataTable'], '`Time`, `Avg`', '(`Measure`='.$Measure['Id'].') AND (`Level`=0) ORDER BY `Time` DESC LIMIT 1');
     
    150151  }
    151152
    152   function LoadMeasure($Id): array
     153  function LoadMeasure(int $Id): array
    153154  {
    154155    $DbResult = $this->Database->select('Measure', '*', '( `Enabled`=1) AND (`Id`='.$Id.') AND ((`PermissionView`="all") OR (`PermissionView`="'.
     
    267268    $Output .= '<br/>';
    268269    return $Output;
    269 
    270270  }
    271271
     
    360360    global $Config;
    361361
    362     $Debug = 0;
    363362    $this->HandleURL();
    364363
Note: See TracChangeset for help on using the changeset viewer.