diff --git a/src/main/java/hudson/matrix/LabelAxis.java b/src/main/java/hudson/matrix/LabelAxis.java
index 85593d15..eae12501 100644
--- a/src/main/java/hudson/matrix/LabelAxis.java
+++ b/src/main/java/hudson/matrix/LabelAxis.java
@@ -24,7 +24,6 @@
package hudson.matrix;
import hudson.Extension;
-import hudson.Functions;
import jenkins.model.Jenkins;
import hudson.model.labels.LabelAtom;
import org.apache.commons.lang.StringUtils;
@@ -86,16 +85,13 @@ public boolean isInstantiable() {
return !j.getNodes().isEmpty() || !j.clouds.isEmpty();
}
-
- public String buildLabelCheckBox(LabelAtom la, LabelAxis instance) {
+ public String buildLabelCheckBox(LabelAtom la) {
final String escapedName = jsStringEscape(htmlAttributeEscape(la.getName()));
final String escapedDescription = jsStringEscape(StringUtils.isEmpty(la.getDescription()) ? "" :
htmlAttributeEscape(la.getDescription()));
- return new StringBuilder("\"").append(jsStringEscape("\"")
- .toString();
- // '${h.jsStringEscape('')}'
+ return "";
}
}
}
diff --git a/src/main/java/hudson/matrix/MatrixProject.java b/src/main/java/hudson/matrix/MatrixProject.java
index cf02328e..3106961e 100644
--- a/src/main/java/hudson/matrix/MatrixProject.java
+++ b/src/main/java/hudson/matrix/MatrixProject.java
@@ -108,7 +108,9 @@
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
+import org.kohsuke.stapler.AncestorInPath;
import org.kohsuke.stapler.HttpResponse;
+import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.TokenList;
@@ -1125,6 +1127,11 @@ public List getAxisDescriptors() {
return r;
}
+ @Restricted(NoExternalUse.class)
+ public FormValidation doCheckDisplayNameOrNull(@AncestorInPath MatrixProject job, @QueryParameter String value) {
+ return Jenkins.get().doCheckDisplayName(value, job.getName());
+ }
+
/**
* @deprecated as of 1.456
* This was only exposed for Jelly.
diff --git a/src/main/resources/hudson/matrix/LabelAxis/config.jelly b/src/main/resources/hudson/matrix/LabelAxis/config.jelly
index e818b775..01066ef2 100644
--- a/src/main/resources/hudson/matrix/LabelAxis/config.jelly
+++ b/src/main/resources/hudson/matrix/LabelAxis/config.jelly
@@ -28,39 +28,16 @@ THE SOFTWARE.
-
+
+
diff --git a/src/main/resources/hudson/matrix/LabelAxis/label-axis-resources.js b/src/main/resources/hudson/matrix/LabelAxis/label-axis-resources.js
new file mode 100644
index 00000000..5c4f2a55
--- /dev/null
+++ b/src/main/resources/hudson/matrix/LabelAxis/label-axis-resources.js
@@ -0,0 +1,41 @@
+Behaviour.specify("DIV.labelAxis-tree", 'LabelAxis', 0, function(e) {
+ var tree = new YAHOO.widget.TreeView(e);
+
+ var i18nContainer = document.querySelector(".label-axis-i18n");
+ var labels = new YAHOO.widget.TextNode(i18nContainer.getAttribute("data-i18n-labels"), tree.getRoot(), false);
+ var machines = new YAHOO.widget.TextNode(i18nContainer.getAttribute("data-i18n-individual-nodes"), tree.getRoot(), false);
+
+ var values = (e.getAttribute("values") || "").split("/");
+ function has(v) {
+ return values.includes(v) ? 'checked="checked" ' : "";
+ }
+
+ var labelAxisDataContainer = document.querySelector(".label-axis-data-container");
+ labelAxisDataContainer.childNodes.forEach(node => {
+ var labelCheckbox = node.getAttribute("data-label-checkbox");
+
+ var CHECKED_ATTR_INSERT_IDX = "
-
+
diff --git a/src/main/resources/lib/hudson/matrix-project/matrix-resources.js b/src/main/resources/lib/hudson/matrix-project/matrix-resources.js
new file mode 100644
index 00000000..da68bcec
--- /dev/null
+++ b/src/main/resources/lib/hudson/matrix-project/matrix-resources.js
@@ -0,0 +1 @@
+refreshPart('matrix',"./ajaxMatrix");
diff --git a/src/main/resources/lib/hudson/matrix-project/matrix.jelly b/src/main/resources/lib/hudson/matrix-project/matrix.jelly
index 0bf1c040..b4461a3c 100644
--- a/src/main/resources/lib/hudson/matrix-project/matrix.jelly
+++ b/src/main/resources/lib/hudson/matrix-project/matrix.jelly
@@ -99,9 +99,7 @@ THE SOFTWARE.
-
+