From 2b08f5c6bd9872c6435d0d6a294554d0b206760e Mon Sep 17 00:00:00 2001
From: Jorik Schellekens
Date: Tue, 27 Aug 2019 14:53:51 +0100
Subject: Error reporting for cert paths
---
synapse_topology/webui/src/js/components/TLS.jsx | 44 +++++++++++++-----------
synapse_topology/webui/src/js/containers/TLS.js | 2 +-
2 files changed, 25 insertions(+), 21 deletions(-)
(limited to 'synapse_topology/webui')
diff --git a/synapse_topology/webui/src/js/components/TLS.jsx b/synapse_topology/webui/src/js/components/TLS.jsx
index 48c27e17fb..5ddb53b75c 100644
--- a/synapse_topology/webui/src/js/components/TLS.jsx
+++ b/synapse_topology/webui/src/js/components/TLS.jsx
@@ -13,6 +13,7 @@ import { TLS_UI } from '../reducers/ui-constants';
import { TLS_TYPES, REVERSE_PROXY_TYPES } from '../actions/constants';
import AccordionToggle from '../containers/AccordionToggle';
import { nextUI } from '../reducers/setup-ui-reducer';
+import InlineError from './InlineError';
const tlsLink = "https://en.wikipedia.org/wiki/Transport_Layer_Security";
const apacheLink = "http://httpd.apache.org/";
@@ -31,8 +32,6 @@ export default ({
const defaultType = TLS_TYPES.REVERSE_PROXY;
- const [type, setType] = useState(defaultType);
-
const [certPath, setCertPath] = useState("");
const [certKeyPath, setCertKeyPath] = useState("");
@@ -41,6 +40,8 @@ export default ({
const toggle = useAccordionToggle(nextUI(TLS_UI));
+ console.log(certKeyPathInvalid)
+ console.log(certPathInvalid)
return
TLS
@@ -53,7 +54,7 @@ export default ({
ACME, providing your own certificates, or reverse proxy handling TLS
certificates.
- setType(k)}>
+
It is recommended to run Synapse behind a reverse proxy such
@@ -129,23 +130,26 @@ export default ({
Specify a path to or upload TLS certs for the domain.
- Please enter {certPathInvalid ? "a valid" : "the"} path to the cert
- setCertPath(e.target.value)}
- />
-
- Please enter {certKeyPathInvalid ? "a valid" : "the"} path to the cert's key
- setCertKeyPath(e.target.value)}
- />
+
+ setCertPath(e.target.value)}
+ />
+
+
+ Please enter path to the cert's key
+
+ setCertKeyPath(e.target.value)}
+ />
+