View | Details | Raw Unified | Return to bug 208422 | Differences between
and this patch

Collapse All | Expand All

(-)createIndex4x.php 2012-06-14 13:31:16.000000000 -0400 (-67 / +78 lines)
Lines 97-103 Link Here
97
    // hard code for now the tests ran on one box
97
    // hard code for now the tests ran on one box
98
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=378706
98
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=378706
99
    return 1;
99
    return 1;
100
101
    global $subdirDrops;
100
    global $subdirDrops;
102
    $testBoxes=array("linux", "macosx", "win32");
101
    $testBoxes=array("linux", "macosx", "win32");
103
    $length=count($testBoxes);
102
    $length=count($testBoxes);
Lines 140-155 Link Here
140
    $time=intval(date("H"))*60+intval(date("i"));
139
    $time=intval(date("H"))*60+intval(date("i"));
141
    $diff=($day-$buildDay)*24*60+$time-$buildTime;
140
    $diff=($day-$buildDay)*24*60+$time-$buildTime;
142
    // Add icons
141
    // Add icons
143
    // SHORT TERM? Since "old builds", not from scratch, don't have these swt md5s, well use an easy indicator file, for now. 
144
    // eventually may want to put in more complicated logic to check for date, or something?  
145
    // presumably this particular md5 was choosen since last one made, I'd guess? 
146
    //$build_done=file_exists("$dropDir/checksum/swt-$buildName-win32-wce_ppc-arm-j2me.zip.md5");
147
    $build_done=file_exists("$dropDir/eclipse-SDK-$buildName-linux-gtk.tar.gz");
148
    echo "<td valign=\"baseline\">\n";
142
    echo "<td valign=\"baseline\">\n";
149
    // hard code for now the build is done
143
    // hard code for now the build is done
150
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=378706
144
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=378706
151
    // if ($build_done) {
145
    // but later, changed ...
152
    if (true) {
146
    // compute build done based on "buildPending" file, but if not 
147
    // present, assume build is done
148
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=382196
149
    $build_done=true;
150
    if (file_exists("$dropDir/buildPending")) {
151
        $build_done=false;
152
    }
153
    if ($build_done) {
153
        $boxes=runTestBoxes($fileName);
154
        $boxes=runTestBoxes($fileName);
154
        echo "<a href=\"$dropDir/\"><img border=\"0\" src=\"../images/build_done.gif\" title=\"Build is available\" alt=\"Build is available\" /></a>\n";
155
        echo "<a href=\"$dropDir/\"><img border=\"0\" src=\"../images/build_done.gif\" title=\"Build is available\" alt=\"Build is available\" /></a>\n";
155
        //$testResults="$dropDir/testresults/xml";
156
        //$testResults="$dropDir/testresults/xml";
Lines 227-269 Link Here
227
    if ($anEntry != "." && $anEntry!=".." && $anEntry!="TIME" && startsWithDropPrefix($anEntry,$dropPrefix)) {
228
    if ($anEntry != "." && $anEntry!=".." && $anEntry!="TIME" && startsWithDropPrefix($anEntry,$dropPrefix)) {
228
        $parts = explode("-", $anEntry);
229
        $parts = explode("-", $anEntry);
229
        // echo "<p>an entry: $anEntry\n";
230
        // echo "<p>an entry: $anEntry\n";
230
        if (count($parts) == 3) {
231
        // do not count hidden directories in computation
231
232
        // allows non-hidden ones to still show up as "most recent" else will be blank.
232
            $buckets[$parts[0]][] = $anEntry;
233
        if (!file_exists($subdirDrops."/".$anEntry."/buildHidden")) {
233
234
            if (count($parts) == 3) {
234
            $timePart = $parts[2];
235
235
            $year = substr($timePart, 0, 4);
236
                $buckets[$parts[0]][] = $anEntry;
236
            $month = substr($timePart, 4, 2);
237
237
            $day = substr($timePart, 6, 2);
238
                $timePart = $parts[2];
238
            $hour = substr($timePart,8,2);
239
                $year = substr($timePart, 0, 4);
239
            $minute = substr($timePart,10,2);
240
                $month = substr($timePart, 4, 2);
240
            $timeStamp = mktime($hour, $minute, 0, $month, $day, $year);
241
                $day = substr($timePart, 6, 2);
241
242
                $hour = substr($timePart,8,2);
242
            $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp);
243
                $minute = substr($timePart,10,2);
243
            // latestTimeStamp will not be defined, first time through
244
                $timeStamp = mktime($hour, $minute, 0, $month, $day, $year);
244
            if (!isset($latestTimeStamp) || !array_key_exists($parts[0],$latestTimeStamp)  || $timeStamp > $latestTimeStamp[$parts[0]]) {
245
245
                $latestTimeStamp[$parts[0]] = $timeStamp;
246
                $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp);
246
                $latestFile[$parts[0]] = $anEntry;
247
                // latestTimeStamp will not be defined, first time through
248
                if (!isset($latestTimeStamp) || !array_key_exists($parts[0],$latestTimeStamp)  || $timeStamp > $latestTimeStamp[$parts[0]]) {
249
                    $latestTimeStamp[$parts[0]] = $timeStamp;
250
                    $latestFile[$parts[0]] = $anEntry;
251
                }
247
            }
252
            }
248
        }
249
253
250
        if (count($parts) == 2) {
254
            if (count($parts) == 2) {
251
255
252
            $buildType=substr($parts[0],0,1);
256
                $buildType=substr($parts[0],0,1);
253
            $buckets[$buildType][] = $anEntry;
257
                $buckets[$buildType][] = $anEntry;
254
            $datePart = substr($parts[0],1);
258
                $datePart = substr($parts[0],1);
255
            $timePart = $parts[1];
259
                $timePart = $parts[1];
256
            $year = substr($datePart, 0, 4);
260
                $year = substr($datePart, 0, 4);
257
            $month = substr($datePart, 4, 2);
261
                $month = substr($datePart, 4, 2);
258
            $day = substr($datePart, 6, 2);
262
                $day = substr($datePart, 6, 2);
259
            $hour = substr($timePart,0,2);
263
                $hour = substr($timePart,0,2);
260
            $minute = substr($timePart,2,2);
264
                $minute = substr($timePart,2,2);
261
            $timeStamp = mktime($hour, $minute, 0, $month, $day, $year);
265
                $timeStamp = mktime($hour, $minute, 0, $month, $day, $year);
262
            $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp);
266
                $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp);
263
267
264
            if (!isset($latestTimeStamp) || !array_key_exists($buildType,$latestTimeStamp) || $timeStamp > $latestTimeStamp[$buildType]) {
268
                if (!isset($latestTimeStamp) || !array_key_exists($buildType,$latestTimeStamp) || $timeStamp > $latestTimeStamp[$buildType]) {
265
                $latestTimeStamp[$buildType] = $timeStamp;
269
                    $latestTimeStamp[$buildType] = $timeStamp;
266
                $latestFile[$buildType] = $anEntry;
270
                    $latestFile[$buildType] = $anEntry;
271
                }
267
            }
272
            }
268
        }
273
        }
269
    }
274
    }
Lines 289-296 Link Here
289
    $prefix=$typeToPrefix[$value];
294
    $prefix=$typeToPrefix[$value];
290
    // if empty bucket, do not print this row
295
    // if empty bucket, do not print this row
291
    if (array_key_exists($prefix,$buckets)) {
296
    if (array_key_exists($prefix,$buckets)) {
292
        echo "<tr>\n";
293
        echo "<td width=\"30%\">$value</td>\n";
294
297
295
298
296
        if (array_key_exists($prefix,$latestFile)) {
299
        if (array_key_exists($prefix,$latestFile)) {
Lines 307-320 Link Here
307
        if (count($parts)==3) {
310
        if (count($parts)==3) {
308
            $buildName=$parts[1];
311
            $buildName=$parts[1];
309
        }
312
        }
310
        if ($fileName == "") {
313
        if (!file_exists($subdirDrops."/".$fileName."/buildHidden")) {
311
            echo "<td></td>\n";
314
            echo "<tr>\n";
312
        } else {
315
            echo "<td width=\"30%\">$value</td>\n";
313
            echo "<td><a href=\"$subdirDrops/$fileName/\">$buildName</a></td>\n";
316
            if ($fileName == "") {
317
                echo "<td></td>\n";
318
            } else {
319
                echo "<td><a href=\"$subdirDrops/$fileName/\">$buildName</a></td>\n";
320
            }
321
            $buildName = printBuildColumns($fileName, $parts);
322
            echo "<td>$timeStamps[$fileName]</td>\n";
323
            echo "</tr>\n";
314
        }
324
        }
315
        $buildName = printBuildColumns($fileName, $parts);
316
        echo "<td>$timeStamps[$fileName]</td>\n";
317
        echo "</tr>\n";
318
    }
325
    }
319
}
326
}
320
?> 
327
?> 
Lines 357-382 Link Here
357
        if (isset($aBucket)) {
364
        if (isset($aBucket)) {
358
            rsort($aBucket);
365
            rsort($aBucket);
359
            foreach($aBucket as $innerValue) {
366
            foreach($aBucket as $innerValue) {
360
                $parts = explode("-", $innerValue);
361
367
362
                echo "<tr>\n";
368
                if (!file_exists($subdirDrops."/".$innerValue."/buildHidden")) {
363
369
364
                // Uncomment the line below if we need click through licenses.
370
                    $parts = explode("-", $innerValue);
365
                // echo "<td><a href=\"license.php?license=$subdirDrops/$innerValue\">$parts[1]</a></td>\n";
366
371
367
                // Comment the line below if we need click through licenses.
372
                    echo "<tr>\n";
368
                $buildName=$innerValue;
373
369
                if (count ($parts)==3) {
374
                    // Uncomment the line below if we need click through licenses.
370
                    echo "<td><a href=\"$subdirDrops/$innerValue/\">$parts[1]</a></td>\n";
375
                    // echo "<td><a href=\"license.php?license=$subdirDrops/$innerValue\">$parts[1]</a></td>\n";
371
                } else if (count ($parts)==2) {
372
                    echo "<td><a href=\"$subdirDrops/$innerValue/\">$innerValue</a></td>\n";
373
                } else {
374
                    echo "<td>Unexpected numberof parts?</td>\n";
375
                }
376
376
377
                $buildName = printBuildColumns($innerValue, $parts);
377
                    // Comment the line below if we need click through licenses.
378
                echo "<td>$timeStamps[$innerValue]</td>\n";
378
                    $buildName=$innerValue;
379
                echo "</tr>\n";
379
                    if (count ($parts)==3) {
380
                        echo "<td><a href=\"$subdirDrops/$innerValue/\">$parts[1]</a></td>\n";
381
                    } else if (count ($parts)==2) {
382
                        echo "<td><a href=\"$subdirDrops/$innerValue/\">$innerValue</a></td>\n";
383
                    } else {
384
                        echo "<td>Unexpected numberof parts?</td>\n";
385
                    }
386
387
                    $buildName = printBuildColumns($innerValue, $parts);
388
                    echo "<td>$timeStamps[$innerValue]</td>\n";
389
                    echo "</tr>\n";
390
                }
380
            }
391
            }
381
        }
392
        }
382
        echo "</table>\n";
393
        echo "</table>\n";

Return to bug 208422