Fix empty values on validate

This commit is contained in:
Ildar Kamalov 2019-02-20 14:26:56 +03:00
parent 9c8e4c64ea
commit 4f45f2c3e3
2 changed files with 26 additions and 10 deletions

View File

@ -278,15 +278,13 @@ let Form = (props) => {
</div>
</div>
</div>
{warning_validation &&
<div className="col-12">
<p className="text-danger">
{
(certificateChain || privateKey)
&& warning_validation
&& warning_validation
}
{warning_validation}
</p>
</div>
}
</div>
<div className="btn-list mt-2">

View File

@ -28,9 +28,27 @@ const encryption = handleActions({
[actions.validateTlsConfigRequest]: state => ({ ...state, processingValidate: true }),
[actions.validateTlsConfigFailure]: state => ({ ...state, processingValidate: false }),
[actions.validateTlsConfigSuccess]: (state, { payload }) => {
const {
issuer = '',
key_type = '',
not_after = '',
not_before = '',
subject = '',
warning_validation = '',
dns_names = '',
...values
} = payload;
const newState = {
...state,
...payload,
...values,
issuer,
key_type,
not_after,
not_before,
subject,
warning_validation,
dns_names,
processingValidate: false,
};
return newState;