diff --git a/core/src/main/java/hudson/search/Search.java b/core/src/main/java/hudson/search/Search.java index 1edbfdb5dc3f..97d15b65c2df 100644 --- a/core/src/main/java/hudson/search/Search.java +++ b/core/src/main/java/hudson/search/Search.java @@ -277,23 +277,23 @@ public static class Item { private final String type; - public final String iconXml; + private final String icon; public Item(String name) { this(name, null, null); } - public Item(String name, String url, String iconXml) { + public Item(String name, String url, String icon) { this.name = name; this.url = url; - this.iconXml = iconXml; + this.icon = icon; this.type = "symbol"; } - public Item(String name, String url, String iconXml, String type) { + public Item(String name, String url, String icon, String type) { this.name = name; this.url = url; - this.iconXml = iconXml; + this.icon = icon; this.type = type; } @@ -303,8 +303,8 @@ public String getUrl() { } @Exported - public String getIconXml() { - return iconXml; + public String getIcon() { + return icon; } @Exported diff --git a/src/main/js/components/command-palette/datasources.js b/src/main/js/components/command-palette/datasources.js index c1666101d410..58dd5389d540 100644 --- a/src/main/js/components/command-palette/datasources.js +++ b/src/main/js/components/command-palette/datasources.js @@ -17,7 +17,7 @@ export const JenkinsSearchSource = { rsp.json().then((data) => { return data["suggestions"].slice().map((e) => LinkResult({ - icon: e.iconXml, + icon: e.icon, type: e.type, label: e.name, url: correctAddress(e.url), diff --git a/src/main/js/components/command-palette/models.js b/src/main/js/components/command-palette/models.js index b3b06f22714c..0c6a733e0d0a 100644 --- a/src/main/js/components/command-palette/models.js +++ b/src/main/js/components/command-palette/models.js @@ -5,7 +5,7 @@ import { xmlEscape } from "@/util/security"; * @param {Object} params * @param {string} params.icon * @param {string} params.label - * @param {string} params.type + * @param {'symbol' | 'image'} params.type * @param {string} params.url * @param {boolean | undefined} params.isExternal */