From c8f45bdbf4f045bcad0a23d7741f8064d70c830d Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 1 Aug 2021 15:41:59 +0100 Subject: Some basic config options --- .../me/lucko/spark/common/command/modules/HeapAnalysisModule.java | 6 +++--- .../java/me/lucko/spark/common/command/modules/SamplerModule.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'spark-common/src/main/java/me/lucko/spark/common/command') diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/HeapAnalysisModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/HeapAnalysisModule.java index 8a7d781..70f6c3c 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/HeapAnalysisModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/HeapAnalysisModule.java @@ -105,8 +105,8 @@ public class HeapAnalysisModule implements CommandModule { saveToFile = true; } else { try { - String key = SparkPlatform.BYTEBIN_CLIENT.postContent(output, SPARK_HEAP_MEDIA_TYPE).key(); - String url = SparkPlatform.VIEWER_URL + key; + String key = platform.getBytebinClient().postContent(output, SPARK_HEAP_MEDIA_TYPE).key(); + String url = platform.getViewerUrl() + key; resp.broadcastPrefixed(text("Heap dump summmary output:", GOLD)); resp.broadcast(text() @@ -135,7 +135,7 @@ public class HeapAnalysisModule implements CommandModule { .append(text(file.toString(), GRAY)) .build() ); - resp.broadcastPrefixed(text("You can read the heap dump summary file using the viewer web-app - " + SparkPlatform.VIEWER_URL, GRAY)); + resp.broadcastPrefixed(text("You can read the heap dump summary file using the viewer web-app - " + platform.getViewerUrl(), GRAY)); platform.getActivityLog().addToLog(Activity.fileActivity(sender, System.currentTimeMillis(), "Heap dump summary", file.toString())); } catch (IOException e) { diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java index b20d22f..c0a295a 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java @@ -312,8 +312,8 @@ public class SamplerModule implements CommandModule { saveToFile = true; } else { try { - String key = SparkPlatform.BYTEBIN_CLIENT.postContent(output, SPARK_SAMPLER_MEDIA_TYPE).key(); - String url = SparkPlatform.VIEWER_URL + key; + String key = platform.getBytebinClient().postContent(output, SPARK_SAMPLER_MEDIA_TYPE).key(); + String url = platform.getViewerUrl() + key; resp.broadcastPrefixed(text("Profiler results:", GOLD)); resp.broadcast(text() @@ -342,7 +342,7 @@ public class SamplerModule implements CommandModule { .append(text(file.toString(), GRAY)) .build() ); - resp.broadcastPrefixed(text("You can read the profile file using the viewer web-app - " + SparkPlatform.VIEWER_URL, GRAY)); + resp.broadcastPrefixed(text("You can read the profile file using the viewer web-app - " + platform.getViewerUrl(), GRAY)); platform.getActivityLog().addToLog(Activity.fileActivity(resp.sender(), System.currentTimeMillis(), "Profiler", file.toString())); } catch (IOException e) { -- cgit