Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRILL-8180: Add Icons to Storage Plugin List #2507

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,27 @@ 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", "");
pluginName = pluginName.replace("Storage", "");
return pluginName;
}

public String getType() {
return type;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions exec/java-exec/src/main/resources/rest/storage/list.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
<#list model as pluginModel>
<#if pluginModel.getPlugin()?? && pluginModel.getPlugin().enabled() == true>
<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()}
</td>
Expand Down Expand Up @@ -88,6 +92,9 @@
<#list model as pluginModel>
<#if pluginModel.getPlugin()?? && pluginModel.getPlugin().enabled() == false>
<tr>
<td style="border:none;">
<img src="/static/img/storage_logos/${pluginModel.getCleanType()}.png" alt="${pluginModel.getCleanType()}" height=40 width=40 />
</td>
<td style="border:none; max-width: 200px; overflow: hidden; text-overflow: ellipsis;">
${pluginModel.getPlugin().getName()}
</td>
Expand Down