console: fix schema registry heap IDs

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9773
GitOrigin-RevId: 05ec9b97702a4734f28e99d36c75b420a57d7bbd
This commit is contained in:
nevermore 2023-07-05 18:48:02 +05:30 committed by hasura-bot
parent 319e9855f9
commit ec4ebf1e1d
2 changed files with 26 additions and 27 deletions

View File

@ -2,6 +2,7 @@ import React from 'react';
import { CountLabel } from './CountLabel';
import { SchemaChange } from '../types';
import { FaChevronRight } from 'react-icons/fa';
import { Analytics } from '../../Analytics';
export const SchemaRow: React.VFC<{
role: string;
@ -43,6 +44,7 @@ export const SchemaRow: React.VFC<{
</div>
{onClick && (
<Analytics name="schema-registry-details-btn">
<div
className="flex text-base w-[2%] justify-end mt-[6px]"
role="button"
@ -50,6 +52,7 @@ export const SchemaRow: React.VFC<{
>
<FaChevronRight />
</div>
</Analytics>
)}
{!onClick && <div className="flex w-[4%] justify-end"></div>}
</div>

View File

@ -65,7 +65,6 @@ export const Tabularised: React.VFC<{
{schemas.map(schema => (
<SchemaCard
createdAt={schema.created_at}
schemaId={schema.id}
hash={schema.entry_hash}
roleBasedSchemas={schema.roleBasedSchemas}
tags={schema.tags}
@ -101,11 +100,10 @@ export const Tabularised: React.VFC<{
const SchemaCard: React.VFC<{
createdAt: string;
hash: string;
schemaId: string;
roleBasedSchemas: RoleBasedSchema[];
tags: SchemaRegistryTag[];
}> = props => {
const { createdAt, hash, roleBasedSchemas, tags, schemaId } = props;
const { createdAt, hash, roleBasedSchemas, tags } = props;
const [isTagModalOpen, setIsTagModalOpen] = React.useState(false);
const [tagsList, setTagsList] = React.useState<SchemaRegistryTag[]>(tags);
@ -143,7 +141,7 @@ const SchemaCard: React.VFC<{
</div>
))}
</div>
<Analytics name={`schema-registry-add-tag-btn-${schemaId}`}>
<Analytics name="schema-registry-add-tag-btn">
<div className="mt-[5px]" onClick={() => setIsTagModalOpen(true)}>
<IconTooltip message="Add a Tag" icon={<FaPlusCircle />} />
</div>
@ -169,7 +167,6 @@ const SchemaCard: React.VFC<{
<div className="font-bold text-gray-500">Roles</div>
{roleBasedSchemas.length ? (
roleBasedSchemas.map((roleBasedSchema, index) => (
<Analytics name={`schema-registry-details-${schemaId}`}>
<div className="flex-col w-full">
<SchemaRow
role={roleBasedSchema.role || ''}
@ -184,7 +181,6 @@ const SchemaCard: React.VFC<{
<div className="flex w-full border-b border-gray-300" />
) : null}
</div>
</Analytics>
))
) : (
<div className="white border-t border-neutral-200">