mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat(wip): docker ui only
This commit is contained in:
parent
c62fd25b2e
commit
d4a4ed1e1c
43 changed files with 1269 additions and 372 deletions
|
@ -4,7 +4,6 @@
|
|||
package nginx
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -119,10 +118,14 @@ func ToggleStubStatus(c *gin.Context) {
|
|||
}
|
||||
|
||||
// Reload Nginx configuration
|
||||
reloadOutput := nginx.Reload()
|
||||
reloadOutput, err := nginx.Reload()
|
||||
if err != nil {
|
||||
cosy.ErrHandler(c, err)
|
||||
return
|
||||
}
|
||||
if len(reloadOutput) > 0 && (strings.Contains(strings.ToLower(reloadOutput), "error") ||
|
||||
strings.Contains(strings.ToLower(reloadOutput), "failed")) {
|
||||
cosy.ErrHandler(c, errors.New("Reload Nginx failed"))
|
||||
cosy.ErrHandler(c, cosy.WrapErrorWithParams(nginx.ErrReloadFailed, reloadOutput))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue