From 8f40ff0953210c9d6203f2384db7f26ab963ef67 Mon Sep 17 00:00:00 2001 From: Mihir A Khandekar Date: Tue, 9 May 2023 22:47:20 +0530 Subject: [PATCH] CPS-861 show hasura ee logo for ee classic consoles PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9093 GitOrigin-RevId: f48d8f843d3a88d04dd8fd5060cad055b43950bf --- frontend/libs/console/legacy-ce/src/index.ts | 1 + frontend/libs/console/legacy-ce/src/lib/utils/proConsole.ts | 4 ++++ .../libs/console/legacy-ee/src/lib/components/Main/Main.js | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/libs/console/legacy-ce/src/index.ts b/frontend/libs/console/legacy-ce/src/index.ts index f02aa55f20a..f6b1030face 100644 --- a/frontend/libs/console/legacy-ce/src/index.ts +++ b/frontend/libs/console/legacy-ce/src/index.ts @@ -150,6 +150,7 @@ export { FeatureFlags } from './lib/features/FeatureFlags'; export { isMonitoringTabSupportedEnvironment, isEnvironmentSupportMultiTenantConnectionPooling, + isEEClassicConsole, } from './lib/utils/proConsole'; export { isCloudConsole } from './lib/utils/cloudConsole'; diff --git a/frontend/libs/console/legacy-ce/src/lib/utils/proConsole.ts b/frontend/libs/console/legacy-ce/src/lib/utils/proConsole.ts index 4051028c989..f4347d852fb 100644 --- a/frontend/libs/console/legacy-ce/src/lib/utils/proConsole.ts +++ b/frontend/libs/console/legacy-ce/src/lib/utils/proConsole.ts @@ -48,3 +48,7 @@ export const isEnvironmentSupportMultiTenantConnectionPooling = ( export const isImportFromOpenAPIEnabled = isProConsole; export const isDynamicDBRoutingEnabled = isProConsole; export const isCachingEnabled = isProConsole; + +export const isEEClassicConsole = () => { + return window.__env.eeMode || false; +}; diff --git a/frontend/libs/console/legacy-ee/src/lib/components/Main/Main.js b/frontend/libs/console/legacy-ee/src/lib/components/Main/Main.js index 82fec9a0d8c..38b515968f0 100644 --- a/frontend/libs/console/legacy-ee/src/lib/components/Main/Main.js +++ b/frontend/libs/console/legacy-ee/src/lib/components/Main/Main.js @@ -34,6 +34,7 @@ import { InitializeTelemetry, telemetryUserEventsTracker, Analytics, + isEEClassicConsole, } from '@hasura/console-legacy-ce'; import { @@ -554,7 +555,7 @@ class Main extends React.Component { {({ access }) => { const getLogoSrc = () => { - if (this.isEnterpriseProject()) { + if (this.isEnterpriseProject() || isEEClassicConsole()) { return EELogo; } if (access === 'active') {