Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add modern icons following new Jenkins UI style #199

Merged
merged 24 commits into from
May 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<version>${changelist}</version>

<name>Jenkins Job Configuration History Plugin</name>
<description>Saves copies of job, node and system configurations.</description>
NotMyFault marked this conversation as resolved.
Show resolved Hide resolved
<url>https://github.com/jenkinsci/job-config-history-plugin</url>

<issueManagement>
Expand Down Expand Up @@ -51,7 +50,7 @@

<properties>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.version>2.319.3</jenkins.version>
<jenkins.version>2.346</jenkins.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<maven-surefire-report-plugin.version>${maven-surefire-plugin.version}</maven-surefire-report-plugin.version>
<maven-hpi-plugin.injectedTestName>InjectedIT</maven-hpi-plugin.injectedTestName>
Expand All @@ -68,7 +67,7 @@
</dependency>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.319.x</artifactId>
<artifactId>bom-2.346.x</artifactId>
<version>1382.v7d694476f340</version>
<scope>import</scope>
<type>pom</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public String getTooltip() {
* @return Icon path as string
*/
public String getIcon() {
return "/plugin/jobConfigHistory/img/buildbadge.svg";
return "symbol-buildbadge plugin-jobConfigHistory";
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public final class JobConfigHistoryConsts {
/**
* Path to the icon.
*/
public static final String ICONFILENAME = "/plugin/jobConfigHistory/img/confighistory.svg";
public static final String ICONFILENAME = "symbol-confighistory plugin-jobConfigHistory";

/**
* Default root directory for storing history.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@
<div>

<script src="${rootURL}/plugin/jobConfigHistory/deleteRevisionAndTableEntry.js"/>
<script type="text/javascript">
function showTooltip(nr) {
document.getElementById('tooltip' + nr).style.visibility = 'visible';
}
function hideTooltip(nr) {
document.getElementById('tooltip' + nr).style.visibility = 'hidden';
}
</script>
<j:set var="configs" value="${it.getAgentConfigs()}" />
<j:choose>
<j:when test="${configs.size() == 0}">
Expand Down Expand Up @@ -67,8 +59,9 @@
<td>
<j:if test="${(config.currentName!=null) and (! config.currentName.isEmpty())}">
<span>${config.operation}</span>
<img onmouseOver="showTooltip(${configNr})" onmouseLeave="hideTooltip(${configNr})" style="height: 16px;margin-left: 10px;width: 16px" src="${resURL}/plugin/jobConfigHistory/img/info.svg" alt="${%Info}" />
<div style="margin-top: 15px;visibility: hidden; position: absolute; background-color: beige; padding: 3px; border: 1px solid black;" id="tooltip${configNr}">${%Old name}: ${config.oldName}<br />${%New name}: ${config.currentName}</div>
<span class="icon-sm" data-html="true" >
<l:icon src="symbol-info plugin-jobConfigHistory" tooltip="${%Old name}: ${config.oldName} => ${%New name}: ${config.currentName}" alt="${%Info}" />
</span>
</j:if>
<j:if test="${(config.currentName==null) || (config.currentName.isEmpty())}">
${config.operation}
Expand All @@ -88,8 +81,10 @@
<td style=" text-align:center">
<j:set var="revisionEqualsCurrent" value="${it.revisionEqualsCurrent(config.getDate())}"/>
<j:if test="${!revisionEqualsCurrent and !fileMissing}">
<a id="restore${configNr}" href="restoreQuestion?timestamp=${config.getDate()}">
<img src="/plugin/jobConfigHistory/img/restore.svg" height="16" width="16" alt="${%Restore}" />
<a href="restoreQuestion?timestamp=${config.getDate()}" style="text-decoration: none">
<span class="icon-md">
<l:icon id="restore${configNr}" src="symbol-restore plugin-jobConfigHistory" title="${%Restore}" />
</span>
</a>
<j:if test="${configNr == 1}">
<!--The current version is not present in history!-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core">
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout">
<j:if test="${it.showBadge() and it.oldConfigsExist()}">
<a href="${it.createLink()}" id="showDiff">
<img width="16" height="16" title="${it.getTooltip()}" alt="x" src="${resURL}${it.getIcon()}"/>
<a href="${it.createLink()}" style="text-decoration: none">
<span class="icon-sm">
<l:icon id="showDiff" src="${it.getIcon()}" title="${it.getTooltip()}" />
</span>
</a>
</j:if>
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@
<div>

<script src="${rootURL}/plugin/jobConfigHistory/deleteRevisionAndTableEntry.js"/>
<script type="text/javascript">
function showTooltip(nr) {
document.getElementById('tooltip' + nr).style.visibility = 'visible';
}
function hideTooltip(nr) {
document.getElementById('tooltip' + nr).style.visibility = 'hidden';
}
</script>

<j:set var="defaultEntriesPerPage" value="${it.getMaxEntriesPerPage()}"/>
<j:set var="pageNum" value="${request.getParameter('pageNum')}"/>
<j:set var="entriesPerPage" value="${request.getParameter('entriesPerPage')}"/>
Expand Down Expand Up @@ -84,14 +75,17 @@
<td>
<j:if test="${(config.currentName!=null) and (! config.currentName.isEmpty())}">
<span>${config.operation}</span>
<img onmouseOver="showTooltip(${configNr})" onmouseLeave="hideTooltip(${configNr})" style="height: 16px;margin-left: 10px;width: 16px" src="${resURL}/plugin/jobConfigHistory/img/info.svg" alt="${%Info}" />
<div style="margin-top: 15px;visibility: hidden; position: absolute; background-color: beige; padding: 3px; border: 1px solid black;" id="tooltip${configNr}">${%Old name}: ${config.oldName}<br />${%New name}: ${config.currentName}</div>
<span class="icon-sm" >
<l:icon src="symbol-info plugin-jobConfigHistory" tooltip="${%Old name}: ${config.oldName} => ${%New name}: ${config.currentName}" alt="${%Info}" />
</span>
</j:if>
<j:if test="${(config.currentName==null) || (config.currentName.isEmpty())}">
${config.operation}
</j:if>
<j:if test="${config.changeReasonComment != null and !config.changeReasonComment.equals(&quot;&quot;)}">
<img style="height: 16px;margin-left: 10px;width: 16px" src="${resURL}/plugin/jobConfigHistory/img/info.svg" title="${%Change Message}: &quot;${config.changeReasonComment}&quot;"/>
<span class="icon-sm">
<l:icon src="symbol-info plugin-jobConfigHistory" title="${%Change Message}: &quot;${config.changeReasonComment}&quot;" />
</span>
</j:if>
</td>
<j:if test="${it.hasConfigurePermission() || it.hasJobConfigurePermission()}">
Expand All @@ -111,8 +105,10 @@
<td style="text-align:center">
<j:set var="revisionEqualsCurrent" value="${it.revisionEqualsCurrent(config.getDate())}"/>
<j:if test="${!revisionEqualsCurrent and !fileMissing}">
<a id="restore${configNr}" href="restoreQuestion?timestamp=${config.getDate()}">
<img src="/plugin/jobConfigHistory/img/restore.svg" height="16" width="16" alt="${%Restore}" />
<a href="restoreQuestion?timestamp=${config.getDate()}" style="text-decoration: none">
<span class="icon-md">
<l:icon id="restore${configNr}" src="symbol-restore plugin-jobConfigHistory" title="${%Restore}" />
</span>
</a>
<j:if test="${configNr == 1 and pageNum == 0}">
<!--The current version is not present in history!-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<l:side-panel>
<l:tasks>
<l:task icon="icon-up icon-md" href="${rootURL}/" title="${%Back to Dashboard}" />
<l:task icon="plugin/jobConfigHistory/img/confighistory.svg" href="${rootURL}/jobConfigHistory" title="${%Back to Overview}" />
<l:task icon="symbol-confighistory plugin-jobConfigHistory" href="${rootURL}/jobConfigHistory" title="${%Back to Overview}" />
<j:choose>
<j:when test="${isDeleted}">
<l:task icon="plugin/jobConfigHistory/img/filter.svg" href="${rootURL}/jobConfigHistory/?filter=deleted" title="${%Back to Deleted Jobs}" />
<l:task icon="symbol-filter plugin-jobConfigHistory" href="${rootURL}/jobConfigHistory/?filter=deleted" title="${%Back to Deleted Jobs}" />
</j:when>
<j:otherwise>
<l:task icon="plugin/jobConfigHistory/img/filter.svg" href="${rootURL}/jobConfigHistory/?filter=system" title="${%Back to System History}" />
<l:task icon="symbol-filter plugin-jobConfigHistory" href="${rootURL}/jobConfigHistory/?filter=system" title="${%Back to System History}" />
</j:otherwise>
</j:choose>
</l:tasks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<l:side-panel>
<l:tasks>
<l:task icon="icon-up icon-md" href="${rootURL}/" title="${%Back to Dashboard}" />
<l:task icon="plugin/jobConfigHistory/img/filter.svg" href="?filter=system" title="${%Show system configs only}" />
<l:task icon="plugin/jobConfigHistory/img/filter.svg" href="?filter=jobs" title="${%Show job configs only}" />
<l:task icon="plugin/jobConfigHistory/img/filter.svg" href="?filter=created" title="${%Show created jobs only}" />
<l:task icon="plugin/jobConfigHistory/img/filter.svg" href="?filter=deleted" title="${%Show deleted jobs only}" />
<l:task icon="symbol-filter plugin-jobConfigHistory" href="?filter=system" title="${%Show system configs only}" />
<l:task icon="symbol-filter plugin-jobConfigHistory" href="?filter=jobs" title="${%Show job configs only}" />
<l:task icon="symbol-filter plugin-jobConfigHistory" href="?filter=created" title="${%Show created jobs only}" />
<l:task icon="symbol-filter plugin-jobConfigHistory" href="?filter=deleted" title="${%Show deleted jobs only}" />
<l:task icon="icon-document icon-md" href="?filter=all" title="${%Show all configs}" />
</l:tasks>
</l:side-panel>
Expand Down Expand Up @@ -187,8 +187,10 @@
<!--this prevents people from destroying their history by trying to restore deleted folder jobs
TODO Fix that. (see code)-->
<j:if test="${config.job.replace('/jobs', '/job').equals(config.job)}">
<a id="restore" href="restoreQuestion?name=${config.getJob()}">
<img src="/plugin/jobConfigHistory/img/restore.svg" height="16" width="16" alt="${%Restore}" />
<a href="restoreQuestion?name=${config.getJob()}" style="text-decoration: none">
<span class="icon-md">
<l:icon id="restore" src="symbol-restore plugin-jobConfigHistory" title="${%Restore}" />
</span>
</a>
</j:if>
</j:if>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<l:side-panel>
<l:tasks>
<l:task icon="icon-up icon-md" href="${rootURL}/" title="${%Back to Dashboard}" />
<l:task icon="plugin/jobConfigHistory/img/confighistory.svg" href="${rootURL}/jobConfigHistory" title="${%Back to Overview}" />
<l:task icon="symbol-confighistory plugin-jobConfigHistory" href="${rootURL}/jobConfigHistory" title="${%Back to Overview}" />
</l:tasks>
</l:side-panel>
<l:main-panel>
Expand Down
19 changes: 19 additions & 0 deletions src/main/resources/images/symbols/buildbadge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/resources/images/symbols/confighistory.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/main/resources/images/symbols/filter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions src/main/resources/images/symbols/info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading