-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update GitServer create, edit forms (#86)
Jira: EPMDPEDP-12859 Related: #86 Change-Id: I0e5d424c4e174f08cd40c09d9d0879fd29f0efb2
- Loading branch information
1 parent
7cb7b01
commit dcf5906
Showing
51 changed files
with
5,234 additions
and
372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 50 additions & 11 deletions
61
src/k8s/Secret/utils/createGitServerSecretInstance/index.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 51 additions & 13 deletions
64
src/k8s/Secret/utils/createGitServerSecretInstance/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { set } from 'lodash'; | ||
import { FormNameObject } from '../../../../types/forms'; | ||
import { SecretKubeObjectInterface } from '../../types'; | ||
|
||
export const editGitServerSecretInstance = ( | ||
names: { | ||
[key: string]: FormNameObject; | ||
}, | ||
kubeObjectData: SecretKubeObjectInterface, | ||
formValues: { | ||
[key: string]: any; | ||
} | ||
): SecretKubeObjectInterface => { | ||
const base = { ...kubeObjectData }; | ||
|
||
for (const [propKey, propValue] of Object.entries(formValues)) { | ||
if (names[propKey].notUsedInFormData) { | ||
continue; | ||
} | ||
|
||
const propPath = names[propKey].path; | ||
set(base, propPath, propValue); | ||
} | ||
|
||
return base; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/pages/edp-configuration/pages/edp-gitserver-list/providers/DynamicData/context.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import { DynamicDataContextProviderValue } from './types'; | ||
|
||
export const DynamicDataContext = React.createContext<DynamicDataContextProviderValue>({ | ||
data: { | ||
gitServer: null, | ||
gitServerSecret: null, | ||
}, | ||
isLoading: false, | ||
}); |
4 changes: 4 additions & 0 deletions
4
src/pages/edp-configuration/pages/edp-gitserver-list/providers/DynamicData/hooks.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import React from 'react'; | ||
import { DynamicDataContext } from './context'; | ||
|
||
export const useDynamicDataContext = () => React.useContext(DynamicDataContext); |
Oops, something went wrong.