Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

display of claimed builds

  • Loading branch information...
commit 96967bbb22b6c305f6c57ac72d0320ab3b8da7ec 1 parent 9183585
pelle authored
Showing with 46 additions and 8 deletions.
  1. 0  .gitignore
  2. 0  contrib/build_matrix_project.xml
  3. 0  nb-configuration.xml
  4. 0  pom.xml
  5. 0  src/main/java/de/pellepelster/jenkins/walldisplay/Configuration.java
  6. 0  src/main/java/de/pellepelster/jenkins/walldisplay/WallDisplayJobProperty.java
  7. 0  src/main/java/de/pellepelster/jenkins/walldisplay/WallDisplayPlugin.java
  8. 0  src/main/java/de/pellepelster/jenkins/walldisplay/WallDisplayTransientViewActionFactory.java
  9. 0  src/main/java/de/pellepelster/jenkins/walldisplay/WallDisplayViewAction.java
  10. 0  src/main/resources/de/pellepelster/jenkins/walldisplay/WallDisplayJobProperty/config.jelly
  11. 0  src/main/resources/de/pellepelster/jenkins/walldisplay/WallDisplayJobProperty/config.properties
  12. 0  src/main/resources/de/pellepelster/jenkins/walldisplay/WallDisplayJobProperty/help-wallDisplayName.html
  13. 0  src/main/resources/de/pellepelster/jenkins/walldisplay/WallDisplayPlugin/config.jelly
  14. 0  src/main/resources/index.jelly
  15. 0  src/main/webapp/dateformat.js
  16. 0  src/main/webapp/images/icon.png
  17. 0  src/main/webapp/jquery-ui-1.8.16.js
  18. 0  src/main/webapp/jquery.js
  19. 0  src/main/webapp/snowfall.jquery.js
  20. +5 −4 src/main/webapp/utils.js
  21. 0  src/main/webapp/walldisplay.css
  22. +41 −4 src/main/webapp/walldisplay.html
View
0  .gitignore 100644 → 100755
File mode changed
View
0  contrib/build_matrix_project.xml 100644 → 100755
File mode changed
View
0  nb-configuration.xml 100644 → 100755
File mode changed
View
0  pom.xml 100644 → 100755
File mode changed
View
0  src/main/java/de/pellepelster/jenkins/walldisplay/Configuration.java 100644 → 100755
File mode changed
View
0  src/main/java/de/pellepelster/jenkins/walldisplay/WallDisplayJobProperty.java 100644 → 100755
File mode changed
View
0  src/main/java/de/pellepelster/jenkins/walldisplay/WallDisplayPlugin.java 100644 → 100755
File mode changed
View
0  src/main/java/de/pellepelster/jenkins/walldisplay/WallDisplayTransientViewActionFactory.java 100644 → 100755
File mode changed
View
0  src/main/java/de/pellepelster/jenkins/walldisplay/WallDisplayViewAction.java 100644 → 100755
File mode changed
View
0  src/main/resources/de/pellepelster/jenkins/walldisplay/WallDisplayJobProperty/config.jelly 100644 → 100755
File mode changed
View
0  ...in/resources/de/pellepelster/jenkins/walldisplay/WallDisplayJobProperty/config.properties 100644 → 100755
File mode changed
View
0  ...rces/de/pellepelster/jenkins/walldisplay/WallDisplayJobProperty/help-wallDisplayName.html 100644 → 100755
File mode changed
View
0  src/main/resources/de/pellepelster/jenkins/walldisplay/WallDisplayPlugin/config.jelly 100644 → 100755
File mode changed
View
0  src/main/resources/index.jelly 100644 → 100755
File mode changed
View
0  src/main/webapp/dateformat.js 100644 → 100755
File mode changed
View
0  src/main/webapp/images/icon.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  src/main/webapp/jquery-ui-1.8.16.js 100644 → 100755
File mode changed
View
0  src/main/webapp/jquery.js 100644 → 100755
File mode changed
View
0  src/main/webapp/snowfall.jquery.js 100644 → 100755
File mode changed
View
9 src/main/webapp/utils.js 100644 → 100755
@@ -132,10 +132,10 @@ function getJobText(job, showBuildNumber, showDetails) {
var jobText = getJobTitle(job);
- if (showBuildNumber && job.lastBuild != null && job.lastBuild.number != null)
- {
- jobText += ' #' + job.lastBuild.number;
- }
+ if (showBuildNumber && job.lastBuild != null && job.lastBuild.number != null)
+ {
+ jobText += ' #' + job.lastBuild.number;
+ }
var appendText = new Array();
@@ -151,6 +151,7 @@ function getJobText(job, showBuildNumber, showDetails) {
if(appendText.length > 0)
jobText += " (" + appendText.join(", ") + ")";
}
+
if (job.color == "red") {
if(culprit != "") {
jobText += " (" + culprit + ")";
View
0  src/main/webapp/walldisplay.css 100644 → 100755
File mode changed
View
45 src/main/webapp/walldisplay.html 100644 → 100755
@@ -230,8 +230,14 @@
}
var jobDimensions = getJobDimensions(job, maxFontSize);
-
- var jobDimensionsStyle = { "width": jobWidth, "height": jobHeight };
+ var claimedBorderWidth = 0;
+
+ if (job.lastBuild && job.lastBuild.actions && isBuildClaimed(job.lastBuild.actions))
+ {
+ claimedBorderWidth = jobMargin;
+ }
+
+ var jobDimensionsStyle = { "width": jobWidth - 2 * claimedBorderWidth, "height": jobHeight - 2 * claimedBorderWidth };
var jobPositionStyle = { "position": "absolute", "top": top, "left": left };
var percentageDiv = $('<div />');;
@@ -274,7 +280,17 @@
var jobWrapper = $('<div />').attr({
"id": job.name
});
-
+
+ if (claimedBorderWidth > 0)
+ {
+ jobWrapper.css({
+ "border": Math.round(jobMargin) +"px",
+ "border-style": "solid",
+ "border-color": themes[theme]["claimed_border"]
+ });
+ }
+
+
jobWrapper.css({
"font-size": (maxFontSize-1) + "px",
"background-color": themes[theme][jobColor]
@@ -310,6 +326,21 @@
$(".job").remove();
}
+ function isBuildClaimed(actions)
+ {
+ claimed = false;
+
+ $.each(actions, function(actionIndex, action) {
+
+ if (action.claimed)
+ {
+ claimed = true;
+ }
+ });
+
+ return claimed;
+ }
+
function getJobs(jobNames)
{
updateRunning["repaint"] = true;
@@ -328,10 +359,11 @@
url: jenkinsUrl + "/job/" + jobName + "/api/json",
dataType: "json",
data: {
- "tree": "property[wallDisplayName],name,color,lastBuild[number,timestamp,duration,actions[failCount,skipCount,totalCount],culprits[fullName]],lastSuccessfulBuild[duration]"
+ "tree": "property[wallDisplayName],name,color,lastBuild[number,timestamp,duration,actions[claimed,claimedBy,failCount,skipCount,totalCount],culprits[fullName]],lastSuccessfulBuild[duration]"
},
success: function(job, textStatus, jqXHR) {
debug("finished getting api for job '" + jobName + "'");
+
var add = true;
$.each(jobsToDisplay, function(index, oldJob) {
if (oldJob.name == job.name)
@@ -694,6 +726,8 @@
themes["default"]["yellow_building"] = "#FFFF00";
themes["default"]["aborted"] = "#ADADAD";
themes["default"]["aborted_building"] = "#E8E6E6";
+ themes["default"]["claimed_border"] = "#F5B800";
+
themes["colorblind"] = new Array();
themes["colorblind"].backgroundColor = "#ffffff";
@@ -705,6 +739,7 @@
themes["colorblind"]["yellow_building"] = "#FFF780";
themes["colorblind"]["aborted"] = "#777777";
themes["colorblind"]["aborted_building"] = "#EEEEEE";
+ themes["colorblind"]["claimed_border"] = "#F5B800";
themes["dark"] = new Array();
themes["dark"].backgroundColor = "#000000";
@@ -716,6 +751,7 @@
themes["dark"]["yellow_building"] = "#FFFF00";
themes["dark"]["aborted"] = "#ADADAD";
themes["dark"]["aborted_building"] = "#E8E6E6";
+ themes["dark"]["claimed_border"] = "#F5B800";
themes["christmas"] = new Array();
themes["christmas"].backgroundColor = "#000000";
@@ -727,6 +763,7 @@
themes["christmas"]["yellow_building"] = "#FFFF00";
themes["christmas"]["aborted"] = "#ADADAD";
themes["christmas"]["aborted_building"] = "#E8E6E6";
+ themes["christmas"]["claimed_border"] = "#F5B800";
themes["christmas"].start = function() {
$(document).snowfall('clear');
$(document).snowfall({round : true, minSize: 8, maxSize: 12 }); // add rounded
Please sign in to comment.
Something went wrong with that request. Please try again.