Skip to content

Commit

Permalink
Make iconXml private, rename to icon
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Dec 11, 2024
1 parent 1b9faa8 commit 809d2e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions core/src/main/java/hudson/search/Search.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Check warning on line 297 in core/src/main/java/hudson/search/Search.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 293-297 are not covered by tests
}

Expand All @@ -303,8 +303,8 @@ public String getUrl() {
}

@Exported
public String getIconXml() {
return iconXml;
public String getIcon() {
return icon;
}

@Exported
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/components/command-palette/datasources.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/components/command-palette/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 809d2e6

Please sign in to comment.