Skip to content

Commit

Permalink
fix(archives): adjust queries and response handling for updated data …
Browse files Browse the repository at this point in the history
…schema
  • Loading branch information
andrewazores committed Mar 1, 2024
1 parent c6eacbe commit e678cee
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
28 changes: 15 additions & 13 deletions src/app/Archives/AllTargetsArchivedRecordingsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const AllTargetsArchivedRecordingsTable: React.FC<AllTargetsArchivedRecor
setArchivesForTargets(
targetNodes.map((node) => {
const target: Target = {
connectUrl: node.target.serviceUri,
connectUrl: node.target.connectUrl,
alias: node.target.alias,
labels: [],
annotations: {
Expand All @@ -123,7 +123,7 @@ export const AllTargetsArchivedRecordingsTable: React.FC<AllTargetsArchivedRecor
return {
target,
targetAsObs: of(target),
archiveCount: node.recordings.archived.aggregate.count,
archiveCount: node.target.recordings.archived.aggregate.count,
};
}),
);
Expand All @@ -148,13 +148,13 @@ export const AllTargetsArchivedRecordingsTable: React.FC<AllTargetsArchivedRecor
`query AllTargetsArchives {
targetNodes {
target {
serviceUri
connectUrl
alias
}
recordings {
archived {
aggregate {
count
recordings {
archived {
aggregate {
count
}
}
}
}
Expand All @@ -178,10 +178,12 @@ export const AllTargetsArchivedRecordingsTable: React.FC<AllTargetsArchivedRecor
`
query ArchiveCountForTarget($connectUrl: String) {
targetNodes(filter: { name: $connectUrl }) {
recordings {
archived {
aggregate {
count
target {
recordings {
archived {
aggregate {
count
}
}
}
}
Expand All @@ -196,7 +198,7 @@ export const AllTargetsArchivedRecordingsTable: React.FC<AllTargetsArchivedRecor
{
target: target,
targetAsObs: of(target),
archiveCount: v.data.targetNodes[0].recordings.archived.aggregate.count,
archiveCount: v.data.targetNodes[0].target.recordings.archived.aggregate.count,
},
];
});
Expand Down
10 changes: 8 additions & 2 deletions src/app/Recordings/ArchivedRecordingsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ export const ArchivedRecordingsTable: React.FC<ArchivedRecordingsTableProps> = (
downloadUrl
reportUrl
metadata {
labels
labels {
key
value
}
}
size
}
Expand All @@ -220,7 +223,10 @@ export const ArchivedRecordingsTable: React.FC<ArchivedRecordingsTableProps> = (
downloadUrl
reportUrl
metadata {
labels
labels {
key
value
}
}
size
}
Expand Down

0 comments on commit e678cee

Please sign in to comment.