added hide feature for project/jobset

[?]
Jun 4, 2010, 2:43 PM
QTFVCDIFHTF36AGU4UGNCTWSHQYTM2KERXS26TPAJK7IDJHL7BVAC

Dependencies

  • [2] NABL63FI * hydra: project members can do stuff that the owner can do
  • [3] SGNXIOI4 Hydra/32: Add option to force evaluation of a certain jobset via web interface (for admins only)
  • [4] TWVSALRL * Allow the maximum number of concurrent builds per platform to be
  • [5] CLJQCY2X * Store info about all the build actions and allow them to be
  • [6] B72GLND4
  • [7] JLDUSNUO * Unify rendering of finished and scheduled builds.
  • [8] H7CNGK4O * Log evaluation errors etc. in the DB.
  • [9] BHZXGT2H * Channels: provide an index page that lists all the packages in the
  • [10] PC6UOHH7 add some stats to jobsets in project view
  • [11] 6BLUKEQ2 * Caching of "path" inputs, and fake a revision number for those.
  • [12] ZI535LI6 * hydra: 'new' UI for project/jobset/job/build
  • [13] RFE6T5LG * Store jobset evaluations in the database explicitly. This includes
  • [14] 7YBYT2LQ
  • [15] S6OISBQ3 * Mark the "current" builds in a jobset, i.e. those corresponding to
  • [16] JTRG7RDQ add support for git as jobinput
  • [17] FHF6IZJQ * Basic release management: releases are now dynamically computed as
  • [18] M552HLIA * Support variant builds.
  • [19] 67P45PY4
  • [20] RBNQKATL * Adding persistant releases. A release is a named set of builds.
  • [21] DVNWJXWW * Generic declaration of build products.
  • [22] D3DIBMOK * For products that are directories (like manuals), allow a default
  • [23] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [24] PHX2HIVG * Store info about the build inputs in the build record.
  • [25] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [26] 5QE3TIHP hydra: add status icon per jobset on project page
  • [27] L2E6EVE2 * Merged the Build and Job tables.
  • [28] SHBLLAVH * More global substitution.
  • [29] ZEHSSVFG
  • [30] SJN2QPWH * Big speed-up of the job status page and the channel generation (such
  • [31] VJHIHMEH * Store the meta.longDescription and meta.license attributes in the
  • [32] KOTB7BKV
  • [33] CMU3YKOU * Store the release name.
  • [34] YTZOC7C5 * Editing of jobset inputs.
  • [35] 3ZCEPLNO
  • [36] RU7AQO7U * Role-based access control. Only admins can create projects. Only
  • [37] X27GNHDV * Basic job info in the database.
  • [38] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [39] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having
  • [40] 3HCBU2FA
  • [41] KN3VYE5P * Cleaned up the foreign key constraints.
  • [42] FYO6NECE hydra
  • [43] EYNG4EL4 * Regenerate the bindings from a clean sqlite database.
  • [44] JM3DPYOM generated schema with new dbix class schema loader, grrrrrr
  • [45] A52HEFHQ * Allow builds to be restarted (if they failed with a transient error,
  • [46] IK53RV4V
  • [47] 4D4U5IPY * Allow jobsets to be disabled.
  • [48] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [49] AHTEIK7G * Added a maintainers field to the Builds table.
  • [50] YAPITGB3 * Boolean inputs.
  • [51] TLZ2SPBR
  • [52] S66BOMVU * Added authentication.
  • [53] CS7T2XFI
  • [54] 3E6IP3R3 * Add the name of the jobset to ReleaseSetJobs, otherwise we can't
  • [55] ZVTSOVHN * Support Subversion checkouts.
  • [56] KAZWI5G4 * hydra: buildpage, show changes since last build/successful build
  • [57] ECBA3GQO * Make the schema class names match the case of the SQL table names.
  • [58] 37R34XJO * Negative caching: don't perform a build if a dependency already
  • [59] 5SHCWE7X * Prevent repeated evaluation of a jobset with the same inputs. This
  • [60] LCKWLQW3 * In Sqlite "release" is now a keyword, so use "release_" instead.
  • [61] KNU2FBIG * hydra: order project list on name
  • [62] BVOPAMLS
  • [63] TQKGQ5R3
  • [64] GNIEG2GC * Disambiguate jobs by jobset name. I.e. jobs with the same name in
  • [65] 7UJ5YV4V * Provide a channel for each project containing all the latest
  • [66] S5PV6IIM * Represent jobs explicitly in the DB.
  • [67] GWCV3TQV * BuildInputs table: link to dependencies, include store paths.
  • [68] R5D7DZPE
  • [69] V4RNHJNR * Add a link to each project's homepage. Suggested by karltk.
  • [*] 3HZY24CX * Make jobsets viewable under
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • edit in src/lib/Hydra/Controller/Jobset.pm at line 135
    [4.1093]
    [4.1093]
    }
    sub hide : Chained('jobset') PathPart Args(0) {
    my ($self, $c) = @_;
    requireProjectOwner($c, $c->stash->{project});
    txn_do($c->model('DB')->schema, sub {
    $c->stash->{jobset}->update({ hidden => 1, enabled => 0 });
    });
    $c->res->redirect($c->uri_for($c->controller('Project')->action_for("view"),
    [$c->stash->{project}->name]));
  • edit in src/lib/Hydra/Controller/Jobset.pm at line 151
    [4.1096]
    [4.1096]
    sub unhide : Chained('jobset') PathPart Args(0) {
    my ($self, $c) = @_;
  • edit in src/lib/Hydra/Controller/Jobset.pm at line 154
    [4.1097]
    [4.1097]
    requireProjectOwner($c, $c->stash->{project});
    txn_do($c->model('DB')->schema, sub {
    $c->stash->{jobset}->update({ hidden => 0 });
    });
    $c->res->redirect($c->uri_for($c->controller('Project')->action_for("view"),
    [$c->stash->{project}->name]));
    }
  • replacement in src/lib/Hydra/Controller/Project.pm at line 29
    [4.402][4.7:77]()
    $c->stash->{jobsets} = [$c->stash->{project}->jobsets->search({},
    [4.402]
    [4.77]
    $c->stash->{jobsets} = [$c->stash->{project}->jobsets->search( isProjectOwner($c, $c->stash->{project}->name) ? {} : { hidden => 0 },
  • edit in src/lib/Hydra/Controller/Project.pm at line 63
    [4.4746]
    [4.2550]
    }
    sub hide : Chained('project') PathPart Args(0) {
    my ($self, $c) = @_;
    requireProjectOwner($c, $c->stash->{project});
    txn_do($c->model('DB')->schema, sub {
    $c->stash->{project}->update({ hidden => 1, enabled => 0 });
    });
    $c->res->redirect($c->uri_for("/"));
  • edit in src/lib/Hydra/Controller/Project.pm at line 78
    [4.2553]
    [4.2553]
    sub unhide : Chained('project') PathPart Args(0) {
    my ($self, $c) = @_;
  • edit in src/lib/Hydra/Controller/Project.pm at line 81
    [4.2554]
    [4.2554]
    requireProjectOwner($c, $c->stash->{project});
    txn_do($c->model('DB')->schema, sub {
    $c->stash->{project}->update({ hidden => 0 });
    });
    $c->res->redirect($c->uri_for("/"));
    }
  • replacement in src/lib/Hydra/Controller/Root.pm at line 29
    [4.6231][4.0:91]()
    $c->stash->{projects} = [$c->model('DB::Projects')->search({}, {order_by => 'name'})];
    [4.6231]
    [4.2216]
    $c->stash->{projects} = [$c->model('DB::Projects')->search(isAdmin($c) ? {} : {hidden => 0}, {order_by => 'name'})];
  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 12
    [4.9721][4.6330:6392]()
    requireLogin requireProjectOwner requireAdmin requirePost
    [4.9721]
    [4.9771]
    requireLogin requireProjectOwner requireAdmin requirePost isAdmin isProjectOwner
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 137
    [4.1332]
    [4.1332]
    sub isProjectOwner {
    my ($c, $project) = @_;
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 140
    [4.1333]
    [4.1333]
    return $c->user_exists && ($c->check_user_roles('admin') || $c->user->username eq $project->owner->username || defined $c->model('DB::ProjectMembers')->find({ project => $project, userName => $c->user->username }));
    }
  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 149
    [2.89][2.89:292]()
    unless $c->check_user_roles('admin') || $c->user->username eq $project->owner->username || defined $c->model('DB::ProjectMembers')->find({ project => $project, userName => $c->user->username });
    [2.89]
    [4.1625]
    unless isProjectOwner($c, $project);
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 153
    [4.1629]
    [4.11189]
    sub isAdmin {
    my ($c) = @_;
    return $c->user_exists && $c->check_user_roles('admin');
    }
  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 165
    [4.11339][4.11339:11385]()
    unless $c->check_user_roles('admin');
    [4.11339]
    [4.6393]
    unless isAdmin($c);
  • edit in src/lib/Hydra/Schema/Jobsets.pm at line 94
    [4.18902]
    [4.18902]
    =head2 hidden
  • edit in src/lib/Hydra/Schema/Jobsets.pm at line 97
    [4.18903]
    [4.18903]
    data_type: integer
    default_value: 0
    is_nullable: 0
    size: undef
  • edit in src/lib/Hydra/Schema/Jobsets.pm at line 175
    [4.1848]
    [4.253]
    "hidden",
    { data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
  • replacement in src/lib/Hydra/Schema/Jobsets.pm at line 283
    [4.3196][4.4997:5139]()
    # Created by DBIx::Class::Schema::Loader v0.05000 @ 2010-03-05 13:07:46
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z0HutYxnzYVuQc3W51mq5Q
    [4.3196]
    [4.3135]
    # Created by DBIx::Class::Schema::Loader v0.05000 @ 2010-06-04 16:32:43
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aQ+7TLIXnNDjjulPNqLq7A
  • edit in src/lib/Hydra/Schema/Projects.pm at line 49
    [4.20250]
    [4.20250]
    =head2 hidden
  • edit in src/lib/Hydra/Schema/Projects.pm at line 52
    [4.20251]
    [4.20251]
    data_type: integer
    default_value: 0
    is_nullable: 0
    size: undef
  • edit in src/lib/Hydra/Schema/Projects.pm at line 98
    [4.14537]
    [4.2904]
    "hidden",
    { data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
  • replacement in src/lib/Hydra/Schema/Projects.pm at line 257
    [4.3685][4.4372:4514]()
    # Created by DBIx::Class::Schema::Loader v0.05000 @ 2010-04-20 11:21:42
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1VZpwwaEdEJzrrV31ErPzw
    [4.3685]
    [4.4514]
    # Created by DBIx::Class::Schema::Loader v0.05000 @ 2010-06-04 16:32:43
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:b6DRXQBuBX5/tm+3VPO9yA
  • edit in src/root/overview.tt at line 23
    [4.19605]
    [4.19605]
    [% IF c.check_user_roles('admin') %]<th>Options</th>[% END %]
  • edit in src/root/overview.tt at line 33
    [4.20014]
    [4.20014]
    [% IF c.check_user_roles('admin') %]
    <td>
    [ [% IF p.hidden %]
    [% INCLUDE maybeLink uri = c.uri_for('/project' p.name 'unhide') content = "Unhide" %]
    [% ELSE %]
    [% INCLUDE maybeLink uri = c.uri_for('/project' p.name 'hide') content = "Hide" %]
    [% END %]
    ]
    </td>
    [% END %]
  • replacement in src/root/project.tt at line 81
    [3.910][3.910:1180]()
    <td>[ [% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, j.name) content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ j.name _ "?") %] ]</td>
    [3.910]
    [3.1180]
    <td>[ [% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, j.name) content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ j.name _ "?") %]
    | [% IF j.hidden %]
    [% INCLUDE maybeLink uri = c.uri_for('/jobset' project.name j.name 'unhide') content = "Unhide" %]
    [% ELSE %]
    [% INCLUDE maybeLink uri = c.uri_for('/jobset' project.name j.name 'hide') content = "Hide" %]
    [% END %]
    ]
    </td>
  • edit in src/sql/hydra.sql at line 23
    [4.4609]
    [4.4609]
    hidden integer not null default 0,
  • edit in src/sql/hydra.sql at line 52
    [4.5135]
    [4.5135]
    hidden integer not null default 0,