mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Configurable sort order:
This commit is contained in:
@@ -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.
|
Made the backup email contents translatable.
|
||||||
---- Changes since 1.310 ----
|
---- Changes since 1.310 ----
|
||||||
Added checkboxes and a button for deleting multiple cluster copies at once.
|
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.
|
||||||
|
|||||||
1
cluster-copy/config.info
Normal file
1
cluster-copy/config.info
Normal file
@@ -0,0 +1 @@
|
|||||||
|
sort_mode=Sort copy commands by,1,0-Order created,1-Filename,2-Destination servers
|
||||||
@@ -2,13 +2,23 @@
|
|||||||
# Show all scheduled cluster copy jobs
|
# Show all scheduled cluster copy jobs
|
||||||
|
|
||||||
require './cluster-copy-lib.pl';
|
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"),
|
@links = ( &select_all_link("d"),
|
||||||
&select_invert_link("d"),
|
&select_invert_link("d"),
|
||||||
"<a href='edit.cgi?new=1'>$text{'index_add'}</a>" );
|
"<a href='edit.cgi?new=1'>$text{'index_add'}</a>" );
|
||||||
|
|
||||||
|
# Get and sort jobs
|
||||||
@jobs = &list_copies();
|
@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) {
|
if (@jobs) {
|
||||||
print &ui_form_start("delete.cgi", "post");
|
print &ui_form_start("delete.cgi", "post");
|
||||||
print &ui_links_row(\@links);
|
print &ui_links_row(\@links);
|
||||||
|
|||||||
Reference in New Issue
Block a user