mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat: add directive auto complete and documents #816
This commit is contained in:
parent
830ed28148
commit
5911462f90
25 changed files with 4288 additions and 306 deletions
18
api/nginx/directives.go
Normal file
18
api/nginx/directives.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package nginx
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/0xJacky/Nginx-UI/internal/nginx"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/uozi-tech/cosy"
|
||||
)
|
||||
|
||||
func GetDirectives(c *gin.Context) {
|
||||
directives, err := nginx.GetDirectives()
|
||||
if err != nil {
|
||||
cosy.ErrHandler(c, err)
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, directives)
|
||||
}
|
|
@ -11,6 +11,7 @@ func InitRouter(r *gin.RouterGroup) {
|
|||
r.POST("nginx/test", Test)
|
||||
r.GET("nginx/status", Status)
|
||||
r.POST("nginx_log", GetNginxLogPage)
|
||||
r.GET("nginx/directives", GetDirectives)
|
||||
}
|
||||
|
||||
func InitNginxLogRouter(r *gin.RouterGroup) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue