line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tapper::Reports::Web::Controller::Tapper::Reports::Tap; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TAPPER'; |
3
|
|
|
|
|
|
|
$Tapper::Reports::Web::Controller::Tapper::Reports::Tap::VERSION = '5.0.14'; |
4
|
10
|
|
|
10
|
|
6159
|
use strict; |
|
10
|
|
|
|
|
32
|
|
|
10
|
|
|
|
|
354
|
|
5
|
10
|
|
|
10
|
|
63
|
use warnings; |
|
10
|
|
|
|
|
44
|
|
|
10
|
|
|
|
|
346
|
|
6
|
|
|
|
|
|
|
|
7
|
10
|
|
|
10
|
|
74
|
use parent 'Tapper::Reports::Web::Controller::Base'; |
|
10
|
|
|
|
|
26
|
|
|
10
|
|
|
|
|
83
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub index :Path :Args(1) |
10
|
|
|
|
|
|
|
{ |
11
|
0
|
|
|
0
|
|
|
my ( $self, $c, $report_id ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
my $report = $c->model('TestrunDB')->resultset('Report')->find($report_id); |
14
|
|
|
|
|
|
|
|
15
|
0
|
0
|
|
|
|
|
if ($report) { |
16
|
0
|
0
|
0
|
|
|
|
if ($report->tap && $report->tap->tap_is_archive) { |
17
|
0
|
|
|
|
|
|
$c->response->content_type ('application/x-compressed'); |
18
|
0
|
|
|
|
|
|
$c->response->header ("Content-Disposition" => 'inline; filename="tap-'.$report_id.'.tgz"'); |
19
|
|
|
|
|
|
|
} else { |
20
|
0
|
|
|
|
|
|
$c->response->content_type ('text/plain'); |
21
|
0
|
|
|
|
|
|
$c->response->header ("Content-Disposition" => 'inline; filename="tap-'.$report_id.'.tap"'); |
22
|
|
|
|
|
|
|
} |
23
|
0
|
0
|
|
|
|
|
$c->response->body ($report->tap ? $report->tap->tap : "Error: No TAP for report $report_id."); |
24
|
|
|
|
|
|
|
} else { |
25
|
0
|
|
|
|
|
|
$c->response->content_type ("text/plain"); |
26
|
0
|
|
|
|
|
|
$c->response->header ("Content-Disposition" => 'inline; filename="nonexistent.report.tap.'.$report_id.'"'); |
27
|
0
|
|
|
|
|
|
$c->response->body ("Error: No report $report_id."); |
28
|
|
|
|
|
|
|
} |
29
|
10
|
|
|
10
|
|
2869
|
} |
|
10
|
|
|
|
|
32
|
|
|
10
|
|
|
|
|
66
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=encoding UTF-8 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Tapper::Reports::Web::Controller::Tapper::Reports::Tap |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 AUTHORS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=over 4 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=item * |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
AMD OSRC Tapper Team <tapper@amd64.org> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item * |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Tapper Team <tapper-ops@amazon.com> |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=back |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This software is Copyright (c) 2019 by Advanced Micro Devices, Inc.. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This is free software, licensed under: |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
The (two-clause) FreeBSD License |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |