line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::OptimalQuery::InteractiveQuery; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
645
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
5
|
1
|
|
|
1
|
|
3
|
no warnings qw( uninitialized ); |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
22
|
|
6
|
1
|
|
|
1
|
|
3
|
use base 'CGI::OptimalQuery::Base'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
2452
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
0
|
|
|
0
|
0
|
|
my $pack = shift; |
10
|
0
|
|
|
|
|
|
my $o = $pack->SUPER::new(@_); |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
0
|
|
|
|
$$o{schema}{options}{'CGI::OptimalQuery::InteractiveQuery'}{WindowWidth} ||= 800; |
13
|
0
|
|
0
|
|
|
|
$$o{schema}{options}{'CGI::OptimalQuery::InteractiveQuery'}{WindowHeight} ||= 600; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
return $o; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub get_defaultCSS { |
22
|
0
|
|
|
0
|
0
|
|
return <
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
#OQinfo tr td { border: 1px solid #efefef; } |
25
|
|
|
|
|
|
|
#OQinfo tr td.OQinfoName { border: 1px solid #666666; } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
#OQdataLHead { |
28
|
|
|
|
|
|
|
background-color: #efefef; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
td.OQinfoName { |
32
|
|
|
|
|
|
|
width: 1%; |
33
|
|
|
|
|
|
|
font-size: 13px; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
.OQinfoVal { |
37
|
|
|
|
|
|
|
background-color: white !important; |
38
|
|
|
|
|
|
|
font-size: 13px; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
#OQtitle { |
42
|
|
|
|
|
|
|
width: 40%; |
43
|
|
|
|
|
|
|
padding-left: 10px !important; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
#OQhead td { |
47
|
|
|
|
|
|
|
padding: 4px !important; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
/* workaround: too bad 'text-align: center' does not work */ |
51
|
|
|
|
|
|
|
table.OQpager { |
52
|
|
|
|
|
|
|
margin-left: auto; |
53
|
|
|
|
|
|
|
margin-right: auto; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
.OQcolHeadTitle { |
57
|
|
|
|
|
|
|
font-size: 1.1em; |
58
|
|
|
|
|
|
|
color: black; |
59
|
|
|
|
|
|
|
font-weight: bold; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
#OQdata tr td { |
63
|
|
|
|
|
|
|
border-right: 1px solid #efefef; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
#OQhead, #OQinfo, #OQdata { |
67
|
|
|
|
|
|
|
width: 100%; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
#OQdoc td { |
72
|
|
|
|
|
|
|
padding: 2px 5px 2px 5px; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
#OQhead { |
77
|
|
|
|
|
|
|
background-color: #666666; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
#OQhead td { |
81
|
|
|
|
|
|
|
color: white; |
82
|
|
|
|
|
|
|
padding: 0px; |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
#OQdoc button { |
86
|
|
|
|
|
|
|
cursor: pointer; |
87
|
|
|
|
|
|
|
background-color: #dddddd; |
88
|
|
|
|
|
|
|
border: 1px outset #333333; |
89
|
|
|
|
|
|
|
font-size: .8em; |
90
|
|
|
|
|
|
|
color: #111111; |
91
|
|
|
|
|
|
|
padding: 0px; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
#OQsummary { |
95
|
|
|
|
|
|
|
width: 30% |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
#OQcmds button { |
99
|
|
|
|
|
|
|
margin-right: 2px; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
div.OQcolCmds button { |
103
|
|
|
|
|
|
|
font-size: 10px; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
div.OQcolCmds button { |
106
|
|
|
|
|
|
|
margin-right: 1px; |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
div.OQcolCmds select { |
109
|
|
|
|
|
|
|
margin-top: 3px; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
#OQinfo { |
113
|
|
|
|
|
|
|
background-color: #cccccc; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
tr.OQdataRowTypeEven { |
117
|
|
|
|
|
|
|
background-color: white; |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
tr.OQdataRowTypeOdd { |
121
|
|
|
|
|
|
|
background-color: #cccccc; |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
td.OQdataRCol { |
125
|
|
|
|
|
|
|
width: 1%; |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
#OQcmds { |
129
|
|
|
|
|
|
|
text-align: right; |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
td.OQdataLCol { width: 1%; } |
133
|
|
|
|
|
|
|
tr.OQupdatedRow { background-color: #ffdddd } |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
td.OQcolHeader { white-space: nowrap } |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
.OQaddColButton, .OQsortAscButton, .OQsortDescButton, .OQfilterCol, .OQcloseButton{ |
138
|
|
|
|
|
|
|
width: 15px; height: 16px; margin: 0; margin-right: 8px !important; padding: 0; |
139
|
|
|
|
|
|
|
border: 0 !important; text-indent: -1000em; |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
.OQaddColButton { background: transparent url(/OptimalQuery/add.gif) no-repeat center top; } |
143
|
|
|
|
|
|
|
.OQsortAscButton { background: transparent url(/OptimalQuery/sortDown.gif) no-repeat center top; } |
144
|
|
|
|
|
|
|
.OQsortDescButton { background: transparent url(/OptimalQuery/sortUp.gif) no-repeat center top; } |
145
|
|
|
|
|
|
|
.OQfilterCol { background: transparent url(/OptimalQuery/filter.gif) no-repeat center top; } |
146
|
|
|
|
|
|
|
.OQcloseButton { background: transparent url(/OptimalQuery/close.gif) no-repeat center top; } |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
#cmdOptions { |
149
|
|
|
|
|
|
|
margin-top: 10px; |
150
|
|
|
|
|
|
|
position: absolute; |
151
|
|
|
|
|
|
|
width: 20em; |
152
|
|
|
|
|
|
|
height: 16em; |
153
|
|
|
|
|
|
|
right: 20px; |
154
|
|
|
|
|
|
|
background-color: #efefef; |
155
|
|
|
|
|
|
|
border: 4px groove #666666; |
156
|
|
|
|
|
|
|
padding-right: 8px; |
157
|
|
|
|
|
|
|
padding-left: 8px; |
158
|
|
|
|
|
|
|
padding-bottom: 8px; |
159
|
|
|
|
|
|
|
font-size: .8em; |
160
|
|
|
|
|
|
|
color: #444444; |
161
|
|
|
|
|
|
|
overflow: auto; |
162
|
|
|
|
|
|
|
display: none; |
163
|
|
|
|
|
|
|
} |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
#cmdOptions button.closeButton { |
166
|
|
|
|
|
|
|
position: absolute; |
167
|
|
|
|
|
|
|
right: 0; |
168
|
|
|
|
|
|
|
color: black; |
169
|
|
|
|
|
|
|
font-weight: bold; |
170
|
|
|
|
|
|
|
padding: 0px; |
171
|
|
|
|
|
|
|
margin: 0px; |
172
|
|
|
|
|
|
|
background-color: white; |
173
|
|
|
|
|
|
|
border: 1px outset black; |
174
|
|
|
|
|
|
|
text-align: center; |
175
|
|
|
|
|
|
|
vertical-align: middle; |
176
|
|
|
|
|
|
|
cursor: pointer; |
177
|
|
|
|
|
|
|
font-size: .8em; |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
#cmdOptions h1 { |
181
|
|
|
|
|
|
|
color: #222222; |
182
|
|
|
|
|
|
|
margin: 0px; |
183
|
|
|
|
|
|
|
font-size: 1.2em; |
184
|
|
|
|
|
|
|
padding: 0; |
185
|
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
#cmdOptions span.note { |
188
|
|
|
|
|
|
|
font-size: .7em; |
189
|
|
|
|
|
|
|
} |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
#OQdata { border-bottom: 1px solid #666666; } |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
#OQkey button { margin-left: 10px; } |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
TILEND |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
|
213
|
0
|
|
|
0
|
0
|
|
sub can_embed { 1 } |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
sub getPager { |
216
|
0
|
|
|
0
|
0
|
|
my $o = shift; |
217
|
|
|
|
|
|
|
|
218
|
0
|
|
|
|
|
|
my $doc = " |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
"; |
277
|
|
|
|
|
|
|
|
278
|
0
|
|
|
|
|
|
return $doc; |
279
|
|
|
|
|
|
|
} |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
sub output { |
283
|
0
|
|
|
0
|
0
|
|
my $o = shift; |
284
|
0
|
|
|
|
|
|
my $current_pack = __PACKAGE__; |
285
|
0
|
0
|
|
|
|
|
my %opts = %{ $$o{schema}{options}{$current_pack} } if exists $$o{schema}{options}{$current_pack}; |
|
0
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
|
287
|
0
|
0
|
|
|
|
|
$opts{httpHeader} = $$o{q}->header('text/html') if ! exists $opts{httpHeader}; |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
|
290
|
0
|
|
|
|
|
|
my $inlineCSS = "\n\n"; |
325
|
0
|
0
|
|
|
|
|
if (!($opts{htmlHeader} =~ s/(<\/head>)/$inlineCSS$1/i)) { |
326
|
0
|
|
|
|
|
|
$opts{htmlHeader} .= $inlineCSS; |
327
|
|
|
|
|
|
|
} |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
$opts{htmlFooter} = " |