diff --git a/backend/app/api/v1/file.go b/backend/app/api/v1/file.go index db617d121..eb3eb7f66 100644 --- a/backend/app/api/v1/file.go +++ b/backend/app/api/v1/file.go @@ -519,6 +519,12 @@ func (b *BaseApi) LoadFromFile(c *gin.Context) { } func mergeChunks(fileName string, fileDir string, dstDir string, chunkCount int) error { + if _, err := os.Stat(path.Dir(dstDir)); err != nil && os.IsNotExist(err) { + if err = os.MkdirAll(path.Dir(dstDir), os.ModePerm); err != nil { + return err + } + } + targetFile, err := os.Create(filepath.Join(dstDir, fileName)) if err != nil { return err @@ -547,7 +553,6 @@ func mergeChunks(fileName string, fileDir string, dstDir string, chunkCount int) // @Success 200 // @Security ApiKeyAuth // @Router /files/chunkupload [post] -// @x-panel-log {"bodyKeys":["path"],"paramKeys":[],"BeforeFuntions":[],"formatZH":"上传文件 [path]","formatEN":"Upload file [path]"} func (b *BaseApi) UploadChunkFiles(c *gin.Context) { fileForm, err := c.FormFile("chunk") if err != nil { diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index 70a3043da..bfa2ca21a 100644 --- a/cmd/server/docs/docs.go +++ b/cmd/server/docs/docs.go @@ -1,10 +1,17 @@ -// Package docs GENERATED BY SWAG; DO NOT EDIT +// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // This file was generated by swaggo/swag package docs -import "github.com/swaggo/swag" +import ( + "bytes" + "encoding/json" + "strings" + "text/template" -const docTemplate = `{ + "github.com/swaggo/swag" +) + +var doc = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { @@ -69,7 +76,7 @@ const docTemplate = `{ "summary": "Get app list update", "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -408,7 +415,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -510,7 +517,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -552,7 +559,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -596,7 +603,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -615,7 +622,7 @@ const docTemplate = `{ "summary": "Sync app installed", "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -655,7 +662,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -708,7 +715,7 @@ const docTemplate = `{ "summary": "Sync app list", "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -746,7 +753,7 @@ const docTemplate = `{ "summary": "Check System isDemo", "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -774,7 +781,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -824,7 +831,7 @@ const docTemplate = `{ "summary": "User logout", "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -869,7 +876,7 @@ const docTemplate = `{ "summary": "Check is First login", "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -902,7 +909,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -945,7 +952,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -987,7 +994,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1074,8 +1081,8 @@ const docTemplate = `{ "bodyKeys": [ "name" ], - "formatEN": "create compose [name]", - "formatZH": "创建 compose [name]", + "formatEN": "check compose [name]", + "formatZH": "检测 compose [name] 格式", "paramKeys": [] } } @@ -1108,7 +1115,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1200,7 +1207,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1240,7 +1247,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1280,7 +1287,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1417,7 +1424,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1570,7 +1577,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1612,7 +1619,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1695,7 +1702,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1783,7 +1790,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1825,7 +1832,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1906,7 +1913,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1976,7 +1983,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2021,7 +2028,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2114,7 +2121,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -2150,7 +2157,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2330,7 +2337,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2372,7 +2379,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2462,7 +2469,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2513,7 +2520,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2555,7 +2562,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2673,7 +2680,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2716,7 +2723,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2767,7 +2774,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2818,7 +2825,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2941,7 +2948,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2993,7 +3000,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3126,7 +3133,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3190,7 +3197,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3241,7 +3248,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3292,7 +3299,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3332,7 +3339,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3419,7 +3426,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3565,7 +3572,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3605,7 +3612,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3645,7 +3652,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3707,7 +3714,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3871,7 +3878,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3911,7 +3918,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3953,7 +3960,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3995,7 +4002,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4032,17 +4039,8 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } - }, - "x-panel-log": { - "BeforeFuntions": [], - "bodyKeys": [ - "path" - ], - "formatEN": "Upload file [path]", - "formatZH": "上传文件 [path]", - "paramKeys": [] } } }, @@ -4074,7 +4072,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4161,7 +4159,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4203,7 +4201,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4245,7 +4243,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4287,7 +4285,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4374,7 +4372,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4417,7 +4415,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4460,7 +4458,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4503,7 +4501,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4581,7 +4579,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4654,7 +4652,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4732,7 +4730,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4776,7 +4774,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4873,7 +4871,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4916,7 +4914,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5003,7 +5001,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5045,7 +5043,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5096,7 +5094,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5139,7 +5137,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5234,7 +5232,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5347,7 +5345,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -5416,7 +5414,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5607,7 +5605,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5705,7 +5703,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5756,7 +5754,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5798,7 +5796,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5842,7 +5840,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5893,7 +5891,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5944,7 +5942,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5987,7 +5985,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -6020,7 +6018,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6065,7 +6063,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6202,7 +6200,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6266,7 +6264,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6328,7 +6326,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6354,7 +6352,7 @@ const docTemplate = `{ "summary": "Clean monitor datas", "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6394,7 +6392,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6434,7 +6432,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6484,7 +6482,7 @@ const docTemplate = `{ "summary": "Load system available status", "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -6517,7 +6515,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6560,7 +6558,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6611,7 +6609,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6663,7 +6661,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6706,7 +6704,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6757,7 +6755,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6873,7 +6871,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6947,7 +6945,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6989,7 +6987,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7230,7 +7228,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7389,7 +7387,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7440,7 +7438,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7492,7 +7490,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7543,7 +7541,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7585,7 +7583,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7672,7 +7670,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7793,7 +7791,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7864,7 +7862,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7906,7 +7904,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7957,7 +7955,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8076,7 +8074,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8127,7 +8125,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8280,7 +8278,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -8313,7 +8311,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8364,7 +8362,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8451,7 +8449,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -8484,7 +8482,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8533,7 +8531,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -8566,7 +8564,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8644,7 +8642,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -10209,21 +10207,6 @@ const docTemplate = `{ } } }, - "dto.NginxKey": { - "type": "string", - "enum": [ - "index", - "limit-conn", - "ssl", - "http-per" - ], - "x-enum-varnames": [ - "Index", - "LimitConn", - "SSL", - "HttpPer" - ] - }, "dto.OperateByID": { "type": "object", "required": [ @@ -11646,7 +11629,7 @@ const docTemplate = `{ }, "params": {}, "scope": { - "$ref": "#/definitions/dto.NginxKey" + "type": "string" }, "websiteId": { "type": "integer" @@ -11660,7 +11643,7 @@ const docTemplate = `{ ], "properties": { "scope": { - "$ref": "#/definitions/dto.NginxKey" + "type": "string" }, "websiteId": { "type": "integer" @@ -12617,18 +12600,56 @@ const docTemplate = `{ } }` +type swaggerInfo struct { + Version string + Host string + BasePath string + Schemes []string + Title string + Description string +} + // SwaggerInfo holds exported Swagger Info so clients can modify it -var SwaggerInfo = &swag.Spec{ - Version: "1.0", - Host: "localhost", - BasePath: "/api/v1", - Schemes: []string{}, - Title: "1Panel", - Description: "开源Linux面板", - InfoInstanceName: "swagger", - SwaggerTemplate: docTemplate, +var SwaggerInfo = swaggerInfo{ + Version: "1.0", + Host: "localhost", + BasePath: "/api/v1", + Schemes: []string{}, + Title: "1Panel", + Description: "开源Linux面板", +} + +type s struct{} + +func (s *s) ReadDoc() string { + sInfo := SwaggerInfo + sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1) + + t, err := template.New("swagger_info").Funcs(template.FuncMap{ + "marshal": func(v interface{}) string { + a, _ := json.Marshal(v) + return string(a) + }, + "escape": func(v interface{}) string { + // escape tabs + str := strings.Replace(v.(string), "\t", "\\t", -1) + // replace " with \", and if that results in \\", replace that with \\\" + str = strings.Replace(str, "\"", "\\\"", -1) + return strings.Replace(str, "\\\\\"", "\\\\\\\"", -1) + }, + }).Parse(doc) + if err != nil { + return doc + } + + var tpl bytes.Buffer + if err := t.Execute(&tpl, sInfo); err != nil { + return doc + } + + return tpl.String() } func init() { - swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) + swag.Register("swagger", &s{}) } diff --git a/cmd/server/docs/swagger.json b/cmd/server/docs/swagger.json index dd967cce9..3f59dba72 100644 --- a/cmd/server/docs/swagger.json +++ b/cmd/server/docs/swagger.json @@ -62,7 +62,7 @@ "summary": "Get app list update", "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -401,7 +401,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -503,7 +503,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -545,7 +545,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -589,7 +589,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -608,7 +608,7 @@ "summary": "Sync app installed", "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -648,7 +648,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -701,7 +701,7 @@ "summary": "Sync app list", "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -739,7 +739,7 @@ "summary": "Check System isDemo", "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -767,7 +767,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -817,7 +817,7 @@ "summary": "User logout", "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -862,7 +862,7 @@ "summary": "Check is First login", "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -895,7 +895,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -938,7 +938,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -980,7 +980,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1067,8 +1067,8 @@ "bodyKeys": [ "name" ], - "formatEN": "create compose [name]", - "formatZH": "创建 compose [name]", + "formatEN": "check compose [name]", + "formatZH": "检测 compose [name] 格式", "paramKeys": [] } } @@ -1101,7 +1101,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1193,7 +1193,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1233,7 +1233,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1273,7 +1273,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1410,7 +1410,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1563,7 +1563,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1605,7 +1605,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1688,7 +1688,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1776,7 +1776,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1818,7 +1818,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1899,7 +1899,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -1969,7 +1969,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2014,7 +2014,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2107,7 +2107,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -2143,7 +2143,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2323,7 +2323,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2365,7 +2365,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2455,7 +2455,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2506,7 +2506,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2548,7 +2548,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2666,7 +2666,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2709,7 +2709,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2760,7 +2760,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2811,7 +2811,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2934,7 +2934,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -2986,7 +2986,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3119,7 +3119,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3183,7 +3183,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3234,7 +3234,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3285,7 +3285,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3325,7 +3325,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3412,7 +3412,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3558,7 +3558,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3598,7 +3598,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3638,7 +3638,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3700,7 +3700,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3864,7 +3864,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3904,7 +3904,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3946,7 +3946,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -3988,7 +3988,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4025,17 +4025,8 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } - }, - "x-panel-log": { - "BeforeFuntions": [], - "bodyKeys": [ - "path" - ], - "formatEN": "Upload file [path]", - "formatZH": "上传文件 [path]", - "paramKeys": [] } } }, @@ -4067,7 +4058,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4154,7 +4145,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4196,7 +4187,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4238,7 +4229,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4280,7 +4271,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4367,7 +4358,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4410,7 +4401,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4453,7 +4444,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4496,7 +4487,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4574,7 +4565,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4647,7 +4638,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4725,7 +4716,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4769,7 +4760,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4866,7 +4857,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4909,7 +4900,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -4996,7 +4987,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5038,7 +5029,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5089,7 +5080,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5132,7 +5123,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5227,7 +5218,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5340,7 +5331,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -5409,7 +5400,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5600,7 +5591,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5698,7 +5689,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5749,7 +5740,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5791,7 +5782,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5835,7 +5826,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5886,7 +5877,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5937,7 +5928,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -5980,7 +5971,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -6013,7 +6004,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6058,7 +6049,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6195,7 +6186,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6259,7 +6250,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6321,7 +6312,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6347,7 +6338,7 @@ "summary": "Clean monitor datas", "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6387,7 +6378,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6427,7 +6418,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6477,7 +6468,7 @@ "summary": "Load system available status", "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -6510,7 +6501,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6553,7 +6544,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6604,7 +6595,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6656,7 +6647,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6699,7 +6690,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6750,7 +6741,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6866,7 +6857,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6940,7 +6931,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -6982,7 +6973,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7223,7 +7214,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7382,7 +7373,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7433,7 +7424,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7485,7 +7476,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7536,7 +7527,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7578,7 +7569,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7665,7 +7656,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7786,7 +7777,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7857,7 +7848,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7899,7 +7890,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -7950,7 +7941,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8069,7 +8060,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8120,7 +8111,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8273,7 +8264,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -8306,7 +8297,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8357,7 +8348,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8444,7 +8435,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -8477,7 +8468,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8526,7 +8517,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } } } @@ -8559,7 +8550,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -8637,7 +8628,7 @@ ], "responses": { "200": { - "description": "OK" + "description": "" } }, "x-panel-log": { @@ -10202,21 +10193,6 @@ } } }, - "dto.NginxKey": { - "type": "string", - "enum": [ - "index", - "limit-conn", - "ssl", - "http-per" - ], - "x-enum-varnames": [ - "Index", - "LimitConn", - "SSL", - "HttpPer" - ] - }, "dto.OperateByID": { "type": "object", "required": [ @@ -11639,7 +11615,7 @@ }, "params": {}, "scope": { - "$ref": "#/definitions/dto.NginxKey" + "type": "string" }, "websiteId": { "type": "integer" @@ -11653,7 +11629,7 @@ ], "properties": { "scope": { - "$ref": "#/definitions/dto.NginxKey" + "type": "string" }, "websiteId": { "type": "integer" diff --git a/cmd/server/docs/swagger.yaml b/cmd/server/docs/swagger.yaml index e8bbdfb1c..5943cb78b 100644 --- a/cmd/server/docs/swagger.yaml +++ b/cmd/server/docs/swagger.yaml @@ -1032,18 +1032,6 @@ definitions: subnet: type: string type: object - dto.NginxKey: - enum: - - index - - limit-conn - - ssl - - http-per - type: string - x-enum-varnames: - - Index - - LimitConn - - SSL - - HttpPer dto.OperateByID: properties: id: @@ -1985,7 +1973,7 @@ definitions: type: string params: {} scope: - $ref: '#/definitions/dto.NginxKey' + type: string websiteId: type: integer required: @@ -1994,7 +1982,7 @@ definitions: request.NginxScopeReq: properties: scope: - $ref: '#/definitions/dto.NginxKey' + type: string websiteId: type: integer required: @@ -2667,7 +2655,7 @@ paths: description: 获取应用更新版本 responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Get app list update @@ -2879,7 +2867,7 @@ paths: $ref: '#/definitions/request.AppInstalledOperate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Operate installed app @@ -2946,7 +2934,7 @@ paths: $ref: '#/definitions/request.AppInstalledUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Change app params @@ -2973,7 +2961,7 @@ paths: $ref: '#/definitions/request.PortUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Change app port @@ -3002,7 +2990,7 @@ paths: $ref: '#/definitions/request.AppInstalledSearch' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: List app installed @@ -3013,7 +3001,7 @@ paths: description: 同步已安装应用列表 responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Sync app installed @@ -3039,7 +3027,7 @@ paths: $ref: '#/definitions/request.AppSearch' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: List apps @@ -3071,7 +3059,7 @@ paths: description: 同步应用列表 responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Sync app list @@ -3099,7 +3087,7 @@ paths: description: 判断是否为demo环境 responses: "200": - description: OK + description: "" summary: Check System isDemo tags: - Auth @@ -3117,7 +3105,7 @@ paths: $ref: '#/definitions/dto.InitUser' responses: "200": - description: OK + description: "" summary: Init user tags: - Auth @@ -3146,7 +3134,7 @@ paths: description: 用户登出 responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: User logout @@ -3177,7 +3165,7 @@ paths: description: 判断是否为首次登录 responses: "200": - description: OK + description: "" summary: Check is First login tags: - Auth @@ -3195,7 +3183,7 @@ paths: $ref: '#/definitions/dto.ContainerCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create container @@ -3223,7 +3211,7 @@ paths: $ref: '#/definitions/dto.ComposeCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create compose @@ -3250,7 +3238,7 @@ paths: $ref: '#/definitions/dto.ComposeOperation' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Operate compose @@ -3310,8 +3298,8 @@ paths: BeforeFuntions: [] bodyKeys: - name - formatEN: create compose [name] - formatZH: 创建 compose [name] + formatEN: check compose [name] + formatZH: 检测 compose [name] 格式 paramKeys: [] /containers/compose/update: post: @@ -3327,7 +3315,7 @@ paths: $ref: '#/definitions/dto.ComposeUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update compose @@ -3384,7 +3372,7 @@ paths: $ref: '#/definitions/dto.DaemonJsonConf' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update docker daemon.json @@ -3410,7 +3398,7 @@ paths: $ref: '#/definitions/dto.DaemonJsonUpdateByFile' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update docker daemon.json by upload file @@ -3436,7 +3424,7 @@ paths: $ref: '#/definitions/dto.DockerOperation' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Operate docker @@ -3522,7 +3510,7 @@ paths: $ref: '#/definitions/dto.ImageLoad' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Load image @@ -3622,7 +3610,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete image @@ -3649,7 +3637,7 @@ paths: $ref: '#/definitions/dto.ImageSave' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Save image @@ -3702,7 +3690,7 @@ paths: $ref: '#/definitions/dto.ImageTag' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Tag image @@ -3758,7 +3746,7 @@ paths: $ref: '#/definitions/dto.NetworkCreat' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create network @@ -3785,7 +3773,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete network @@ -3836,7 +3824,7 @@ paths: $ref: '#/definitions/dto.ContainerOperation' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Operate Container @@ -3881,7 +3869,7 @@ paths: - application/json responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create image repo @@ -3910,7 +3898,7 @@ paths: - application/json responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete image repo @@ -3969,7 +3957,7 @@ paths: - application/json responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Load repo status @@ -3991,7 +3979,7 @@ paths: - application/json responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update image repo @@ -4103,7 +4091,7 @@ paths: $ref: '#/definitions/dto.ComposeTemplateCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create compose template @@ -4130,7 +4118,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete compose template @@ -4187,7 +4175,7 @@ paths: $ref: '#/definitions/dto.ComposeTemplateUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update compose template @@ -4220,7 +4208,7 @@ paths: $ref: '#/definitions/dto.VolumeCreat' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create volume @@ -4247,7 +4235,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete volume @@ -4321,7 +4309,7 @@ paths: $ref: '#/definitions/dto.CronjobCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create cronjob @@ -4349,7 +4337,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete cronjob @@ -4382,7 +4370,7 @@ paths: $ref: '#/definitions/dto.CronjobDownload' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Download cronjob records @@ -4415,7 +4403,7 @@ paths: $ref: '#/definitions/dto.OperateByID' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Handle cronjob once @@ -4492,7 +4480,7 @@ paths: $ref: '#/definitions/dto.CronjobUpdateStatus' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update cronjob status @@ -4526,7 +4514,7 @@ paths: $ref: '#/definitions/dto.CronjobUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update cronjob @@ -4611,7 +4599,7 @@ paths: $ref: '#/definitions/dto.MysqlDBCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create mysql database @@ -4651,7 +4639,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Change mysql access @@ -4684,7 +4672,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Change mysql password @@ -4717,7 +4705,7 @@ paths: $ref: '#/definitions/dto.MysqlConfUpdateByFile' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update mysql conf by upload file @@ -4743,7 +4731,7 @@ paths: $ref: '#/definitions/dto.MysqlDBDelete' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete mysql database @@ -4798,7 +4786,7 @@ paths: $ref: '#/definitions/dto.UpdateDescription' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update mysql database description @@ -4889,7 +4877,7 @@ paths: $ref: '#/definitions/dto.RedisConfUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update redis conf @@ -4915,7 +4903,7 @@ paths: $ref: '#/definitions/dto.RedisConfUpdateByFile' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update redis conf by file @@ -4941,7 +4929,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Change redis password @@ -4980,7 +4968,7 @@ paths: $ref: '#/definitions/dto.RedisConfPersistenceUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update redis persistence conf @@ -5080,7 +5068,7 @@ paths: $ref: '#/definitions/dto.MysqlVariablesUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update mysql variables @@ -5106,7 +5094,7 @@ paths: $ref: '#/definitions/request.FileCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create file @@ -5133,7 +5121,7 @@ paths: $ref: '#/definitions/request.FileBatchDelete' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Batch delete file @@ -5160,7 +5148,7 @@ paths: $ref: '#/definitions/request.FilePathCheck' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Check file exist @@ -5184,19 +5172,12 @@ paths: type: file responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: ChunkUpload file tags: - File - x-panel-log: - BeforeFuntions: [] - bodyKeys: - - path - formatEN: Upload file [path] - formatZH: 上传文件 [path] - paramKeys: [] /files/compress: post: consumes: @@ -5211,7 +5192,7 @@ paths: $ref: '#/definitions/request.FileCompress' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Compress file @@ -5267,7 +5248,7 @@ paths: $ref: '#/definitions/request.FileDeCompress' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Decompress file @@ -5294,7 +5275,7 @@ paths: $ref: '#/definitions/request.FileDelete' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete file @@ -5321,7 +5302,7 @@ paths: $ref: '#/definitions/request.FileDownload' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Download file @@ -5348,7 +5329,7 @@ paths: $ref: '#/definitions/dto.FilePath' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Download file with path @@ -5404,7 +5385,7 @@ paths: $ref: '#/definitions/request.FileCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Change file mode @@ -5432,7 +5413,7 @@ paths: $ref: '#/definitions/request.FileMove' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Move file @@ -5460,7 +5441,7 @@ paths: $ref: '#/definitions/request.FileRename' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Change file name @@ -5488,7 +5469,7 @@ paths: $ref: '#/definitions/request.FileEdit' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update file content @@ -5537,7 +5518,7 @@ paths: $ref: '#/definitions/request.DirSizeReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Load file size @@ -5583,7 +5564,7 @@ paths: type: file responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Upload file @@ -5632,7 +5613,7 @@ paths: $ref: '#/definitions/request.FileWget' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Wget file @@ -5661,7 +5642,7 @@ paths: $ref: '#/definitions/dto.HostOperate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create host @@ -5722,7 +5703,7 @@ paths: $ref: '#/definitions/dto.CommandOperate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create command @@ -5750,7 +5731,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete command @@ -5805,7 +5786,7 @@ paths: $ref: '#/definitions/dto.CommandOperate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update command @@ -5832,7 +5813,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete host @@ -5865,7 +5846,7 @@ paths: $ref: '#/definitions/dto.GroupCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create group @@ -5893,7 +5874,7 @@ paths: $ref: '#/definitions/dto.OperateByID' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete group @@ -5954,7 +5935,7 @@ paths: $ref: '#/definitions/dto.GroupUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update group @@ -6025,7 +6006,7 @@ paths: $ref: '#/definitions/dto.HostConnTest' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Test host conn by info @@ -6067,7 +6048,7 @@ paths: $ref: '#/definitions/dto.ChangeHostGroup' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update host group @@ -6187,7 +6168,7 @@ paths: $ref: '#/definitions/request.NginxConfigFileUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update OpenResty conf by upload file @@ -6248,7 +6229,7 @@ paths: $ref: '#/definitions/request.NginxConfigUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update OpenResty conf @@ -6281,7 +6262,7 @@ paths: $ref: '#/definitions/dto.BackupOperate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create backup account @@ -6308,7 +6289,7 @@ paths: $ref: '#/definitions/dto.CommonBackup' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Backup system data @@ -6337,7 +6318,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete backup account @@ -6370,7 +6351,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete backup record @@ -6403,7 +6384,7 @@ paths: $ref: '#/definitions/dto.DownloadRecord' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Download backup record @@ -6431,7 +6412,7 @@ paths: $ref: '#/definitions/dto.RecordSearch' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Page backup records @@ -6451,7 +6432,7 @@ paths: $ref: '#/definitions/dto.CommonRecover' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Recover system data @@ -6481,7 +6462,7 @@ paths: $ref: '#/definitions/dto.CommonRecover' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Recover system data by upload @@ -6567,7 +6548,7 @@ paths: $ref: '#/definitions/dto.BackupOperate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update backup account @@ -6607,7 +6588,7 @@ paths: $ref: '#/definitions/dto.PasswordUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Reset system password expired @@ -6646,7 +6627,7 @@ paths: $ref: '#/definitions/dto.MfaCredential' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Bind mfa @@ -6663,7 +6644,7 @@ paths: description: 清空监控数据 responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Clean monitor datas @@ -6689,7 +6670,7 @@ paths: $ref: '#/definitions/dto.PasswordUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update system password @@ -6715,7 +6696,7 @@ paths: $ref: '#/definitions/dto.PortUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update system port @@ -6746,7 +6727,7 @@ paths: description: 获取系统可用状态 responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Load system available status @@ -6766,7 +6747,7 @@ paths: $ref: '#/definitions/dto.SnapshotCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create system snapshot @@ -6794,7 +6775,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete system backup @@ -6827,7 +6808,7 @@ paths: $ref: '#/definitions/dto.UpdateDescription' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update snapshot description @@ -6861,7 +6842,7 @@ paths: $ref: '#/definitions/dto.SnapshotImport' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Import system snapshot @@ -6889,7 +6870,7 @@ paths: $ref: '#/definitions/dto.SnapshotRecover' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Recover system backup @@ -6922,7 +6903,7 @@ paths: $ref: '#/definitions/dto.SnapshotRecover' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Rollback system backup @@ -6996,7 +6977,7 @@ paths: $ref: '#/definitions/dto.SettingUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update system setting @@ -7043,7 +7024,7 @@ paths: $ref: '#/definitions/dto.Upgrade' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Upgrade @@ -7070,7 +7051,7 @@ paths: $ref: '#/definitions/request.WebsiteCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create website @@ -7223,7 +7204,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete website acme account @@ -7322,7 +7303,7 @@ paths: $ref: '#/definitions/request.NginxConfigUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update nginx conf @@ -7355,7 +7336,7 @@ paths: $ref: '#/definitions/request.WebsiteDefaultUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Change default server @@ -7389,7 +7370,7 @@ paths: $ref: '#/definitions/request.WebsiteDelete' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete website @@ -7422,7 +7403,7 @@ paths: $ref: '#/definitions/request.WebsiteDnsAccountCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create website dns account @@ -7449,7 +7430,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete website dns account @@ -7504,7 +7485,7 @@ paths: $ref: '#/definitions/request.WebsiteDnsAccountUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update website dns account @@ -7581,7 +7562,7 @@ paths: $ref: '#/definitions/request.WebsiteDomainDelete' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete website domain @@ -7626,7 +7607,7 @@ paths: $ref: '#/definitions/request.WebsiteGroupCreate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Create website group @@ -7653,7 +7634,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete website group @@ -7686,7 +7667,7 @@ paths: $ref: '#/definitions/request.WebsiteGroupUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update website group @@ -7762,7 +7743,7 @@ paths: $ref: '#/definitions/request.WebsiteNginxUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update website nginx conf @@ -7795,7 +7776,7 @@ paths: $ref: '#/definitions/request.WebsiteOp' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Operate website @@ -7892,7 +7873,7 @@ paths: type: integer responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Search website ssl by id @@ -7912,7 +7893,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Delete website ssl @@ -7945,7 +7926,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLRenew' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Reset website ssl @@ -8000,7 +7981,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLSearch' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Page website ssl @@ -8020,7 +8001,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update ssl @@ -8052,7 +8033,7 @@ paths: type: integer responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Search website ssl by website id @@ -8072,7 +8053,7 @@ paths: $ref: '#/definitions/request.WebsiteUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update website @@ -8121,7 +8102,7 @@ paths: $ref: '#/definitions/request.WebsiteWafUpdate' responses: "200": - description: OK + description: "" security: - ApiKeyAuth: [] summary: Update website waf conf diff --git a/frontend/src/components/upload/index.vue b/frontend/src/components/upload/index.vue index 0859c28b3..2d9e0233e 100644 --- a/frontend/src/components/upload/index.vue +++ b/frontend/src/components/upload/index.vue @@ -12,6 +12,12 @@ {{ $t('database.clickHelper') }} - + {{ $t('commons.button.upload') }} @@ -82,11 +88,13 @@ import i18n from '@/lang'; import { UploadFile, UploadFiles, UploadInstance } from 'element-plus'; import { File } from '@/api/interface/file'; import DrawerHeader from '@/components/drawer-header/index.vue'; -import { BatchDeleteFile, CheckFile, GetUploadList, UploadFileData } from '@/api/modules/files'; +import { BatchDeleteFile, CheckFile, ChunkUploadFileData, GetUploadList } from '@/api/modules/files'; import { loadBaseDir } from '@/api/modules/setting'; import { MsgError, MsgSuccess } from '@/utils/message'; const loading = ref(); +const isUpload = ref(); +const uploadPrecent = ref(0); const selects = ref([]); const baseDir = ref(); @@ -166,20 +174,12 @@ const beforeAvatarUpload = (rawFile) => { MsgError(i18n.global.t('commons.msg.unSupportType')); return false; } - if (rawFile.size / 1024 / 1024 > 50) { - MsgError(i18n.global.t('commons.msg.unSupportSize', [50])); - return false; - } return true; } if (!rawFile.name.endsWith('.sql') && !rawFile.name.endsWith('.tar.gz') && !rawFile.name.endsWith('.sql.gz')) { MsgError(i18n.global.t('commons.msg.unSupportType')); return false; } - if (rawFile.size / 1024 / 1024 > 10) { - MsgError(i18n.global.t('commons.msg.unSupportSize', [10])); - return false; - } return true; }; @@ -194,42 +194,72 @@ const handleClose = () => { }; const onSubmit = async () => { - const formData = new FormData(); if (uploaderFiles.value.length !== 1) { return; } - if (!uploaderFiles.value[0]!.raw.name) { + const file = uploaderFiles.value[0]; + if (!file.raw.name) { MsgError(i18n.global.t('commons.msg.fileNameErr')); return; } let reg = /^[a-zA-Z0-9\u4e00-\u9fa5]{1}[a-z:A-Z0-9_.\u4e00-\u9fa5-]{0,256}$/; - if (!reg.test(uploaderFiles.value[0]!.raw.name)) { + if (!reg.test(file.raw.name)) { MsgError(i18n.global.t('commons.msg.fileNameErr')); return; } - const res = await CheckFile(baseDir.value + uploaderFiles.value[0]!.raw.name); + const res = await CheckFile(baseDir.value + file.raw.name); if (!res.data) { MsgError(i18n.global.t('commons.msg.fileExist')); return; } - formData.append('file', uploaderFiles.value[0]!.raw); - let isOk = beforeAvatarUpload(uploaderFiles.value[0]!.raw); + let isOk = beforeAvatarUpload(file.raw); if (!isOk) { return; } - formData.append('path', baseDir.value); - loading.value = true; - UploadFileData(formData, {}) - .then(() => { - loading.value = false; + submitUpload(file); +}; + +const submitUpload = async (file: any) => { + isUpload.value = true; + const CHUNK_SIZE = 1024 * 1024; + const fileSize = file.size; + const chunkCount = Math.ceil(fileSize / CHUNK_SIZE); + let uploadedChunkCount = 0; + + for (let i = 0; i < chunkCount; i++) { + const start = i * CHUNK_SIZE; + const end = Math.min(start + CHUNK_SIZE, fileSize); + const chunk = file.raw.slice(start, end); + + const formData = new FormData(); + + formData.append('filename', file.name); + formData.append('path', baseDir.value); + formData.append('chunk', chunk); + formData.append('chunkIndex', i.toString()); + formData.append('chunkCount', chunkCount.toString()); + + try { + await ChunkUploadFileData(formData, { + onUploadProgress: (progressEvent) => { + const progress = Math.round( + ((uploadedChunkCount + progressEvent.loaded / progressEvent.total) * 100) / chunkCount, + ); + uploadPrecent.value = progress; + }, + }); + uploadedChunkCount++; + } catch (error) { + isUpload.value = false; + } + if (uploadedChunkCount == chunkCount) { + isUpload.value = false; uploadRef.value?.clearFiles(); uploaderFiles.value = []; MsgSuccess(i18n.global.t('file.uploadSuccess')); search(); - }) - .catch(() => { - loading.value = false; - }); + } + } }; const onBatchDelete = async (row: File.File | null) => { diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index c15c7c9e4..127373e71 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -305,7 +305,7 @@ const message = { 'This port is the exposed port of the container. You need to save the modification separately and restart the container!', selectFile: 'Select file', - supportUpType: 'Only sql, sql.gz, and tar.gz files within 10 MB are supported', + supportUpType: 'Only sql, sql.gz, and tar.gz files are supported', zipFormat: 'tar.gz compressed package structure: test.tar.gz compressed package must contain test.sql', currentStatus: 'Current state', @@ -965,7 +965,7 @@ const message = { type: 'Type', static: 'Static', deployment: 'Deployment', - supportUpType: 'Only .tar.gz files within 50 MB are supported', + supportUpType: 'Only .tar.gz files are supported', zipFormat: '.tar.gz compressed package structure: test.tar.gz compressed package must contain {0} file', proxy: 'Reverse Proxy', alias: 'Path Name', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 8931410da..752b64f9f 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -311,7 +311,7 @@ const message = { selectFile: '选择文件', dropHelper: '将上传文件拖拽到此处,或者', clickHelper: '点击上传', - supportUpType: '仅支持 10M 以内 sql、sql.gz、tar.gz 文件', + supportUpType: '仅支持 sql、sql.gz、tar.gz 文件', zipFormat: 'tar.gz 压缩包结构:test.tar.gz 压缩包内,必需包含 test.sql', currentStatus: '当前状态', @@ -971,7 +971,7 @@ const message = { type: '类型', static: '静态网站', deployment: '一键部署', - supportUpType: '仅支持 50M 以内 .tar.gz 文件', + supportUpType: '仅支持 .tar.gz 文件', zipFormat: '.tar.gz 压缩包结构:test.tar.gz 压缩包内,必需包含 {0} 文件', proxy: '反向代理', alias: '代号', diff --git a/frontend/src/views/host/file-management/upload/index.vue b/frontend/src/views/host/file-management/upload/index.vue index 276ee2627..0cac30cbc 100644 --- a/frontend/src/views/host/file-management/upload/index.vue +++ b/frontend/src/views/host/file-management/upload/index.vue @@ -15,7 +15,6 @@ :auto-upload="false" ref="uploadRef" :on-change="fileOnChange" - v-loading="loading" :limit="1" :on-exceed="handleExceed" > @@ -24,8 +23,10 @@ {{ $t('database.dropHelper') }} {{ $t('database.clickHelper') }} + -