From: raghavendracharik Date: Wed, 20 Jul 2016 11:10:13 +0000 (-0700) Subject: Implementation of testcase/pod declaration dashboard for adding tescases X-Git-Tag: colorado.1.0~239 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=fff0e399eb7b57ecd0ddce1b742da8c22968014c;p=releng.git Implementation of testcase/pod declaration dashboard for adding tescases JIRA: FUNCTEST-26 Change-Id: Iceb1c54ba8c245d43cc553533fdf4fd3284c7132 Signed-off-by: raghavendracharik --- diff --git a/utils/test/declaration/addtestcase.php b/utils/test/declaration/addtestcase.php new file mode 100644 index 000000000..0e5bed689 --- /dev/null +++ b/utils/test/declaration/addtestcase.php @@ -0,0 +1,40 @@ +$url,'name'=>$name,'description'=>$desc); + $str_data=json_encode($str_data); + $res=sendPostData($url_send, $str_data); + echo '
Success! Added New test Case
'; + +}else{ + + echo '
Error! Failed to Add New test Case
'; + +} + +?> + diff --git a/utils/test/declaration/index.php b/utils/test/declaration/index.php new file mode 100644 index 000000000..b2c5d0370 --- /dev/null +++ b/utils/test/declaration/index.php @@ -0,0 +1,221 @@ + + + + OPNFV DashBoard + + + + + + + + + + +
+

OPNFV DASHBOARD:

+
+ +
+
+ + + + + + + + + + + pods; + $i=1; + foreach ( $pods as $pod ){ + + $column_str=""; + $column_str=""; + $column_str=$column_str.""; + $column_str= $column_str.""; + $column_str= $column_str.""; + $column_str= $column_str.""; + $column_str= $column_str.""; + echo $column_str; + $i=$i+1; + } + ?> +
#Pod NameCreation DateRoleMode
".$i."".$pod->name."".$pod->creation_date."".$pod->role."".$pod->mode."
+
+
+ + + + + + + + + projects; + $i=0; + foreach ( $projects as $project ){ + + $column_str=""; + $column_str=""; + $column_str=$column_str.""; + $column_str= $column_str.""; + $column_str= $column_str.""; + echo $column_str; + $i=$i+1; + } +?> +
#ProjectCreation Date
".$i."".$project->name."".$project->creation_date."
+
+
+
+ + +
+
+ +
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+
+
+ + diff --git a/utils/test/declaration/testcases.php b/utils/test/declaration/testcases.php new file mode 100644 index 000000000..20645807e --- /dev/null +++ b/utils/test/declaration/testcases.php @@ -0,0 +1,36 @@ +projects; + $selected=$projects[0]->name; + } + $new_url="http://testresults.opnfv.org:80/test/api/v1/projects/".$selected."/cases"; + $response = file_get_contents($new_url); + $data = json_decode($response); + $testcases=$data->testcases; + $i=0; + $column_str=""; + $column_str=$column_str.""; + $column_str=$column_str.""; + $column_str=$column_str.""; + $column_str=$column_str.""; + foreach ( $testcases as $testcase ){ + $i=$i+1; + $column_str=$column_str.""; + $column_str=$column_str.""; + $column_str=$column_str.""; + $column_str=$column_str.""; + $column_str=$column_str.""; + $column_str=$column_str.""; + + } + $column_str=$column_str."
#Test Case NameCreation DateDescription
".$i."".$testcase->name."".$testcase->creation_date."".$testcase->description."
"; + echo $column_str; + +?> +