mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
Store axes used for matrix build in the MatrixBuild, so viewing build history will
show matrix for that build, instead of axes for the project which may have changed. Also only tooltip attribute on status balls (as done elsewhere in Hudson), rather than both tooltip and title (firefox actually shows both). git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15447 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
06c30ce690
commit
d2eb155e57
4 files changed
+18
-8
No files matched your search
@@ -112,7 +112,7 @@ public abstract class Layouter<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the width of n-th X-axis.
|
||||
* Computes the width of n-th Y-axis.
|
||||
*/
|
||||
public int height(int n) {
|
||||
return calc(y,n);
|
||||
|
||||
@@ -53,6 +53,8 @@ import org.kohsuke.stapler.StaplerResponse;
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
|
||||
private AxisList axes;
|
||||
|
||||
public MatrixBuild(MatrixProject job) throws IOException {
|
||||
super(job);
|
||||
}
|
||||
@@ -65,6 +67,13 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
|
||||
super(project, buildDir);
|
||||
}
|
||||
|
||||
public Object readResolve() {
|
||||
// MatrixBuild.axes added in 1.285; default to parent axes for old data
|
||||
if (axes==null)
|
||||
axes = getParent().getAxes();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by view to render a ball for {@link MatrixRun}.
|
||||
*/
|
||||
@@ -83,7 +92,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
|
||||
}
|
||||
|
||||
public Layouter<RunPtr> getLayouter() {
|
||||
return new Layouter<RunPtr>(getParent().getAxes()) {
|
||||
return new Layouter<RunPtr>(axes) {
|
||||
protected RunPtr getT(Combination c) {
|
||||
return new RunPtr(c);
|
||||
}
|
||||
@@ -114,7 +123,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
|
||||
try {
|
||||
MatrixRun item = getRun(Combination.fromString(token));
|
||||
if(item!=null)
|
||||
return item;
|
||||
return item;
|
||||
} catch (IllegalArgumentException _) {
|
||||
// failed to parse the token as Combination. Must be something else
|
||||
}
|
||||
@@ -161,6 +170,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
|
||||
}
|
||||
}
|
||||
|
||||
axes = p.getAxes();
|
||||
Collection<MatrixConfiguration> activeConfigurations = p.getActiveConfigurations();
|
||||
final int n = getNumber();
|
||||
|
||||
|
||||
@@ -29,13 +29,13 @@ THE SOFTWARE.
|
||||
<l:ajax>
|
||||
<p:matrix autoRefresh="${it.isBuilding()}">
|
||||
<j:set var="b" value="${p.run}" />
|
||||
<a href="${p.combination}" tooltip="${p.tooltip}">
|
||||
<a href="${p.combination}/">
|
||||
<img src="${imagesURL}/24x24/${h.ifThenElse(b!=null,b.buildStatusUrl,'grey.gif')}"
|
||||
title="${b.iconColor.description}" alt="${b.iconColor.description}"/>
|
||||
tooltip="${p.tooltip}" alt="${p.tooltip}"/>
|
||||
<j:if test="${empty(o.x) and empty(o.y)}">
|
||||
${p.combination.toString(o.z)}
|
||||
</j:if>
|
||||
</a>
|
||||
</p:matrix>
|
||||
</l:ajax>
|
||||
</j:jelly>
|
||||
</j:jelly>
|
||||
@@ -29,11 +29,11 @@ THE SOFTWARE.
|
||||
<l:ajax>
|
||||
<p:matrix autoRefresh="true">
|
||||
<a href="${p.shortUrl}">
|
||||
<img src="${imagesURL}/24x24/${p.buildStatusUrl}" title="${p.iconColor.description}" alt="${p.iconColor.description}"/>
|
||||
<img src="${imagesURL}/24x24/${p.buildStatusUrl}" tooltip="${p.iconColor.description}" alt="${p.iconColor.description}"/>
|
||||
<j:if test="${empty(o.x) and empty(o.y)}">
|
||||
${p.combination.toString(o.z)}
|
||||
</j:if>
|
||||
</a>
|
||||
</p:matrix>
|
||||
</l:ajax>
|
||||
</j:jelly>
|
||||
</j:jelly>
|
||||
Reference in new issue
Block a user