diff --git a/frontend/control-plane-graphql-codegen.yml b/frontend/control-plane-graphql-codegen.yml index 80a567666f2..09786adc47e 100644 --- a/frontend/control-plane-graphql-codegen.yml +++ b/frontend/control-plane-graphql-codegen.yml @@ -3,9 +3,6 @@ schema: - 'http://data.lux-dev.hasura.me/v1/graphql': headers: 'x-hasura-admin-secret': 'randomsecret' - - 'http://schema-registry.lux-dev.hasura.me/v1/graphql': - headers: - 'x-hasura-admin-secret': 'randomsecret' documents: 'libs/console/legacy-ce/src/lib/features/ControlPlane/queries.ts' generates: libs/console/legacy-ce/src/lib/features/ControlPlane/generatedGraphQLTypes.ts: diff --git a/frontend/libs/console/legacy-ce/src/lib/Endpoints.ts b/frontend/libs/console/legacy-ce/src/lib/Endpoints.ts index 4fac56fe821..d592df6546a 100644 --- a/frontend/libs/console/legacy-ce/src/lib/Endpoints.ts +++ b/frontend/libs/console/legacy-ce/src/lib/Endpoints.ts @@ -33,7 +33,7 @@ export const getEndpoints = (globals: typeof consoleGlobals) => { }/v1/graphql`, prometheusUrl: `${baseUrl}/v1/metrics`, registerEETrial: `https://licensing.pro.hasura.io/v1/graphql`, - schemaRegistry: 'http://schema-registry.lux-dev.hasura.me/v1/graphql', + schemaRegistry: `${window.location.protocol}//${globals.schemaRegistryHost}/v1/graphql`, // registerEETrial: `http://licensing.lux-dev.hasura.me/v1/graphql`, }; diff --git a/frontend/libs/console/legacy-ce/src/lib/Globals.ts b/frontend/libs/console/legacy-ce/src/lib/Globals.ts index 8e5b7f51388..e64c43bcbf7 100644 --- a/frontend/libs/console/legacy-ce/src/lib/Globals.ts +++ b/frontend/libs/console/legacy-ce/src/lib/Globals.ts @@ -79,6 +79,7 @@ type CloudServerEnv = { herokuOAuthClientId: UUID; isAdminSecretSet: boolean; luxDataHost: string; // e.g. "data.pro.hasura.io" + schemaRegistryHost: string; projectID: UUID; projectName: string; serverVersion: string; @@ -150,6 +151,7 @@ export type EnvVars = { cloudRootDomain?: string; herokuOAuthClientId?: string; luxDataHost?: string; + schemaRegistryHost: string; isAdminSecretSet?: boolean; enableTelemetry?: boolean; consoleType?: ConsoleType; @@ -218,6 +220,9 @@ const globals = { ? stripTrailingSlash(window.__env.luxDataHost) : // stripTrailingSlash is used to ensure correctness in Endpoints because we append /v1/graphql to luxDataHost in endpoints. undefined, + schemaRegistryHost: window.__env?.schemaRegistryHost + ? stripTrailingSlash(window.__env.schemaRegistryHost) + : '', userRole: window.__env?.userRole || undefined, userId: window.__env?.userId || undefined, consoleType: window.__env?.consoleType // FIXME : this check can be removed when the all CLI environments are set with the console type, some CLI environments could have empty consoleType diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/utils/routesUtils.ts b/frontend/libs/console/legacy-ce/src/lib/components/Common/utils/routesUtils.ts index 4011954f7de..d48ecad1015 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/utils/routesUtils.ts +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/utils/routesUtils.ts @@ -161,7 +161,6 @@ export const eventsPrefix = 'events'; export const scheduledEventsPrefix = 'cron'; export const adhocEventsPrefix = 'one-off-scheduled-events'; export const dataEventsPrefix = 'data'; -export const schemaRegsitryPrefix = 'sh'; export const getSTRoute = (type: string | undefined, relativeRoute: string) => { if (type === 'relative') {