Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
cgivre committed Dec 28, 2022
1 parent 198a6dd commit 0a208c0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,20 @@ public String getPassword() {
}
}

/**
* Returns the path for the image used in the list view.
* @return
*/
public String getImagePath() {
if (getCleanType().contentEquals("FileSystem")) {
return "/static/img/storage_logos/FileSystem.png";
}

// If the plugin is in contrib, get the full path
String path = plugin.getConfig().getClass().getResource("/storage_logos/" + getCleanType() + ".png").getPath();
return path;
}

public String getCleanType() {
String pluginName = type.replace("Config", "");
pluginName = pluginName.replace("Plugin", "");
Expand Down
1 change: 1 addition & 0 deletions exec/java-exec/src/main/resources/rest/storage/list.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<tr>
<td style="border:none;">
<img src="/static/img/storage_logos/${pluginModel.getCleanType()}.png" alt="${pluginModel.getCleanType()}" height=40 width=40 />
${pluginModel.getImagePath()}
</td>
<td style="border:none; max-width: 200px; overflow: hidden; text-overflow: ellipsis;">
${pluginModel.getPlugin().getName()}
Expand Down

0 comments on commit 0a208c0

Please sign in to comment.