-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Modernize build status and weather icons #5065
Merged
Merged
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
4c27438
Inline icon-set lib
timja d556c74
Add @since 2.0
timja 472804c
Merge branch 'master' into inline-icon-set-lib
timja 8ea006f
Merge branch 'master' into inline-icon-set-lib
timja d4d40a1
Merge branch 'inline-icon-set-lib' of github.com:timja/jenkins into i…
timja 7206870
Downgrade iconset to 1.0.5 version
timja 913c52b
Fix javadoc
timja b07e165
Missed one javadoc error
timja 43b1e7c
Add support for svg icons in actions
timja e128508
Change help icon
timja 63763e2
Fix large SVG icons
timja 61c3dec
Experiment with font awesome
timja 6937e27
Add /manage support
timja b1a76e3
Merge branch 'master' into svg-icons
timja dd8ea43
Use material sprites (#30)
fqueiruga 974fd7d
Merge branch 'master' into pr/5065
fqueiruga a9b7cc9
Convert status icons to sprite
fqueiruga 8aa825d
Merge branch 'master' into pr/5065
fqueiruga 8ae2e25
Apply suggestions from code review
fqueiruga 080d1b5
Fix missing icons
timja 4534757
Replace weather icons with SVGs
fqueiruga 3ec7751
Update core/src/main/java/org/jenkins/ui/icon/WeatherIcon.java
fqueiruga 787db98
Fix IconTest
timja b74d7ac
Merge branch 'svg-icons' of github.com:timja/jenkins into svg-icons
timja 76679ff
Apply suggestions from code review
fqueiruga ef2865b
Merge branch 'master' into svg-icons
timja 8cd47ac
Add class required for compat
timja ba286b6
Fix UpdateCenter
timja 1d1cd44
Simplify API for plugins
timja f24d465
Merge branch 'master' into svg-icons
timja 0864772
Remove unused icon types
timja ef6bc13
Remove other reference to unused code
timja 0fe9659
Review comments
timja f0324e8
Bit more javadoc
timja 03a6243
Change the build unstable status icon
fqueiruga b21f098
Revert sidebar changes and add license info
timja 1a8cedc
Revert missed icon clipboard
timja File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
core/src/main/java/org/jenkins/ui/icon/BuildStatusIcon.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright (c) 2021 CloudBees, Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
package org.jenkins.ui.icon; | ||
timja marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
import org.kohsuke.accmod.Restricted; | ||
import org.kohsuke.accmod.restrictions.NoExternalUse; | ||
|
||
/** | ||
* An icon used for build statuses | ||
*/ | ||
@Restricted(NoExternalUse.class) | ||
public class BuildStatusIcon extends Icon { | ||
timja marked this conversation as resolved.
Show resolved
Hide resolved
timja marked this conversation as resolved.
Show resolved
Hide resolved
|
||
private boolean inProgress; | ||
|
||
public BuildStatusIcon(String classSpec, String url, String style, boolean inProgress) { | ||
super(classSpec, url, style, IconFormat.EXTERNAL_SVG_SPRITE); | ||
this.inProgress = inProgress; | ||
} | ||
|
||
public BuildStatusIcon(String classSpec, String url, String style) { | ||
this(classSpec, url, style, false); | ||
} | ||
|
||
@Override | ||
public boolean isSvgSprite() { | ||
return super.isSvgSprite(); | ||
} | ||
|
||
public boolean isBuildStatus() { | ||
return true; | ||
} | ||
|
||
public boolean isInProgress() { | ||
return inProgress; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright (c) 2021 CloudBees, Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
package org.jenkins.ui.icon; | ||
timja marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* Format for the icon. | ||
* @since TODO | ||
*/ | ||
public enum IconFormat { | ||
timja marked this conversation as resolved.
Show resolved
Hide resolved
|
||
IMG, | ||
EXTERNAL_SVG_SPRITE, | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Felix created it, I just added the license header