forked from m-dhar/oslccm-plugin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding buildaction and projectaction
- Loading branch information
Showing
5 changed files
with
99 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/main/java/jenkins/plugins/oslccm/OslccmBuildAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package jenkins.plugins.oslccm; | ||
|
||
import java.io.IOException; | ||
|
||
import hudson.model.Action; | ||
import hudson.model.AbstractBuild; | ||
|
||
import org.kohsuke.stapler.StaplerRequest; | ||
import org.kohsuke.stapler.StaplerResponse; | ||
|
||
public class OslccmBuildAction implements Action { | ||
|
||
private AbstractBuild<?, ?> build; | ||
|
||
public OslccmBuildAction(AbstractBuild<?, ?> build) { | ||
this.build = build; | ||
|
||
} | ||
|
||
public AbstractBuild<?, ?> getBuild() { | ||
return build; | ||
} | ||
|
||
public void doDynamic(StaplerRequest req, StaplerResponse res) | ||
throws IOException { | ||
res.sendRedirect2("DelegatedBugReport"); | ||
return; | ||
|
||
} | ||
|
||
public String getIconFileName() { | ||
return "document.gif"; | ||
} | ||
|
||
public String getDisplayName() { | ||
|
||
return "Delegated OSLC Bug Report"; | ||
} | ||
|
||
public String getUrlName() { | ||
return "OSLC-CM"; | ||
} | ||
|
||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/jenkins/plugins/oslccm/OslccmProjectAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package jenkins.plugins.oslccm; | ||
|
||
import hudson.model.Action; | ||
import hudson.model.AbstractProject; | ||
|
||
public class OslccmProjectAction implements Action { | ||
private AbstractProject<?, ?> project; | ||
|
||
public OslccmProjectAction(AbstractProject<?, ?> project) { | ||
this.project = project; | ||
} | ||
|
||
public String getDisplayName() { | ||
return "Delegated Bug Report"; | ||
} | ||
|
||
public String getIconFileName() { | ||
return null; | ||
} | ||
|
||
public String getUrlName() { | ||
return null; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/resources/jenkins/plugins/oslccm/OslccmBuildAction/DelegatedBugReport.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt"> | ||
<l:layout> | ||
<st:include it="${it.build}" page="sidepanel.jelly"/> | ||
<l:main-panel> | ||
<h2>Delegated Bug Report</h2> | ||
<p>still under construction</p> | ||
</l:main-panel> | ||
</l:layout> | ||
</j:jelly> |
8 changes: 8 additions & 0 deletions
8
src/main/resources/jenkins/plugins/oslccm/OslccmProjectAction/jobMain.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<j:jelly xmlns:j="jelly:core" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
<table style="margin-top: 1em; margin-left:1em;"> | ||
<t:summary icon="document.gif"> | ||
<h2>OSLC stuff</h2> | ||
<li>dunno what to put here yet</li> | ||
</t:summary> | ||
</table> | ||
</j:jelly> |