console: Remove Read Replicas for BigQuery Connections DSF-109

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8239
Co-authored-by: Julian <843342+okjulian@users.noreply.github.com>
GitOrigin-RevId: b3607ba5d4ec3e8efc409392ea5715adce64b4b4
This commit is contained in:
Julian@Hasura 2023-03-14 13:19:02 -03:00 committed by hasura-bot
parent a0a2492fe3
commit 2ea72dac8a
2 changed files with 6 additions and 3 deletions

View File

@ -402,7 +402,7 @@ const ConnectDatabase: React.FC<ConnectDatabaseProps> = props => {
{getSupportedDrivers('connectDbForm.read_replicas.edit').includes( {getSupportedDrivers('connectDbForm.read_replicas.edit').includes(
connectDBInputState.dbType connectDBInputState.dbType
) && ) &&
canAccessReadReplica() && ( canAccessReadReplica(connectDBInputState.dbType) && (
<ReadReplicaForm <ReadReplicaForm
readReplicaState={readReplicasState} readReplicaState={readReplicasState}
readReplicaDispatch={readReplicaDispatch} readReplicaDispatch={readReplicaDispatch}
@ -436,7 +436,7 @@ const ConnectDatabase: React.FC<ConnectDatabaseProps> = props => {
{getSupportedDrivers('connectDbForm.read_replicas.create').includes( {getSupportedDrivers('connectDbForm.read_replicas.create').includes(
connectDBInputState.dbType connectDBInputState.dbType
) && ) &&
canAccessReadReplica() && ( canAccessReadReplica(connectDBInputState.dbType) && (
<ReadReplicaForm <ReadReplicaForm
readReplicaState={readReplicasState} readReplicaState={readReplicasState}
readReplicaDispatch={readReplicaDispatch} readReplicaDispatch={readReplicaDispatch}

View File

@ -1,7 +1,10 @@
/* eslint-disable no-underscore-dangle */ /* eslint-disable no-underscore-dangle */
import { Driver } from '../dataSources';
import { isProConsole } from './proConsole'; import { isProConsole } from './proConsole';
export const canAccessReadReplica = () => isProConsole(window.__env); export const canAccessReadReplica = (dbType: Driver) => {
return isProConsole(window.__env) && dbType !== 'bigquery';
};
export const canAccessSecuritySettings = () => isProConsole(window.__env); export const canAccessSecuritySettings = () => isProConsole(window.__env);