From 905fa8ecd873d20a1f4e38e94fbe8b0527f470d2 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Fri, 1 Mar 2024 16:04:07 -0500 Subject: [PATCH 1/3] fix(archives): adjust queries and response handling for updated data schema --- .../AllTargetsArchivedRecordingsTable.tsx | 28 ++++++++++--------- .../Recordings/ArchivedRecordingsTable.tsx | 10 +++++-- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/app/Archives/AllTargetsArchivedRecordingsTable.tsx b/src/app/Archives/AllTargetsArchivedRecordingsTable.tsx index a52104a5e..6ddb90d8a 100644 --- a/src/app/Archives/AllTargetsArchivedRecordingsTable.tsx +++ b/src/app/Archives/AllTargetsArchivedRecordingsTable.tsx @@ -112,7 +112,7 @@ export const AllTargetsArchivedRecordingsTable: React.FC { const target: Target = { - connectUrl: node.target.serviceUri, + connectUrl: node.target.connectUrl, alias: node.target.alias, labels: [], annotations: { @@ -123,7 +123,7 @@ export const AllTargetsArchivedRecordingsTable: React.FC = ( downloadUrl reportUrl metadata { - labels + labels { + key + value + } } size } @@ -220,7 +223,10 @@ export const ArchivedRecordingsTable: React.FC = ( downloadUrl reportUrl metadata { - labels + labels { + key + value + } } size } From 5935aac681fce7206438f58bc21c75ff6bdb9024 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Fri, 1 Mar 2024 16:53:27 -0500 Subject: [PATCH 2/3] correct tests --- ...AllTargetsArchivedRecordingsTable.test.tsx | 58 ++++++++++--------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/src/test/Archives/AllTargetsArchivedRecordingsTable.test.tsx b/src/test/Archives/AllTargetsArchivedRecordingsTable.test.tsx index 6af7d3070..0fdd8e029 100644 --- a/src/test/Archives/AllTargetsArchivedRecordingsTable.test.tsx +++ b/src/test/Archives/AllTargetsArchivedRecordingsTable.test.tsx @@ -76,42 +76,42 @@ const mockTargetsAndCountsResponse = { data: { targetNodes: [ { - recordings: { - archived: { - aggregate: { - count: mockCount1, - }, - }, - }, target: { alias: mockAlias1, - serviceUri: mockConnectUrl1, - }, - }, - { - recordings: { - archived: { - aggregate: { - count: mockCount2, + connectUrl: mockConnectUrl1, + recordings: { + archived: { + aggregate: { + count: mockCount1, + }, }, }, }, - target: { - alias: mockAlias2, - serviceUri: mockConnectUrl2, - }, }, { - recordings: { - archived: { - aggregate: { - count: mockCount3, + target: { + alias: mockAlias2, + connectUrl: mockConnectUrl2, + recordings: { + archived: { + aggregate: { + count: mockCount2, + }, }, }, }, + }, + { target: { alias: mockAlias3, - serviceUri: mockConnectUrl3, + connectUrl: mockConnectUrl3, + recordings: { + archived: { + aggregate: { + count: mockCount3, + }, + }, + }, }, }, ], @@ -122,10 +122,12 @@ const mockNewTargetCountResponse = { data: { targetNodes: [ { - recordings: { - archived: { - aggregate: { - count: mockNewCount, + target: { + recordings: { + archived: { + aggregate: { + count: mockNewCount, + }, }, }, }, From 24527db5c842b52658c70ba5453cb5d68e07fecb Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 4 Mar 2024 14:22:33 -0500 Subject: [PATCH 3/3] update filter input for schema name change --- src/app/RecordingMetadata/BulkEditLabels.tsx | 2 +- src/app/Recordings/ArchivedRecordingsTable.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/RecordingMetadata/BulkEditLabels.tsx b/src/app/RecordingMetadata/BulkEditLabels.tsx index b88a78a73..3ecb392ec 100644 --- a/src/app/RecordingMetadata/BulkEditLabels.tsx +++ b/src/app/RecordingMetadata/BulkEditLabels.tsx @@ -164,7 +164,7 @@ export const BulkEditLabels: React.FC = ({ observable = isUploadsTable ? context.api .graphql( - `query GetUploadedRecordings($filter: ArchivedRecordingFilterInput) { + `query GetUploadedRecordings($filter: ArchivedRecordingsFilterInput) { archivedRecordings(filter: $filter) { data { name diff --git a/src/app/Recordings/ArchivedRecordingsTable.tsx b/src/app/Recordings/ArchivedRecordingsTable.tsx index 38a8df4e3..9c16de6e2 100644 --- a/src/app/Recordings/ArchivedRecordingsTable.tsx +++ b/src/app/Recordings/ArchivedRecordingsTable.tsx @@ -216,7 +216,7 @@ export const ArchivedRecordingsTable: React.FC = ( const queryUploadedRecordings = React.useCallback(() => { /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ return context.api.graphql( - `query UploadedRecordings($filter: ArchivedRecordingFilterInput){ + `query UploadedRecordings($filter: ArchivedRecordingsFilterInput) { archivedRecordings(filter: $filter) { data { name