mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Add using relative dates in some pages where it makes sense
This commit is contained in:
@@ -355,6 +355,7 @@ unix_utable=Allowed Unix users
|
||||
sessions_title=Current Login Sessions
|
||||
sessions_id=Session ID
|
||||
sessions_user=Webmin user
|
||||
sessions_login_ago=Last active ago
|
||||
sessions_login=Last active at
|
||||
sessions_host=IP address
|
||||
sessions_lview=View logs..
|
||||
|
||||
@@ -28,7 +28,7 @@ print &ui_columns_start([ $text{'sessions_id'},
|
||||
$text{'sessions_state'},
|
||||
$text{'sessions_user'},
|
||||
$text{'sessions_host'},
|
||||
$text{'sessions_login'},
|
||||
$text{'sessions_login_ago'},
|
||||
$text{'sessions_actions'},
|
||||
], 100);
|
||||
foreach my $k (sort { my @a = split(/\s+/, $sessiondb{$a});
|
||||
@@ -68,7 +68,8 @@ foreach my $k (sort { my @a = split(/\s+/, $sessiondb{$a});
|
||||
push(@cols, $user);
|
||||
}
|
||||
push(@cols, $lip);
|
||||
push(@cols, &make_date($ltime));
|
||||
push(@cols, &make_date_relative($ltime).
|
||||
" ".&ui_help(&make_date($ltime)));
|
||||
my @links;
|
||||
if ($haslog) {
|
||||
push(@links, ui_link("../webminlog/search.cgi?uall=1&mall=1&tall=1&wall=1&fall=1&sid=$k", $text{'sessions_lview'}));
|
||||
|
||||
@@ -35,7 +35,7 @@ if (@logins) {
|
||||
}
|
||||
my $html = &ui_columns_start([ $text{'sessions_host'},
|
||||
$text{'sessions_user'},
|
||||
$text{'sessions_login'},
|
||||
$text{'sessions_login_ago'},
|
||||
$text{'sessions_state'},
|
||||
$text{'sessions_action'} ]);
|
||||
my $open = 0;
|
||||
@@ -73,7 +73,8 @@ if (@logins) {
|
||||
$html .= &ui_columns_row([
|
||||
$l->[2],
|
||||
$user,
|
||||
&make_date($l->[1]),
|
||||
&make_date_relative($l->[1]).
|
||||
" ".&ui_help(&make_date($l->[1])),
|
||||
$state,
|
||||
&ui_links_row(\@links) ]);
|
||||
}
|
||||
|
||||
1
lang/en
1
lang/en
@@ -438,6 +438,7 @@ file_truncated_message=fetched $1 of data, truncated $2 out of $3
|
||||
file_truncated_message_head=fetched beginning $1 of data, truncated $2 out of $3
|
||||
file_truncated_message_tail=fetched ending $1 of data, truncated $2 out of $3
|
||||
|
||||
time_ago_col=Time ago
|
||||
time_ago_year=$1 year ago
|
||||
time_ago_years=$1 years ago
|
||||
time_ago_month=$1 month ago
|
||||
|
||||
@@ -197,6 +197,7 @@ elsif (@match) {
|
||||
$text{'search_user'},
|
||||
$text{'search_host'},
|
||||
$config{'host_search'} ? ( $text{'search_webmin'} ) : ( ),
|
||||
$text{'time_ago_col'},
|
||||
$text{'search_datetime'} ], "100");
|
||||
foreach my $act (sort { $b->{'time'} <=> $a->{'time'} } @match) {
|
||||
my @tm = localtime($act->{'time'});
|
||||
@@ -231,6 +232,7 @@ elsif (@match) {
|
||||
if ($config{'host_search'}) {
|
||||
push(@cols, $act->{'webmin'});
|
||||
}
|
||||
push(@cols, &make_date_relative($act->{'time'}));
|
||||
push(@cols, &make_date($act->{'time'}));
|
||||
print &ui_columns_row(\@cols);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,8 @@ if ($act->{'sid'} ne '-') {
|
||||
&urlize($in{'returndesc'}), $act->{'sid'}) );
|
||||
}
|
||||
|
||||
print &ui_table_row($text{'view_time'}, &make_date($act->{'time'}));
|
||||
print &ui_table_row($text{'view_time'}, &make_date($act->{'time'}).
|
||||
" (".&make_date_relative($act->{'time'}).")");
|
||||
|
||||
if ($act->{'webmin'}) {
|
||||
print &ui_table_row($text{'view_host'},
|
||||
|
||||
Reference in New Issue
Block a user