File tree Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,14 @@ export const useIntersection = (
207
207
}
208
208
export const isNullOrUndefined = ( value : unknown ) : boolean => value === null || value === undefined
209
209
210
+ export const handleDisableSubmitOnEnter = ( event : React . KeyboardEvent < HTMLFormElement > ) => {
211
+ const isTextArea = event . target instanceof HTMLTextAreaElement
212
+
213
+ if ( event . key === 'Enter' && ! isTextArea ) {
214
+ event . preventDefault ( )
215
+ }
216
+ }
217
+
210
218
export const getKeyToBooleanMapFromArray = < T extends string | number > ( arr : T [ ] = [ ] ) =>
211
219
arr . reduce < Record < T , boolean > > (
212
220
( acc , key ) => {
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export const ModuleNameMap = {
53
53
// TODO: Convert to object later if more formats arise
54
54
export const DATE_TIME_FORMAT_STRING = 'ddd DD MMM YYYY HH:mm:ss'
55
55
export const API_TOKEN_PREFIX = 'API-TOKEN:'
56
+ export const DEFAULT_SECRET_PLACEHOLDER = '••••••••'
56
57
57
58
export enum PatchOperationType {
58
59
replace = 'replace' ,
Original file line number Diff line number Diff line change @@ -489,6 +489,32 @@ export enum AggregationKeys {
489
489
490
490
export type AggregationKeysType = keyof typeof AggregationKeys
491
491
492
+ export enum GitOpsAuthModeType {
493
+ SSH = 'SSH' ,
494
+ PASSWORD = 'PASSWORD' ,
495
+ SSH_AND_PASSWORD = 'PAT_AND_SSH' ,
496
+ }
497
+
498
+ export interface BaseGitOpsType {
499
+ authMode : GitOpsAuthModeType
500
+ sshKey : string
501
+ sshHost : string
502
+ username : string
503
+ token : string
504
+ }
505
+
506
+ export type GitOpsFieldKeyType =
507
+ | 'host'
508
+ | 'username'
509
+ | 'token'
510
+ | 'gitHubOrgId'
511
+ | 'azureProjectName'
512
+ | 'gitLabGroupId'
513
+ | 'bitBucketWorkspaceId'
514
+ | 'bitBucketProjectKey'
515
+ | 'sshHost'
516
+ | 'sshKey'
517
+
492
518
export interface AppInfoListType {
493
519
application : string
494
520
appStatus : string
Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ export interface customEnv {
69
69
ENABLE_RESOURCE_SCAN ?: boolean
70
70
FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE : boolean
71
71
ENABLE_RESOURCE_SCAN_V2 ?: boolean
72
- ENABLE_GITOPS_BITBUCKET_SOURCE : boolean
73
72
HIDE_RESOURCE_WATCHER ?: boolean
74
73
ORGANIZATION_NAME : string
75
74
FEATURE_EXTERNAL_FLUX_CD_ENABLE : boolean
You can’t perform that action at this time.
0 commit comments