2 if(isset($_REQUEST['project'])){
3 $selected=$_REQUEST['project'];
6 $url = "http://testresults.opnfv.org:80/test/api/v1/projects";
7 $response = file_get_contents($url);
8 $data = json_decode($response);
9 $projects=$data->projects;
10 $selected=$projects[0]->name;
12 $new_url="http://testresults.opnfv.org:80/test/api/v1/projects/".$selected."/cases";
13 $response = file_get_contents($new_url);
14 $data = json_decode($response);
15 $testcases=$data->testcases;
18 $column_str=$column_str."<table class=\"table table-striped\"><tr>";
19 $column_str=$column_str."<th>#</th><th>Test Case Name</th>";
20 $column_str=$column_str."<th>Creation Date</th>";
21 $column_str=$column_str."<th>Description</th></tr>";
22 foreach ( $testcases as $testcase ){
24 $column_str=$column_str."<tr>";
25 $column_str=$column_str."<td>".$i."</td>";
26 $column_str=$column_str."<td>".$testcase->name."</td>";
27 $column_str=$column_str."<td>".$testcase->creation_date."</td>";
28 $column_str=$column_str."<td>".$testcase->description."</td>";
29 $column_str=$column_str."</tr>";
32 $column_str=$column_str."</table>";