Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/hydra
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c8fa7ffc126e
Choose a base ref
...
head repository: NixOS/hydra
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 88a92256e1fd
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Feb 14, 2019

  1. Serialize data as JSON with Accept: application/json

    Similar to #607. According to the Catalyst[1] docs it's possible to
    specify a data structure that is supposed to be serialized when
    requesting i.e. a JSON response.
    
    [1] https://metacpan.org/pod/Catalyst::Controller::REST#status_ok
    Ma27 committed Feb 14, 2019
    Copy the full SHA
    1cbbc6c View commit details

Commits on Mar 17, 2019

  1. Merge pull request #636 from Ma27/serve-json-for-evals-and-machines

    Serialize data as JSON with `Accept: application/json`
    grahamc authored Mar 17, 2019
    Copy the full SHA
    88a9225 View commit details
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/lib/Hydra/Controller/Root.pm
5 changes: 4 additions & 1 deletion src/lib/Hydra/Controller/Root.pm
Original file line number Diff line number Diff line change
@@ -197,6 +197,7 @@ sub machines :Local Args(0) {
"where busy != 0 order by machine, stepnr",
{ Slice => {} });
$c->stash->{template} = 'machine-status.tt';
$self->status_ok($c, entity => $c->stash->{machines});
}


@@ -350,7 +351,9 @@ sub evals :Local Args(0) {
$c->stash->{page} = $page;
$c->stash->{resultsPerPage} = $resultsPerPage;
$c->stash->{total} = $evals->search({hasnewbuilds => 1})->count;
$c->stash->{evals} = getEvals($self, $c, $evals, ($page - 1) * $resultsPerPage, $resultsPerPage)
$c->stash->{evals} = getEvals($self, $c, $evals, ($page - 1) * $resultsPerPage, $resultsPerPage);

$self->status_ok($c, entity => $c->stash->{evals});
}