Skip to content

Commit

Permalink
Merge pull request #10 from mixalturek/master
Browse files Browse the repository at this point in the history
[JENKINS-22215] Side panel menu is missing on pages with listing of s…
  • Loading branch information
mixalturek committed Mar 16, 2014
2 parents d72781b + 56e50f4 commit b9d148b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
Expand Up @@ -242,5 +242,14 @@ public String getSourceCode() {
public CppcheckWorkspaceFile getCppcheckWorkspaceFile() {
return cppcheckWorkspaceFile;
}

/**
* Get the owner build.
*
* @return the build
*/
public AbstractBuild<?, ?> getOwner() {
return owner;
}
}

Expand Up @@ -103,6 +103,18 @@ public final String getFileName() {
return fileName;
}

/**
* Returns the name of this file, allow wrap of long paths in a HTML page.
*
* @return the name of this file with <wbr /> element after each slash
*/
public final String getFileNameHtmlWrap() {
if(fileName == null)
return "";

return fileName.replace("/", "/<wbr />");
}

public String getTempName(final AbstractBuild<?, ?> owner) {
if (fileName != null) {
return owner.getRootDir().getAbsolutePath() + "/"
Expand Down
Expand Up @@ -26,7 +26,7 @@ public AbstractCppcheckProjectAction(AbstractProject<?, ?> project) {
}

public String getIconFileName() {
return "/plugin/cppcheck/icons/cppcheck-24.png";
return "/plugin/cppcheck/icons/cppcheck-48.png";
}

public String getSearchUrl() {
Expand Down
Expand Up @@ -28,12 +28,13 @@
xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<st:header name="Content-Type" value="text/html;charset=UTF-8"/>
<l:layout norefresh="true">

<st:include it="${it.owner}" page="sidepanel.jelly"/>
<l:main-panel>
<h1>${%sourcedetail.header(it.cppcheckWorkspaceFile.fileName)}</h1>
<h1>${%Cppcheck Results}</h1>

${it.sourceCode}
<h2>${%sourcedetail.header(it.cppcheckWorkspaceFile.fileNameHtmlWrap)}</h2>

${it.sourceCode}
</l:main-panel>
</l:layout>
</j:jelly>

0 comments on commit b9d148b

Please sign in to comment.