Skip to content

Commit

Permalink
fix import pfx from diagnostic window
Browse files Browse the repository at this point in the history
  • Loading branch information
algv committed Nov 24, 2020
1 parent d1724f6 commit 8354cbd
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions app/components/Certificate/CertificateWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ class CertWindow extends React.Component<any, any> {
}

componentDidMount() {
const { isCertInfoMode, urlCmdProps, urlCmdCertInfo } = this.props;
const { isCertInfoMode, location, urlCmdProps, urlCmdCertInfo } = this.props;
const { localize, locale } = this.context;

$(".btn-floated").dropdown();
if (urlCmdProps && !urlCmdProps.done) {
if (urlCmdProps.operation === URL_CMD_CERTIFICATES_IMPORT) {
Expand All @@ -99,6 +101,17 @@ class CertWindow extends React.Component<any, any> {
if (isCertInfoMode && urlCmdCertInfo.certToProcessPkiItemInfo) {
this.handleActiveCert(urlCmdCertInfo.certToProcessPkiItemInfo);
}

if (location && location.state && location.state.certImport) {
setTimeout(() => {
this.certImport();
if (this.props.history) {
this.props.history.replace({
pathname: LOCATION_CERTIFICATES, search: "my", state: { head: localize("Certificate.certs_my", locale), store: MY },
});
}
}, 100);
}
}

handleShowModalByType = (typeOfModal: string) => {
Expand Down Expand Up @@ -1411,14 +1424,6 @@ class CertWindow extends React.Component<any, any> {
const { certificate, crl, requestCA } = this.state;
const { localize, locale } = this.context;

if (location && location.state && location.state.certImport) {
this.certImport();
if (this.props.history) {
this.props.history.replace({
pathname: LOCATION_CERTIFICATES, search: "my", state: { head: localize("Certificate.certs_my", locale), store: MY },
});
}
}
if (isLoading || isLoadingFromDSS) {
return <ProgressBars />;
}
Expand Down

0 comments on commit 8354cbd

Please sign in to comment.