Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
Behaviour.specify(".progress-console-onclick", 'progress-bar-click', 0, function (progressBarElement) {
Behaviour.specify(".bct-progress-console-onclick", 'BuildCardExtension_progressBarClick', 0, function (element) {

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

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

Behaviour.specify(".console-icon-onlick", 'console-icon-click', 0, function (consoleIconElement) {
Behaviour.specify(".bct-console-icon-onclick", 'BuildCardExtension_consoleIconClick', 0, function (element) {

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

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

Behaviour.specify(".bct-rerun-success-icon-onclick", 'BuildCardExtension_successRerunClick', 0, function(element) {

const dataContainer = document.querySelector(".bct-rerun-success-icon-onclick-params");
const id = parseInt(dataContainer.dataset.showSpinnerId, 10);
const buildExtId = dataContainer.dataset.rerunBuildExtId;
const dependencyIds = dataContainer.dataset.rerunBuildDependencyIds
.split(',')
.filter(Boolean)
.map(id => parseInt(id, 10));

element.addEventListener('click', () => {
buildPipeline.showSpinner(id);
buildPipeline.rerunBuild(id, buildExtId, dependencyIds);
});
});


Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
{{#unless project.disabled}}
<div class="status-bar" id="status-bar-{{id}}">
{{#if build.isBuilding}}
<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">
<span class="bct-progress-console-onclick-params" 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="bct-progress-console-onclick">
<table class="progress-bar" align="center">
<tbody>
<tr title="Estimated remaining time: {{build.estimatedRemainingTime}}">
Expand Down Expand Up @@ -95,8 +95,8 @@
</a>
</j:when>
<j:otherwise>
<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" >
<span class="bct-console-icon-onclick-params" 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="bct-console-icon-onclick" >
<l:icon src="${consoleOutputIconUrl} icon-sm" alt="console" />
</span>
</j:otherwise>
Expand All @@ -108,7 +108,8 @@
{{#if build.isSuccess}}
{{#if ${!it.triggerOnlyLatestJob}}}
<j:if test="${it.hasBuildPermission()}">
<span onclick="buildPipeline.showSpinner({{id}}); buildPipeline.rerunBuild({{id}}, '{{build.extId}}', [{{build.dependencyIds}}])">
<span class="bct-rerun-success-icon-onclick-params" data-show-spinner-id="{{id}}" data-rerun-build-ext-id="{{build.extId}}" data-rerun-build-dependency-ids="{{build.dependencyIds}}" style="display: none;" />
<span class="bct-rerun-success-icon-onclick">
<l:icon src="icon-clock icon-sm" alt="re-run" />
</span>
</j:if>
Expand Down

0 comments on commit 31008b1

Please sign in to comment.