diff options
Diffstat (limited to 'src/bmweb/indexsection.js')
-rw-r--r-- | src/bmweb/indexsection.js | 76 |
1 files changed, 54 insertions, 22 deletions
diff --git a/src/bmweb/indexsection.js b/src/bmweb/indexsection.js index c3fac25..05d15d3 100644 --- a/src/bmweb/indexsection.js +++ b/src/bmweb/indexsection.js @@ -69,6 +69,15 @@ function updateComputeIndexLink(defaultBaseTime, defaultMedianWinSize) 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); @@ -537,14 +546,6 @@ function IndexSection() table = section.appendChild(document.createElement("table")); table.setAttribute("style", "border:0px; padding:0px"); tr = table.insertRow(0); - td = tr.insertCell(0); - td.setAttribute("style", "border:0px; padding:0px"); - linksFieldset = td.appendChild(document.createElement("fieldset")); - linksFieldset.setAttribute("style", "border:0px; padding:2px"); - - table = linksFieldset.appendChild(document.createElement("table")); - table.setAttribute("style", "border:0px; padding:0px"); - tr = table.insertRow(0); // ... 'compute index' link ... td = tr.insertCell(tr.cells.length); @@ -562,22 +563,51 @@ function IndexSection() + ")" ); - // ... 'compute stats' link ... + // ... data quality stats fieldset ... td = tr.insertCell(tr.cells.length); - td.setAttribute("style", "border:0px; padding:2px"); - link = td.appendChild(document.createElement("a")); - link.id = "ixComputeStatsLink"; - link.appendChild(document.createTextNode("Compute Stats")); - link.setAttribute("class", "ixLink_stats"); - link.setAttribute("href", "dummy"); // for correct initial rendering - link.setAttribute( - "onmouseover", - "updateComputeStatsLink(" - + defaultBaseTime - + ", " + defaultMedianWinSize - + ")" - ); + td.setAttribute("style", "border:0px; padding:0px"); + fieldset = td.appendChild(document.createElement("fieldset")); + legend = fieldset.appendChild(document.createElement("legend")); + legend.appendChild(document.createTextNode("Data Quality Statistics")); + legend.setAttribute("style", "font-size:12"); + table = fieldset.appendChild(document.createElement("table")); + table.setAttribute("style", "border:0px; padding:0px"); + tr = table.insertRow(table.rows.length); + td = tr.insertCell(0); + td.innerHTML = "Enabled: "; + td.setAttribute("style", "text-align:right"); + td = tr.insertCell(1); + td.setAttribute("style", "text-align:left"); + input = td.appendChild(document.createElement("input")); + input.setAttribute("type", "checkbox"); + input.setAttribute("id", "ixDQStatsEnabled"); + + tr = table.insertRow(table.rows.length); + td = tr.insertCell(0); + td.setAttribute("style", "text-align:right"); + td.innerHTML = "Difference tolerance (%): "; + td = tr.insertCell(1); + td.setAttribute("style", "text-align:left"); + input = td.appendChild(document.createElement("input")); + input.setAttribute("type", "text"); + input.setAttribute("id", "ixDQStatsDiffTol"); + input.setAttribute("Value", "10"); + + tr = table.insertRow(table.rows.length); + td = tr.insertCell(0); + td.setAttribute("style", "text-align:right"); + td.innerHTML = "Stability tolerance: "; + td = tr.insertCell(1); + td.setAttribute("style", "text-align:left"); + select = td.appendChild(document.createElement("select")); + select.setAttribute("id", "ixDQStatsStabTol"); + select.options[0] = new Option("2", "2"); + select.options[1] = new Option("3", "3"); + select.options[2] = new Option("4", "4"); + select.options[3] = new Option("5", "5"); + select.options[4] = new Option("6", "6"); + select.options[2].selected = true; // Create 'Configuration' section ... section.appendChild(document.createElement("br")); @@ -623,6 +653,7 @@ function IndexSection() tr = table.insertRow(table.rows.length); td = tr.insertCell(0); td.innerHTML = "Base timestamp (secs since 1970): "; + td.setAttribute("style", "text-align:right"); td = tr.insertCell(1); input = td.appendChild(document.createElement("input")); input.setAttribute("type", "text"); @@ -633,6 +664,7 @@ function IndexSection() tr = table.insertRow(table.rows.length); td = tr.insertCell(0); td.innerHTML = "Median window size: "; + td.setAttribute("style", "text-align:right"); td = tr.insertCell(1); input = td.appendChild(document.createElement("input")); input.setAttribute("type", "text"); |