Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9 from recena/JENKINS-31162
Support for Item categorization in Jenkins 2
  • Loading branch information
recena committed Mar 31, 2016
2 parents c1725b5 + 58573c8 commit d1c1011
Show file tree
Hide file tree
Showing 32 changed files with 55 additions and 428 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 @@ -23,6 +23,8 @@ THE SOFTWARE.
-->

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core">
<div>
${%body}
</div>
<j:out value="${it.description}"/>
</div>
</j:jelly>

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 d1c1011

Please sign in to comment.