Skip to content

Commit

Permalink
fix(recordings): uploaded archives should be viewable with Grafana (b…
Browse files Browse the repository at this point in the history
…ackport #541) (#542)

fix(recordings): uploaded archives should be viewable with Grafana (#541)

Signed-off-by: Thuan Vo <[email protected]>
(cherry picked from commit 727d14b)

Co-authored-by: Thuan Vo <[email protected]>
  • Loading branch information
mergify[bot] and tthvo authored Jul 4, 2024
1 parent 0ebd06e commit 967789b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/io/cryostat/recordings/Recordings.java
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,12 @@ public Uni<String> uploadActiveToGrafana(@RestPath long targetId, @RestPath long
@RolesAllowed("write")
public Response uploadArchivedToGrafanaBeta(
@RestPath String connectUrl, @RestPath String filename) throws Exception {
var jvmId = Target.getTargetByConnectUrl(URI.create(connectUrl)).jvmId;
String jvmId;
if ("uploads".equals(connectUrl)) {
jvmId = "uploads";
} else {
jvmId = Target.getTargetByConnectUrl(URI.create(connectUrl)).jvmId;
}
return Response.status(RestResponse.Status.PERMANENT_REDIRECT)
.location(
URI.create(
Expand Down

0 comments on commit 967789b

Please sign in to comment.