index.php 24 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
 * Copyright (c) 2010 - 2020, ETH Zurich, Computer Engineering Group
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * * Redistributions of source code must retain the above copyright notice, this
 *   list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 * * Neither the name of the copyright holder nor the names of its
 *   contributors may be used to endorse or promote products derived from
 *   this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 */
33
34
35
36
?>
<?php require_once('include/layout.php');require_once('include/presets.php'); ?>
<script type="text/javascript" src="scripts/jquery.cookie.js"></script>
<script type="text/javascript">
Reto Da Forno's avatar
Reto Da Forno committed
37
38
39
    function getResult(testid, timeout) {
        // hide ui
        if ($(".dlpane").length == 0) {
40
            $("body").first().prepend('<div class="dlpane" style="position:absolute;margin:0;z-index:10000;width:100%;height:100%;background-color:#000;opacity:0.4;filter:alpha(opacity=40);"><\/div>'+
Reto Da Forno's avatar
Reto Da Forno committed
41
42
43
44
            '<div class="dlpane" style="position:absolute;font-family: Verdana, Arial, Helvetica, sans-serif;width:100%;z-index:10001;background-color:gray"><div class="info" style="width:100%"><div style="float:left;"><img height="50" width="50" alt="" src="pics/icons/wait.gif"><\/div>'+
            '<p>Please wait while test results are being fetched (Id '+testid+'). Depending on the amount of data this could take several minutes.. <\/p><\/div><\/div>'
            );
        }
Reto Da Forno's avatar
Reto Da Forno committed
45
46
        // make ajax query
        $.ajax({
Reto Da Forno's avatar
Reto Da Forno committed
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
            type: "POST",
            url: "result_download_archive.php",
            data: { testid : testid },
            success: function(data) {
                switch (data.status) {
                case "fetching":
                // poll again
                setTimeout("getResult("+data.testid+", "+Math.min(1000,timeout + 100)+")",timeout);
                break;
                case "success":
                // redirect
                // new iframe
                var frame_id = 'download_'+(new Date()).getTime();
                $('body').append('<iframe style="display:none" name="'+frame_id+'">');
                // set target
                $("#downloadform").attr('target', frame_id);
                $("[name=testid]","#downloadform").first().val(data.testid);
                $("[name=query]","#downloadform").first().val("get");
                $("#downloadform").submit();
                // unhide ui
                $(".dlpane").remove();
                break;
                case "error":
                // unhide ui
                $(".dlpane").remove();
                alert("An error occurred: "+data.output);
73
                break;
Reto Da Forno's avatar
Reto Da Forno committed
74
75
76
                }
            },
            dataType: "json"
Reto Da Forno's avatar
Reto Da Forno committed
77
78
79
        });
    }
    
80
81
    var trackTestTimer;
    
Reto Da Forno's avatar
Reto Da Forno committed
82
83
84
85
86
87
88
89
90
91
92
    function trackTest(testid, status) {
        // make ajax query
        $.ajax({
            type: "GET",
            url: "test_feed.php",
            data: { testid : testid },
            success: function(data) {
                if (data.length==0 || data[0].test_status != status) {
                    document.location.href="index.php";
                }
                else {
93
                    trackTestTimer = setTimeout("trackTest("+testid+",\""+status+"\")", 5000);
Reto Da Forno's avatar
Reto Da Forno committed
94
95
96
                }
            },
            fail: function() {
97
                trackTestTimer = setTimeout("trackTest("+testid+",\""+status+"\")", 30000);
Reto Da Forno's avatar
Reto Da Forno committed
98
99
100
101
102
103
104
            },
            dataType: "json"
        });
    }
    
    var addedTests=Array();
    
105
106
    var refreshPageTimer;
    
Reto Da Forno's avatar
Reto Da Forno committed
107
108
    function trackNewTests() {
        // make ajax query
109
        var now = new Date();
Reto Da Forno's avatar
Reto Da Forno committed
110
111
112
113
114
115
116
117
118
119
120
121
122
123
        now=Math.round(now.getTime() / 1000 - 3600 + now.getTimezoneOffset()*60);
        var x = now;
        $.ajax({
            type: "GET",
            url: "test_feed.php",
            data: { updatesince : now },
            success: function(data) {
                $(data).each(function() {
                    var testid = parseInt(this.testid);
                    if ($.inArray(testid,addedTests)<0) {
                        // reload
                        document.location.href="index.php";
                    }
                });
124
                refreshPageTimer = setTimeout("trackNewTests()", 5000);
Reto Da Forno's avatar
Reto Da Forno committed
125
126
            },
            fail: function() {
127
                refreshPageTimer = setTimeout("trackNewTests()", 30000);
Reto Da Forno's avatar
Reto Da Forno committed
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
            },
            dataType: "json"
        });
    }
    
    function reschedule(el) {
        $("i.starttime>form").each(function() {
            var otime = $('input[name=starttime]', this).val();
            $(this).parent().bind("click",  function() {reschedule(this)});
            $(this).parent().empty().append(otime);
        });
        var otime = $(el).text();
        var testid = $("td:first-child", $(el).parents("tr")).text();
        $(el).empty().append('<form name="reschedule" method="post" action="test_edit.php"><input type="hidden" name="testid" value="'+testid+'"><input style="width:100%" name="starttime" type="text" value="'+otime+'"></form>')
        $(el).unbind("click");
    }
    
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
    var editingTitle = 0;
    var editingDesc  = 0;
    
    function editTitle(testid) {
        if (editingTitle == 0) {
            editingTitle = testid;
            clearTimeout(trackTestTimer);
            clearTimeout(refreshPageTimer);
            val = $("#title" + testid).text();
            $("#title" + testid).html("<input type='text' style='overflow:visible' id='newtitle" + testid + "' value='" + val + "' />");
        }
    }
    
    function editDesc(testid) {
        if (editingDesc == 0) {
            editingDesc = testid;
            clearTimeout(trackTestTimer);
            clearTimeout(refreshPageTimer);
            val = $("#desc" + testid).text();
            $("#desc" + testid).html("<input type='text' id='newdesc" + testid + "' value='" + val + "' />");
        }
    }
    
Reto Da Forno's avatar
Reto Da Forno committed
168
    $(document).ready(function() {
169
        var table_rows = Math.max(Math.floor(($(window).height() - 300) / 40),10);
170
        $("#pager_num_rows").attr('value', table_rows);
Reto Da Forno's avatar
Reto Da Forno committed
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
        $("#test_overview")
            .tablesorter({widgets: ["zebra"] })
            .tablesorterPager({container: $("#pager"), positionFixed: false});
        $(".qtip_show").qtip( {
            content: {text: false},
            style  : "flocklab",
        });
        $("#test_overview").show();
        $.cookie.json = true;
        var test_tbl_state;
         try { test_tbl_state = $.cookie('flocklab.testsort'); }
         catch (err) {
            test_tbl_state = null;
        }
        if ( test_tbl_state == null) {
            test_tbl_state = {s: [[0,1]], p: 0};
        }
        $("#test_overview").data('tablesorter').page = test_tbl_state.p;
        $("#test_overview").trigger("sorton",[test_tbl_state.s]);
190
        $("#test_overview").bind("applyWidgets",function() {
Reto Da Forno's avatar
Reto Da Forno committed
191
192
193
194
195
196
            $.cookie('flocklab.testsort', {s:$("#test_overview").data('tablesorter').sortList, p:$("#test_overview").data('tablesorter').page});
        });
        // time change for not yet running tests
        $("i.starttime").bind('click', function() {reschedule(this)});
        trackNewTests();
    });
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
    
    $(document).mousedown(function(evt) {
        if(editingTitle > 0 && evt.target.id != "newtitle" + editingTitle) {
            newtitle = $("#newtitle" + editingTitle).val();
            if (confirm("save changes?")) {
                $.post("api.php", "s=title&id=" + editingTitle + "&val=" + newtitle, function() { location.reload(); });
            }
            editingTitle = 0;
        }
        if(editingDesc > 0 && evt.target.id != "newdesc" + editingDesc) {
            newdesc = $("#newdesc" + editingDesc).val();
            if (confirm("save changes?")) {
                $.post("api.php", "s=desc&id=" + editingDesc + "&val=" + newdesc, function() { location.reload(); });
            }
            editingDesc = 0;
        }
    });
214
215
216
</script>
<?php
echo '<h1>Manage Tests for '.$_SESSION['firstname'] . ' ' . $_SESSION['lastname']. '</h1>';
Reto Da Forno's avatar
Reto Da Forno committed
217
218
                /* Get all test of the current user from the database and display them in the table. */
                $db = db_connect();
219
                $sql = "SELECT serv_tests_key, title, description, time_start_act, time_start_wish, time_end_act, time_end_wish, test_status, ExtractValue(testconfig_xml, 'testConf/targetConf/dbImageId') image_ids
Reto Da Forno's avatar
Reto Da Forno committed
220
221
222
223
224
225
226
227
228
229
230
231
232
233
                        FROM tbl_serv_tests 
                        WHERE owner_fk = " . $_SESSION['serv_users_key'] . " AND test_status <> 'deleted' AND test_status <> 'todelete'
                        ORDER BY serv_tests_key DESC";
                $rs = mysqli_query($db, $sql) or flocklab_die('Cannot get tests from database because: ' . mysqli_error($db));
                $nrows = mysqli_num_rows($rs);
                mysqli_close($db);
                
                // If there are no tests for this user, display a message instead of the table:
                if ($nrows == 0) {
                    echo "<p class='warning'><img alt='' src='pics/icons/att.png'>No test defined yet. Register your first test <a href='newtest.php'>here</a>.</p>";
                }
                // If there are tests for this user, display them (with alternating row coloring):
                else {
                    ?>
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
            <table>
              <tr>
                <td width="200px" class="transparentbg"><a style="color:#666666;text-decoration:none;" href="newtest.php"><span class="texticon">+</span> add new test</a></td>
                <td width="500px" style="text-align:center" class="transparentbg"><span id="pager" class="pager" style="text-align:right">
                      <span class="texticonsm first link bold" alt="first" title="first"><<</span>
                      <span class="texticonsm prev link bold" alt="prev" title="prev"><</span>
                      <span class="pagedisplay"></span>
                      <span class="texticonsm next link bold" alt="next" title="next">></span>
                      <span class="texticonsm last link bold" alt="last" title="last">>></span>
                      <input class="pagesize" style="visibility: hidden; width: 0px" id="pager_num_rows" value="15">
                    </span>
                </td>
                <td width="200px" class="transparentbg"></td>
              </tr>
            </table>
Reto Da Forno's avatar
Reto Da Forno committed
249
250
251
            <table id="test_overview" class="tablesorter" style="display:none">
                <thead>
                    <tr>
Reto Da Forno's avatar
Reto Da Forno committed
252
                        <th width="35px">ID</th>
253
                        <th width="100px">Title</th>
254
                        <th width="150px">Description</th>
255
                        <th width="30px">IMG</th>
Reto Da Forno's avatar
Reto Da Forno committed
256
257
258
259
                        <th width="35px" class='qtip_show' title='State'>State</th>
                        <th>Start</th>
                        <th>End</th>
                        <th width="80px" class='qtip_show' title='Actions'>Actions</th>
Reto Da Forno's avatar
Reto Da Forno committed
260
261
262
263
264
                    </tr>
                </thead>
                <tbody>
                <?php 
                    $i = 0;
265
                    $max_len = 60; // maximum length of text before being cut
Reto Da Forno's avatar
Reto Da Forno committed
266
267
268
269
270
                    $js = '';$all = array();
                    $now = new DateTime();
                    $now = $now->format('U');
                    while ($row = mysqli_fetch_array($rs)) {
                        // Find out the state of the test:
Reto Da Forno's avatar
Reto Da Forno committed
271
272
273
274
275
276
277
278
279
280
281
                        $schedulable  = true;
                        $planned      = false;
                        $running      = false;
                        $finished     = false;
                        $preparing    = false;
                        $cleaningup   = false;
                        $failed       = false;
                        $aborting     = false;
                        $syncing      = false;
                        $synced       = false;
                        $retentionexp = false;
Reto Da Forno's avatar
Reto Da Forno committed
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
                        switch($row['test_status']) {
                            case "planned":
                                $planned = true;
                                break;
                            case "preparing":
                                $preparing = true;
                                break;
                            case "running":
                                $running = true;
                                break;
                            case "cleaning up":
                                $cleaningup = true;
                                break;
                            case "finished":
                                $finished = true;
                                break;
                            case "not schedulable":
                                $schedulable = false;
                                break;
                            case "failed":
                                $failed = true;
                                break;
                            case "aborting":
                                $aborting = true;
                                break;
                            case "syncing":
                                $syncing = true;
                                break;
                            case "synced":
                                $synced = true;
                                break;
                            case "retention expiring":
                                $retentionexp = true;
                                break;
                        }
                        if ($row['test_status'] != "failed" && $row['test_status'] !="finished" && $row['test_status'] !="not schedulable" && $row['test_status'] !="retention expiring") {
                            $js .='setTimeout("trackTest('.$row['serv_tests_key'].',\"'.$row['test_status'].'\")", 3000);'."\n";
                        }
                        $all[]=$row['serv_tests_key'];
                        $i++;
                        if ($i%2 == 1) {
                            echo "<tr class='even'>";
                        } else {
                            echo "<tr class='odd'>";
                        }
                        echo "<td>" . $row['serv_tests_key'] . "</td>";
                        // Title. If longer than $max_len characters, display as tooltip:
329
                        echo "<td class='qtip_show' title='" . htmlentities($row['title']) . "' id='title".$row['serv_tests_key']."' ondblclick='editTitle(".$row['serv_tests_key'].")'>" . htmlentities($row['title']) . "</td>";
Reto Da Forno's avatar
Reto Da Forno committed
330
331
                        // Description. If longer than $max_len characters, display as tooltip:
                        if (strlen($row['description']) <= $max_len) 
332
                            echo "<td id='desc".$row['serv_tests_key']."' ondblclick='editDesc(".$row['serv_tests_key'].")'>" . htmlentities($row['description']) . "</td>";
Reto Da Forno's avatar
Reto Da Forno committed
333
                        else
334
                            echo "<td class='qtip_show' title='" . htmlentities($row['description']) . "' id='desc".$row['serv_tests_key']."' ondblclick='editDesc(".$row['serv_tests_key'].")'>" . htmlentities(substr($row['description'],0,$max_len)) . "...</td>";
335
336
                        // Image ID
                        echo "<td class='qtip_show' title='image IDs used in this test'>" . $row['image_ids'] . "</td>";
Reto Da Forno's avatar
Reto Da Forno committed
337
                        // Status
Reto Da Forno's avatar
Reto Da Forno committed
338
339
340
341
342
343
344
                        echo "<td>";
                        echo "<span style='display:none'>".$row['test_status']."</span>"; // needed to make cell sortable by JQuery
                        echo "<img src='".state_icon($row['test_status'])."' height='16px' alt='".state_short_description($row['test_status'])."' title='".state_long_description($row['test_status'])."' class='qtip_show' >";
                        echo "</td>";
                        // Start time: dependent of state of test
                        if ( $running || $cleaningup || $finished || $failed || $aborting || $syncing || $synced || $retentionexp) {
                            echo "<td title='Actual start time' class='qtip_show'>" . date_to_tzdate($row['time_start_act']). "</td>";
Reto Da Forno's avatar
Reto Da Forno committed
345
                        }
Reto Da Forno's avatar
Reto Da Forno committed
346
347
                        elseif ($preparing || $planned) {
                            echo "<td title='Planned start time' class='qtip_show'><i class='starttime'>" . date_to_tzdate($row['time_start_wish']). "</i></td>";
Reto Da Forno's avatar
Reto Da Forno committed
348
                        }
Reto Da Forno's avatar
Reto Da Forno committed
349
350
351
352
353
                        else
                            echo "<td title='Test is not schedulable' class='qtip_show'>n/a</td>";
                        // End time: dependent of state of test
                        if ($planned || $preparing || $running) {
                            echo "<td title='Planned end time' class='qtip_show'><i class='endtime'>" . date_to_tzdate($row['time_end_wish']). "</i></td>";
Reto Da Forno's avatar
Reto Da Forno committed
354
                        }
Reto Da Forno's avatar
Reto Da Forno committed
355
356
                        elseif ($cleaningup || $finished || $failed || $syncing  || $synced || $retentionexp) {
                            echo "<td title='Actual end time' class='qtip_show'>" . date_to_tzdate($row['time_end_act']). "</td>";
Reto Da Forno's avatar
Reto Da Forno committed
357
358
359
                        }
                        elseif ($aborting)
                            echo "<td title='Test is currently aborting' class='qtip_show'>n/a</td>";
Reto Da Forno's avatar
Reto Da Forno committed
360
361
362
363
364
365
366
367
                        elseif (!$schedulable)
                            echo "<td title='Test is not schedulable' class='qtip_show'>n/a</td>";
                        else
                            echo "<td title='Test is in unknown state' class='qtip_show'>n/a</td>";
                        // Actions: dependent of state of test
                        echo "<td>";
                        if ($planned) {
                            echo "<span style='display:none'>planned</span>"; // needed to make cell sortable by JQuery
Reto Da Forno's avatar
Reto Da Forno committed
368
369
                            echo "<img src='pics/icons/trash.png' height='16px' alt='Delete' title='Delete test' class='qtip_show link' onClick='document.tstdel.testid.value = " . $row['serv_tests_key'] . ";document.tstdel.submit();'>";
                            echo "<img src='pics/icons/edit.png' style='margin-left:3px' height='16px' alt='Edit' title='Edit test' class='qtip_show link' onClick='document.tstedt.testid.value = " . $row['serv_tests_key'] . ";document.tstedt.submit();'>";
Reto Da Forno's avatar
Reto Da Forno committed
370
371
                        } elseif ($running) {
                            echo "<span style='display:none'>running</span>"; // needed to make cell sortable by JQuery
Reto Da Forno's avatar
Reto Da Forno committed
372
                            echo "<img src='pics/icons/cancel.png' height='16px' alt='Abort' title='Abort test' class='qtip_show link' onClick='document.tstabrt.testid.value = " . $row['serv_tests_key'] . ";document.tstabrt.submit();'>";
Reto Da Forno's avatar
Reto Da Forno committed
373
374
375
376
                        } elseif ($preparing || $cleaningup || $syncing || $synced) {
                            echo "<span style='display:none'>preparing</span>"; // needed to make cell sortable by JQuery
                        } elseif ($finished) {
                            echo "<span style='display:none'>finished</span>"; // needed to make cell sortable by JQuery
Reto Da Forno's avatar
Reto Da Forno committed
377
378
                            echo "<img src='pics/icons/trash.png' height='16px' alt='Delete' title='Delete test' class='qtip_show link' onClick='document.tstdel.testid.value = " . $row['serv_tests_key'] . ";document.tstdel.submit();'>";
                            echo "<img src='pics/icons/download.png' style='margin-left:5px' height='16px' alt='Download' title='Download results' class='qtip_show link' onClick='getResult(".$row['serv_tests_key'].", 100);'>";
Reto Da Forno's avatar
Reto Da Forno committed
379
380
381
382
383
384
                            if ($CONFIG['viz']['generate_plots']) {
                                $plot = $CONFIG['viz']['dir'].'/flocklab_plot_'.$row['serv_tests_key'].'.html';
                                if (file_exists($plot)) {
                                    echo "<a href='show_results_plot.php?t=".$row['serv_tests_key']."' target='_blank'><img src='pics/icons/chart.png' style='margin-left:5px' height='16px' alt='Results' title='Plot results' class='qtip_show' ></a>";
                                }
                            }
Reto Da Forno's avatar
Reto Da Forno committed
385
386
                        } elseif ($retentionexp) {
                            echo "<span style='display:none'>retentionexpiring</span>"; // needed to make cell sortable by JQuery
Reto Da Forno's avatar
Reto Da Forno committed
387
388
                            echo "<img src='pics/icons/trash.png' height='16px' alt='Delete' title='Delete test' class='qtip_show link' onClick='document.tstdel.testid.value = " . $row['serv_tests_key'] . ";document.tstdel.submit();'>";
                            echo "<img src='pics/icons/download.png' style='margin-left:5px' height='16px' alt='Download' title='Download results' class='qtip_show link' onClick='getResult(".$row['serv_tests_key'].", 100);'>";
Reto Da Forno's avatar
Reto Da Forno committed
389
390
                        } elseif ($failed) {
                            echo "<span style='display:none'>notschedulable</span>"; // needed to make cell sortable by JQuery
Reto Da Forno's avatar
Reto Da Forno committed
391
                            echo "<img src='pics/icons/trash.png' height='16px' alt='Delete' title='Delete test.' class='qtip_show link' onClick='document.tstdel.testid.value = " . $row['serv_tests_key'] . ";document.tstdel.submit();'>";
Reto Da Forno's avatar
Reto Da Forno committed
392
393
                        } elseif (!$schedulable) {
                            echo "<span style='display:none'>notschedulable</span>"; // needed to make cell sortable by JQuery
Reto Da Forno's avatar
Reto Da Forno committed
394
                            echo "<img src='pics/icons/trash.png' height='16px' alt='Delete' title='Delete test.' class='qtip_show link' onClick='document.tstdel.testid.value = " . $row['serv_tests_key'] . ";document.tstdel.submit();'>";
Reto Da Forno's avatar
Reto Da Forno committed
395
396
397
398
                        } elseif ($aborting) {
                        } else {
                            echo "<span style='display:none'>unknown</span>"; // needed to make cell sortable by JQuery
                        }
Reto Da Forno's avatar
Reto Da Forno committed
399
                        echo "<img src='pics/icons/preview.png' style='margin-left:5px' height='16px' alt='Download config' title='Download test configuration.' class='qtip_show link' onClick='document.tstcdnl.testid.value = " . $row['serv_tests_key'] . ";document.tstcdnl.submit();'>";
Reto Da Forno's avatar
Reto Da Forno committed
400
401
402
403
404
405
                        echo "</td>";
                        echo "</tr>";
                    }
            ?>
                </tbody>
            </table>
Reto Da Forno's avatar
Reto Da Forno committed
406
            <br />
407
408
            <br />
            <i>Note: you can edit the test title and description with a double click.</i>
Reto Da Forno's avatar
Reto Da Forno committed
409
410
411
412
413
414
415
416
417
418
419
420
421
422
            <?php 
            echo "<script type=\"text/javascript\">
            $(document).ready(function() {
            ".$js;
            if (count($all)>0)
                echo 'addedTests.push('.implode(',',$all).');'."\n";
            echo "});\n</script>";
            }?>
            <!-- Forms for processing actions -->
            <form name="tstdel" method="post" action="test_delete.php"><input type="hidden" name="testid" value=""></form>
            <form name="tstedt" method="post" action="test_edit.php"><input type="hidden" name="testid" value=""></form>
            <form name="tstabrt" method="post" action="test_abort.php"><input type="hidden" name="testid" value=""></form>
            <form name="resdwn" method="post" id="downloadform" action="result_download_archive.php"><input type="hidden" name="testid" value=""><input type="hidden" name="query" value=""></form>
            <form name="tstcdnl" method="post" action="testconfig_download.php"><input type="hidden" name="testid" value=""></form>
423
424
425
<?php
do_layout('Manage Tests','Manage Tests');
?>