forked from geoffbullen/build-pipeline-plugin
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
6537326
commit 31008b1
Showing
2 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
30 changes: 24 additions & 6 deletions
30
.../hudson/plugin/buildpipeline/extension/BuildCardExtension/build-card-template-onclicks.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters