Fix getCertByApplication()

This commit is contained in:
Yang Luo
2023-05-18 16:32:43 +08:00
parent 9f084a0799
commit 04eaad1c80
2 changed files with 30 additions and 2 deletions

View File

@ -23,10 +23,20 @@ import BaseListPage from "./BaseListPage";
import PopconfirmModal from "./common/modal/PopconfirmModal";
class CertListPage extends BaseListPage {
constructor(props) {
super(props);
}
componentDidMount() {
this.setState({
owner: Setting.isAdminUser(this.props.account) ? "admin" : this.props.account.owner,
});
}
newCert() {
const randomName = Setting.getRandomName();
return {
owner: this.props.account.owner, // this.props.account.certname,
owner: this.state.owner,
name: `cert_${randomName}`,
createdTime: moment().format(),
displayName: `New Cert - ${randomName}`,