diff --git a/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/devconsole/HibernateSearchElasticsearchDevConsoleProcessor.java b/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/devconsole/HibernateSearchElasticsearchDevConsoleProcessor.java index e77c3b5bd5044..8bdb25083a5b1 100644 --- a/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/devconsole/HibernateSearchElasticsearchDevConsoleProcessor.java +++ b/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/devconsole/HibernateSearchElasticsearchDevConsoleProcessor.java @@ -14,7 +14,7 @@ public class HibernateSearchElasticsearchDevConsoleProcessor { @BuildStep(onlyIf = IsDevelopment.class) public DevConsoleRuntimeTemplateInfoBuildItem collectBeanInfo() { - return new DevConsoleRuntimeTemplateInfoBuildItem("entityTypes", new HibernateSearchSupplier()); + return new DevConsoleRuntimeTemplateInfoBuildItem("indexedEntityTypes", new HibernateSearchSupplier()); } @BuildStep diff --git a/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/resources/dev-templates/embedded.html b/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/resources/dev-templates/embedded.html index 7f7027a3cb8cc..10c92d629e123 100644 --- a/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/resources/dev-templates/embedded.html +++ b/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/resources/dev-templates/embedded.html @@ -1,4 +1,4 @@ - Indexed entity types {info:entityTypes.size()} + Indexed entity types {info:indexedEntityTypes.size()}
diff --git a/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/resources/dev-templates/entity-types.html b/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/resources/dev-templates/entity-types.html index a257afacb8225..b659d423fe987 100644 --- a/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/resources/dev-templates/entity-types.html +++ b/extensions/hibernate-search-orm-elasticsearch/deployment/src/main/resources/dev-templates/entity-types.html @@ -4,6 +4,11 @@
+ + + + + + - {#for entityType in info:entityTypes} + {#for indexedEntityType in info:indexedEntityTypes} - + + {/for} diff --git a/extensions/hibernate-search-orm-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchDevConsoleRecorder.java b/extensions/hibernate-search-orm-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchDevConsoleRecorder.java index c472dac77e565..993f0bf0e29ca 100644 --- a/extensions/hibernate-search-orm-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchDevConsoleRecorder.java +++ b/extensions/hibernate-search-orm-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchDevConsoleRecorder.java @@ -25,7 +25,7 @@ protected void handlePostAsync(RoutingContext event, MultiMap form) throws Excep } SearchMapping mapping = HibernateSearchSupplier.searchMapping(); if (mapping == null) { - flashMessage(event, "There aren't any indexed entity types!", FlashScopeUtil.FlashMessageStatus.ERROR); + flashMessage(event, "There are no indexed entity types.", FlashScopeUtil.FlashMessageStatus.ERROR); return; } mapping.scope(Object.class, diff --git a/extensions/hibernate-search-orm-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchSupplier.java b/extensions/hibernate-search-orm-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchSupplier.java index 1f6cb8579a691..e83a357cefe7b 100644 --- a/extensions/hibernate-search-orm-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchSupplier.java +++ b/extensions/hibernate-search-orm-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchSupplier.java @@ -9,20 +9,37 @@ import org.hibernate.search.mapper.orm.mapping.SearchMapping; import io.quarkus.arc.Arc; +import io.quarkus.hibernate.search.orm.elasticsearch.runtime.devconsole.HibernateSearchSupplier.DevUiIndexedEntity; + +public class HibernateSearchSupplier implements Supplier> { -public class HibernateSearchSupplier implements Supplier> { @Override - public List get() { + public List get() { SearchMapping mapping = searchMapping(); if (mapping == null) { return Collections.emptyList(); } - return mapping.allIndexedEntities().stream().map(SearchIndexedEntity::jpaName).sorted() + return mapping.allIndexedEntities().stream().map(DevUiIndexedEntity::new).sorted() .collect(Collectors.toList()); - } public static SearchMapping searchMapping() { return Arc.container().instance(SearchMapping.class).get(); } + + public static class DevUiIndexedEntity implements Comparable { + + public final String jpaName; + public final String javaClass; + + DevUiIndexedEntity(SearchIndexedEntity searchIndexedEntity) { + this.jpaName = searchIndexedEntity.jpaName(); + this.javaClass = searchIndexedEntity.javaClass().getName(); + } + + @Override + public int compareTo(DevUiIndexedEntity o) { + return this.jpaName.compareTo(o.jpaName); + } + } } diff --git a/extensions/vertx-http/deployment/src/main/resources/dev-templates/main.html b/extensions/vertx-http/deployment/src/main/resources/dev-templates/main.html index d63db0fe8ec8d..2ebb33ce421a2 100644 --- a/extensions/vertx-http/deployment/src/main/resources/dev-templates/main.html +++ b/extensions/vertx-http/deployment/src/main/resources/dev-templates/main.html @@ -17,6 +17,10 @@ {#insert style/} + + + + {#if currentExtensionName && currentExtensionName != 'Eclipse Vert.x - HTTP'} {currentExtensionName} › @@ -100,10 +104,7 @@ {#include logmanagerModals}{/include} {#include testsModals}{/include} - - <script src="{devRootAppend}/resources/js/jquery.min.js"></script> - <script src="{devRootAppend}/resources/js/bootstrap.bundle.min.js"></script> - <script src="{devRootAppend}/resources/js/dev-console.js"></script> + <script src="{devRootAppend}/resources/js/logstream.js"></script> <script src="{devRootAppend}/resources/js/tests.js"></script>
@@ -11,18 +16,20 @@ Entity name Entity type
- +
{entityType}{indexedEntityType.jpaName}{indexedEntityType.javaClass}