|
|
@@ -12,7 +12,8 @@ import { RouteComponentProps } from "react-router";
|
|
|
import { Context } from "shared/Context";
|
|
|
import ActionConfBranchSelector from "components/repo-selector/ActionConfBranchSelector";
|
|
|
import DetectContentsList from "components/repo-selector/DetectContentsList";
|
|
|
-
|
|
|
+import { pushFiltered } from "shared/routing";
|
|
|
+import ImageSelector from "components/image-selector/ImageSelector";
|
|
|
type Props = {
|
|
|
source: SourceType | undefined;
|
|
|
imageUrl: string;
|
|
|
@@ -23,8 +24,6 @@ type Props = {
|
|
|
setActionConfig: (
|
|
|
x: ActionConfigType | ((prevState: ActionConfigType) => ActionConfigType)
|
|
|
) => void;
|
|
|
- procfileProcess: string;
|
|
|
- setProcfileProcess: (x: string) => void;
|
|
|
branch: string;
|
|
|
setBranch: (x: string) => void;
|
|
|
dockerfilePath: string | null;
|
|
|
@@ -46,18 +45,16 @@ const SourceSettings: React.FC<Props> = ({
|
|
|
setImageTag,
|
|
|
actionConfig,
|
|
|
setActionConfig,
|
|
|
- setProcfileProcess,
|
|
|
branch,
|
|
|
setBranch,
|
|
|
dockerfilePath,
|
|
|
setDockerfilePath,
|
|
|
- procfilePath,
|
|
|
- setProcfilePath,
|
|
|
folderPath,
|
|
|
setFolderPath,
|
|
|
setBuildConfig,
|
|
|
porterYaml,
|
|
|
setPorterYaml,
|
|
|
+ ...props
|
|
|
}) => {
|
|
|
const renderGithubSettings = () => {
|
|
|
return (
|
|
|
@@ -120,12 +117,9 @@ const SourceSettings: React.FC<Props> = ({
|
|
|
actionConfig={actionConfig}
|
|
|
branch={branch}
|
|
|
dockerfilePath={dockerfilePath}
|
|
|
- procfilePath={procfilePath}
|
|
|
folderPath={folderPath}
|
|
|
setActionConfig={setActionConfig}
|
|
|
setDockerfilePath={setDockerfilePath}
|
|
|
- setProcfilePath={setProcfilePath}
|
|
|
- setProcfileProcess={setProcfileProcess}
|
|
|
setFolderPath={setFolderPath}
|
|
|
setBuildConfig={setBuildConfig}
|
|
|
porterYaml={porterYaml}
|
|
|
@@ -139,7 +133,7 @@ const SourceSettings: React.FC<Props> = ({
|
|
|
const renderDockerSettings = () => {
|
|
|
return (
|
|
|
<>
|
|
|
- <Text size={16}>Registry settings</Text>
|
|
|
+ {/* /* <Text size={16}>Registry settings</Text>
|
|
|
<Spacer y={0.5} />
|
|
|
<Text color="helper">
|
|
|
Specify the complete registry URL for your Docker image:
|
|
|
@@ -150,7 +144,40 @@ const SourceSettings: React.FC<Props> = ({
|
|
|
value={imageUrl}
|
|
|
width="300px"
|
|
|
setValue={setImageUrl}
|
|
|
- />
|
|
|
+ /> */}
|
|
|
+
|
|
|
+ <StyledSourceBox>
|
|
|
+ {/* <CloseButton
|
|
|
+ onClick={() => {
|
|
|
+ setSourceType("");
|
|
|
+ setImageUrl("");
|
|
|
+ setImageTag("");
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <i className="material-icons">close</i>
|
|
|
+ </CloseButton> */}
|
|
|
+ <Subtitle>
|
|
|
+ Specify the container image you would like to connect to this
|
|
|
+ template.
|
|
|
+ <Highlight
|
|
|
+ onClick={() =>
|
|
|
+ pushFiltered(props, "/integrations/registry", ["project_id"])
|
|
|
+ }
|
|
|
+ >
|
|
|
+ Manage Docker registries
|
|
|
+ </Highlight>
|
|
|
+ <Required>*</Required>
|
|
|
+ </Subtitle>
|
|
|
+ <DarkMatter antiHeight="-4px" />
|
|
|
+ <ImageSelector
|
|
|
+ selectedTag={imageTag}
|
|
|
+ selectedImageUrl={imageUrl}
|
|
|
+ setSelectedImageUrl={setImageUrl}
|
|
|
+ setSelectedTag={setImageTag}
|
|
|
+ forceExpanded={true}
|
|
|
+ />
|
|
|
+ <br />
|
|
|
+ </StyledSourceBox>
|
|
|
</>
|
|
|
);
|
|
|
};
|
|
|
@@ -191,3 +218,46 @@ const Required = styled.div`
|
|
|
color: #fc4976;
|
|
|
display: inline-block;
|
|
|
`;
|
|
|
+
|
|
|
+const CloseButton = styled.div`
|
|
|
+ position: absolute;
|
|
|
+ display: block;
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ z-index: 1;
|
|
|
+ border-radius: 50%;
|
|
|
+ right: 12px;
|
|
|
+ top: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ :hover {
|
|
|
+ background-color: #ffffff11;
|
|
|
+ }
|
|
|
+
|
|
|
+ > i {
|
|
|
+ font-size: 20px;
|
|
|
+ color: #aaaabb;
|
|
|
+ }
|
|
|
+`;
|
|
|
+const Highlight = styled.a`
|
|
|
+ color: #8590ff;
|
|
|
+ text-decoration: none;
|
|
|
+ margin-left: 5px;
|
|
|
+ cursor: pointer;
|
|
|
+ display: inline;
|
|
|
+`;
|
|
|
+
|
|
|
+const StyledSourceBox = styled.div`
|
|
|
+ width: 100%;
|
|
|
+ color: #ffffff;
|
|
|
+ padding: 14px 35px 20px;
|
|
|
+ position: relative;
|
|
|
+ font-size: 13px;
|
|
|
+ margin-top: 6px;
|
|
|
+ margin-bottom: 25px;
|
|
|
+ border-radius: 5px;
|
|
|
+ background: ${(props) => props.theme.fg};
|
|
|
+ border: 1px solid #494b4f;
|
|
|
+`;
|