| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Tapper::Reports::Web::Controller::Base; |
|
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TAPPER'; |
|
3
|
|
|
|
|
|
|
$Tapper::Reports::Web::Controller::Base::VERSION = '5.0.13'; |
|
4
|
11
|
|
|
11
|
|
6412
|
use strict; |
|
|
11
|
|
|
|
|
19
|
|
|
|
11
|
|
|
|
|
344
|
|
|
5
|
11
|
|
|
11
|
|
43
|
use warnings; |
|
|
11
|
|
|
|
|
17
|
|
|
|
11
|
|
|
|
|
435
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
11
|
|
|
11
|
|
44
|
use parent qw(Catalyst::Controller::HTML::FormFu); |
|
|
11
|
|
|
|
|
16
|
|
|
|
11
|
|
|
|
|
84
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub reduced_filter_path |
|
11
|
|
|
|
|
|
|
{ |
|
12
|
0
|
|
|
0
|
|
0
|
my ($self, $filters, $remove) = @_; |
|
13
|
0
|
|
|
|
|
0
|
my %new_filters = %$filters; |
|
14
|
0
|
|
|
|
|
0
|
delete $new_filters{$remove}; |
|
15
|
0
|
|
|
|
|
0
|
return join('/', %new_filters ); |
|
16
|
|
|
|
|
|
|
} |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub prepare_filter_path |
|
20
|
|
|
|
|
|
|
{ |
|
21
|
2
|
|
|
2
|
|
4
|
my ($self, $c, $days) = @_; |
|
22
|
2
|
|
|
|
|
5
|
my @args = @{$c->req->arguments}; |
|
|
2
|
|
|
|
|
6
|
|
|
23
|
2
|
|
|
|
|
80
|
my %args; |
|
24
|
2
|
50
|
|
|
|
10
|
%args = @args if (int @args % 2 == 0); |
|
25
|
|
|
|
|
|
|
|
|
26
|
2
|
50
|
|
|
|
7
|
$args{days} = $days if $days; |
|
27
|
|
|
|
|
|
|
|
|
28
|
2
|
|
|
|
|
25
|
return join('/', %args ); |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub begin :Private |
|
33
|
|
|
|
|
|
|
{ |
|
34
|
18
|
|
|
18
|
|
93756
|
my ( $self, $c ) = @_; |
|
35
|
|
|
|
|
|
|
|
|
36
|
18
|
|
|
|
|
148
|
require Tapper::Config; |
|
37
|
18
|
50
|
|
|
|
187
|
if (Tapper::Config->subconfig->{web}->{we_have_a_problem}) { |
|
38
|
0
|
|
|
|
|
0
|
$c->stash->{we_have_a_problem} = Tapper::Config->subconfig->{web}->{we_have_a_problem}; |
|
39
|
|
|
|
|
|
|
} |
|
40
|
18
|
|
|
|
|
163
|
$c->stash->{logo} = Tapper::Config->subconfig->{web}{logo}; |
|
41
|
18
|
|
|
|
|
962
|
$c->stash->{title} = Tapper::Config->subconfig->{web}{title}; |
|
42
|
18
|
|
|
|
|
903
|
$c->stash->{footer} = Tapper::Config->subconfig->{web}{footer}; |
|
43
|
11
|
|
|
11
|
|
5060080
|
} |
|
|
11
|
|
|
|
|
22
|
|
|
|
11
|
|
|
|
|
94
|
|
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=pod |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=encoding UTF-8 |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 NAME |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Tapper::Reports::Web::Controller::Base |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 reduced_filter_path |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Create a filter path out of the filters given as first argument that |
|
61
|
|
|
|
|
|
|
does not contain the second argument. |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
@param hash ref - current filter settings |
|
64
|
|
|
|
|
|
|
@param string - new path without that filter (should be a key in the hash) |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
@return string - new path |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 prepare_filter_path |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Create the URL part for the current filter setting with the requested |
|
71
|
|
|
|
|
|
|
number of days. |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
@param catalyst context |
|
74
|
|
|
|
|
|
|
@param int - number of days |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
@return url part |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHORS |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=over 4 |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
AMD OSRC Tapper Team <tapper@amd64.org> |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Tapper Team <tapper-ops@amazon.com> |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=back |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This software is Copyright (c) 2017 by Advanced Micro Devices, Inc.. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This is free software, licensed under: |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
The (two-clause) FreeBSD License |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |