fix: show deprecated schema in explorer when there is no usage reported (#6532)

This commit is contained in:
jdolle 2025-02-18 18:46:53 -08:00 committed by GitHub
parent 2507a9b9e0
commit 390be90688
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,7 @@ import { SchemaVariantFilter } from '@/components/target/explorer/filter';
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
import { Button } from '@/components/ui/button';
import { DateRangePicker, presetLast7Days } from '@/components/ui/date-range-picker';
import { EmptyList, noSchemaVersion } from '@/components/ui/empty-list';
import { noSchemaVersion } from '@/components/ui/empty-list';
import { Link } from '@/components/ui/link';
import { Meta } from '@/components/ui/meta';
import { Subtitle, Title } from '@/components/ui/page';
@ -351,24 +351,11 @@ function ExplorerDeprecatedSchemaPageContent(props: {
}
const currentOrganization = query.data?.organization?.organization;
const hasCollectedOperations = query.data?.hasCollectedOperations === true;
if (!currentOrganization) {
return null;
}
if (!hasCollectedOperations) {
return (
<div className="py-8">
<EmptyList
title="Hive is waiting for your first collected operation"
description="You can collect usage of your GraphQL API with Hive Client"
docsUrl="/features/usage-reporting"
/>
</div>
);
}
return (
<DeprecatedSchemaExplorer
dataRetentionInDays={currentOrganization.rateLimit.retentionInDays}