* Start of a JSON API to get information about a specific build.

[?]
Sep 15, 2011, 8:27 AM
HSVVEKTY2U5XJ4ZDHF43YEQXRPRWNZLZDDD4W7JFJ55UWD7CEFBQC

Dependencies

  • [2] HOI5XQHS * Don't use a config file by default. This frees up $HYDRA_CONFIG so
  • [3] BEKA3TMM Hydra/25: At job pages, show the hash of the output
  • [4] SHYRGAWZ hydra: when no external url is given for diff's of git/hg input, revert to a diff done on a local available clone
  • [5] WOHG5MJD hydra: catalyst plain view doesn;t work with data => 0, so put some whitespace around it
  • [6] SHBLLAVH * More global substitution.
  • [7] BKOIYITR added some json responses
  • [8] AFTXA575 * $HYDRA_DATA environment variable.
  • [9] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] SAFVRDTK * Put Hydra's dependencies so that they can easily be installed in a
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] NUIKDEHL * A quick hack to list the contents of various types of files (RPM,
  • [*] OD5FSS5A * Quick hack to allow viewing of dependency graphs (via nix-store -q
  • [*] D5QIOJGP * Move everything up one directory.

Change contents

  • edit in deps.nix at line 14
    [11.349]
    [11.349]
    perlPackages.CatalystViewJSON
  • edit in src/lib/Hydra/Controller/API.pm at line 13
    [4.63]
    [5.236]
    # !!! Rewrite this to use View::JSON.
  • edit in src/lib/Hydra/Controller/API.pm at line 166
    [5.4806][5.4806:4878]()
    }
    sub ts {
    my ($nr, $period) = @_;
    my @arr ;
    return @arr;
  • edit in src/lib/Hydra/Controller/Build.pm at line 12
    [3.9]
    [12.157]
  • edit in src/lib/Hydra/Controller/Build.pm at line 32
    [12.684]
    [12.684]
  • edit in src/lib/Hydra/Controller/Build.pm at line 219
    [13.191]
    [13.192]
  • edit in src/lib/Hydra/Controller/Build.pm at line 313
    [14.1009]
    [14.1009]
  • edit in src/lib/Hydra/Controller/Build.pm at line 546
    [12.3297]
    [12.3297]
    sub get_info : Chained('build') PathPart('api/get-info') Args(0) {
    my ($self, $c) = @_;
    my $build = $c->stash->{build};
    # !!! strip the json prefix
    $c->stash->{jsonBuildId} = $build->id;
    $c->stash->{jsonDrvPath} = $build->drvpath;
    $c->stash->{jsonOutPath} = $build->outpath;
    $c->forward('View::JSON');
    }
  • file addition: JSON.pm (----------)
    [15.1193]
    package Hydra::View::JSON;
    use base qw(Catalyst::View::JSON);
    1;
  • replacement in src/lib/Hydra.pm at line 46
    [2.601][5.1036:1042](),[5.1036][5.1036:1042]()
    }
    [2.601]
    [5.1042]
    },
    'View::JSON' => {
    expose_stash => qr/^json/,
    },
    'Plugin::Session' => {
    expires => 3600 * 24 * 2,
    },