@@ -110,14 +110,17 @@ export const SnowflakeForm: React.FC<ISnowflakeFormProps> = ({
110110 const handleSubmit = ( e : React . FormEvent ) => {
111111 e . preventDefault ( ) ;
112112
113- const unnamedIntegration = format ( 'Unnamed Snowflake Integration ({0})' , integrationId ) ;
113+ const unnamedIntegration = getLocString (
114+ 'integrationsSnowflakeUnnamedIntegration' ,
115+ 'Unnamed Snowflake Integration ({0})'
116+ ) ;
114117
115118 let config : SnowflakeIntegrationConfig ;
116119
117- if ( authMethod === null || authMethod === SnowflakeAuthMethods . PASSWORD ) {
120+ if ( authMethod === SnowflakeAuthMethods . PASSWORD ) {
118121 config = {
119122 id : integrationId ,
120- name : ( name || unnamedIntegration ) . trim ( ) ,
123+ name : ( name || format ( unnamedIntegration , integrationId ) ) . trim ( ) ,
121124 type : 'snowflake' ,
122125 account : account . trim ( ) ,
123126 authMethod : authMethod ,
@@ -128,9 +131,14 @@ export const SnowflakeForm: React.FC<ISnowflakeFormProps> = ({
128131 role : role . trim ( ) || undefined
129132 } ;
130133 } else if ( authMethod === SnowflakeAuthMethods . SERVICE_ACCOUNT_KEY_PAIR ) {
134+ // Guard against empty private key
135+ if ( ! privateKey . trim ( ) ) {
136+ return ;
137+ }
138+
131139 config = {
132140 id : integrationId ,
133- name : ( name || unnamedIntegration ) . trim ( ) ,
141+ name : ( name || format ( unnamedIntegration , integrationId ) ) . trim ( ) ,
134142 type : 'snowflake' ,
135143 account : account . trim ( ) ,
136144 authMethod : authMethod ,
@@ -186,6 +194,7 @@ export const SnowflakeForm: React.FC<ISnowflakeFormProps> = ({
186194 placeholder = { getLocString ( 'integrationsSnowflakeAccountPlaceholder' , 'abcd.us-east-1' ) }
187195 autoComplete = "off"
188196 required
197+ pattern = ".*\S.*"
189198 disabled = { isUnsupported }
190199 />
191200 </ div >
@@ -225,6 +234,7 @@ export const SnowflakeForm: React.FC<ISnowflakeFormProps> = ({
225234 placeholder = { getLocString ( 'integrationsSnowflakeUsernamePlaceholder' , '' ) }
226235 autoComplete = "username"
227236 required
237+ pattern = ".*\S.*"
228238 />
229239 </ div >
230240
@@ -241,6 +251,7 @@ export const SnowflakeForm: React.FC<ISnowflakeFormProps> = ({
241251 placeholder = { getLocString ( 'integrationsSnowflakePasswordPlaceholder' , '•••••' ) }
242252 autoComplete = "current-password"
243253 required
254+ pattern = ".*\S.*"
244255 />
245256 </ div >
246257 </ >
@@ -268,6 +279,7 @@ export const SnowflakeForm: React.FC<ISnowflakeFormProps> = ({
268279 placeholder = { getLocString ( 'integrationsSnowflakeServiceAccountUsernamePlaceholder' , '' ) }
269280 autoComplete = "username"
270281 required
282+ pattern = ".*\S.*"
271283 />
272284 </ div >
273285
0 commit comments