Skip to content

Commit

Permalink
fixed issues with new graphql schema for querying archived recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcao13 authored and andrewazores committed Sep 15, 2022
1 parent c53f2ae commit cb0d464
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
16 changes: 10 additions & 6 deletions src/app/RecordingMetadata/BulkEditLabels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export const BulkEditLabels: React.FunctionComponent<BulkEditLabelsProps> = (pro
const updateCommonLabels = React.useCallback(
(setLabels: (l: RecordingLabel[]) => void) => {
let allRecordingLabels = [] as RecordingLabel[][];
console.log("updateCommonLabels", recordings);
console.log(recordings)
recordings.forEach((r: ArchivedRecording, idx) => {
if (props.checkedIndices.includes(idx)) {
allRecordingLabels.push(parseLabels(r.metadata.labels));
Expand Down Expand Up @@ -135,18 +137,20 @@ export const BulkEditLabels: React.FunctionComponent<BulkEditLabelsProps> = (pro
targetNodes(filter: { name: "${target.connectUrl}" }) {
recordings {
archived {
name
downloadUrl
reportUrl
metadata {
labels
data {
name
downloadUrl
reportUrl
metadata {
labels
}
}
}
}
}
}`),
),
map(v => props.isTargetRecording ? v : v.data.targetNodes[0].recordings.archived as ArchivedRecording[]),
map(v => props.isTargetRecording ? v : v.data.targetNodes[0].recordings.archived.data as ArchivedRecording[]),
first()
)
.subscribe((value) => setRecordings(value))
Expand Down
8 changes: 5 additions & 3 deletions src/app/Shared/Services/Api.service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,11 @@ export class ApiService {
targetNodes(filter: { name: "${target.connectUrl}" }) {
recordings {
archived(filter: { name: "${recordingName}" }) {
doPutMetadata(metadata: { labels: ${this.stringifyRecordingLabels(labels)}}) {
metadata {
labels
data {
doPutMetadata(metadata: { labels: ${this.stringifyRecordingLabels(labels)}}) {
metadata {
labels
}
}
}
}
Expand Down

0 comments on commit cb0d464

Please sign in to comment.