Skip to content

Commit

Permalink
remove subdirectory for recording requests
Browse files Browse the repository at this point in the history
  • Loading branch information
mwangggg committed Oct 18, 2023
1 parent ba88f71 commit 5908a54
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/app/Shared/Services/Api.service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,7 @@ export class ApiService {

// from file system path functions
uploadArchivedRecordingToGrafanaFromPath(jvmId: string, recordingName: string): Observable<boolean> {
const subdirectoryName = jvmIdToSubdirectoryName(jvmId);
return this.sendRequest('beta', `fs/recordings/${subdirectoryName}/${encodeURIComponent(recordingName)}/upload`, {
return this.sendRequest('beta', `fs/recordings/${jvmId}/${encodeURIComponent(recordingName)}/upload`, {
method: 'POST',
}).pipe(
map((resp) => resp.ok),
Expand All @@ -513,8 +512,7 @@ export class ApiService {
}

deleteArchivedRecordingFromPath(jvmId: string, recordingName: string): Observable<boolean> {
const subdirectoryName = jvmIdToSubdirectoryName(jvmId);
return this.sendRequest('beta', `fs/recordings/${subdirectoryName}/${encodeURIComponent(recordingName)}`, {
return this.sendRequest('beta', `fs/recordings/${jvmId}/${encodeURIComponent(recordingName)}`, {
method: 'DELETE',
}).pipe(
map((resp) => resp.ok),
Expand All @@ -531,10 +529,9 @@ export class ApiService {
}

postRecordingMetadataFromPath(jvmId: string, recordingName: string, labels: RecordingLabel[]): Observable<boolean> {
const subdirectoryName = jvmIdToSubdirectoryName(jvmId);
return this.sendRequest(
'beta',
`fs/recordings/${subdirectoryName}/${encodeURIComponent(recordingName)}/metadata/labels`,
`fs/recordings/${jvmId}/${encodeURIComponent(recordingName)}/metadata/labels`,
{
method: 'POST',
body: this.transformAndStringifyToRawLabels(labels),
Expand Down

0 comments on commit 5908a54

Please sign in to comment.