This repository has been archived by the owner on Feb 13, 2020. It is now read-only.
forked from openshift/console
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed CreateSourceSecret.tsx file
- Loading branch information
Showing
8 changed files
with
172 additions
and
284 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
93 changes: 0 additions & 93 deletions
93
frontend/packages/dev-console/src/components/import/git/CreateSourceSecret.tsx
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
frontend/packages/dev-console/src/components/import/git/CreateSourceSecretModal.tsx
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,46 @@ | ||
import * as React from 'react'; | ||
import { | ||
withSecretForm, | ||
SourceSecretForm, | ||
SecretTypeAbstraction, | ||
} from '@console/internal/components/secrets/create-secret'; | ||
import { createModalLauncher } from '@console/internal/components/factory/modal'; | ||
|
||
interface CreateSourceSecretModalProps { | ||
cancel: (e: MouseEvent) => void; | ||
close: () => void; | ||
onSave?: (name: string) => void; | ||
namespace: string; | ||
} | ||
|
||
const CreateSourceSecretModal: React.FC<CreateSourceSecretModalProps> = ({ | ||
close, | ||
namespace, | ||
onSave, | ||
}) => { | ||
const CreateSourceSecretForm = withSecretForm(SourceSecretForm, true); | ||
const onClose = () => { | ||
close(); | ||
return null; | ||
}; | ||
|
||
const handleSave = (name: string) => { | ||
close(); | ||
onSave(name); | ||
}; | ||
return ( | ||
<CreateSourceSecretForm | ||
onCancel={onClose} | ||
onSave={handleSave} | ||
fixed={{ metadata: { namespace } }} | ||
secretTypeAbstraction={SecretTypeAbstraction.source} | ||
explanation="Source secrets let you authenticate against a Git server." | ||
titleVerb="Create" | ||
isCreate | ||
/> | ||
); | ||
}; | ||
|
||
export const sourceSecretModalLauncher = createModalLauncher<CreateSourceSecretModalProps>( | ||
CreateSourceSecretModal, | ||
); |
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
Oops, something went wrong.