Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Jun 26, 2022
1 parent b3048d9 commit 5d3aac9
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 31 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/jenkins/ui/icon/IconSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static String getSymbol(String name, String title, String tooltip, String
String symbol = symbolsForLookup.get(translatedName);
symbol = symbol.replaceAll("(class=\")[^&]*?(\")", "$1$2");
symbol = symbol.replaceAll("(tooltip=\")[^&]*?(\")", "");
symbol = symbol.replaceAll("(id=\")[^&]*?(\")", "");
symbol = symbol.replace("(id=\")[^&]*?(\")", "");
if (!tooltip.isEmpty()) {
symbol = symbol.replaceAll("<svg", "<svg tooltip=\"" + Functions.htmlAttributeEscape(tooltip) + "\"");
}
Expand Down Expand Up @@ -124,7 +124,7 @@ public static String getSymbol(String name, String title, String tooltip, String
symbol = symbol.replaceAll("(<title>)[^&]*(</title>)", "$1$2");
symbol = symbol.replaceAll("(class=\")[^&]*?(\")", "$1$2");
symbol = symbol.replaceAll("(tooltip=\")[^&]*?(\")", "$1$2");
symbol = symbol.replaceAll("(id=\")[^&]*?(\")", "");
symbol = symbol.replace("(id=\")[^&]*?(\")", "");
if (!tooltip.isEmpty()) {
symbol = symbol.replaceAll("<svg", "<svg tooltip=\"" + Functions.htmlAttributeEscape(tooltip) + "\"");
}
Expand Down
26 changes: 14 additions & 12 deletions core/src/main/resources/jenkins/model/Jenkins/legend.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -36,84 +36,84 @@ THE SOFTWARE.

<dl class="app-icon-legend">
<dt>
<l:icon src="symbol-status-blue" />
<l:icon class="icon-blue icon-xlg"/>
</dt>
<dd>
${%blue}
</dd>

<dt>
<l:icon src="symbol-status-blue_anime" />
<l:icon class="icon-blue-anime icon-xlg"/>
</dt>
<dd>
${%blue_anime}
</dd>

<dt>
<l:icon src="symbol-status-yellow" />
<l:icon class="icon-yellow icon-xlg"/>
</dt>
<dd>
${%yellow}
</dd>

<dt>
<l:icon src="symbol-status-yellow_anime" />
<l:icon class="icon-yellow-anime icon-xlg"/>
</dt>
<dd>
${%yellow_anime}
</dd>

<dt>
<l:icon src="symbol-status-red" />
<l:icon class="icon-red icon-xlg"/>
</dt>
<dd>
${%red}
</dd>

<dt>
<l:icon src="symbol-status-red_anime" />
<l:icon class="icon-red-anime icon-xlg"/>
</dt>
<dd>
${%red_anime}
</dd>

<dt>
<l:icon src="symbol-status-notbuilt" />
<l:icon class="icon-nobuilt icon-xlg"/>
</dt>
<dd>
${%lightgrey}
</dd>

<dt>
<l:icon src="symbol-status-notbuilt_anime" />
<l:icon class="icon-nobuilt-anime icon-xlg"/>
</dt>
<dd>
${%lightgrey_anime}
</dd>

<dt>
<l:icon src="symbol-status-disabled" class="you-know" />
<l:icon class="icon-disabled icon-xlg"/>
</dt>
<dd>
${%grey}
</dd>

<dt>
<l:icon src="symbol-status-disabled_anime" />
<l:icon class="icon-disabled-anime icon-xlg"/>
</dt>
<dd>
${%grey_anime}
</dd>

<dt>
<l:icon src="symbol-status-aborted" />
<l:icon class="icon-aborted icon-xlg"/>
</dt>
<dd>
${%darkgrey}
</dd>

<dt>
<l:icon src="symbol-status-aborted_anime" />
<l:icon class="icon-aborted-anime icon-xlg"/>
</dt>
<dd>
${%darkgrey_anime}
Expand All @@ -122,6 +122,8 @@ THE SOFTWARE.

<h2>${%Weather}</h2>

<p class="jenkins-description">${%iconDescription}</p>

<dl class="app-icon-legend">
<dt>
<l:icon src="symbol-weather-icon-health-80plus" />
Expand Down
12 changes: 6 additions & 6 deletions core/src/main/resources/jenkins/model/Jenkins/legend.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ yellow=The last build was successful but unstable. \
yellow_anime=The last build was successful but unstable. A new build is in progress.
red=The last build failed.
red_anime=The last build failed. A new build is in progress.
health-81plus=Project health is over 80%. You can hover the mouse over the project\u2019s icon for a more detailed explanation.
health-61to80=Project health is over 60% and up to 80%. You can hover the mouse over the project\u2019s icon for a more detailed explanation.
health-41to60=Project health is over 40% and up to 60%. You can hover the mouse over the project\u2019s icon for a more detailed explanation.
health-21to40=Project health is over 20% and up to 40%. You can hover the mouse over the project\u2019s icon for a more detailed explanation.
health-00to20=Project health is 20% or less. You can hover the mouse over the project\u2019s icon for a more detailed explanation.

health-81plus=Project health is over 80%
health-61to80=Project health is over 60% and up to 80%
health-41to60=Project health is over 40% and up to 60%
health-21to40=Project health is over 20% and up to 40%
health-00to20=Project health is 20% or less
iconDescription=You can hover your mouse over a project\u2019s icon for a more detailed explanation
2 changes: 1 addition & 1 deletion war/src/main/less/abstracts/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
purple: #af52de;
red: #e6001f;
yellow: #ffcc00;
gray: #747292;
gray: #a3a3c2;
}

@semantics: {
Expand Down
15 changes: 8 additions & 7 deletions war/src/main/less/modules/table.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
vertical-align: middle;
padding: var(--table-padding) 0 var(--table-padding) var(--table-padding);
font-weight: 500;
height: 50px;
height: 3rem;

&:first-of-type {
padding-left: calc(var(--table-padding) * 2);
Expand Down Expand Up @@ -141,8 +141,9 @@

&__button, &__icon {
svg, .build-status-icon__wrapper, img {
width: 24px !important;
height: 24px !important;
width: auto;
height: 1.5rem !important;
max-width: 1.7rem;
}
}

Expand All @@ -155,8 +156,8 @@

.jenkins-table__button, .jenkins-table__link, .jenkins-table__icon {
svg, .build-status-icon__wrapper, img {
width: 20px !important;
height: 20px !important;
height: 1.3rem !important;
max-width: 1.5rem !important;
}
}
}
Expand All @@ -170,8 +171,8 @@

.jenkins-table__button, .jenkins-table__link, .jenkins-table__icon {
svg, .build-status-icon__wrapper, img {
width: 16px !important;
height: 16px !important;
height: 1rem !important;
max-width: 1.2rem !important;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion war/src/main/less/pages/icon-legend.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.app-icon-legend {
display: grid;
grid-template-columns: auto 1fr;
grid-gap: 1rem;
gap: calc(var(--section-padding) / 2);
align-items: center;
margin: 0;
padding: 0;
Expand All @@ -24,5 +24,6 @@
dd {
margin: 0;
padding: 0;
font-weight: 500;
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5d3aac9

Please sign in to comment.