mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
refactor(cert): introducing new management page
1. User can now view the latest renew logs of the certain certificate. 2. Add manually renew button in certificate modify page for managed certificate (auto cert)
This commit is contained in:
parent
7c47f08a72
commit
ac68fd05c9
36 changed files with 1908 additions and 1286 deletions
|
@ -72,24 +72,6 @@ func GetAutoCertList() (c []*Cert) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetCertList(name, domain string) (c []Cert) {
|
||||
tx := db
|
||||
if name != "" {
|
||||
tx = tx.Where("name LIKE ? or domain LIKE ?", "%"+name+"%", "%"+name+"%")
|
||||
}
|
||||
if domain != "" {
|
||||
tx = tx.Where("domain LIKE ?", "%"+domain+"%")
|
||||
}
|
||||
tx.Find(&c)
|
||||
return
|
||||
}
|
||||
|
||||
func FirstCertByID(id int) (c Cert, err error) {
|
||||
err = db.First(&c, id).Error
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Cert) Updates(n *Cert) error {
|
||||
return db.Model(&Cert{}).Where("id", c.ID).Updates(n).Error
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue