1 #------------------------------------------------------------------------
2 # Compiled template generated by the Template Toolkit version 2.14
3 #------------------------------------------------------------------------
5 Template::Document->new({
7 'modtime' => '1127835909',
8 'name' => 'dashboard.tt',
11 my $context = shift || die "template sub called without context\n";
12 my $stash = $context->stash;
17 #line 1 "/home/community/pgbuildfarm/templates/dashboard.tt"
18 $stash->set('flag_imgs', { 'perl' => '/img/camel.png', 'python' => '/img/python.png', 'debug' => '/img/bug.png', 'pam' => '/img/pam.png', 'cassert' => '/img/cassert.png', 'openssl' => '/img/ssl_icon.gif', 'nls' => '/img/translateicon.gif', 'krb5' => '/img/krb.gif', 'tcl' => '/img/tcl.png', 'thread-safety' => '/img/threads.gif', 'integer-datetimes' => '/img/days.png' });
21 $output .= "\n<div id=\"main\">\n <h1>PostgreSQL BuildFarm Status</h1>\n <p>\n Shown here is the latest status of each farm member \n for each branch it has reported on in the last 30 days.\n </p>\n <p>\n Use the farm member link for history of that member \n on the relevant branch.\n </p>\n<table><tr><th class=\"head\" rowspan=\"2\">Legend</th>\n";
22 #line 45 "/home/community/pgbuildfarm/templates/dashboard.tt"
26 my ($value, $error, $oldloop);
27 my $list = $stash->get('flag_imgs');
29 unless (UNIVERSAL::isa($list, 'Template::Iterator')) {
30 $list = Template::Config->iterator($list)
31 || die $Template::Config::ERROR, "\n";
34 ($value, $error) = $list->get_first();
35 eval { $oldloop = $stash->get('loop') };
36 $stash->set('loop', $list);
38 LOOP: while (! $error) {
39 $stash->{'flagset'} = $value;
40 $output .= "\n<td><img src=\"";
41 #line 43 "/home/community/pgbuildfarm/templates/dashboard.tt"
42 $output .= $stash->get(['flagset', 0, 'value', 0]);
43 $output .= "\" title=\"";
44 #line 43 "/home/community/pgbuildfarm/templates/dashboard.tt"
45 $output .= $stash->get(['flagset', 0, 'key', 0]);
46 $output .= "\" alt=\"";
47 #line 43 "/home/community/pgbuildfarm/templates/dashboard.tt"
48 $output .= $stash->get(['flagset', 0, 'key', 0]);
49 $output .= "\" height=\"16\" width=\"16\" class=\"inline\" align=\"center\"/> = ";
50 #line 43 "/home/community/pgbuildfarm/templates/dashboard.tt"
51 $output .= $stash->get(['flagset', 0, 'key', 0]);
53 #line 44 "/home/community/pgbuildfarm/templates/dashboard.tt"
54 if ($stash->get(['loop', 0, 'count', 0]) eq 5) {
55 $output .= "</tr><tr>";
59 ($value, $error) = $list->get_next();
62 $stash->set('loop', $oldloop);
64 $error = 0 if $error && $error eq Template::Constants::STATUS_DONE;
68 $output .= "\n</tr></table>\n<br />\n <table cellspacing=\"0\">\n";
69 #line 49 "/home/community/pgbuildfarm/templates/dashboard.tt"
70 $stash->set('brch', '');
72 #line 81 "/home/community/pgbuildfarm/templates/dashboard.tt"
76 my ($value, $error, $oldloop);
77 my $list = $stash->get('statrows');
79 unless (UNIVERSAL::isa($list, 'Template::Iterator')) {
80 $list = Template::Config->iterator($list)
81 || die $Template::Config::ERROR, "\n";
84 ($value, $error) = $list->get_first();
85 eval { $oldloop = $stash->get('loop') };
86 $stash->set('loop', $list);
88 LOOP: while (! $error) {
89 $stash->{'row'} = $value;
91 #line 54 "/home/community/pgbuildfarm/templates/dashboard.tt"
92 if ($stash->get(['row', 0, 'branch', 0]) ne $stash->get('brch')) {
93 #line 51 "/home/community/pgbuildfarm/templates/dashboard.tt"
94 $stash->set('brch', $stash->get(['row', 0, 'branch', 0]));
95 $output .= "\n<tr><th class=\"head\" colspan=\"4\">Branch: ";
96 #line 52 "/home/community/pgbuildfarm/templates/dashboard.tt"
97 $output .= $stash->get('brch');
98 $output .= "</th></tr>\n<tr><th>Alias</th><th>System</th><th>Status</th><th>Flags</th></tr>\n";
102 #line 55 "/home/community/pgbuildfarm/templates/dashboard.tt"
103 $output .= $context->process('cl', { 'bgfor' => $stash->get(['row', 0, 'stage', 0]) });
104 $output .= ">\n <td><a \n href=\"show_history.pl?nm=";
105 #line 57 "/home/community/pgbuildfarm/templates/dashboard.tt"
106 $output .= $stash->get(['row', 0, 'sysname', 0]);
107 $output .= "&br=";
108 #line 57 "/home/community/pgbuildfarm/templates/dashboard.tt"
109 $output .= $stash->get(['row', 0, 'branch', 0]);
110 $output .= "\"\n title=\"History\"\n >";
111 #line 59 "/home/community/pgbuildfarm/templates/dashboard.tt"
112 $output .= $stash->get(['row', 0, 'sysname', 0]);
113 $output .= "</a></td>\n <td><span class=\"opsys\">";
114 #line 60 "/home/community/pgbuildfarm/templates/dashboard.tt"
115 $output .= $stash->get(['row', 0, 'operating_system', 0]);
117 #line 61 "/home/community/pgbuildfarm/templates/dashboard.tt"
118 $output .= $stash->get(['row', 0, 'os_version', 0]);
119 $output .= "</span> <span class=\"compiler\">";
120 #line 63 "/home/community/pgbuildfarm/templates/dashboard.tt"
121 $output .= $stash->get(['row', 0, 'compiler', 0]);
123 #line 64 "/home/community/pgbuildfarm/templates/dashboard.tt"
124 $output .= $stash->get(['row', 0, 'compiler_version', 0]);
125 $output .= "</span> <span class=\"arch\">";
126 #line 66 "/home/community/pgbuildfarm/templates/dashboard.tt"
127 $output .= $stash->get(['row', 0, 'architecture', 0]);
128 $output .= "</span></td>\n <td class=\"status\">";
129 #line 69 "/home/community/pgbuildfarm/templates/dashboard.tt"
134 my $filter = $context->filter('replace', [ '\s', ' ' ])
135 || $context->throw($context->error);
137 $output .= $stash->get(['row', 0, 'when_ago', 0]);
142 $output .= " ago \n ";
143 #line 70 "/home/community/pgbuildfarm/templates/dashboard.tt"
144 $output .= $stash->get(['row', 0, 'stage', 0]);
145 $output .= " <a href=\"show_log.pl?nm=";
146 #line 73 "/home/community/pgbuildfarm/templates/dashboard.tt"
147 $output .= $stash->get(['row', 0, 'sysname', 0]);
148 $output .= "&dt=";
149 #line 75 "/home/community/pgbuildfarm/templates/dashboard.tt"
154 my $filter = $context->filter('uri')
155 || $context->throw($context->error);
157 $output .= $stash->get(['row', 0, 'snapshot', 0]);
163 #line 77 "/home/community/pgbuildfarm/templates/dashboard.tt"
164 if ($stash->get(['row', 0, 'stage', 0]) ne 'OK') {
165 $output .= "Details";
171 $output .= "</a></td>\n\n <td class=\"flags\">";
172 #line 79 "/home/community/pgbuildfarm/templates/dashboard.tt"
176 my ($value, $error, $oldloop);
177 my $list = $stash->get(['row', 0, 'build_flags', 0, 'split', 0, 'sort', 0]);
179 unless (UNIVERSAL::isa($list, 'Template::Iterator')) {
180 $list = Template::Config->iterator($list)
181 || die $Template::Config::ERROR, "\n";
184 ($value, $error) = $list->get_first();
185 eval { $oldloop = $stash->get('loop') };
186 $stash->set('loop', $list);
188 LOOP: while (! $error) {
189 $stash->{'flag'} = $value;
190 #line 79 "/home/community/pgbuildfarm/templates/dashboard.tt"
191 $output .= $context->process('img');;
192 ($value, $error) = $list->get_next();
195 $stash->set('loop', $oldloop);
197 $error = 0 if $error && $error eq Template::Constants::STATUS_DONE;
198 die $error if $error;
201 $output .= "</td>\n</tr>\n";;
202 ($value, $error) = $list->get_next();
205 $stash->set('loop', $oldloop);
207 $error = 0 if $error && $error eq Template::Constants::STATUS_DONE;
208 die $error if $error;
211 $output .= "\n </table>\n</div>\n\n";
214 $error = $context->catch($@, \$output);
215 die $error unless $error->type eq 'return';
222 my $context = shift || die "template sub called without context\n";
223 my $stash = $context->stash;
228 $output .= " class=\"";
229 #line 27 "/home/community/pgbuildfarm/templates/dashboard.tt"
233 my $result = $stash->get('bgfor');
237 $match = [ $match ] unless ref $match eq 'ARRAY';
238 if (grep(/^$result$/, @$match)) {
242 $match = 'ContribCheck';
243 $match = [ $match ] unless ref $match eq 'ARRAY';
244 if (grep(/^$result$/, @$match)) {
248 $match = [ 'Check', 'InstallCheck' ];
249 $match = [ $match ] unless ref $match eq 'ARRAY';
250 if (grep(/^$result$/, @$match)) {
261 $error = $context->catch($@, \$output);
262 die $error unless $error->type eq 'return';
268 my $context = shift || die "template sub called without context\n";
269 my $stash = $context->stash;
274 #line 22 "/home/community/pgbuildfarm/templates/dashboard.tt"
275 if ($stash->get('flag') eq 'depend' || $stash->get('flag') eq 'gnu-ld') {
278 elsif ($stash->get(['flag_imgs', 0, $stash->get('flag'), 0])) {
279 #line 22 "/home/community/pgbuildfarm/templates/dashboard.tt"
284 my $filter = $context->filter('collapse')
285 || $context->throw($context->error);
287 $output .= "<img src=\"";
288 #line 19 "/home/community/pgbuildfarm/templates/dashboard.tt"
289 $output .= $stash->get(['flag_imgs', 0, $stash->get('flag'), 0]);
290 $output .= "\" \n title=\"";
291 #line 20 "/home/community/pgbuildfarm/templates/dashboard.tt"
292 $output .= $stash->get('flag');
293 $output .= "\" alt=\"";
294 #line 20 "/home/community/pgbuildfarm/templates/dashboard.tt"
295 $output .= $stash->get('flag');
296 $output .= "\" \n height=\"16\" width=\"16\" class=\"inline\" align=\"bottom\" /> \n ";
305 $error = $context->catch($@, \$output);
306 die $error unless $error->type eq 'return';