diff --git a/client/src/components/App/index.js b/client/src/components/App/index.js index 5bf0f925..a756eadc 100644 --- a/client/src/components/App/index.js +++ b/client/src/components/App/index.js @@ -51,12 +51,12 @@ class App extends Component { } render() { - const { dashboard } = this.props; + const { dashboard, encryption } = this.props; const updateAvailable = !dashboard.processingVersions && dashboard.isCoreRunning && dashboard.isUpdateAvailable; - const isExpiringCertificate = false; + const isExpiringCertificate = !encryption.processing && encryption.warning; return ( diff --git a/client/src/components/Settings/Encryption/Form.js b/client/src/components/Settings/Encryption/Form.js index e58aa8f4..4e85ea5a 100644 --- a/client/src/components/Settings/Encryption/Form.js +++ b/client/src/components/Settings/Encryption/Form.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { Field, reduxForm } from 'redux-form'; import { Trans, withNamespaces } from 'react-i18next'; @@ -25,6 +25,8 @@ const Form = (props) => { invalid, submitting, processing, + statusCert, + statusKey, } = props; return ( @@ -131,10 +133,17 @@ const Form = (props) => { validate={[required]} />
-
- encryption_status: -
-
+ {statusCert && + +
+ encryption_status: +
+
+ {statusCert} +
+
+ } + {/*
encryption_certificates_for @@ -143,7 +152,7 @@ const Form = (props) => { encryption_expire -
+
*/}
@@ -164,10 +173,16 @@ const Form = (props) => { validate={[required]} />
-
- encryption_status: -
-
Valid RSA private key
+ {statusKey && + +
+ encryption_status: +
+
+ {statusKey} +
+
+ }
@@ -190,6 +205,8 @@ Form.propTypes = { invalid: PropTypes.bool.isRequired, initialValues: PropTypes.object.isRequired, processing: PropTypes.bool.isRequired, + statusCert: PropTypes.string, + statusKey: PropTypes.string, t: PropTypes.func.isRequired, }; diff --git a/client/src/components/Settings/Encryption/index.js b/client/src/components/Settings/Encryption/index.js index b4f876a7..e554cc6f 100644 --- a/client/src/components/Settings/Encryption/index.js +++ b/client/src/components/Settings/Encryption/index.js @@ -15,6 +15,8 @@ class Encryption extends Component { const { processing, processingConfig, + status_cert: statusCert, + status_key: statusKey, ...values } = encryption; @@ -29,6 +31,8 @@ class Encryption extends Component {