Skip to content

Commit

Permalink
gRPC Dev UI: better size for response text, include streaming service…
Browse files Browse the repository at this point in the history
…s and health endpoint

refs quarkusio#19218
  • Loading branch information
michalszynkiewicz committed Aug 19, 2021
1 parent 4b76f8e commit 3ed3079
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.google.protobuf.MessageOrBuilder;
import com.google.protobuf.util.JsonFormat;

import grpc.health.v1.HealthGrpc;
import io.grpc.MethodDescriptor;
import io.grpc.MethodDescriptor.Marshaller;
import io.grpc.MethodDescriptor.PrototypeMarshaller;
Expand Down Expand Up @@ -120,6 +121,7 @@ Collection<Class<?>> getGrpcServices(IndexView index) throws ClassNotFoundExcept
for (String className : serviceClassNames) {
serviceClasses.add(tccl.loadClass(className));
}
serviceClasses.add(HealthGrpc.class);
return serviceClasses;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@

connection.responseText = data.body + connection.responseText;
responseElement.value = connection.responseText;
responseElement.style.height = Math.min(responseElement.scrollHeight + 5, 500) + "px"
responseElement.style.height = "1px";
responseElement.style.height = Math.min(responseElement.scrollHeight + 5, 500) + "px";
} else if (data.status == 'COMPLETED') {
const connection = connections.get(data.id);
hideConnected(connection);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public boolean hasTestableMethod() {
}
Map<String, String> prototypes = DevConsoleManager.getGlobal("io.quarkus.grpc.messagePrototypes");
for (ServerMethodDefinition<?, ?> method : getMethods()) {
if (method.getMethodDescriptor().getType() == MethodType.UNARY
if (method.getMethodDescriptor().getType() != MethodType.UNKNOWN
&& prototypes.containsKey(method.getMethodDescriptor().getFullMethodName() + "_REQUEST")) {
return true;
}
Expand Down Expand Up @@ -146,8 +146,8 @@ public boolean hasPrototype() {
}

public boolean isTestable() {
return !configuration.server.ssl.certificate.isPresent()
&& !configuration.server.ssl.keyStore.isPresent();
return configuration.server.ssl.certificate.isEmpty()
&& configuration.server.ssl.keyStore.isEmpty();
}

public String getPrototype() {
Expand Down

0 comments on commit 3ed3079

Please sign in to comment.