Skip to content

Commit

Permalink
Modify floatingbox.jelly according to CSP requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
asimell committed Oct 24, 2024
1 parent f6ccfc4 commit ba1db71
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2008-2014 Nokia Solutions and Networks Oy
Expand All @@ -25,10 +25,10 @@ limitations under the License.
<a href="${from.urlName}">
<img id="passfailgraph" src="" title="Browse results" width="500" height="200"/>
</a><br/>
<p><label><input type="checkbox" id="zoomToChanges" onclick="redrawPassFailGraph('${from.urlName}/');"/>Zoom to changes</label></p>
<p><label><input type="checkbox" id="failedOnly" onclick="redrawPassFailGraph('${from.urlName}/');"/>Show only failed</label></p>
<p><label><input type="checkbox" id="criticalOnly" onclick="redrawPassFailGraph('${from.urlName}/');"/>Show only critical</label></p>
<p><label><input min="0" max="9999" step="1" placeholder="all" value="" type="number" id="maxBuildsToShow" onchange="redrawPassFailGraph('${from.urlName}/');"/>Max builds</label></p>
<p><label><input type="checkbox" id="zoomToChanges"/>Zoom to changes</label></p>
<p><label><input type="checkbox" id="failedOnly"/>Show only failed</label></p>
<p><label><input type="checkbox" id="criticalOnly"/>Show only critical</label></p>
<p><label><input min="0" max="9999" step="1" placeholder="all" value="" type="number" id="maxBuildsToShow"/>Max builds</label></p>
<br/><p style="float:right"><a id="passfailgraph_hd_link" href="">Show bigger image</a></p>
</div>
<script>initPassFailGraph('${from.urlName}/');</script>
Expand Down
28 changes: 22 additions & 6 deletions src/main/webapp/robot.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,29 @@ function initPassFailGraph(target) {
var failedOnly = getCookie("RobotResult_failedOnly", "false");
var criticalOnly = getCookie("RobotResult_criticalOnly", "false");
var maxBuildsToShow = getCookie("RobotResult_maxBuildsToShow", 0);
if (document.getElementById("zoomToChanges"))
document.getElementById("zoomToChanges").checked = (mode == "true");
if (document.getElementById("failedOnly"))
document.getElementById("failedOnly").checked = (failedOnly == "true");
if (document.getElementById("criticalOnly"))
document.getElementById("criticalOnly").checked = (criticalOnly == "true");

var element = document.getElementById("zoomToChanges");
if (element) {
element.checked = (mode == "true");
element.addEventListener("click", redrawPassFailGraph(target));
}

element = document.getElementById("failedOnly");
if (element) {
element.checked = (failedOnly == "true");
element.addEventListener("click", redrawPassFailGraph(target));
}

element = document.getElementById("criticalOnly");
if (element) {
element.checked = (criticalOnly == "true");
element.addEventListener("click", redrawPassFailGraph(target));
}

element = document.getElementById("maxBuildsToShow");
setMaxBuildsToShow(maxBuildsToShow);
element.addEventListener("change", redrawPassFailGraph(target));

setPassFailGraphSrc(target, mode, failedOnly, criticalOnly, maxBuildsToShow);
}

Expand Down

0 comments on commit ba1db71

Please sign in to comment.