Skip to content

Commit

Permalink
Add generation time to /report/mirrors
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-suse committed Nov 24, 2023
1 parent 030c808 commit fcd14e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/MirrorCache/WebAPI/Controller/Report/Mirrors.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ sub index {
$self->stash;
return $self->render(
"report/mirrors/index",
dt => $dt,
mirrors => $report,
projects => $projects,
allprojects => $allprojects
Expand Down
2 changes: 2 additions & 0 deletions t/environ/14-project-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,6 @@ rc=0
$mc/curl /report/mirrors | grep $($ap3/print_address) || rc=$?
test $rc -gt 0

$mc/curl /report/mirrors | grep 'generated at'

echo success
6 changes: 6 additions & 0 deletions templates/report/mirrors/index.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,10 @@ td.newregion, tr:hover td.newregion {
</table>
</div>
</div>
% my $generated_at = eval('$dt');
% if ($generated_at) {
<div>
generated at: <%= $generated_at %>
</div>
% }
</form>

0 comments on commit fcd14e1

Please sign in to comment.