Skip to content

Commit

Permalink
Use ionicons API (#296)
Browse files Browse the repository at this point in the history
feat: Use ionicons API
  • Loading branch information
NotMyFault authored Sep 14, 2022
1 parent e402216 commit 0340173
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 166 deletions.
Original file line number Diff line number Diff line change
@@ -1,88 +1,88 @@
<?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:p="/lib/hudson/project">
<j:forEach var="builder" items="${builders}">
<j:choose>
<j:when test="${!lastPhase.equals(builder.phaseName)}">
<j:set var="lastPhase" value="${builder.phaseName}"/>
<j:set var="indent" value="${indent - 1}"/>
<tr>
<td></td>
<td></td>
<td class="phase" style="padding-left:${indent * 20}px;font-style:italic;font-size:smaller;font-weight:bold;">
${builder.phaseName}
</td>
<td></td>
<td></td>
<td></td>
</tr>
<j:set var="indent" value="${indent + 1}"/>
</j:when>
<tr>
<td class="no-wrap" align="center" width="28px">
<span class="job"><img src="${imagesURL}/24x24/${builder.icon}" alt=""/></span>
</td>
<td class="no-wrap" align="center" width="24px">
<j:choose>
<j:when test="${builder.isRetry()}">
<img src="${rootURL}/plugin/jenkins-multijob-plugin/retry.gif" title="Failure, retry this build." alt="Failure, retry this build."/>
</j:when>
</j:choose>
</td>
<td class="no-wrap" style="padding-left:${indent * 20}px" width="70%">
<a href="${rootURL}/${builder.url}">
<j:choose>
<j:if test="${builder.getJobAlias() != null}">
<j:when test="${builder.getJobAlias() != ''}">
${builder.jobName} (${builder.getJobAlias()})
</j:when>
</j:if>
<j:otherwise>
${builder.jobName}
</j:otherwise>
</j:choose>
</a>
</td>
<td class="no-wrap">
<j:choose>
<j:when test="${builder.url.length() > 0}">
<a href="${rootURL}/${builder.url}">
build #${builder.buildNumber}
</a>
</j:when>
</j:choose>
</td>
<td class="no-wrap">
<j:choose>
<j:when test="${builder.duration.length() > 0}">
( ${builder.duration} )
</j:when>
</j:choose>
</td>
<td class="no-wrap" align="center">
<a href="${rootURL}/${builder.url}console">
<l:icon class="icon-terminal icon-md" alt="Console Output" />
</a>
</td>
</tr>
</j:choose>
<j:choose>
<j:when test="${builder.isMultiJobBuild()}">
<j:set var="oldLastPhase" value="${lastPhase}"/>
<j:set var="oldBuilders" value="${builders}"/>
<j:set var="oldIndent" value="${indent}"/>

<j:set var="lastPhase" value=""/>
<j:set var="builders" value="${builder.build.getSubBuilds()}"/>
<j:set var="indent" value="${indent + 2}"/>

<st:include page="table.jelly" />

<j:set var="lastPhase" value="${oldLastPhase}"/>
<j:set var="builders" value="${oldLastBuilders}"/>
<j:set var="indent" value="${oldIndent}"/>
</j:when>
</j:choose>
</j:forEach>
</j:jelly>
<?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:p="/lib/hudson/project">
<j:forEach var="builder" items="${builders}">
<j:choose>
<j:when test="${!lastPhase.equals(builder.phaseName)}">
<j:set var="lastPhase" value="${builder.phaseName}"/>
<j:set var="indent" value="${indent - 1}"/>
<tr>
<td></td>
<td></td>
<td class="phase" style="padding-left:${indent * 20}px;font-style:italic;font-size:smaller;font-weight:bold;">
${builder.phaseName}
</td>
<td></td>
<td></td>
<td></td>
</tr>
<j:set var="indent" value="${indent + 1}"/>
</j:when>
<tr>
<td class="no-wrap" align="center" width="28px">
<span class="job"><img src="${imagesURL}/24x24/${builder.icon}" alt=""/></span>
</td>
<td class="no-wrap" align="center" width="24px">
<j:choose>
<j:when test="${builder.isRetry()}">
<img src="${rootURL}/plugin/jenkins-multijob-plugin/retry.gif" title="Failure, retry this build." alt="Failure, retry this build."/>
</j:when>
</j:choose>
</td>
<td class="no-wrap" style="padding-left:${indent * 20}px" width="70%">
<a href="${rootURL}/${builder.url}">
<j:choose>
<j:if test="${builder.getJobAlias() != null}">
<j:when test="${builder.getJobAlias() != ''}">
${builder.jobName} (${builder.getJobAlias()})
</j:when>
</j:if>
<j:otherwise>
${builder.jobName}
</j:otherwise>
</j:choose>
</a>
</td>
<td class="no-wrap">
<j:choose>
<j:when test="${builder.url.length() > 0}">
<a href="${rootURL}/${builder.url}">
build #${builder.buildNumber}
</a>
</j:when>
</j:choose>
</td>
<td class="no-wrap">
<j:choose>
<j:when test="${builder.duration.length() > 0}">
( ${builder.duration} )
</j:when>
</j:choose>
</td>
<td class="no-wrap" align="center">
<a href="${rootURL}/${builder.url}console">
<l:icon src="symbol-terminal-outline plugin-ionicons-api" class="icon-md" alt="Console Output" />
</a>
</td>
</tr>
</j:choose>
<j:choose>
<j:when test="${builder.isMultiJobBuild()}">
<j:set var="oldLastPhase" value="${lastPhase}"/>
<j:set var="oldBuilders" value="${builders}"/>
<j:set var="oldIndent" value="${indent}"/>

<j:set var="lastPhase" value=""/>
<j:set var="builders" value="${builder.build.getSubBuilds()}"/>
<j:set var="indent" value="${indent + 2}"/>

<st:include page="table.jelly" />

<j:set var="lastPhase" value="${oldLastPhase}"/>
<j:set var="builders" value="${oldLastBuilders}"/>
<j:set var="indent" value="${oldIndent}"/>
</j:when>
</j:choose>
</j:forEach>
</j:jelly>
Original file line number Diff line number Diff line change
@@ -1,57 +1,50 @@
<?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:p="/lib/hudson/project">

<j:if test="${it.supportsMakeDisabled()}">
<st:include page="makeDisabled.jelly" />
</j:if>

<!--j:choose>
<j:when test="${it.topMost}"-->
<br />
<t:projectView jobs="${it.view.getRootItem(it)}"
jobBaseUrl="${it.rootUrl}" showViewTabs="false" columnExtensions="${it.view.columns}">
</t:projectView>
<!--/j:when>
</j:choose-->


<p:projectActionFloatingBox />

<table style="margin-top: 1em; margin-left:1em;">

<j:forEach var="act" items="${it.prominentActions}">
<t:summary icon="${act.iconFileName}" href="${act.urlName}">
${act.displayName}
</t:summary>
</j:forEach>
<t:summary icon="folder.gif" 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.gif" href="changes">
${%Recent Changes}
</t:summary>

<j:set var="tr" value="${it.testResultAction}" />
<j:if test="${tr!=null}">
<t:summary icon="clipboard.gif">
<a href="lastCompletedBuild/testReport/">${%Latest Test Result}</a>
<st:nbsp />
<t:test-result it="${tr}" />
</t:summary>
</j:if>
</table>

<!-- merge fragments from the actions -->
<j:forEach var="a" items="${it.actions}">
<st:include page="jobMain.jelly" it="${a}" optional="true" />
</j:forEach>

<p:upstream-downstream />
</j:jelly>
<?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:p="/lib/hudson/project">

<j:if test="${it.supportsMakeDisabled()}">
<st:include page="makeDisabled.jelly" />
</j:if>

<!--j:choose>
<j:when test="${it.topMost}"-->
<br />
<t:projectView jobs="${it.view.getRootItem(it)}"
jobBaseUrl="${it.rootUrl}" showViewTabs="false" columnExtensions="${it.view.columns}">
</t:projectView>
<!--/j:when>
</j:choose-->


<p:projectActionFloatingBox />

<table style="margin-top: 1em; margin-left:1em;">

<j:forEach var="act" items="${it.prominentActions}">
<t:summary icon="${act.iconFileName}" href="${act.urlName}">
${act.displayName}
</t:summary>
</j:forEach>

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

<j:set var="tr" value="${it.testResultAction}" />
<j:if test="${tr!=null}">
<t:summary icon="clipboard.gif">
<a href="lastCompletedBuild/testReport/">${%Latest Test Result}</a>
<st:nbsp />
<t:test-result it="${tr}" />
</t:summary>
</j:if>
</table>

<!-- merge fragments from the actions -->
<j:forEach var="a" items="${it.actions}">
<st:include page="jobMain.jelly" it="${a}" optional="true" />
</j:forEach>

<p:upstream-downstream />
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@
<j:set var="open" value="showFailureSummary('test-${id}','${rootURL}/${report.child.url}testReport/${f.getRelativePathFrom(report.result)}/summary')"/>
<j:set var="close" value="hideFailureSummary('test-${id}')"/>
<a id="test-${id}-showlink" onclick="${open}" title="${%Show details}">
<l:icon class="icon-document-add icon-sm"/>
<l:icon src="symbol-add-outline plugin-ionicons-api" class="icon-sm"/>
</a>
<a id="test-${id}-hidelink" onclick="${close}" title="${%Hide details}" style="display:none">
<l:icon class="icon-document-delete icon-sm"/>
<l:icon src="symbol-remove-outline plugin-ionicons-api" class="icon-sm"/>
</a>
<st:nbsp/>

Expand All @@ -161,4 +161,4 @@
</j:if>
</l:main-panel>
</l:layout>
</j:jelly>
</j:jelly>
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<?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:set var="lBuild" value="${job.getLastBuild()}" />
<td data="${lBuild.duration ?: '0'}">
<j:choose>
<j:when test="${lBuild!=null}">
<a href="${job.absoluteUrl}${job.getBuildNumber()}/console">
<l:icon class="icon-terminal ${subIconSizeClass}" title="${%Console output}"
alt="${%Console output}" border="0" />
</a>
</j:when>
<j:otherwise>
</j:otherwise>
</j:choose>
</td>
</j:jelly>
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout">
<j:set var="lBuild" value="${job.getLastBuild()}" />
<td data="${lBuild.duration ?: '0'}">
<j:choose>
<j:when test="${lBuild!=null}">
<a href="${job.absoluteUrl}${job.getBuildNumber()}/console">
<l:icon src="symbol-terminal-outline plugin-ionicons-api" class="${subIconSizeClass}"
title="${%Console output}" alt="${%Console output}" border="0" />
</a>
</j:when>
<j:otherwise>
</j:otherwise>
</j:choose>
</td>
</j:jelly>

0 comments on commit 0340173

Please sign in to comment.