SchemaRegistry bugfix cherrypick(v2.35)

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10622
GitOrigin-RevId: 5f1b15b52342d176fb697a9ce2b4e2650ffc6c49
This commit is contained in:
Aaysha 2024-01-15 20:26:27 +05:30 committed by hasura-bot
parent 3015602268
commit bd402fa63f

View File

@ -7,7 +7,7 @@ import { IconTooltip } from '../../../new-components/Tooltip';
import { FaExclamationCircle, FaRegMap } from 'react-icons/fa';
import { sendTelemetryEvent } from '../../../telemetry';
import { useGetSchemaRegistryNotificationColor } from '../../../features/SchemaRegistry/hooks/useGetSchemaRegistryNotificationColor';
import { getLSItem, LS_KEYS, setLSItem } from '../../../utils';
import { getLSItem, isCloudConsole, LS_KEYS, setLSItem } from '../../../utils';
import {
BreakingChangesColor,
BreakingChangesTooltipMessage,
@ -39,12 +39,6 @@ const TopNav: React.FC<TopNavProps> = ({ location }) => {
dataTestVal: 'rest-explorer-link',
title: 'REST',
},
{
key: 'schema-registry',
link: '/api/schema-registry',
dataTestVal: 'schema-registry-link',
title: 'Schema Registry',
},
],
[
{
@ -63,6 +57,18 @@ const TopNav: React.FC<TopNavProps> = ({ location }) => {
dataTestVal: 'security-explorer-link',
title: 'Security',
});
if (
isCloudConsole(globals) &&
(globals.userRole === 'admin' || globals.userRole === 'owner')
) {
sectionsData[0].push({
key: 'schema-registry',
link: '/api/schema-registry',
dataTestVal: 'schema-registry-link',
title: 'Schema Registry',
});
}
}
const isActive = (link: string) => {