Skip to content
Permalink
Browse files

Merge pull request #1437 from benru/JENKINS-25286

[FIXED JENKINS-25286] Export assignedLabels for agents and jobs in JSON and XML APIs
  • Loading branch information...
oleg-nenashev committed Dec 10, 2017
2 parents 59b9658 + 3a0a575 commit 972257bf322fc94b8c2a0095f5f04b91960a6888
@@ -407,6 +407,7 @@ public void setConcurrentBuild(boolean b) throws IOException {
/**
* Gets the textual representation of the assigned label as it was entered by the user.
*/
@Exported(name="labelExpression")
public String getAssignedLabelString() {
if (canRoam || assignedNode==null) return null;
try {
@@ -776,6 +776,12 @@ public String getUrl() {
return "computer/" + Util.rawEncode(getName()) + "/";
}

@Exported
public Set<LabelAtom> getAssignedLabels() {
Node node = getNode();
return (node != null) ? node.getAssignedLabels() : Collections.EMPTY_SET;
}

/**
* Returns projects that are tied on this node.
*/
@@ -127,7 +127,7 @@ protected boolean matches(Queue.Item item, SubTask subTask) {
/**
* Alias for {@link #getDisplayName()}.
*/
@Exported
@Exported(visibility=2)
public final String getName() {
return getDisplayName();
}

0 comments on commit 972257b

Please sign in to comment.
You can’t perform that action at this time.