Skip to content

Commit e57fa8c

Browse files
Dev UI: Change to use namespace/method rather than namespace.method for Json-RPC
Signed-off-by: Phillip Kruger <[email protected]>
1 parent 0061772 commit e57fa8c

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/BuildTimeContentProcessor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ DeploymentMethodBuildItem mapDeploymentMethods(
215215
for (BuildTimeActionBuildItem actions : buildTimeActions) {
216216
String extensionPathName = actions.getExtensionPathName(curateOutcomeBuildItem);
217217
for (BuildTimeAction bta : actions.getActions()) {
218-
String fullName = extensionPathName + "." + bta.getMethodName();
218+
String fullName = extensionPathName + SLASH + bta.getMethodName();
219219
if (bta.hasRuntimeValue()) {
220220
recordedValues.put(fullName, bta.getRuntimeValue());
221221
} else {
@@ -224,7 +224,7 @@ DeploymentMethodBuildItem mapDeploymentMethods(
224224
methodNames.add(fullName);
225225
}
226226
for (BuildTimeAction bts : actions.getSubscriptions()) {
227-
String fullName = extensionPathName + "." + bts.getMethodName();
227+
String fullName = extensionPathName + SLASH + bts.getMethodName();
228228
if (bts.hasRuntimeValue()) {
229229
recordedValues.put(fullName, bts.getRuntimeValue());
230230
} else {

extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/DevUIProcessor.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ public class DevUIProcessor {
9393
private static final String FOOTER_LOG_NAMESPACE = "devui-footer-log";
9494
private static final String DEVUI = "dev-ui";
9595
private static final String SLASH = "/";
96-
private static final String DOT = ".";
9796
private static final String DOUBLE_POINT = ":";
9897
private static final String DASH_DEPLOYMENT = "-deployment";
9998
private static final String SLASH_ALL = SLASH + "*";
@@ -341,9 +340,9 @@ void findAllJsonRPCMethods(BuildProducer<JsonRPCRuntimeMethodsBuildItem> jsonRPC
341340

342341
// Create list of available methods for the Javascript side.
343342
if (method.returnType().name().equals(DotName.createSimple(Multi.class.getName()))) {
344-
subscriptionMethods.add(extension + DOT + method.name());
343+
subscriptionMethods.add(extension + SLASH + method.name());
345344
} else {
346-
requestResponseMethods.add(extension + DOT + method.name());
345+
requestResponseMethods.add(extension + SLASH + method.name());
347346
}
348347

349348
// Also create the map to pass to the runtime for the relection calls

extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/controller/jsonrpc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class JsonRpc {
141141
return function (...args) {
142142
var uid = JsonRpc.messageCounter++;
143143

144-
let method = this._extensionName + "." + prop.toString();
144+
let method = this._extensionName + "/" + prop.toString();
145145

146146
let params = new Object();
147147
if (args.length > 0) {

extensions/vertx-http/runtime/src/main/java/io/quarkus/devui/runtime/comms/JsonRpcRouter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void populateJsonRPCRuntimeMethods(Map<String, Map<JsonRpcMethodName, Jso
7777
}
7878
ReflectionInfo reflectionInfo = new ReflectionInfo(jsonRpcMethod.getClazz(), providerInstance, javaMethod,
7979
params, jsonRpcMethod.getExplicitlyBlocking(), jsonRpcMethod.getExplicitlyNonBlocking());
80-
String jsonRpcMethodName = extensionName + DOT + methodName;
80+
String jsonRpcMethodName = extensionName + SLASH + methodName;
8181
jsonRpcToRuntimeClassPathJava.put(jsonRpcMethodName, reflectionInfo);
8282
} catch (NoSuchMethodException | SecurityException ex) {
8383
throw new RuntimeException(ex);
@@ -352,7 +352,7 @@ public JsonMapper getJsonMapper() {
352352
return codec.getJsonMapper();
353353
}
354354

355-
private static final String DOT = ".";
355+
private static final String SLASH = "/";
356356
private static final String UNSUBSCRIBE = "unsubscribe";
357357

358358
}

extensions/vertx-http/runtime/src/main/java/io/quarkus/devui/runtime/continuoustesting/ContinuousTestingJsonRPCService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class ContinuousTestingJsonRPCService implements Consumer<ContinuousTesti
3030

3131
@Override
3232
public void accept(final ContinuousTestingSharedStateManager.State state) {
33-
final var results = DevConsoleManager.<TestRunResultsInterface> invoke("devui-continuous-testing.getResults");
33+
final var results = DevConsoleManager.<TestRunResultsInterface> invoke("devui-continuous-testing/getResults");
3434
final List<Item> passedTests = new LinkedList<>();
3535
final List<Item> failedTests = new LinkedList<>();
3636
final List<Item> skippedTests = new LinkedList<>();

0 commit comments

Comments
 (0)