Remove some obsolete JSON APIs

[?]
Oct 3, 2013, 12:50 PM
OIDTPX3FDZBDQQ2OPECRJ7JZP36OJANJQKF5KYZURVN2OGLUXOVAC

Dependencies

  • [2] LZVO64YG Merge in the first bits of the API work
  • [3] S66BOMVU * Added authentication.
  • [4] LBNVQXUB * Build the /build stuff in a separate controller.
  • [5] A52HEFHQ * Allow builds to be restarted (if they failed with a transient error,
  • [6] TH674WKJ add log diff to compare logs to previous builds
  • [7] NOSDBMWD Remove comments, re-add logo.
  • [8] JLDUSNUO * Unify rendering of finished and scheduled builds.
  • [9] 5NO7NCKT * Refactoring.
  • [10] KNU2FBIG * hydra: order project list on name
  • [11] 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
  • [12] XJRJ4J7M Add user registration
  • [13] PMNWRTGJ Add multiple output support
  • [14] LSZLZHJY Allow users to edit their own settings
  • [15] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [16] W3HI52QV use NIX_*_DIR env vars when defined
  • [17] XHVZXX6N
  • [18] QTFVCDIF added hide feature for project/jobset
  • [19] 3PNG7NIB Remove trailing whitespace
  • [20] 3WUMSTU5 Use getMainOutput
  • [21] PCKLFRT5 Support push notification of repository changes
  • [22] BKOIYITR added some json responses
  • [23] HPEG2RHV Merge the BuildResultInfo table into the Builds table
  • [24] FHHFNCCR Fix duplicate function name
  • [25] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [26] ND75XNSQ Allow showing all evaluations that contain a given build
  • [27] HSVVEKTY * Start of a JSON API to get information about a specific build.
  • [28] WRIU3S5E * UI for cloning builds (not functional yet).
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.

Change contents

  • edit in src/lib/Hydra/Controller/API.pm at line 17
    [3.83][3.33:72](),[3.63][3.33:72]()
    # !!! Rewrite this to use View::JSON.
  • edit in src/lib/Hydra/Controller/API.pm at line 22
    [3.238][3.370:372](),[3.370][3.370:372](),[3.372][3.655:656](),[3.656][3.372:507](),[3.372][3.372:507](),[3.507][3.850:857](),[3.857][3.515:517](),[3.515][3.515:517](),[3.517][3.657:658](),[3.658][3.517:604](),[3.517][3.517:604](),[3.604][3.858:859](),[3.859][3.659:750](),[3.609][3.659:750](),[3.750][3.701:702](),[3.701][3.701:702](),[3.702][3.751:765](),[3.765][3.717:749](),[3.717][3.717:749](),[3.749][3.766:803](),[3.803][3.787:793](),[3.787][3.787:793](),[3.793][3.860:944](),[3.944][3.883:929](),[3.883][3.883:929]()
    }
    sub projectToHash {
    my ($project) = @_;
    return {
    name => $project->name,
    description => $project->description
    };
    }
    sub projects : Chained('api') PathPart('projects') Args(0) {
    my ($self, $c) = @_;
    my @projects = $c->model('DB::Projects')->search({hidden => 0}, {order_by => 'name'});
    my @list;
    foreach my $p (@projects) {
    push @list, projectToHash($p);
    }
    $c->stash->{'plain'} = {
    data => scalar (JSON::Any->objToJson(\@list))
    };
    $c->forward('Hydra::View::Plain');
  • edit in src/lib/Hydra/Controller/Build.pm at line 616
    [3.3297][2.5947:6019](),[3.67][3.149:210](),[2.6019][3.149:210](),[3.149][3.149:210](),[3.210][3.1473:1572](),[3.1572][3.0:37](),[3.333][3.0:37](),[3.37][3.1573:1636](),[3.1636][3.381:412](),[3.4182][3.381:412](),[3.381][3.381:412](),[3.412][3.68:72]()
    sub get_info : Chained('buildChain') PathPart('api/get-info') Args(0) {
    my ($self, $c) = @_;
    my $build = $c->stash->{build};
    $c->stash->{json}->{buildId} = $build->id;
    $c->stash->{json}->{drvPath} = $build->drvpath;
    my $out = getMainOutput($build);
    $c->stash->{json}->{outPath} = $out->path if defined $out;
    $c->forward('View::JSON');
    }
  • replacement in src/lib/Hydra/Controller/Root.pm at line 58
    [3.2335][2.21664:21698]()
    $self->status_ok(
    $c,
    [3.2335]
    [2.21698]
    $self->status_ok($c,
  • replacement in src/lib/Hydra/Controller/Root.pm at line 61
    [2.21827][2.21827:21884]()
    columns => [ 'name', 'displayname' ]
    [2.21827]
    [2.21884]
    columns => [ 'name', 'displayname', 'description' ]