forked from lix-project/hydra
Remove the global channel
It's useless and it makes it very easy to kill the server by fetching /channel/latest/closure.
This commit is contained in:
parent
98e7e37832
commit
2f6c2f5622
|
@ -3,9 +3,9 @@ package Hydra::Controller::Root;
|
||||||
use utf8;
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use base 'Hydra::Base::Controller::ListBuilds';
|
|
||||||
use Hydra::Helper::Nix;
|
use Hydra::Helper::Nix;
|
||||||
use Hydra::Helper::CatalystUtils;
|
use Hydra::Helper::CatalystUtils;
|
||||||
|
use base 'Hydra::Base::Controller::REST';
|
||||||
use Digest::SHA1 qw(sha1_hex);
|
use Digest::SHA1 qw(sha1_hex);
|
||||||
use Nix::Store;
|
use Nix::Store;
|
||||||
use Nix::Config;
|
use Nix::Config;
|
||||||
|
@ -192,16 +192,6 @@ sub machines :Local Args(0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Hydra::Base::Controller::ListBuilds needs this.
|
|
||||||
sub get_builds : Chained('/') PathPart('') CaptureArgs(0) {
|
|
||||||
my ($self, $c) = @_;
|
|
||||||
$c->stash->{allBuilds} = $c->model('DB::Builds');
|
|
||||||
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceeded');
|
|
||||||
$c->stash->{channelBaseName} = "everything";
|
|
||||||
$c->stash->{total} = $c->model('DB::NrBuilds')->find('finished')->count;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
sub robots_txt : Path('robots.txt') {
|
sub robots_txt : Path('robots.txt') {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->stash->{'plain'} = { data => "User-agent: *\nDisallow: /*\n" };
|
$c->stash->{'plain'} = { data => "User-agent: *\nDisallow: /*\n" };
|
||||||
|
|
Loading…
Reference in a new issue