diff --git a/frontend/src/views/domain/ngx_conf/LocationEditor.vue b/frontend/src/views/domain/ngx_conf/LocationEditor.vue index f92412bf..b836ea8a 100644 --- a/frontend/src/views/domain/ngx_conf/LocationEditor.vue +++ b/frontend/src/views/domain/ngx_conf/LocationEditor.vue @@ -40,6 +40,20 @@ function remove(index: number) { + + + @@ -48,19 +62,7 @@ function remove(index: number) { -
- - - - - - -
+
@@ -88,12 +90,5 @@ function remove(index: number) { .ant-card { margin: 10px 0; box-shadow: unset; - - .input-wrapper { - display: flex; - gap: 10px; - align-items: center; - width: 100%; - } } diff --git a/server/pkg/nginx/type.go b/server/pkg/nginx/type.go index f547a52b..3a7186dd 100644 --- a/server/pkg/nginx/type.go +++ b/server/pkg/nginx/type.go @@ -64,9 +64,17 @@ func (d *NgxDirective) TrimParams() { } func NewNgxServer() *NgxServer { - return &NgxServer{commentQueue: &CommentQueue{linkedlistqueue.New()}} + return &NgxServer{ + Locations: make([]*NgxLocation, 0), + Directives: make([]*NgxDirective, 0), + commentQueue: &CommentQueue{linkedlistqueue.New()}, + } } func NewNgxConfig(filename string) *NgxConfig { - return &NgxConfig{FileName: filename, commentQueue: &CommentQueue{linkedlistqueue.New()}} + return &NgxConfig{ + FileName: filename, + commentQueue: &CommentQueue{linkedlistqueue.New()}, + Upstreams: make([]*NgxUpstream, 0), + } }