bug fix in the UI hookup

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@33851 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2010-08-14 17:53:55 +00:00
1 parent e7a2a53afe
commit 46e185d3fb
3 files changed
+32 -19

No files matched your search

+8 -1
View File
@@ -101,10 +101,17 @@ public abstract class Label extends Actionable implements Comparable<Label>, Mod
return name;
}
public String getSearchUrl() {
/**
* Relative URL from the context path.
*/
public String getUrl() {
return "label/"+name;
}
public String getSearchUrl() {
return getUrl();
}
/**
* Evaluates whether the label expression is true given the specified value assignment.
* IOW, returns true if the assignment provided by the resolver matches this label expression.
@@ -91,22 +91,25 @@ public class LabelAtom extends Label implements Saveable {
Vector<Action> ta = new Vector<Action>();
// add the config link
ta.add(new Action() {
public String getIconFileName() {
if (Hudson.getInstance().hasPermission(Hudson.ADMINISTER))
return "setting.gif";
else
return null;
}
if (!getApplicablePropertyDescriptors().isEmpty()) {
// if there's no property descriptor, there's nothing interesting to configure.
ta.add(new Action() {
public String getIconFileName() {
if (Hudson.getInstance().hasPermission(Hudson.ADMINISTER))
return "setting.gif";
else
return null;
}
public String getDisplayName() {
return "Configure";
}
public String getDisplayName() {
return "Configure";
}
public String getUrlName() {
return "configure";
}
});
public String getUrlName() {
return "configure";
}
});
}
for (LabelAtomProperty p : properties)
ta.addAll(p.getActions(this));
@@ -156,6 +159,7 @@ public class LabelAtom extends Label implements Saveable {
}
}
properties.setOwner(this);
updateTransientActions();
}
/**