diff --git a/contrib/storage-http/src/main/resources/storage_logos/Http.png b/contrib/storage-http/src/main/resources/storage_logos/Http.png new file mode 100644 index 00000000000..2c2ccb58286 Binary files /dev/null and b/contrib/storage-http/src/main/resources/storage_logos/Http.png differ diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java index 61d85c5bd5e..4908df8e64c 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java @@ -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; } diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Cassandra.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Cassandra.png new file mode 100644 index 00000000000..6dc27591478 Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Cassandra.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Druid.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Druid.png new file mode 100644 index 00000000000..0e08cbce2c9 Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Druid.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Elasticsearch.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Elasticsearch.png new file mode 100644 index 00000000000..73f55fbf70d Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Elasticsearch.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/FileSystem.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/FileSystem.png new file mode 100644 index 00000000000..2a4010d99b3 Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/FileSystem.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/HBase.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/HBase.png new file mode 100644 index 00000000000..2067e121a95 Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/HBase.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Hive.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Hive.png new file mode 100644 index 00000000000..986a48e55c3 Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Hive.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Jdbc.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Jdbc.png new file mode 100644 index 00000000000..812191a8e1c Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Jdbc.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Kafka.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Kafka.png new file mode 100644 index 00000000000..14860baaae6 Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Kafka.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Kudu.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Kudu.png new file mode 100644 index 00000000000..cdab825c90c Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Kudu.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Mongo.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Mongo.png new file mode 100644 index 00000000000..e0e8b38c7e9 Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Mongo.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/OpenTSDB.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/OpenTSDB.png new file mode 100644 index 00000000000..749a66575c4 Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/OpenTSDB.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Phoenix.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Phoenix.png new file mode 100644 index 00000000000..189688691c6 Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Phoenix.png differ diff --git a/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Splunk.png b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Splunk.png new file mode 100644 index 00000000000..67f4a69f642 Binary files /dev/null and b/exec/java-exec/src/main/resources/rest/static/img/storage_logos/Splunk.png differ diff --git a/exec/java-exec/src/main/resources/rest/storage/list.ftl b/exec/java-exec/src/main/resources/rest/storage/list.ftl index 370eaa1e04e..b9a29514e83 100644 --- a/exec/java-exec/src/main/resources/rest/storage/list.ftl +++ b/exec/java-exec/src/main/resources/rest/storage/list.ftl @@ -59,6 +59,10 @@ <#list model as pluginModel> <#if pluginModel.getPlugin()?? && pluginModel.getPlugin().enabled() == true>