From e1d06a718a1d2e007c2f63d28c4c6075f440b82c Mon Sep 17 00:00:00 2001 From: Deniz Kusefoglu Date: Wed, 1 Aug 2018 12:13:03 -0700 Subject: [PATCH] Add https checking to SourceStep --- ui/src/sources/components/SourceStep.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/src/sources/components/SourceStep.tsx b/ui/src/sources/components/SourceStep.tsx index c121cea0b..afe6a1b32 100644 --- a/ui/src/sources/components/SourceStep.tsx +++ b/ui/src/sources/components/SourceStep.tsx @@ -14,6 +14,7 @@ import { notifySourceCreationFailed, notifySourceCreationSucceeded, } from 'src/shared/copy/notifications' +import {insecureSkipVerifyText} from 'src/shared/copy/tooltipText' import {Source} from 'src/types' import {DEFAULT_SOURCE} from 'src/shared/constants' @@ -87,9 +88,16 @@ class SourceStep extends PureComponent { /> + {this.isHTTPS && ( + + )} ) } @@ -110,6 +118,11 @@ class SourceStep extends PureComponent { const {source} = this.state this.setState({source: {...source, [key]: value}}) } + + private get isHTTPS(): boolean { + const {source} = this.state + return getDeep(source, 'url', '').startsWith('https') + } } const mdtp = {