Make iconXml private, rename to icon

This commit is contained in:
Jan Faracik 2024-12-11 21:37:47 +00:00
parent 1b9faa8fb0
commit 809d2e6120
3 changed files with 9 additions and 9 deletions

View File

@ -277,23 +277,23 @@ public class Search implements StaplerProxy {
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 class Search implements StaplerProxy {
}
@Exported
public String getIconXml() {
return iconXml;
public String getIcon() {
return icon;
}
@Exported

View File

@ -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),

View File

@ -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
*/