Skip to content

Commit

Permalink
[JENKINS-31162] Support for Item categorization in Jenkins 2
Browse files Browse the repository at this point in the history
  • Loading branch information
recena committed Mar 23, 2016
1 parent c1725b5 commit 295c7ef
Show file tree
Hide file tree
Showing 32 changed files with 52 additions and 427 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -3,3 +3,5 @@ work
/.project
/.settings
/.classpath
external-monitor-job.iml
.idea
33 changes: 33 additions & 0 deletions src/main/java/hudson/model/ExternalJob.java
Expand Up @@ -122,6 +122,39 @@ public String getDisplayName() {
return Messages.ExternalJob_displayName();
}

/**
* Needed if it wants External Monitor Jobs are categorized in Jenkins 2.x.
*
* TODO: Override when the baseline is upgraded to 2.x
*
* @return A string it represents a ItemCategory identifier.
*/
public String getCategoryId() {
return "standaloneprojects";
}

/**
* Needed if it wants External Monitor Jobs are categorized in Jenkins 2.x.
*
* TODO: Override when the baseline is upgraded to 2.x
*
* @return A string with the Item description.
*/
public String getDescription() {
return Messages.ExternalJob_Description();
}

/**
* Needed if it wants External Monitor Jobs are categorized in Jenkins 2.x.
*
* TODO: Override when the baseline is upgraded to 2.x
*
* @return A string it represents a URL pattern to get the Item icon in different sizes.
*/
public String getIconFilePathPattern() {
return "plugin/external-monitor-job/images/:size/externaljob.png";
}

public ExternalJob newInstance(ItemGroup parent, String name) {
return new ExternalJob(parent,name);
}
Expand Down
Expand Up @@ -24,5 +24,5 @@ THE SOFTWARE.

<?jelly escape-by-default='true'?>
<div>
${%body}
${it.description}
</div>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 295c7ef

Please sign in to comment.