Skip to content

Commit

Permalink
rest: make time from logs a time unit
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Jun 3, 2024
1 parent e31a437 commit 02ff48f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Thruk/Controller/rest_v1.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2915,8 +2915,8 @@ sub guess_field_type {
return('number', $unit);
}

# ex.: start, end
if($name =~ m/^(mtime|start|end|localtime|lmd_last_cache_update|ts)$/mx) {
# absolute time ex.: start, end
if($name =~ m/^(mtime|start|end|localtime|lmd_last_cache_update|ts|time)$/mx) {
return('time', '');
}

Expand All @@ -2931,7 +2931,7 @@ sub guess_field_type {
}

# ex.: duration
if($name =~ m/^(duration|response_time|execution_time|time)$/mx) {
if($name =~ m/^(duration|response_time|execution_time)$/mx) {
return('number', 's');
}
if($name =~ m/(_duration|_seconds)$/mx) {
Expand Down

0 comments on commit 02ff48f

Please sign in to comment.