Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(serverless): add the form flag for deploying with serverless
- Loading branch information
1 parent
4a4100f
commit b1c5990
Showing
8 changed files
with
62 additions
and
14 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
28 changes: 28 additions & 0 deletions
28
frontend/packages/dev-console/src/components/import/serverless/ServerlessSection.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,28 @@ | ||
import * as React from 'react'; | ||
import { connectToFlags } from '@console/internal/reducers/features'; | ||
import { FLAG_KNATIVE_SERVING } from '@console/knative-plugin'; | ||
import FormSection from '../section/FormSection'; | ||
import { CheckboxField } from '../../formik-fields'; | ||
|
||
type ServerlessSectionProps = { | ||
flags: { [key: string]: boolean }; | ||
}; | ||
|
||
const ServerlessSection: React.FC<ServerlessSectionProps> = ({ flags }) => { | ||
if (flags[FLAG_KNATIVE_SERVING]) { | ||
return ( | ||
<FormSection title="Serverless Options" divider> | ||
<span className="label label-warning">Tech Preview</span> | ||
<CheckboxField | ||
type="checkbox" | ||
label="Enable scaling to zero when idle" | ||
name="serverless.trigger" | ||
/> | ||
</FormSection> | ||
); | ||
} | ||
|
||
return null; | ||
}; | ||
|
||
export default connectToFlags(FLAG_KNATIVE_SERVING)(ServerlessSection); |
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