Skip to content

Commit 0a208c0

Browse files
committed
WIP
1 parent 198a6dd commit 0a208c0

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java

+14
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,20 @@ public String getPassword() {
490490
}
491491
}
492492

493+
/**
494+
* Returns the path for the image used in the list view.
495+
* @return
496+
*/
497+
public String getImagePath() {
498+
if (getCleanType().contentEquals("FileSystem")) {
499+
return "/static/img/storage_logos/FileSystem.png";
500+
}
501+
502+
// If the plugin is in contrib, get the full path
503+
String path = plugin.getConfig().getClass().getResource("/storage_logos/" + getCleanType() + ".png").getPath();
504+
return path;
505+
}
506+
493507
public String getCleanType() {
494508
String pluginName = type.replace("Config", "");
495509
pluginName = pluginName.replace("Plugin", "");

exec/java-exec/src/main/resources/rest/storage/list.ftl

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
<tr>
6262
<td style="border:none;">
6363
<img src="/static/img/storage_logos/${pluginModel.getCleanType()}.png" alt="${pluginModel.getCleanType()}" height=40 width=40 />
64+
${pluginModel.getImagePath()}
6465
</td>
6566
<td style="border:none; max-width: 200px; overflow: hidden; text-overflow: ellipsis;">
6667
${pluginModel.getPlugin().getName()}

0 commit comments

Comments
 (0)