File Coverage

blib/lib/M3/ServerView/RootView.pm
Criterion Covered Total %
statement 18 18 100.0
branch 2 2 100.0
condition n/a
subroutine 8 8 100.0
pod n/a
total 28 28 100.0


line stmt bran cond sub pod time code
1             package M3::ServerView::RootView;
2              
3 4     4   22 use strict;
  4         8  
  4         155  
4 4     4   20 use warnings;
  4         8  
  4         109  
5              
6 4     4   2703 use M3::ServerView::RootEntry;
  4         13  
  4         129  
7              
8 4     4   27 use base qw(M3::ServerView::View);
  4         9  
  4         1102  
9              
10 1     1   5 sub _entry_class { "M3::ServerView::RootEntry"; }
11              
12             sub _entry_columns {
13             return (
14             "No" => [ no => "text" ],
15             "Type" => [ type => "text" ],
16             "Address" => sub {
17 42     42   5651 my ($view, $entry, $uri) = @_;
18 42 100       202 if (ref $uri) {
19 21         71 $entry->{_details} = [$view->connection, $uri->path, $uri->query];
20             }
21             },
22             "PID" => [ pid => "numeric" ],
23             "Started" => [ started => "datetime" ],
24             "Jobs" => [ jobs => "numeric" ],
25             "Threads" => [ threads => "numeric" ],
26             "CPU%" => [ cpu => "text" ],
27             "Heap/kb" => [ heap => "numeric" ],
28             "Status" => [ status => "text" ],
29 102     102   4034 "Command" => sub {},
30 1     1   22 );
31             }
32              
33             1;
34             __END__