diff --git a/cluster-copy/CHANGELOG b/cluster-copy/CHANGELOG index 3538a8824..9ab5f55e4 100644 --- a/cluster-copy/CHANGELOG +++ b/cluster-copy/CHANGELOG @@ -11,3 +11,5 @@ A command to run before copying can now be specified, and both the before and af Made the backup email contents translatable. ---- Changes since 1.310 ---- Added checkboxes and a button for deleting multiple cluster copies at once. +---- Changes since 1.430 ---- +Added a Module Config setting to control the default sort order. diff --git a/cluster-copy/config.info b/cluster-copy/config.info new file mode 100644 index 000000000..1fe056f35 --- /dev/null +++ b/cluster-copy/config.info @@ -0,0 +1 @@ +sort_mode=Sort copy commands by,1,0-Order created,1-Filename,2-Destination servers diff --git a/cluster-copy/index.cgi b/cluster-copy/index.cgi index 30d3de0bf..e6d3f115c 100755 --- a/cluster-copy/index.cgi +++ b/cluster-copy/index.cgi @@ -2,13 +2,23 @@ # Show all scheduled cluster copy jobs require './cluster-copy-lib.pl'; -&ui_print_header(undef, $text{'index_title'}, "", "intro", 0, 1); +&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1); @links = ( &select_all_link("d"), &select_invert_link("d"), "$text{'index_add'}" ); +# Get and sort jobs @jobs = &list_copies(); +if ($config{'sort_mode'} == 1) { + # By filename + @jobs = sort { $a->{'files'} cmp $b->{'files'} } @jobs; + } +elsif ($config{'sort_mode'} == 2) { + # By destination server + @jobs = sort { $a->{'servers'} cmp $b->{'servers'} } @jobs; + } + if (@jobs) { print &ui_form_start("delete.cgi", "post"); print &ui_links_row(\@links);