|
@@ -19,7 +19,9 @@ import { hardcodedIcons } from "shared/hardcodedNameDict";
|
|
|
const DEFAULT_STACK_SOURCE_CONFIG_INDEX = 0;
|
|
const DEFAULT_STACK_SOURCE_CONFIG_INDEX = 0;
|
|
|
|
|
|
|
|
const NewApp = () => {
|
|
const NewApp = () => {
|
|
|
- const { addAppResource, newStack } = useContext(StacksLaunchContext);
|
|
|
|
|
|
|
+ const { addAppResource, newStack, namespace } = useContext(
|
|
|
|
|
+ StacksLaunchContext
|
|
|
|
|
+ );
|
|
|
const { currentCluster } = useContext(Context);
|
|
const { currentCluster } = useContext(Context);
|
|
|
|
|
|
|
|
const params = useParams<{
|
|
const params = useParams<{
|
|
@@ -72,7 +74,11 @@ const NewApp = () => {
|
|
|
}, [params]);
|
|
}, [params]);
|
|
|
|
|
|
|
|
if (isLoading) {
|
|
if (isLoading) {
|
|
|
- return <Wrapper><Loading /></Wrapper>;
|
|
|
|
|
|
|
+ return (
|
|
|
|
|
+ <Wrapper>
|
|
|
|
|
+ <Loading />
|
|
|
|
|
+ </Wrapper>
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (hasError) {
|
|
if (hasError) {
|
|
@@ -185,17 +191,20 @@ const NewApp = () => {
|
|
|
<TitleSection>
|
|
<TitleSection>
|
|
|
<DynamicLink to={`/stacks/launch/overview`}>
|
|
<DynamicLink to={`/stacks/launch/overview`}>
|
|
|
<BackButton>
|
|
<BackButton>
|
|
|
- <i className="material-icons">
|
|
|
|
|
- keyboard_backspace
|
|
|
|
|
- </i>
|
|
|
|
|
|
|
+ <i className="material-icons">keyboard_backspace</i>
|
|
|
</BackButton>
|
|
</BackButton>
|
|
|
</DynamicLink>
|
|
</DynamicLink>
|
|
|
<Polymer>
|
|
<Polymer>
|
|
|
- <Icon src={hardcodedIcons[template.metadata.name]} />
|
|
|
|
|
|
|
+ <Icon src={hardcodedIcons[template.metadata.name]} />
|
|
|
</Polymer>
|
|
</Polymer>
|
|
|
- Add {template.metadata.name.charAt(0).toUpperCase() + template.metadata.name.slice(1)} to Stack
|
|
|
|
|
|
|
+ Add{" "}
|
|
|
|
|
+ {template.metadata.name.charAt(0).toUpperCase() +
|
|
|
|
|
+ template.metadata.name.slice(1)}{" "}
|
|
|
|
|
+ to Stack
|
|
|
</TitleSection>
|
|
</TitleSection>
|
|
|
- <Heading>Application Name <Required>*</Required></Heading>
|
|
|
|
|
|
|
+ <Heading>
|
|
|
|
|
+ Application Name <Required>*</Required>
|
|
|
|
|
+ </Heading>
|
|
|
<InputRow
|
|
<InputRow
|
|
|
type="string"
|
|
type="string"
|
|
|
value={appName}
|
|
value={appName}
|
|
@@ -205,15 +214,21 @@ const NewApp = () => {
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
<div style={{ position: "relative" }}>
|
|
<div style={{ position: "relative" }}>
|
|
|
- <Heading>Application Settings</Heading>
|
|
|
|
|
- <Helper>Configure settings for this application.</Helper>
|
|
|
|
|
- <PorterFormWrapper
|
|
|
|
|
- formData={template.form}
|
|
|
|
|
- onSubmit={handleSubmit}
|
|
|
|
|
- isLaunch
|
|
|
|
|
- saveValuesStatus={saveButtonStatus}
|
|
|
|
|
- saveButtonText="Add Application"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <Heading>Application Settings</Heading>
|
|
|
|
|
+ <Helper>Configure settings for this application.</Helper>
|
|
|
|
|
+ <PorterFormWrapper
|
|
|
|
|
+ formData={template.form}
|
|
|
|
|
+ onSubmit={handleSubmit}
|
|
|
|
|
+ isLaunch
|
|
|
|
|
+ saveValuesStatus={saveButtonStatus}
|
|
|
|
|
+ saveButtonText="Add Application"
|
|
|
|
|
+ valuesToOverride={{ namespace }}
|
|
|
|
|
+ injectedProps={{
|
|
|
|
|
+ "key-value-array": {
|
|
|
|
|
+ availableSyncEnvGroups: [],
|
|
|
|
|
+ },
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</StyledLaunchFlow>
|
|
</StyledLaunchFlow>
|
|
|
);
|
|
);
|
|
@@ -283,4 +298,4 @@ const StyledLaunchFlow = styled.div`
|
|
|
margin-top: ${(props: { disableMarginTop?: boolean }) =>
|
|
margin-top: ${(props: { disableMarginTop?: boolean }) =>
|
|
|
props.disableMarginTop ? "inherit" : "calc(50vh - 380px)"};
|
|
props.disableMarginTop ? "inherit" : "calc(50vh - 380px)"};
|
|
|
padding-bottom: 150px;
|
|
padding-bottom: 150px;
|
|
|
-`;
|
|
|
|
|
|
|
+`;
|