Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-73960] Extract event handlers in BuildCardExtension/buildCardTemplate.jelly #142

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
16aad96
fix: Update jQuery filter removal syntax for 3.x compatibility
shlomomdahan Oct 23, 2024
d74f129
address first csp issue: https://github.com/jenkinsci/build-pipeline-…
shlomomdahan Oct 23, 2024
317e0fa
address first csp issue: https://github.com/jenkinsci/build-pipeline-…
shlomomdahan Oct 23, 2024
913d01a
line 97: https://github.com/jenkinsci/build-pipeline-plugin/blob/mast…
shlomomdahan Oct 23, 2024
6537326
Merge branch 'master' into JENKINS-73960
shlomomdahan Oct 28, 2024
31008b1
fix: https://github.com/jenkinsci/build-pipeline-plugin/blob/master/s…
shlomomdahan Oct 29, 2024
85d08a3
fix:https://github.com/jenkinsci/build-pipeline-plugin/blob/master/sr…
shlomomdahan Oct 29, 2024
f5f7cc7
fix:https://github.com/jenkinsci/build-pipeline-plugin/blob/master/sr…
shlomomdahan Oct 29, 2024
2147df2
fix: https://github.com/jenkinsci/build-pipeline-plugin/blob/master/s…
shlomomdahan Oct 30, 2024
047a747
fix: https://github.com/jenkinsci/build-pipeline-plugin/blob/master/s…
shlomomdahan Oct 30, 2024
6ef4240
fix: https://github.com/jenkinsci/build-pipeline-plugin/blob/master/s…
shlomomdahan Oct 30, 2024
a3b8458
dynamic behaviour.specify
shlomomdahan Oct 30, 2024
ed0c9e5
dynamic behaviour.specify
shlomomdahan Oct 30, 2024
30476d5
update names, update java method, all working
shlomomdahan Oct 30, 2024
5572051
remove Behaviour.specify \ Use dynamic approach
shlomomdahan Oct 30, 2024
ba67a4b
remove Behaviour.specify \ Use dynamic approach
shlomomdahan Oct 30, 2024
9bf83a9
remove Behaviour.specify \ Use dynamic approach
shlomomdahan Oct 30, 2024
59e2952
rerun tests
shlomomdahan Oct 31, 2024
7beca34
specify pipeline wrapper - fixes onclick issues
shlomomdahan Nov 7, 2024
188bc43
select all pipeline wrappers - incase multiple builds selected
shlomomdahan Nov 7, 2024
b456e59
Merge branch 'master' into JENKINS-73960
shlomomdahan Nov 8, 2024
8e66cab
Merge branch 'master' into JENKINS-73960
shlomomdahan Nov 8, 2024
b3e23da
remove redundant parameters span
shlomomdahan Nov 10, 2024
fd147b5
simplify dependency ID parsing
shlomomdahan Nov 12, 2024
0a748ce
simplify/cleanup
shlomomdahan Nov 25, 2024
e501c9e
simplify/cleanup
shlomomdahan Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</j:if>

<st:adjunct includes="io.jenkins.plugins.jquery3"/>
<st:adjunct includes="au.com.centrumsystems.hudson.plugin.buildpipeline.extension.BuildCardExtension.build-card-template-onclicks"/>
<script src="${rootURL}/plugin/build-pipeline-plugin/js/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="${rootURL}/plugin/build-pipeline-plugin/js/jquery-ui-1.8.14.custom.min.js"></script>
<script type="text/javascript" src="${rootURL}/plugin/build-pipeline-plugin/js/handlebars-1.0.0.beta.6.js"></script>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Behaviour.specify(".progress-console-onclick", 'progress-bar-click', 0, function (progressBarElement) {
shlomomdahan marked this conversation as resolved.
Show resolved Hide resolved

const dataContainer = document.querySelector(".fill-dialog-params-statusbar");
const href = dataContainer.dataset.fillDialogHref;
const title = dataContainer.dataset.fillDialogTitle;

progressBarElement.addEventListener('click', () => {
buildPipeline.fillDialog(href, title);
});
});

Behaviour.specify(".console-icon-onlick", 'console-icon-click', 0, function (consoleIconElement) {
shlomomdahan marked this conversation as resolved.
Show resolved Hide resolved

const dataContainer = document.querySelector(".fill-dialog-params-console-output-icon");
const href = dataContainer.dataset.fillDialogHref;
const title = dataContainer.dataset.fillDialogTitle;

consoleIconElement.addEventListener('click', () => {
buildPipeline.fillDialog(href, title);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
{{#unless project.disabled}}
<div class="status-bar" id="status-bar-{{id}}">
{{#if build.isBuilding}}
<div onclick="buildPipeline.fillDialog('${app.rootUrl}{{build.url}}console', 'Console output for {{project.name}} #{{build.number}}')">
<span class="fill-dialog-params-statusbar" data-fill-dialog-href="${app.rootUrl}{{build.url}}console" data-fill-dialog-title="Console output for {{project.name}} #{{build.number}}" style="display:none"/>
<div class="progress-console-onclick">
<table class="progress-bar" align="center">
<tbody>
<tr title="Estimated remaining time: {{build.estimatedRemainingTime}}">
Expand Down Expand Up @@ -94,7 +95,8 @@
</a>
</j:when>
<j:otherwise>
<span onclick="buildPipeline.fillDialog('${app.rootUrl}{{build.url}}console', 'Console output for {{project.name}} #{{build.number}}')">
<span class="fill-dialog-params-console-output-icon" data-fill-dialog-href="${app.rootUrl}{{build.url}}console" data-fill-dialog-title="Console output for {{project.name}} #{{build.number}}" style="display:none"/>
<span class="console-icon-onlick" >
<l:icon src="${consoleOutputIconUrl} icon-sm" alt="console" />
</span>
</j:otherwise>
Expand Down