line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Monitis::TransactionMonitors; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
5
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
6
|
|
|
|
|
|
|
require Carp; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use base 'Monitis'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1074
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub suspend { |
11
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
my @mandatory = qw//; |
14
|
0
|
|
|
|
|
|
my @optional = qw/monitorIds tag/; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
return $self->api_post('suspendTransactionMonitor' => $params); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub activate { |
22
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my @mandatory = qw//; |
25
|
0
|
|
|
|
|
|
my @optional = qw/monitorIds tag/; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
return $self->api_post('activateTransactionMonitor' => $params); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub get { |
33
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
my @mandatory = qw//; |
36
|
0
|
|
|
|
|
|
my @optional = qw/type/; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
return $self->api_get('transactionTests' => $params); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub get_monitor_info { |
44
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
my @mandatory = qw/monitorId/; |
47
|
0
|
|
|
|
|
|
my @optional = qw//; |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
return $self->api_get('transactionTestInfo' => $params); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub get_monitor_result { |
55
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
my @mandatory = qw/monitorId year month day/; |
58
|
0
|
|
|
|
|
|
my @optional = qw/locationIds timezone/; |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
return $self->api_get('transactionTestResult' => $params); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub get_step_result { |
66
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
my @mandatory = qw/resultId/; |
69
|
0
|
|
|
|
|
|
my @optional = qw//; |
70
|
|
|
|
|
|
|
|
71
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
72
|
|
|
|
|
|
|
|
73
|
0
|
|
|
|
|
|
return $self->api_get('transactionStepResult' => $params); |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub get_step_capture { |
77
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
78
|
|
|
|
|
|
|
|
79
|
0
|
|
|
|
|
|
my @mandatory = qw/monitorId resultId/; |
80
|
0
|
|
|
|
|
|
my @optional = qw//; |
81
|
|
|
|
|
|
|
|
82
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
# TODO: Handling PNG should be tested! |
85
|
0
|
|
|
|
|
|
my $request = |
86
|
|
|
|
|
|
|
$self->build_get_request('transactionStepCapture' => $params); |
87
|
|
|
|
|
|
|
|
88
|
0
|
|
|
|
|
|
my $response = $self->ua->request($request); |
89
|
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
|
return $response->decoded_content; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub get_step_net { |
94
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
95
|
|
|
|
|
|
|
|
96
|
0
|
|
|
|
|
|
my @mandatory = qw/resultId year month day/; |
97
|
0
|
|
|
|
|
|
my @optional = qw//; |
98
|
|
|
|
|
|
|
|
99
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
100
|
|
|
|
|
|
|
|
101
|
0
|
|
|
|
|
|
return $self->api_get('transactionStepNet' => $params); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
__END__ |