/*############################################################################# # 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 sort data to be ordered according to the time function sortFunction(a,b){ var dateA = new Date(a.date).getTime(); var dateB = new Date(b.date).getTime(); return dateA > dateB ? 1 : -1; }; // Function to format date according to JS function formatDate(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 drawGraph(filename,installer,test_unit){ $.getJSON( filename, function(data) { var serie=[]; index_test=0; // find index mapping to the test_unit for (var i=0;i'+test_unit+''; } text_html+='
'; } document.getElementById('tests').innerHTML=text_html; // debug console.log(text_html); // generate a div per installer (to host the graph) for (var i in opnfv_dashboard_installers){ var div_installer='
' var $newdiv=$(div_installer); $("body").append($newdiv); }