diff options
Diffstat (limited to 'utils/test')
4 files changed, 80 insertions, 35 deletions
diff --git a/utils/test/result_collection_api/tools/dashboard/css/opnfv_dashboard_tests.css b/utils/test/result_collection_api/tools/dashboard/css/opnfv_dashboard_tests.css index 369b0f935..c74e26c63 100644 --- a/utils/test/result_collection_api/tools/dashboard/css/opnfv_dashboard_tests.css +++ b/utils/test/result_collection_api/tools/dashboard/css/opnfv_dashboard_tests.css @@ -20,7 +20,7 @@ body { #testcase_selected{
position: relative;
- left: 100px;
+ left: 50px;
font-size: 20px;
color: #00ADBB;
}
@@ -53,17 +53,17 @@ body { .btn-default{
font-size: 20px;
- background-color: #0095A2;
+ background-color: #FFFFFF; /*#0095A2*/
}
.dropdown-header{
font-size: 20px;
- background-color: #0095A2;
+ background-color: #FFFFFF; /*#0095A2*/
}
.dropdown-menu{
font-size: 16px;
- background-color: #0095A2;
+ background-color: #FFFFFF; /*#0095A2*/
}
.dropdown-menu > li > a:focus, .dropdown-menu > li > a:hover {
diff --git a/utils/test/result_collection_api/tools/dashboard/js/opnfv_dashboard_tests.js b/utils/test/result_collection_api/tools/dashboard/js/opnfv_dashboard_tests.js index 3683c632c..4bb56af79 100644 --- a/utils/test/result_collection_api/tools/dashboard/js/opnfv_dashboard_tests.js +++ b/utils/test/result_collection_api/tools/dashboard/js/opnfv_dashboard_tests.js @@ -15,14 +15,14 @@ function format_date(inputDate){ }
// Draw a single graph for a specific test for a specific installer
-function draw_graph_per_scenario_per_installer (filename, installer, scenario, test_unit){
+function draw_graph_per_scenario_per_installer (filename, installer, pod, scenario, test_unit){
$.getJSON(filename, function(data) {
var serie = [];
index_test = 0;
// find index mapping to the test_unit
for (var i=0; i<data.dashboard.length; i++)
if (data.dashboard[i].name==test_unit){
- index_test=i;
+ index_test=i;
break;
}
@@ -57,7 +57,7 @@ function draw_graph_per_scenario_per_installer (filename, installer, scenario, t if ($.inArray(opnfv_dashboard_y_labels[y], keys)!=-1) labels.push(data.dashboard[index_test].info[opnfv_dashboard_y_labels[y]]);
// Draw the graph
- g=new Dygraph(
+ g = new Dygraph(
document.getElementById(scenario),
serie,
{
@@ -86,19 +86,13 @@ function draw_graphs_all_scenarios_per_installer () { project = opnfv_dashboard_project;
test = opnfv_dashboard_test;
test_unit = opnfv_dashboard_test_unit;
-
- if (installer.length==0){
- alert ('select an installer');
- return;
- }
- if (test.length==0){
- alert ('select a test case');
- return;
- }
for (i=0; i<opnfv_dashboard_installers_scenarios[installer].length; i++){
- var filename = './' + opnfv_dashboard_file_directory + '/' + installer + '/' + project + '/' + opnfv_dashboard_file_prefix + project+'_'+test+'_'+opnfv_dashboard_installers_scenarios[installer][i]+opnfv_dashboard_file_suffix;
+ var filename = './' + opnfv_dashboard_file_directory + '/' + installer + '/' + project + '/' + opnfv_dashboard_file_prefix + project+'_'+test+'_'+opnfv_dashboard_installers_scenarios[installer][i];
+ if (opnfv_dashboard_pod!='all')
+ filename += '_' + opnfv_dashboard_pod;
+ filename += opnfv_dashboard_file_suffix;
console.log(filename);
- draw_graph_per_scenario_per_installer(filename, installer, opnfv_dashboard_installers_scenarios[installer][i], test_unit);
+ draw_graph_per_scenario_per_installer(filename, installer, opnfv_dashboard_pod, opnfv_dashboard_installers_scenarios[installer][i], test_unit);
}
}
@@ -113,10 +107,30 @@ function on_testcase_draw_graph(test, test_unit){ function on_installer_draw_graph(installer){
opnfv_dashboard_installer = installer;
show_installers(installer);
+ opnfv_dashboard_pod = 'all'; // force the new pod to 'all' because there is # pods per installer
+ show_installers_pods(opnfv_dashboard_pod);
show_divs(installer);
draw_graphs_all_scenarios_per_installer ();
}
+function on_pod_draw_graph(pod){
+ opnfv_dashboard_pod = pod;
+ show_installers_pods(pod);
+ show_divs(opnfv_dashboard_installer);
+ draw_graphs_all_scenarios_per_installer ();
+}
+
+function on_ready_draw_graph(){
+ opnfv_dashboard_test = 'vPing';
+ opnfv_dashboard_test_unit = 'vPing duration';
+ opnfv_dashboard_installer = opnfv_dashboard_installers[Math.round((Math.random(opnfv_dashboard_installers.length-1)))];
+ show_installers_pods(opnfv_dashboard_installers_pods[opnfv_dashboard_installer][0]);
+ show_installers(opnfv_dashboard_installer);
+ show_divs(opnfv_dashboard_installer);
+ $("#testcase_selected").html(opnfv_dashboard_test_unit);
+ draw_graphs_all_scenarios_per_installer ();
+}
+
// generate test case selection
function show_testcases(){
var html_testcases = '<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Select a test case';
@@ -149,12 +163,26 @@ function show_installers(active_installer) for (var i in opnfv_dashboard_installers)
if (opnfv_dashboard_installers[i]==active_installer)
html_installers += '<li class="active"><a href="#" onClick="on_installer_draw_graph(\''+opnfv_dashboard_installers[i]+'\')">'+opnfv_dashboard_installers[i]+'</a></li>';
- else
- html_installers += '<li><a href="#" onClick="on_installer_draw_graph(\''+opnfv_dashboard_installers[i]+'\')">'+opnfv_dashboard_installers[i]+'</a></li>';
+ else
+ html_installers += '<li><a href="#" onClick="on_installer_draw_graph(\''+opnfv_dashboard_installers[i]+'\')">'+opnfv_dashboard_installers[i]+'</a></li>';
html_installers += '</ul>';
$("#installers").html(html_installers);
}
+// generate pods buttons
+function show_installers_pods(active_pod)
+{
+ var html_pods = '';
+ html_pods += '<ul class="nav nav-pills">';
+ for (var i in opnfv_dashboard_installers_pods[opnfv_dashboard_installer])
+ if (opnfv_dashboard_installers_pods[opnfv_dashboard_installer][i]==active_pod)
+ html_pods += '<li class="active"><a href="#" onClick="on_pod_draw_graph(\''+opnfv_dashboard_installers_pods[opnfv_dashboard_installer][i]+'\')">'+opnfv_dashboard_installers_pods_print[opnfv_dashboard_installer][i]+'</a></li>';
+ else
+ html_pods += '<li><a href="#" onClick="on_pod_draw_graph(\''+opnfv_dashboard_installers_pods[opnfv_dashboard_installer][i]+'\')">'+opnfv_dashboard_installers_pods_print[opnfv_dashboard_installer][i]+'</a></li>';
+ html_pods += '</ul>';
+ $("#pods").html(html_pods);
+}
+
// generate a div per installer (to host the graph)
function show_divs(installer){
$("#graphs").remove();
@@ -163,14 +191,15 @@ function show_divs(installer){ var div_scenario = '<div class= "chart" id="' + opnfv_dashboard_installers_scenarios[installer][i] + '"/>';
console.log(div_scenario);
var $newdiv = $(div_scenario);
-
$("#graphs").append($newdiv);
}
}
// generate HTML menus and buttons
$( document ).ready(function(){
- show_installers('');
- show_testcases();
console.log( "ready!" );
+
+ //show_installers('');
+ show_testcases();
+ on_ready_draw_graph();
});
diff --git a/utils/test/result_collection_api/tools/dashboard/js/opnfv_dashboard_tests_conf.js b/utils/test/result_collection_api/tools/dashboard/js/opnfv_dashboard_tests_conf.js index e091f2680..6778332eb 100644 --- a/utils/test/result_collection_api/tools/dashboard/js/opnfv_dashboard_tests_conf.js +++ b/utils/test/result_collection_api/tools/dashboard/js/opnfv_dashboard_tests_conf.js @@ -1,7 +1,8 @@ +var opnfv_dashboard_project = 'functest';
var opnfv_dashboard_installer = '';
var opnfv_dashboard_test = '';
var opnfv_dashboard_test_unit = '';
-var opnfv_dashboard_project = 'functest';
+var opnfv_dashboard_pod = 'all';
var opnfv_dashboard_installers = ['apex', 'compass', 'fuel', 'joid'];
@@ -9,7 +10,7 @@ var opnfv_dashboard_installers_scenarios = {}; opnfv_dashboard_installers_scenarios['apex'] =
['os-nosdn-nofeature-ha',
'os-odl_l2-nofeature-ha',
- 'os-onos-nofeature-ha',
+ 'os-onos-nofeature-ha',
'os-odl_l3-nofeature-ha',
'os-odl_l2-sfc-ha'];
@@ -20,7 +21,7 @@ opnfv_dashboard_installers_scenarios['compass']= 'os-ocl-nofeature-ha'];
opnfv_dashboard_installers_scenarios['fuel']=
- ['os-nosdn-nofeature-ha','os-odl_l2-nofeature-ha','os-onos-nofeature-ha','os-odl_l3-nofeature-ha','os-odl_l2-bgpvpn-ha','os-nosdn-ovs-ha','os-nosdn-kvm-ha','os-nosdn-ovs_kvm-ha'];
+ ['os-nosdn-nofeature-ha','os-odl_l2-nofeature-ha','os-onos-nofeature-ha','os-odl_l3-nofeature-ha','os-odl_l2-bgpvpn-ha','os-nosdn-ovs-ha','os-nosdn-kvm-ha','os-nosdn-ovs_kvm-ha'];
opnfv_dashboard_installers_scenarios['joid']=
['os-nosdn-nofeature-ha',
@@ -30,10 +31,11 @@ opnfv_dashboard_installers_scenarios['joid']= var opnfv_dashboard_testcases = {
'VIM': {
- 'tempest': ['Tempest duration',
+ 'Tempest': ['Tempest duration',
'Tempest nb tests/nb failures'],
'vPing': ['vPing duration'],
- 'vPing_userdata': ['vPing_userdata duration']
+ 'vPing_userdata': ['vPing_userdata duration'],
+ 'Rally': ['rally duration']
},
'Controller': {
'ODL': ['ODL nb tests/nb failures'],
@@ -46,11 +48,24 @@ var opnfv_dashboard_testcases = { 'vIMS': ['vIMS nb tests passed/failed/skipped',
'vIMS orchestrator/VNF/test duration'],
'promise': ['Promise duration ',
- 'Promise nb tests/nb failures']
+ 'Promise nb tests/nb failures'],
+ 'doctor': ['doctor-notification duration ']
}
};
-var opnfv_dashboard_file_directory = 'res';
+var opnfv_dashboard_installers_pods = {};
+opnfv_dashboard_installers_pods['apex'] = ['all','intel-pod7','opnfv-jump-1'];
+opnfv_dashboard_installers_pods['compass'] = ['all','huawei-us-deploy-bare-1','huawei-us-deploy-vm-1','huawei-us-deploy-vm2','intel-pod8'];
+opnfv_dashboard_installers_pods['fuel'] = ['all','ericsson-pod2','opnfv-jump-2'];
+opnfv_dashboard_installers_pods['joid'] = ['all','intel-pod5','intel-pod6','orange-fr-pod2'];
+
+var opnfv_dashboard_installers_pods_print = {};
+opnfv_dashboard_installers_pods_print['apex'] = ['all','intelpod7','opnfvjump1'];
+opnfv_dashboard_installers_pods_print['compass'] = ['all','hwusbare1','hwusvm1','hwusvm2','intelpod8'];
+opnfv_dashboard_installers_pods_print['fuel'] = ['all','ericssonpod2','opnfvjump2'];
+opnfv_dashboard_installers_pods_print['joid'] = ['all','intelpod5','intelpod6','orangefrpod2'];
+
+var opnfv_dashboard_file_directory = 'res-test';
var opnfv_dashboard_file_prefix = 'res_';
var opnfv_dashboard_file_suffix = '.json';
@@ -71,4 +86,4 @@ var opnfv_dashboard_graph_title_height = 30; // height for the graph title var opnfv_dashboard_graph_stroke_width = 5; // line stroke when mouse over
var opnfv_dashboard_graph_axis_label_color = '#2E2925';
var opnfv_dashboard_graph_text_align = 'right';
-var opnfv_dashboard_graph_background_color = 'transparent';
\ No newline at end of file +var opnfv_dashboard_graph_background_color = 'transparent';
diff --git a/utils/test/result_collection_api/tools/dashboard/opnfv_dashboard_tests.html b/utils/test/result_collection_api/tools/dashboard/opnfv_dashboard_tests.html index ad2bf222a..424b525a3 100644 --- a/utils/test/result_collection_api/tools/dashboard/opnfv_dashboard_tests.html +++ b/utils/test/result_collection_api/tools/dashboard/opnfv_dashboard_tests.html @@ -19,13 +19,14 @@ <script src="js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/opnfv_dashboard_tests.css">
<script type="text/javascript" src="js/opnfv_dashboard_tests.js"></script>
- </head>
+ </head>
<body>
<div id="title" class="container">FuncTest dashboard
- <p> </p>
+ <p> </p>
+ <div id="installers"></div>
+ <div id="pods" style="float:right"></div>
<div id="testcase" class="dropdown" style="float:left"></div>
- <div id="testcase_selected" style="float:left"></div>
- <div id="installers" style="float:right"></div>
+ <div id="testcase_selected" style="float:left"></div>
</div>
</body>
</html>
|