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.14'; |
4
|
11
|
|
|
11
|
|
7729
|
use strict; |
|
11
|
|
|
|
|
33
|
|
|
11
|
|
|
|
|
457
|
|
5
|
11
|
|
|
11
|
|
81
|
use warnings; |
|
11
|
|
|
|
|
28
|
|
|
11
|
|
|
|
|
446
|
|
6
|
|
|
|
|
|
|
|
7
|
11
|
|
|
11
|
|
72
|
use parent qw(Catalyst::Controller::HTML::FormFu); |
|
11
|
|
|
|
|
30
|
|
|
11
|
|
|
|
|
135
|
|
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
|
|
14
|
my ($self, $c, $days) = @_; |
22
|
2
|
|
|
|
|
6
|
my @args = @{$c->req->arguments}; |
|
2
|
|
|
|
|
9
|
|
23
|
2
|
|
|
|
|
158
|
my %args; |
24
|
2
|
50
|
|
|
|
13
|
%args = @args if (int @args % 2 == 0); |
25
|
|
|
|
|
|
|
|
26
|
2
|
50
|
|
|
|
8
|
$args{days} = $days if $days; |
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
|
|
36
|
return join('/', %args ); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub begin :Private |
33
|
|
|
|
|
|
|
{ |
34
|
18
|
|
|
18
|
|
135457
|
my ( $self, $c ) = @_; |
35
|
|
|
|
|
|
|
|
36
|
18
|
|
|
|
|
156
|
require Tapper::Config; |
37
|
18
|
50
|
|
|
|
289
|
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
|
|
|
|
|
220
|
$c->stash->{logo} = Tapper::Config->subconfig->{web}{logo}; |
41
|
18
|
|
|
|
|
1374
|
$c->stash->{title} = Tapper::Config->subconfig->{web}{title}; |
42
|
18
|
|
|
|
|
1313
|
$c->stash->{footer} = Tapper::Config->subconfig->{web}{footer}; |
43
|
11
|
|
|
11
|
|
7697353
|
} |
|
11
|
|
|
|
|
37
|
|
|
11
|
|
|
|
|
143
|
|
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) 2019 by Advanced Micro Devices, Inc.. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This is free software, licensed under: |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
The (two-clause) FreeBSD License |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |