Skip to content

Commit

Permalink
[SECURITY-2191]
Browse files Browse the repository at this point in the history
  • Loading branch information
Wadeck authored and daniel-beck committed Feb 22, 2021
1 parent 0ae6fc1 commit 8bd7786
Showing 1 changed file with 0 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,16 @@
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">

<!-- deactivate auto refresh while keeping the initial value-->
<j:set var="isAutoRefresh" value="${h.isAutoRefresh(request)}"/>

<j:if test="${isAutoRefresh}">
<j:set var="_" value="${it.preventRefresh(response)}"/>
<j:invokeStatic var="autoRefreshTimeout" className="jenkins.util.SystemProperties"
method="getString">
<j:arg value="hudson.Functions.autoRefreshSeconds" type="java.lang.String"/>
<j:arg value="10" type="java.lang.String"/>
</j:invokeStatic>
<j:set var="javascriptAutoRefresh">
if (active) {
autoRefreshTimer = setTimeout(function() {
window.location.reload(true);
}, ${autoRefreshTimeout} * 1000);
console.log("Setting autorefresh timer");
} else {
clearTimeout(autoRefreshTimer);
console.log("Removing autorefresh timer");
}
</j:set>
</j:if>
<script type="text/javascript">
var autoRefreshTimer;

function setAutoRefresh(active) {
${javascriptAutoRefresh}
}

function ShowPopup(hoveritem) {
var hp = document.getElementById("claimHoverPopup");
hp.style.display = "block";
setAutoRefresh(false);
}

function HidePopup() {
var hp = document.getElementById("claimHoverPopup");
hp.style.display = "none";
var action = <st:bind value="${it}" />;
setAutoRefresh(true);
}

function Display(error) {
Expand All @@ -51,8 +21,6 @@
reasonText.textContent = content.responseObject();
});
}

setAutoRefresh(true);
</script>

<t:summary icon="icon-claim-claim">
Expand Down

0 comments on commit 8bd7786

Please sign in to comment.