mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 12:05:19 +00:00
[JENKINS-68137] Enable custom icon symbols for plugins (#6395)
Co-authored-by: Ullrich Hafner <ullrich.hafner@gmail.com> Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
This commit is contained in:
8 files changed
+87
-15
No files matched your search
@@ -2320,6 +2320,26 @@ public class Functions {
|
||||
return iconMetadata;
|
||||
}
|
||||
|
||||
@Restricted(NoExternalUse.class)
|
||||
public static String extractPluginNameFromIconSrc(String iconSrc) {
|
||||
if (iconSrc == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (!iconSrc.contains("plugin-")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String[] arr = iconSrc.split(" ");
|
||||
for (String element : arr) {
|
||||
if (element.startsWith("plugin-")) {
|
||||
return element.replace("plugin-", "");
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
@Restricted(NoExternalUse.class)
|
||||
public static String tryGetIconPath(String iconGuess, JellyContext context) {
|
||||
if (iconGuess == null) {
|
||||
|
||||
Reference in new issue
Block a user