Skip to content

Commit

Permalink
wip using the lite objects query
Browse files Browse the repository at this point in the history
  • Loading branch information
gtarpenning committed Sep 19, 2024
1 parent 1c3c013 commit df53d89
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ export const FilterableObjectVersionsTable: React.FC<{
? [effectiveFilter.objectName]
: undefined,
latestOnly: effectivelyLatestOnly,
}
},
undefined,
[]
);

if (filteredObjectVersions.loading) {
Expand Down Expand Up @@ -394,7 +396,8 @@ const PeerVersionsLink: React.FC<{obj: ObjectVersionSchema}> = props => {
{
objectIds: [obj.objectId],
},
100
100,
[]
);
if (objectVersionsNode.loading) {
return <LoadingDots />;
Expand All @@ -408,7 +411,7 @@ const PeerVersionsLink: React.FC<{obj: ObjectVersionSchema}> = props => {
objectName: obj.objectId,
}}
versionCount={Math.min(countValue, 99)}
countIsLimited={countValue === 100}
countIsLimited={countValue >= 100}
neverPeek
variant="secondary"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,7 @@ const useRootObjectVersions = makeTraceServerEndpointHook(
project: string,
filter: ObjectVersionFilter,
limit?: number,
columns?: string[],
opts?: {skip?: boolean}
) => ({
params: {
Expand All @@ -920,6 +921,8 @@ const useRootObjectVersions = makeTraceServerEndpointHook(
latest_only: filter.latestOnly,
is_op: false,
},
limit,
columns,
},
skip: opts?.skip,
}),
Expand All @@ -929,6 +932,7 @@ const useRootObjectVersions = makeTraceServerEndpointHook(
inputProject,
filter,
limit,
columns,
opts
): ObjectVersionSchema[] =>
res.objs.map(convertTraceServerObjectVersionToSchema)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export type WFDataModelHooksInterface = {
project: string,
filter: ObjectVersionFilter,
limit?: number,
columns?: string[],
opts?: {skip?: boolean}
) => LoadableWithError<ObjectVersionSchema[]>;
// `useRefsData` is in beta while we integrate Shawn's new Object DB
Expand Down

0 comments on commit df53d89

Please sign in to comment.