Show random status and warning
This commit is contained in:
parent
c5b1105fc1
commit
c025c845d2
@ -51,12 +51,12 @@ class App extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { dashboard } = this.props;
|
const { dashboard, encryption } = this.props;
|
||||||
const updateAvailable =
|
const updateAvailable =
|
||||||
!dashboard.processingVersions &&
|
!dashboard.processingVersions &&
|
||||||
dashboard.isCoreRunning &&
|
dashboard.isCoreRunning &&
|
||||||
dashboard.isUpdateAvailable;
|
dashboard.isUpdateAvailable;
|
||||||
const isExpiringCertificate = false;
|
const isExpiringCertificate = !encryption.processing && encryption.warning;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HashRouter hashType='noslash'>
|
<HashRouter hashType='noslash'>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Field, reduxForm } from 'redux-form';
|
import { Field, reduxForm } from 'redux-form';
|
||||||
import { Trans, withNamespaces } from 'react-i18next';
|
import { Trans, withNamespaces } from 'react-i18next';
|
||||||
@ -25,6 +25,8 @@ const Form = (props) => {
|
|||||||
invalid,
|
invalid,
|
||||||
submitting,
|
submitting,
|
||||||
processing,
|
processing,
|
||||||
|
statusCert,
|
||||||
|
statusKey,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -131,10 +133,17 @@ const Form = (props) => {
|
|||||||
validate={[required]}
|
validate={[required]}
|
||||||
/>
|
/>
|
||||||
<div className="form__status">
|
<div className="form__status">
|
||||||
<div className="form__label form__label--bold">
|
{statusCert &&
|
||||||
<Trans>encryption_status</Trans>:
|
<Fragment>
|
||||||
</div>
|
<div className="form__label form__label--bold">
|
||||||
<div>
|
<Trans>encryption_status</Trans>:
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{statusCert}
|
||||||
|
</div>
|
||||||
|
</Fragment>
|
||||||
|
}
|
||||||
|
{/* <div>
|
||||||
<Trans values={{ domains: '*.example.org, example.org' }}>
|
<Trans values={{ domains: '*.example.org, example.org' }}>
|
||||||
encryption_certificates_for
|
encryption_certificates_for
|
||||||
</Trans>
|
</Trans>
|
||||||
@ -143,7 +152,7 @@ const Form = (props) => {
|
|||||||
<Trans values={{ date: '2022-01-01' }}>
|
<Trans values={{ date: '2022-01-01' }}>
|
||||||
encryption_expire
|
encryption_expire
|
||||||
</Trans>
|
</Trans>
|
||||||
</div>
|
</div> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -164,10 +173,16 @@ const Form = (props) => {
|
|||||||
validate={[required]}
|
validate={[required]}
|
||||||
/>
|
/>
|
||||||
<div className="form__status">
|
<div className="form__status">
|
||||||
<div className="form__label form__label--bold">
|
{statusKey &&
|
||||||
<Trans>encryption_status</Trans>:
|
<Fragment>
|
||||||
</div>
|
<div className="form__label form__label--bold">
|
||||||
<div>Valid RSA private key</div>
|
<Trans>encryption_status</Trans>:
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{statusKey}
|
||||||
|
</div>
|
||||||
|
</Fragment>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -190,6 +205,8 @@ Form.propTypes = {
|
|||||||
invalid: PropTypes.bool.isRequired,
|
invalid: PropTypes.bool.isRequired,
|
||||||
initialValues: PropTypes.object.isRequired,
|
initialValues: PropTypes.object.isRequired,
|
||||||
processing: PropTypes.bool.isRequired,
|
processing: PropTypes.bool.isRequired,
|
||||||
|
statusCert: PropTypes.string,
|
||||||
|
statusKey: PropTypes.string,
|
||||||
t: PropTypes.func.isRequired,
|
t: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ class Encryption extends Component {
|
|||||||
const {
|
const {
|
||||||
processing,
|
processing,
|
||||||
processingConfig,
|
processingConfig,
|
||||||
|
status_cert: statusCert,
|
||||||
|
status_key: statusKey,
|
||||||
...values
|
...values
|
||||||
} = encryption;
|
} = encryption;
|
||||||
|
|
||||||
@ -29,6 +31,8 @@ class Encryption extends Component {
|
|||||||
<Form
|
<Form
|
||||||
initialValues={{ ...values }}
|
initialValues={{ ...values }}
|
||||||
processing={encryption.processingConfig}
|
processing={encryption.processingConfig}
|
||||||
|
statusCert={statusCert}
|
||||||
|
statusKey={statusKey}
|
||||||
onSubmit={this.handleFormSubmit}
|
onSubmit={this.handleFormSubmit}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
Loading…
Reference in New Issue
Block a user