File tree Expand file tree Collapse file tree 6 files changed +38
-4
lines changed Expand file tree Collapse file tree 6 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @devtron-labs/devtron-fe-common-lib" ,
3
- "version" : " 0.0.97 " ,
3
+ "version" : " 0.0.98 " ,
4
4
"description" : " Supporting common component library" ,
5
5
"type" : " module" ,
6
6
"main" : " dist/index.js" ,
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 @@ -488,6 +488,32 @@ export enum AggregationKeys {
488
488
489
489
export type AggregationKeysType = keyof typeof AggregationKeys
490
490
491
+ export enum GitOpsAuthModeType {
492
+ SSH = 'SSH' ,
493
+ PASSWORD = 'PASSWORD' ,
494
+ SSH_AND_PASSWORD = 'PAT_AND_SSH' ,
495
+ }
496
+
497
+ export interface BaseGitOpsType {
498
+ authMode : GitOpsAuthModeType
499
+ sshKey : string
500
+ sshHost : string
501
+ username : string
502
+ token : string
503
+ }
504
+
505
+ export type GitOpsFieldKeyType =
506
+ | 'host'
507
+ | 'username'
508
+ | 'token'
509
+ | 'gitHubOrgId'
510
+ | 'azureProjectName'
511
+ | 'gitLabGroupId'
512
+ | 'bitBucketWorkspaceId'
513
+ | 'bitBucketProjectKey'
514
+ | 'sshHost'
515
+ | 'sshKey'
516
+
491
517
export interface AppInfoListType {
492
518
application : string
493
519
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
}
You can’t perform that action at this time.
0 commit comments