mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
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:
parent
319e9855f9
commit
ec4ebf1e1d
@ -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,13 +44,15 @@ export const SchemaRow: React.VFC<{
|
||||
</div>
|
||||
|
||||
{onClick && (
|
||||
<div
|
||||
className="flex text-base w-[2%] justify-end mt-[6px]"
|
||||
role="button"
|
||||
onClick={onClick}
|
||||
>
|
||||
<FaChevronRight />
|
||||
</div>
|
||||
<Analytics name="schema-registry-details-btn">
|
||||
<div
|
||||
className="flex text-base w-[2%] justify-end mt-[6px]"
|
||||
role="button"
|
||||
onClick={onClick}
|
||||
>
|
||||
<FaChevronRight />
|
||||
</div>
|
||||
</Analytics>
|
||||
)}
|
||||
{!onClick && <div className="flex w-[4%] justify-end"></div>}
|
||||
</div>
|
||||
|
@ -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,22 +167,20 @@ 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 || ''}
|
||||
changes={roleBasedSchema.changes}
|
||||
onClick={() => {
|
||||
dispatch(
|
||||
_push(`/settings/schema-registry/${roleBasedSchema.id}`)
|
||||
);
|
||||
}}
|
||||
/>
|
||||
{!(index + 1 === roleBasedSchemas.length) ? (
|
||||
<div className="flex w-full border-b border-gray-300" />
|
||||
) : null}
|
||||
</div>
|
||||
</Analytics>
|
||||
<div className="flex-col w-full">
|
||||
<SchemaRow
|
||||
role={roleBasedSchema.role || ''}
|
||||
changes={roleBasedSchema.changes}
|
||||
onClick={() => {
|
||||
dispatch(
|
||||
_push(`/settings/schema-registry/${roleBasedSchema.id}`)
|
||||
);
|
||||
}}
|
||||
/>
|
||||
{!(index + 1 === roleBasedSchemas.length) ? (
|
||||
<div className="flex w-full border-b border-gray-300" />
|
||||
) : null}
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<div className="white border-t border-neutral-200">
|
||||
|
Loading…
Reference in New Issue
Block a user