/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the BM project on Qt Labs. ** ** This file may be used under the terms of the GNU General Public ** License version 2.0 or 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of ** this file. Please review the following information to ensure GNU ** General Public Licensing requirements will be met: ** http://www.fsf.org/licensing/licenses/info/GPLv2.html and ** http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at qt-sales@nokia.com. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ****************************************************************************/ function updateComputeIndexLink(defaultBaseTime, defaultMedianWinSize) { // Initialize URL ... url = "http://" + location.host + "/cgi-bin/bmclientwrapper"; url += "?command="; url += "-server " + server(); url += " index get detailspage"; url += " -stylesheet " + document.styleSheets[0].href; // Add base timestamp ... baseTime = getIntFromTextInput("ixBaseTime", defaultBaseTime); document.getElementById("ixBaseTime").value = baseTime; url += " -basetimestamp " + baseTime; // Add median window size ... medianWinSize = getIntFromTextInput("ixMedianWinSize", defaultMedianWinSize); document.getElementById("ixMedianWinSize").value = medianWinSize; url += " -medianwinsize " + medianWinSize; // Add filters ... function getCheckedFilterValues(tableId) { table = document.getElementById(tableId); values = []; rows = table.rows; for (i = 0; i < rows.length; ++i) { input = document.getElementById(tableId + ":" + i); if (input.checked) values[values.length] = rows[i].cells[1].innerHTML; } return values; } function createFilterOptionsString(option, values) { s = ""; for (i = 0; i < values.length; ++i) s += " " + option + " " + values[i]; return s; } url += createFilterOptionsString("-testcase", getCheckedFilterValues("ixTestCaseFilter")); url += createFilterOptionsString("-metric", getCheckedFilterValues("ixMetricFilter")); url += createFilterOptionsString("-platform", getCheckedFilterValues("ixPlatformFilter")); url += createFilterOptionsString("-host", getCheckedFilterValues("ixHostFilter")); url += createFilterOptionsString("-branch", getCheckedFilterValues("ixBranchFilter")); if (document.getElementById("ixDQStatsEnabled").checked) { // Add parameters for data quality statistics ... url += " -dataqualitystats" + " -dqstatsdifftol " + document.getElementById("ixDQStatsDiffTol").value + " -dqstatsstabtol " + selectedOptions("ixDQStatsStabTol")[0]; } // Update link ... link = document.getElementById("ixComputeIndexLink"); link.setAttribute("href", url); link.setAttribute("target", "_blank"); // prevent page from opening in same window } function updateComputeStatsLink(defaultBaseTime, defaultMedianWinSize) { // Initialize URL ... url = "dummy"; // 4 NOW! // Update link ... link = document.getElementById("ixComputeStatsLink"); link.setAttribute("href", url); link.setAttribute("target", "_blank"); // prevent page from opening in same window } function IndexSection() { var defaultBaseTime = -1; // current time var defaultMedianWinSize = 8; // Variables to support highlighting of values that contribute to combination matches: var cmb; // (= combinations): a 2D index array (i.e. cmb[i][j] is the index of the // jth component of the ith combination) var sel; // (= selections): a 2D boolean array (i.e. sel[i][j] is true iff the // jth value of the ith component is selected) var mts; // (= matches): a 2D array that counts the number of combinations a given // value matches (i.e. mts[i][j] is the match count of the jth // value of the ith component). In order for a value to match a // given combination, the value itself and all the other values of // the combination need to be selected. this.name = function() { return "ixSection"; } this.reset = function(handleDone) { this.finalize_reset = function() { setMessage(""); document.getElementById("ixReset").disabled = false; if (handleDone) handleDone(); } this.handleReply_resetConfigs = function(reply) { if (reply.error) { alert("reset() failed when fetching configs (2): " + reply.error); } else { // Populate