Skip to content

Commit

Permalink
Utilize modern build status, update test table design and add dropdow…
Browse files Browse the repository at this point in the history
…n menu to modules (#251)

* feat: Utilize modern build status

* refactor: Exchange PNG with SVG reference

Minor refactoring due recent baseline bump

* Add dropdowns on modules
  • Loading branch information
NotMyFault authored Feb 12, 2022
1 parent 1d05ac4 commit c8e0d10
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/main/java/hudson/maven/MavenProbeAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public final class MavenProbeAction implements Action {

public String getIconFileName() {
if(channel==null) return null;
return "computer.png";
return "computer.svg";
}

public String getDisplayName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public String getBuildStatusUrl() {
@Exported
public BallColor getIconColor() {
if(result==null)
return BallColor.GREY_ANIME;
return BallColor.NOTBUILT_ANIME;
else
return result.color;
}
Expand Down Expand Up @@ -169,7 +169,7 @@ protected ACL getACL() {
}

public final String getIconFileName() {
return getACL().hasPermission(getPermission()) ? "redo.png" : null;
return getACL().hasPermission(getPermission()) ? "redo.svg" : null;
}

public final String getDisplayName() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/hudson/maven/reporters/MavenSiteArchiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public String getDisplayName() {

public String getIconFileName() {
if(getSiteDir(project).exists())
return "help.png";
return "help.svg";
else
// hide it since we don't have site yet.
return null;
Expand All @@ -174,7 +174,7 @@ public String getIconFileName() {
*/
public DirectoryBrowserSupport doDynamic() {
File siteDir = getSiteDir(project);
return new DirectoryBrowserSupport(project, new FilePath(siteDir), project.getDisplayName() + " site", "help.gif", !new File(siteDir, "index.html").isFile());
return new DirectoryBrowserSupport(project, new FilePath(siteDir), project.getDisplayName() + " site", "help.svg", !new File(siteDir, "index.html").isFile());
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/hudson/maven/MavenModuleSet/index.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ THE SOFTWARE.
${act.displayName}
</t:summary>
</j:forEach>
<t:summary icon="folder.png" href="ws/" permission="${it.WORKSPACE}">
<t:summary icon="folder.svg" href="ws/" permission="${it.WORKSPACE}">
${%Workspace}
</t:summary>

<t:artifactList caption="${%Last Successful Artifacts}"
build="${it.lastSuccessfulBuild}" baseURL="lastSuccessfulBuild/"
permission="${it.lastSuccessfulBuild.ARTIFACTS}" />

<t:summary icon="notepad.png" href="changes">
<t:summary icon="notepad.svg" href="changes">
${%Recent Changes}
</t:summary>

<j:set var="tr" value="${it.testResultAction}"/>
<j:if test="${tr!=null}">
<t:summary icon="clipboard.png">
<t:summary icon="clipboard.svg">
<a href="lastBuild/testReport/">${%Latest Test Result}</a>
<st:nbsp/>
<t:test-result it="${tr}" />
Expand All @@ -76,4 +76,4 @@ THE SOFTWARE.
<st:include page="permalinks.jelly" />
</l:main-panel>
</l:layout>
</j:jelly>
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<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">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson">
<h2>${%Module Builds}</h2>
<table>
<j:forEach var="m" items="${it.moduleBuilds}">
<tr>
<j:choose>
<j:when test="${m.value.size()==0}">
<td class="no-wrap">
<img src="${imagesURL}/16x16/grey.png" alt="" height="16" width="16"/>
<l:icon class="icon-nobuilt icon-sm" alt="" />
<st:nbsp/>${m.key.displayName} (${%noRun})
</td><td>
</td>
Expand All @@ -39,11 +39,10 @@ THE SOFTWARE.
<j:set var="mb" value="${m.value.get(0)}"/>
<td class="no-wrap">
<a href="${m.key.shortUrl}">
<img src="${imagesURL}/16x16/${mb.buildStatusUrl}"
alt="${mb.iconColor.description}" height="16" width="16"/>
<l:icon class="${mb.iconColor.iconClassName} icon-sm" alt="${mb.iconColor.description}" />
</a>
<st:nbsp/>
<a href="${m.key.shortUrl}">
<a href="${m.key.shortUrl}" class="model-link">
${m.key.displayName}
</a>
</td><td data="${mb.duration}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ THE SOFTWARE.
-->

<?jelly escape-by-default='true'?>
<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:test="/lib/test">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:test="/lib/test">
<l:layout>
<st:include it="${it.owner}" page="sidepanel.jelly" />
<l:main-panel>
Expand All @@ -32,14 +32,16 @@ THE SOFTWARE.
<j:set var="prev" value="${it.previousResult}" />
<test:bar />

<table class="pane sortable bigtable" id="testresult">
<tr>
<td class="pane-header">${%Module}</td>
<td class="pane-header" style="width:5em">${%Fail}</td>
<td class="pane-header" style="width:1em; font-size:smaller; white-space:nowrap;">(${%diff})</td>
<td class="pane-header" style="width:5em">${%Total}</td>
<td class="pane-header" style="width:1em; font-size:smaller; white-space:nowrap;">(${%diff})</td>
</tr>
<table class="pane sortable jenkins-table" id="testresult">
<thead>
<tr>
<td class="pane-header">${%Module}</td>
<td class="pane-header" style="width:5em">${%Fail}</td>
<td class="pane-header" style="width:1em; font-size:smaller; white-space:nowrap;">(${%diff})</td>
<td class="pane-header" style="width:5em">${%Total}</td>
<td class="pane-header" style="width:1em; font-size:smaller; white-space:nowrap;">(${%diff})</td>
</tr>
</thead>
<tbody>
<j:forEach var="c" items="${it.children}">
<j:set var="p" value="${it.getChildReport(c)}"/>
Expand Down

0 comments on commit c8e0d10

Please sign in to comment.