/*############################################################################# # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## */ // Function to format date according to JS function format_date(inputDate){ var input = inputDate.slice(0,-7); input=input.replace(' ','T'); input+='Z'; return new Date(Date.parse(input)); } // Draw a single graph for a specific test for a specific installer 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'; var testcase = family_testcases[i]; family_tests = Object.keys(opnfv_dashboard_testcases[testcase]); for (var j in family_tests){ var test = family_tests[j]; family_tests_units = Object.keys(opnfv_dashboard_testcases[testcase][test]); for (var k in family_tests_units){ test_unit = opnfv_dashboard_testcases[testcase][test][k]; html_testcases += '
  • ' + opnfv_dashboard_testcases[testcase][test][k] + '
  • '; } } } html_testcases+=''; $("#testcase").html(html_testcases); } // generate installers buttons function show_installers(active_installer) { var html_installers = ''; html_installers += ''; $("#installers").html(html_installers); } // generate pods buttons function show_installers_pods(active_pod) { var html_pods = ''; html_pods += ''; $("#pods").html(html_pods); } // generate a div per installer (to host the graph) function show_divs(installer){ $("#graphs").remove(); $("body").append('
    '); for (var i in opnfv_dashboard_installers_scenarios[installer]){ var div_scenario = '
    '; console.log(div_scenario); var $newdiv = $(div_scenario); $("#graphs").append($newdiv); } } // generate HTML menus and buttons $( document ).ready(function(){ console.log( "ready!" ); //show_installers(''); show_testcases(); on_ready_draw_graph(); });