Ignore:
Timestamp:
Feb 6, 2016, 12:08:40 AM (9 years ago)
Author:
chronos
Message:
  • Add: Show also elapsed time in export task progress.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Export/Export.php

    r865 r866  
    739739
    740740      // Show progress bar
    741       $Output .= ' <strong>Export '.$Export.': <div id="progress'.$Task['Export'].'">'.
    742         ProgressBar(300, $Task['Progress']).'</div></strong>';
     741      $Output .= ' <strong>Export '.$Export.':</strong> <div id="progress'.$Task['Export'].'">'.
     742        '<strong>'.ProgressBar(300, $Task['Progress']).'</strong> ';
    743743
    744744      // Show estimated time to complete
    745745      $PrefixMultiplier = new PrefixMultiplier();
    746746      if($Task['Progress'] > 0) {
     747        $ElapsedTime = time() - MysqlDateTimeToTime($Task['TimeStart']);
     748        $Output .= T('Elapsed time').': <strong>'.$PrefixMultiplier->Add($ElapsedTime, '', 4, 'Time').'</strong> / ';
    747749        $EstimatedTime = (time() - MysqlDateTimeToTime($Task['TimeStart'])) / $Task['Progress'] * (100 - $Task['Progress']);
    748         $Output .= 'Zbývající odhadovaný čas: '.$PrefixMultiplier->Add($EstimatedTime, '', 4, 'Time').'<br/>';
    749       }
     750        $Output .= T('Estimated remaining time').': <strong>'.$PrefixMultiplier->Add($EstimatedTime, '', 4, 'Time').'</strong><br/>';
     751      }
     752      $Output .= '</div>';
    750753
    751754      if($Task['Progress'] > 99)
    752755        $Output .= '<script type="text/javascript" language="JavaScript" charset="utf-8">'.
    753         'setTimeout("parent.location.href=\''.$this->System->Link('/export/?Action=View&amp;Tab=7&amp;ExportId='.$TaskId).'\'", 500)'.
     756        'setTimeout("parent.location.href=\''.$this->System->Link('/export/?Action=View&Tab=7&ExportId='.$TaskId).'\'", 500)'.
    754757        '</script>';
    755758    }
Note: See TracChangeset for help on using the changeset viewer.