1717import React , { useCallback , useEffect , useMemo , useState } from "react" ;
1818import debounce from "lodash/debounce" ;
1919import get from "lodash/get" ;
20- import ModalWrapper from "../../Common/ModalWrapper/ModalWrapper" ;
2120import Grid from "@material-ui/core/Grid" ;
2221import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper" ;
2322import { Button , LinearProgress , Paper , Typography } from "@material-ui/core" ;
@@ -27,10 +26,7 @@ import TableCell from "@material-ui/core/TableCell";
2726import TableRow from "@material-ui/core/TableRow" ;
2827import api from "../../../../common/api" ;
2928import { createStyles , Theme , withStyles } from "@material-ui/core/styles" ;
30- import {
31- containerForHeader ,
32- modalBasic ,
33- } from "../../Common/FormComponents/common/styleLibrary" ;
29+ import { modalBasic } from "../../Common/FormComponents/common/styleLibrary" ;
3430import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper" ;
3531import SelectWrapper from "../../Common/FormComponents/SelectWrapper/SelectWrapper" ;
3632import {
@@ -268,6 +264,7 @@ const AddTenant = ({ classes }: IAddTenantProps) => {
268264 vaultCert : "" ,
269265 vaultCA : "" ,
270266 gemaltoCA : "" ,
267+ gcpPrivateKey : "" ,
271268 } ) ;
272269
273270 // Files States
@@ -853,17 +850,6 @@ const AddTenant = ({ classes }: IAddTenantProps) => {
853850 ] ;
854851 }
855852
856- if ( encryptionType === "gcp" ) {
857- encryptionValidation = [
858- ...encryptionValidation ,
859- {
860- fieldKey : "gcp_project_id" ,
861- required : true ,
862- value : gcpProjectID ,
863- } ,
864- ] ;
865- }
866-
867853 if ( encryptionType === "aws" ) {
868854 encryptionValidation = [
869855 ...encryptionValidation ,
@@ -1100,7 +1086,7 @@ const AddTenant = ({ classes }: IAddTenantProps) => {
11001086 } ,
11011087 } ;
11021088 break ;
1103- case "GCP " :
1089+ case "gcp " :
11041090 insertEncrypt = {
11051091 gcp : {
11061092 secretmanager : {
@@ -2311,12 +2297,9 @@ const AddTenant = ({ classes }: IAddTenantProps) => {
23112297 name = "gcp_project_id"
23122298 onChange = { ( e : React . ChangeEvent < HTMLInputElement > ) => {
23132299 setGcpProjectID ( e . target . value ) ;
2314- clearValidationError ( "gcp_project_id" ) ;
23152300 } }
23162301 label = "Project ID"
23172302 value = { gcpProjectID }
2318- error = { validationErrors [ "gcp_project_id" ] || "" }
2319- required
23202303 />
23212304 </ Grid >
23222305 < Grid item xs = { 12 } >
0 commit comments