Make jobset deletion consistent with project deletion
[?]
Feb 26, 2013, 4:36 PM
ZRRPBEI4ZSISCMWV62JGB35QNRJVA7SZUR4F52WTQRECCG2GCEAQCDependencies
- [2]
TNMOG2ZQIndentation - [3]
OX6NYJDVSplit viewing and editing a jobset - [4]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [5]
OOQ2D3KC* Refactoring: move fetchInput out of hydra_scheduler into a separate - [6]
LZO3C2KI* Hack around those SQLite timeouts: just retry the transaction. - [7]
FPK5LF53* Put the project-related actions in a separate controller. Put the - [8]
UMFB2767Hydra/64: Leaving number of builds empty gives DBIx error - [9]
3PNG7NIBRemove trailing whitespace - [10]
7ZQAHJQMFix indentation - [11]
JARRBLZDBootstrapify the Hydra forms (except the project and jobset edit pages) - [12]
QTFVCDIFadded hide feature for project/jobset - [13]
OEPUOUNBUsing twitter bootstrap for more consistent looks for Hydra - [14]
TLJC6BJ3Add a menu item for deleting jobsets - [15]
PVIRRARJTurn hiding/unhiding a jobset into a checkbox - [16]
YG6VGK4F"Evaluate" command: push the jobset to the front of the eval queue - [17]
I4K2UPCWTweaks - [*]
3HZY24CX* Make jobsets viewable under - [*]
QL55ECJ6- adapted ui for hydra, more in line with nixos.org website
Change contents
- edit in src/lib/Hydra/Controller/Jobset.pm at line 133
if (($c->request->params->{submit} // "") eq "delete") {$c->stash->{jobset}->delete;return $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 145[4.1093]→[4.0:2](∅→∅),[4.77]→[4.77:78](∅→∅),[4.129]→[4.18:19](∅→∅),[2.137]→[4.1097:1245](∅→∅),[4.744]→[4.1097:1245](∅→∅),[4.1097]→[4.1097:1245](∅→∅),[4.1245]→[4.26:27](∅→∅),[4.27]→[4.172:214](∅→∅),[4.1250]→[4.172:214](∅→∅),[4.214]→[4.1292:1337](∅→∅),[4.1292]→[4.1292:1337](∅→∅),[4.1337]→[4.28:29](∅→∅),[4.29]→[4.1342:1463](∅→∅),[4.1342]→[4.1342:1463](∅→∅)
}sub delete : Chained('jobset') PathPart Args(0) {my ($self, $c) = @_;requireProjectOwner($c, $c->stash->{project});requirePost($c);txn_do($c->model('DB')->schema, sub {$c->stash->{jobset}->delete;});$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 48
if (($c->request->params->{submit} || "") eq "delete") {if (($c->request->params->{submit} // "") eq "delete") { - replacement in src/lib/Hydra/Controller/Project.pm at line 50
$c->res->redirect($c->uri_for("/"));return $c->res->redirect($c->uri_for("/")); - edit in src/root/edit-jobset.tt at line 112
[% IF !create %]<button id="delete-jobset" type="submit" class="btn btn-danger" name="submit" value="delete"><i class="icon-trash icon-white"></i>Delete this jobset</button><script type="text/javascript">$("#delete-jobset").click(function() {return confirm("Are you sure you want to delete this jobset?");});</script>[% END %] - edit in src/root/topbar.tt at line 85
<form id="delete-jobset" method="post" action="[% c.uri_for('/jobset' project.name jobset.name 'delete') %]" class="hidden"></form><script>function confirmDeleteJobset() {bootbox.confirm('Are you sure you want to delete this jobset?',function(del) { if (del) $('#delete-jobset').submit(); });return;};</script>[% INCLUDE menuItem title="Delete" uri = "javascript:confirmDeleteJobset()" %]