diff --git a/frontend/packages/dev-console/src/components/import/GitImportForm.tsx b/frontend/packages/dev-console/src/components/import/GitImportForm.tsx index d627f96b6bc..a45b1ddd782 100644 --- a/frontend/packages/dev-console/src/components/import/GitImportForm.tsx +++ b/frontend/packages/dev-console/src/components/import/GitImportForm.tsx @@ -14,6 +14,7 @@ import DevfileStrategySection from './devfile/DevfileStrategySection'; import GitSection from './git/GitSection'; import { BuildOptions, GitImportFormProps, ImportTypes } from './import-types'; import ImportStrategySection from './ImportStrategySection'; +import SecureRoute from './route/SecureRoute'; import { BuildSection } from './section/BuildSection'; const GitImportForm: React.FC & GitImportFormProps> = ({ @@ -48,6 +49,10 @@ const GitImportForm: React.FC & GitImportFormProps> = importType !== ImportTypes.devfile && values.import.selectedStrategy.type !== ImportStrategy.DEVFILE && !isSample; + const showSecureRouteSectionForDevfile = + (importType === ImportTypes.devfile || + values.import.selectedStrategy.type === ImportStrategy.DEVFILE) && + values?.devfile?.devfileSuggestedResources?.route?.spec?.tls; return (
@@ -90,6 +95,11 @@ const GitImportForm: React.FC & GitImportFormProps> = )} + {showSecureRouteSectionForDevfile && ( +
+ +
+ )} )}