diff options
Diffstat (limited to 'src/bmweb/indexsection.js')
-rw-r--r-- | src/bmweb/indexsection.js | 68 |
1 files changed, 57 insertions, 11 deletions
diff --git a/src/bmweb/indexsection.js b/src/bmweb/indexsection.js index 48c798a..c3fac25 100644 --- a/src/bmweb/indexsection.js +++ b/src/bmweb/indexsection.js @@ -21,7 +21,7 @@ ** ****************************************************************************/ -function updateEvalLink(defaultBaseTime, defaultMedianWinSize) +function updateComputeIndexLink(defaultBaseTime, defaultMedianWinSize) { // Initialize URL ... url = "http://" + location.host + "/cgi-bin/bmclientwrapper"; @@ -70,8 +70,22 @@ function updateEvalLink(defaultBaseTime, defaultMedianWinSize) url += createFilterOptionsString("-branch", getCheckedFilterValues("ixBranchFilter")); // Update link ... - evalLink = document.getElementById("ixEvalLink"); - evalLink.setAttribute("href", url); + 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() @@ -518,15 +532,47 @@ function IndexSection() section.appendChild(document.createElement("br")); section.appendChild(document.createElement("br")); - // Create a link that opens a page that presents the result of evaluating the index - // over time ... - evalLink = section.appendChild(document.createElement("a")); - evalLink.id = "ixEvalLink"; - evalLink.appendChild(document.createTextNode("Evaluate")); - evalLink.setAttribute("href", "dummy"); // for correct initial rendering - evalLink.setAttribute( + + // Create 'links' section ... + 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); + td.setAttribute("style", "border:0px; padding:2px"); + link = td.appendChild(document.createElement("a")); + link.id = "ixComputeIndexLink"; + link.appendChild(document.createTextNode("Compute Index")); + link.setAttribute("class", "ixLink_index"); + link.setAttribute("href", "dummy"); // for correct initial rendering + link.setAttribute( + "onmouseover", + "updateComputeIndexLink(" + + defaultBaseTime + + ", " + defaultMedianWinSize + + ")" + ); + + // ... 'compute stats' link ... + 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", - "updateEvalLink(" + "updateComputeStatsLink(" + defaultBaseTime + ", " + defaultMedianWinSize + ")" |