本文整理了Java中hudson.model.Job.getIconColor()
方法的一些代码示例,展示了Job.getIconColor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.getIconColor()
方法的具体详情如下:
包路径:hudson.model.Job
类名称:Job
方法名:getIconColor
[英]Used as the color of the status ball for the project.
[中]用作项目状态球的颜色。
代码示例来源:origin: jenkinsci/jenkins
/**
* Converts the Hudson build status to CruiseControl build status,
* which is either Success, Failure, Exception, or Unknown.
*/
public static String toCCStatus(Item i) {
if (i instanceof Job) {
Job j = (Job) i;
switch (j.getIconColor()) {
case ABORTED:
case ABORTED_ANIME:
case RED:
case RED_ANIME:
case YELLOW:
case YELLOW_ANIME:
return "Failure";
case BLUE:
case BLUE_ANIME:
return "Success";
case DISABLED:
case DISABLED_ANIME:
case GREY:
case GREY_ANIME:
case NOTBUILT:
case NOTBUILT_ANIME:
return "Unknown";
}
}
return "Unknown";
}
代码示例来源:origin: jenkinsci/jenkins
public String getBuildStatusUrl() {
return getIconColor().getImage();
}
代码示例来源:origin: jenkinsci/jenkins
public String getBuildStatusIconClassName() {
return getIconColor().getIconClassName();
}
代码示例来源:origin: jenkinsci/jenkins
@Override
public BallColor getIconColor() {
if(isDisabled())
return isBuilding() ? BallColor.DISABLED_ANIME : BallColor.DISABLED;
else
return super.getIconColor();
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Adds a child item when rendering context menu of its parent.
*
* @since 1.513
*/
public ContextMenu add(Job job) {
return add(new MenuItem()
.withDisplayName(job.getDisplayName())
.withIcon(job.getIconColor())
.withUrl(job.getSearchUrl()));
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
@Override
public BallColor getIconColor() {
if(isDisabled())
return BallColor.DISABLED;
else
return super.getIconColor();
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
@Override
public BallColor getIconColor() {
if (isDisabled()) {
return BallColor.DISABLED;
} else {
return super.getIconColor();
}
}
代码示例来源:origin: yannickcr/jenkins-status-badges-plugin
public HttpResponse doIcon( StaplerRequest req, StaplerResponse rsp, @QueryParameter String style )
throws IOException, FontFormatException
{
return factory.getBuildImage( project.getIconColor(), style );
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
@Override
public BallColor getIconColor() {
if (isDisabled()) {
return BallColor.DISABLED;
} else {
return super.getIconColor();
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public String getBuildStatusUrl() {
return getIconColor().getImage();
}
代码示例来源:origin: hudson/hudson-2.x
@Override
public BallColor getIconColor() {
if(isDisabled())
return BallColor.DISABLED;
else
return super.getIconColor();
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
public String getBuildStatusUrl() {
return getIconColor().getImage();
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
public String getBuildStatusIconClassName() {
return getIconColor().getIconClassName();
}
代码示例来源:origin: yannickcr/jenkins-status-badges-plugin
public HttpResponse doIcon( StaplerRequest req, StaplerResponse rsp, @QueryParameter String job,
@QueryParameter String style )
throws IOException, FontFormatException
{
Job<?, ?> project = buildStatus.getProject( job, req, rsp );
return iconResolver.getBuildImage( project.getIconColor(), style );
}
代码示例来源:origin: org.jenkins-ci.plugins.workflow/workflow-job
@Override public BallColor getIconColor() {
if (isDisabled()) {
return isBuilding() ? BallColor.DISABLED_ANIME : BallColor.DISABLED;
} else {
return super.getIconColor();
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
public static BallColor getJobStatusIcon(String jobName){
TopLevelItem job = Hudson.getInstance().getItem(jobName);
if (job != null && job instanceof Job){
return ((Job)job).getIconColor();
}
return null;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
public BallColor getIconColor() {
if(isDisabled())
return isBuilding() ? BallColor.DISABLED_ANIME : BallColor.DISABLED;
else
return super.getIconColor();
}
代码示例来源:origin: jenkinsci/embeddable-build-status-plugin
public String doText(StaplerRequest req, StaplerResponse rsp, @QueryParameter String job, @QueryParameter String build) {
if (job == null) {
return "Missing query parameter: job";
}
Job<?, ?> project = getProject(job, true);
if(build != null) {
Run<?, ?> run = getRun(project, build, true);
return run.getIconColor().getDescription();
} else {
return project.getIconColor().getDescription();
}
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
@Override
@Exported(visibility = 2, name = "color")
public BallColor getIconColor() {
initPython();
if (pexec.isImplemented(61)) {
return (BallColor) pexec.execPython("get_icon_color");
} else {
return super.getIconColor();
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Adds a child item when rendering context menu of its parent.
*
* @since 1.513
*/
public ContextMenu add(Job job) {
return add(new MenuItem()
.withDisplayName(job.getDisplayName())
.withIcon(job.getIconColor())
.withUrl(job.getSearchUrl()));
}
内容来源于网络,如有侵权,请联系作者删除!