From 10427ddd652997492cba9aa0f44540c4a6d03e34 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Thu, 6 Jul 2023 18:48:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E5=88=97=E8=A1=A8=E5=92=8C=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=BF=BD=E7=95=A5=E5=8A=9F=E8=83=BD=20(#1566)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加忽略应用列表和取消忽略功能 --- backend/app/api/v1/app.go | 16 + backend/app/dto/request/app.go | 4 +- backend/app/dto/response/app.go | 7 + backend/app/repo/app_detail.go | 8 + backend/app/service/app.go | 22 + backend/app/service/app_install.go | 2 +- backend/router/ro_app.go | 1 + cmd/server/docs/docs.go | 483 +++++++++--------- cmd/server/docs/swagger.json | 412 ++++++++------- cmd/server/docs/swagger.yaml | 386 ++++++++------ frontend/src/api/interface/app.ts | 7 + frontend/src/api/modules/app.ts | 4 + frontend/src/lang/modules/en.ts | 5 +- frontend/src/lang/modules/tw.ts | 5 +- frontend/src/lang/modules/zh.ts | 5 +- .../app-store/installed/ignore/index.vue | 85 +++ .../src/views/app-store/installed/index.vue | 17 +- go.mod | 6 +- go.sum | 6 + 19 files changed, 897 insertions(+), 584 deletions(-) create mode 100644 frontend/src/views/app-store/installed/ignore/index.vue diff --git a/backend/app/api/v1/app.go b/backend/app/api/v1/app.go index ead89d0d6..f24c2f456 100644 --- a/backend/app/api/v1/app.go +++ b/backend/app/api/v1/app.go @@ -130,6 +130,22 @@ func (b *BaseApi) GetAppDetailByID(c *gin.Context) { helper.SuccessWithData(c, appDetailDTO) } +// @Tags App +// @Summary Get Ignore App +// @Description 获取忽略的应用版本 +// @Accept json +// @Success 200 {object} response.IgnoredApp +// @Security ApiKeyAuth +// @Router /apps/ingored [get] +func (b *BaseApi) GetIgnoredApp(c *gin.Context) { + res, err := appService.GetIgnoredApp() + if err != nil { + helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) + return + } + helper.SuccessWithData(c, res) +} + // @Tags App // @Summary Install app // @Description 安装应用 diff --git a/backend/app/dto/request/app.go b/backend/app/dto/request/app.go index 39cfb3a37..1ae960bfd 100644 --- a/backend/app/dto/request/app.go +++ b/backend/app/dto/request/app.go @@ -67,8 +67,8 @@ type AppInstalledUpdate struct { } type AppInstalledIgnoreUpgrade struct { - InstallId uint `json:"installId" validate:"required"` - DetailId uint `json:"detailId" validate:"required"` + DetailID uint `json:"detailID" validate:"required"` + Operate string `json:"operate" validate:"required,oneof=cancel ignore"` } type PortUpdate struct { diff --git a/backend/app/dto/response/app.go b/backend/app/dto/response/app.go index afbad742a..cf51844f6 100644 --- a/backend/app/dto/response/app.go +++ b/backend/app/dto/response/app.go @@ -48,6 +48,13 @@ type AppDetailDTO struct { Image string `json:"image"` } +type IgnoredApp struct { + Icon string `json:"icon"` + Name string `json:"name"` + Version string `json:"version"` + DetailID uint `json:"detailID"` +} + type AppInstalledDTO struct { model.AppInstall Total int `json:"total"` diff --git a/backend/app/repo/app_detail.go b/backend/app/repo/app_detail.go index d2b0fb6c4..c813ea5e9 100644 --- a/backend/app/repo/app_detail.go +++ b/backend/app/repo/app_detail.go @@ -13,6 +13,7 @@ type AppDetailRepo struct { type IAppDetailRepo interface { WithVersion(version string) DBOption WithAppId(id uint) DBOption + WithIgnored() DBOption GetFirst(opts ...DBOption) (model.AppDetail, error) Update(ctx context.Context, detail model.AppDetail) error BatchCreate(ctx context.Context, details []model.AppDetail) error @@ -31,12 +32,19 @@ func (a AppDetailRepo) WithVersion(version string) DBOption { return g.Where("version = ?", version) } } + func (a AppDetailRepo) WithAppId(id uint) DBOption { return func(g *gorm.DB) *gorm.DB { return g.Where("app_id = ?", id) } } +func (a AppDetailRepo) WithIgnored() DBOption { + return func(g *gorm.DB) *gorm.DB { + return g.Where("ignore_upgrade = 1") + } +} + func (a AppDetailRepo) GetFirst(opts ...DBOption) (model.AppDetail, error) { var detail model.AppDetail err := getDb(opts...).Model(&model.AppDetail{}).Find(&detail).Error diff --git a/backend/app/service/app.go b/backend/app/service/app.go index 4939d37cc..280f3e224 100644 --- a/backend/app/service/app.go +++ b/backend/app/service/app.go @@ -39,6 +39,7 @@ type IAppService interface { GetAppUpdate() (*response.AppUpdateRes, error) GetAppDetailByID(id uint) (*response.AppDetailDTO, error) SyncAppListFromLocal() + GetIgnoredApp() ([]response.IgnoredApp, error) } func NewIAppService() IAppService { @@ -232,6 +233,27 @@ func (a AppService) GetAppDetailByID(id uint) (*response.AppDetailDTO, error) { return res, nil } +func (a AppService) GetIgnoredApp() ([]response.IgnoredApp, error) { + var res []response.IgnoredApp + details, _ := appDetailRepo.GetBy(appDetailRepo.WithIgnored()) + if len(details) == 0 { + return res, nil + } + for _, detail := range details { + app, err := appRepo.GetFirst(commonRepo.WithByID(detail.AppId)) + if err != nil { + return nil, err + } + res = append(res, response.IgnoredApp{ + Name: app.Name, + Version: detail.Version, + DetailID: detail.ID, + Icon: app.Icon, + }) + } + return res, nil +} + func (a AppService) Install(ctx context.Context, req request.AppInstallCreate) (appInstall *model.AppInstall, err error) { if err = docker.CreateDefaultDockerNetwork(); err != nil { err = buserr.WithDetail(constant.Err1PanelNetworkFailed, err.Error(), nil) diff --git a/backend/app/service/app_install.go b/backend/app/service/app_install.go index d2b65ea73..896695ea1 100644 --- a/backend/app/service/app_install.go +++ b/backend/app/service/app_install.go @@ -359,7 +359,7 @@ func (a *AppInstallService) IgnoreUpgrade(req request.AppInstalledIgnoreUpgrade) if err != nil { return err } - appDetail.IgnoreUpgrade = true + appDetail.IgnoreUpgrade = req.Operate == "ignore" return appDetailRepo.Update(context.Background(), appDetail) } diff --git a/backend/router/ro_app.go b/backend/router/ro_app.go index e31178080..0e35cc0c9 100644 --- a/backend/router/ro_app.go +++ b/backend/router/ro_app.go @@ -37,5 +37,6 @@ func (a *AppRouter) InitAppRouter(Router *gin.RouterGroup) { appRouter.GET("/installed/params/:appInstallId", baseApi.GetParams) appRouter.POST("/installed/params/update", baseApi.UpdateInstalled) appRouter.POST("/installed/ignore", baseApi.IgnoreUpgrade) + appRouter.GET("/ignored/detail", baseApi.GetIgnoredApp) } } diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index b7174b877..049892688 100644 --- a/cmd/server/docs/docs.go +++ b/cmd/server/docs/docs.go @@ -1,17 +1,10 @@ -// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Package docs GENERATED BY SWAG; DO NOT EDIT // This file was generated by swaggo/swag package docs -import ( - "bytes" - "encoding/json" - "strings" - "text/template" +import "github.com/swaggo/swag" - "github.com/swaggo/swag" -) - -var doc = `{ +const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { @@ -76,7 +69,7 @@ var doc = `{ "summary": "Get app list update", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -163,6 +156,31 @@ var doc = `{ } } }, + "/apps/ingored": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取忽略的应用版本", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Get Ignore App", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.IgnoredApp" + } + } + } + } + }, "/apps/install": { "post": { "security": [ @@ -428,7 +446,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -504,7 +522,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -606,7 +624,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -648,7 +666,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -692,7 +710,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -711,7 +729,7 @@ var doc = `{ "summary": "Sync app installed", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -751,7 +769,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -807,7 +825,7 @@ var doc = `{ "summary": "Sync app list", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -845,7 +863,7 @@ var doc = `{ "summary": "Check System isDemo", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -859,7 +877,7 @@ var doc = `{ "summary": "Load safety status", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -909,7 +927,7 @@ var doc = `{ "summary": "User logout", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -973,7 +991,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1016,7 +1034,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1058,7 +1076,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1100,7 +1118,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1179,7 +1197,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1221,7 +1239,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1313,7 +1331,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1353,7 +1371,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1393,7 +1411,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1533,7 +1551,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1686,7 +1704,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1728,7 +1746,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1811,7 +1829,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1946,7 +1964,7 @@ var doc = `{ "summary": "List containers", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -2001,7 +2019,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2043,7 +2061,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2124,7 +2142,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2242,7 +2260,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2287,7 +2305,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2380,7 +2398,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -2416,7 +2434,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2604,7 +2622,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2646,7 +2664,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2736,7 +2754,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2787,7 +2805,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2830,7 +2848,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2873,7 +2891,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2915,7 +2933,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3033,7 +3051,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3076,7 +3094,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3127,7 +3145,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3178,7 +3196,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3229,7 +3247,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3352,7 +3370,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3404,7 +3422,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3537,7 +3555,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3601,7 +3619,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3652,7 +3670,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3703,7 +3721,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3743,7 +3761,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3833,7 +3851,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3982,7 +4000,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4022,7 +4040,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4062,7 +4080,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4124,7 +4142,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4288,7 +4306,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4328,7 +4346,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4370,7 +4388,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4412,7 +4430,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4454,7 +4472,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4491,7 +4509,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -4524,7 +4542,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4611,7 +4629,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4653,7 +4671,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4695,7 +4713,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4737,7 +4755,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4815,7 +4833,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4858,7 +4876,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4901,7 +4919,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4945,7 +4963,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4988,7 +5006,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5066,7 +5084,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5142,7 +5160,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5223,7 +5241,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5267,7 +5285,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5310,7 +5328,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5408,7 +5426,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5451,7 +5469,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5491,7 +5509,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5627,7 +5645,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5660,7 +5678,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5703,7 +5721,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5766,7 +5784,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5809,7 +5827,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5896,7 +5914,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5938,7 +5956,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6011,7 +6029,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6044,7 +6062,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6132,7 +6150,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6211,7 +6229,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6244,7 +6262,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6350,7 +6368,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6422,7 +6440,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6465,7 +6483,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6656,7 +6674,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6757,7 +6775,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6805,7 +6823,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6847,7 +6865,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6887,7 +6905,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6920,7 +6938,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6962,7 +6980,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6995,7 +7013,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7037,7 +7055,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7079,7 +7097,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7123,7 +7141,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7199,7 +7217,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7250,7 +7268,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7293,7 +7311,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -7326,7 +7344,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7371,7 +7389,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7517,7 +7535,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7581,7 +7599,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7652,7 +7670,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7678,7 +7696,7 @@ var doc = `{ "summary": "Clean monitor datas", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7718,7 +7736,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7758,7 +7776,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7808,7 +7826,7 @@ var doc = `{ "summary": "Load system available status", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -7841,7 +7859,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7884,7 +7902,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7935,7 +7953,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7987,7 +8005,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8030,7 +8048,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8081,7 +8099,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8190,7 +8208,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8218,7 +8236,7 @@ var doc = `{ "summary": "Load time zone options", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8296,7 +8314,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8339,7 +8357,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } }, @@ -8370,7 +8388,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8412,7 +8430,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8653,7 +8671,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8740,7 +8758,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8773,7 +8791,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8881,7 +8899,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8932,7 +8950,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8984,7 +9002,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9035,7 +9053,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9086,7 +9104,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9137,7 +9155,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9179,7 +9197,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9266,7 +9284,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9390,7 +9408,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9441,7 +9459,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9474,7 +9492,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9587,7 +9605,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9638,7 +9656,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9715,7 +9733,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9800,7 +9818,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9851,7 +9869,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9884,7 +9902,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9935,7 +9953,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9986,7 +10004,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -10019,7 +10037,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10149,7 +10167,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -10182,7 +10200,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10233,7 +10251,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10323,7 +10341,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -10356,7 +10374,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10405,7 +10423,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -10438,7 +10456,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10516,7 +10534,7 @@ var doc = `{ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10845,7 +10863,8 @@ var doc = `{ "MINIO", "LOCAL", "COS", - "KODO" + "KODO", + "OneDrive" ] }, "type": { @@ -11631,7 +11650,8 @@ var doc = `{ "MINIO", "LOCAL", "COS", - "KODO" + "KODO", + "OneDrive" ] } } @@ -12422,6 +12442,25 @@ var doc = `{ } } }, + "dto.NginxKey": { + "type": "string", + "enum": [ + "index", + "limit-conn", + "ssl", + "cache", + "http-per", + "proxy-cache" + ], + "x-enum-varnames": [ + "Index", + "LimitConn", + "SSL", + "CACHE", + "HttpPer", + "ProxyCache" + ] + }, "dto.Operate": { "type": "object", "required": [ @@ -13186,7 +13225,8 @@ var doc = `{ "SFTP", "MINIO", "COS", - "KODO" + "KODO", + "OneDrive" ] } } @@ -13802,15 +13842,19 @@ var doc = `{ "request.AppInstalledIgnoreUpgrade": { "type": "object", "required": [ - "detailId", - "installId" + "detailID", + "operate" ], "properties": { - "detailId": { + "detailID": { "type": "integer" }, - "installId": { - "type": "integer" + "operate": { + "type": "string", + "enum": [ + "cancel", + "ignore" + ] } } }, @@ -14394,7 +14438,7 @@ var doc = `{ }, "params": {}, "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" @@ -14461,7 +14505,7 @@ var doc = `{ ], "properties": { "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" @@ -15538,6 +15582,23 @@ var doc = `{ } } }, + "response.IgnoredApp": { + "type": "object", + "properties": { + "detailID": { + "type": "integer" + }, + "icon": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, "response.NginxParam": { "type": "object", "properties": { @@ -15821,56 +15882,18 @@ var doc = `{ } }` -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 = 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() +var SwaggerInfo = &swag.Spec{ + Version: "1.0", + Host: "localhost", + BasePath: "/api/v1", + Schemes: []string{}, + Title: "1Panel", + Description: "开源Linux面板", + InfoInstanceName: "swagger", + SwaggerTemplate: docTemplate, } func init() { - swag.Register("swagger", &s{}) + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) } diff --git a/cmd/server/docs/swagger.json b/cmd/server/docs/swagger.json index 1745bbcb4..6be898f40 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": "" + "description": "OK" } } } @@ -149,6 +149,31 @@ } } }, + "/apps/ingored": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取忽略的应用版本", + "consumes": [ + "application/json" + ], + "tags": [ + "App" + ], + "summary": "Get Ignore App", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.IgnoredApp" + } + } + } + } + }, "/apps/install": { "post": { "security": [ @@ -414,7 +439,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -490,7 +515,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -592,7 +617,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -634,7 +659,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -678,7 +703,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -697,7 +722,7 @@ "summary": "Sync app installed", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -737,7 +762,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -793,7 +818,7 @@ "summary": "Sync app list", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -831,7 +856,7 @@ "summary": "Check System isDemo", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -845,7 +870,7 @@ "summary": "Load safety status", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -895,7 +920,7 @@ "summary": "User logout", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -959,7 +984,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1002,7 +1027,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1044,7 +1069,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1086,7 +1111,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1165,7 +1190,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1207,7 +1232,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1299,7 +1324,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1339,7 +1364,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1379,7 +1404,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1519,7 +1544,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1672,7 +1697,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1714,7 +1739,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1797,7 +1822,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -1932,7 +1957,7 @@ "summary": "List containers", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -1987,7 +2012,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2029,7 +2054,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2110,7 +2135,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2228,7 +2253,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2273,7 +2298,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2366,7 +2391,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -2402,7 +2427,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2590,7 +2615,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2632,7 +2657,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2722,7 +2747,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2773,7 +2798,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2816,7 +2841,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2859,7 +2884,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -2901,7 +2926,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3019,7 +3044,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3062,7 +3087,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3113,7 +3138,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3164,7 +3189,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3215,7 +3240,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3338,7 +3363,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3390,7 +3415,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3523,7 +3548,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3587,7 +3612,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3638,7 +3663,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3689,7 +3714,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3729,7 +3754,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3819,7 +3844,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -3968,7 +3993,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4008,7 +4033,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4048,7 +4073,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4110,7 +4135,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4274,7 +4299,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4314,7 +4339,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4356,7 +4381,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4398,7 +4423,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4440,7 +4465,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4477,7 +4502,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -4510,7 +4535,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4597,7 +4622,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4639,7 +4664,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4681,7 +4706,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4723,7 +4748,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4801,7 +4826,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4844,7 +4869,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4887,7 +4912,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4931,7 +4956,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -4974,7 +4999,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5052,7 +5077,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5128,7 +5153,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5209,7 +5234,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5253,7 +5278,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5296,7 +5321,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5394,7 +5419,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5437,7 +5462,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5477,7 +5502,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5613,7 +5638,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -5646,7 +5671,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5689,7 +5714,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5752,7 +5777,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5795,7 +5820,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5882,7 +5907,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5924,7 +5949,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -5997,7 +6022,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6030,7 +6055,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6118,7 +6143,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6197,7 +6222,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6230,7 +6255,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6336,7 +6361,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6408,7 +6433,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6451,7 +6476,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6642,7 +6667,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6743,7 +6768,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6791,7 +6816,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6833,7 +6858,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6873,7 +6898,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6906,7 +6931,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -6948,7 +6973,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -6981,7 +7006,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7023,7 +7048,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7065,7 +7090,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7109,7 +7134,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7185,7 +7210,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7236,7 +7261,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7279,7 +7304,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -7312,7 +7337,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7357,7 +7382,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7503,7 +7528,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7567,7 +7592,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7638,7 +7663,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7664,7 +7689,7 @@ "summary": "Clean monitor datas", "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7704,7 +7729,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7744,7 +7769,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7794,7 +7819,7 @@ "summary": "Load system available status", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -7827,7 +7852,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7870,7 +7895,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7921,7 +7946,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -7973,7 +7998,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8016,7 +8041,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8067,7 +8092,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8176,7 +8201,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8204,7 +8229,7 @@ "summary": "Load time zone options", "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8282,7 +8307,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8325,7 +8350,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } }, @@ -8356,7 +8381,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8398,7 +8423,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8639,7 +8664,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8726,7 +8751,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8759,7 +8784,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -8867,7 +8892,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8918,7 +8943,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -8970,7 +8995,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9021,7 +9046,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9072,7 +9097,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9123,7 +9148,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9165,7 +9190,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9252,7 +9277,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9376,7 +9401,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9427,7 +9452,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9460,7 +9485,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9573,7 +9598,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9624,7 +9649,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9701,7 +9726,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9786,7 +9811,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9837,7 +9862,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -9870,7 +9895,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9921,7 +9946,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -9972,7 +9997,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -10005,7 +10030,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10135,7 +10160,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -10168,7 +10193,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10219,7 +10244,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10309,7 +10334,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -10342,7 +10367,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10391,7 +10416,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } } } @@ -10424,7 +10449,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10502,7 +10527,7 @@ ], "responses": { "200": { - "description": "" + "description": "OK" } }, "x-panel-log": { @@ -10831,7 +10856,8 @@ "MINIO", "LOCAL", "COS", - "KODO" + "KODO", + "OneDrive" ] }, "type": { @@ -11617,7 +11643,8 @@ "MINIO", "LOCAL", "COS", - "KODO" + "KODO", + "OneDrive" ] } } @@ -12408,6 +12435,25 @@ } } }, + "dto.NginxKey": { + "type": "string", + "enum": [ + "index", + "limit-conn", + "ssl", + "cache", + "http-per", + "proxy-cache" + ], + "x-enum-varnames": [ + "Index", + "LimitConn", + "SSL", + "CACHE", + "HttpPer", + "ProxyCache" + ] + }, "dto.Operate": { "type": "object", "required": [ @@ -13172,7 +13218,8 @@ "SFTP", "MINIO", "COS", - "KODO" + "KODO", + "OneDrive" ] } } @@ -13788,15 +13835,19 @@ "request.AppInstalledIgnoreUpgrade": { "type": "object", "required": [ - "detailId", - "installId" + "detailID", + "operate" ], "properties": { - "detailId": { + "detailID": { "type": "integer" }, - "installId": { - "type": "integer" + "operate": { + "type": "string", + "enum": [ + "cancel", + "ignore" + ] } } }, @@ -14380,7 +14431,7 @@ }, "params": {}, "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" @@ -14447,7 +14498,7 @@ ], "properties": { "scope": { - "type": "string" + "$ref": "#/definitions/dto.NginxKey" }, "websiteId": { "type": "integer" @@ -15524,6 +15575,23 @@ } } }, + "response.IgnoredApp": { + "type": "object", + "properties": { + "detailID": { + "type": "integer" + }, + "icon": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, "response.NginxParam": { "type": "object", "properties": { diff --git a/cmd/server/docs/swagger.yaml b/cmd/server/docs/swagger.yaml index 136f5ad3f..0b633686b 100644 --- a/cmd/server/docs/swagger.yaml +++ b/cmd/server/docs/swagger.yaml @@ -201,6 +201,7 @@ definitions: - LOCAL - COS - KODO + - OneDrive type: string type: enum: @@ -730,6 +731,7 @@ definitions: - LOCAL - COS - KODO + - OneDrive type: string required: - fileDir @@ -1261,6 +1263,22 @@ definitions: subnet: type: string type: object + dto.NginxKey: + enum: + - index + - limit-conn + - ssl + - cache + - http-per + - proxy-cache + type: string + x-enum-varnames: + - Index + - LimitConn + - SSL + - CACHE + - HttpPer + - ProxyCache dto.Operate: properties: operation: @@ -1769,6 +1787,7 @@ definitions: - MINIO - COS - KODO + - OneDrive type: string required: - from @@ -2175,13 +2194,16 @@ definitions: type: object request.AppInstalledIgnoreUpgrade: properties: - detailId: - type: integer - installId: + detailID: type: integer + operate: + enum: + - cancel + - ignore + type: string required: - - detailId - - installId + - detailID + - operate type: object request.AppInstalledOperate: properties: @@ -2571,7 +2593,7 @@ definitions: type: string params: {} scope: - type: string + $ref: '#/definitions/dto.NginxKey' websiteId: type: integer required: @@ -2616,7 +2638,7 @@ definitions: request.NginxScopeReq: properties: scope: - type: string + $ref: '#/definitions/dto.NginxKey' websiteId: type: integer required: @@ -3340,6 +3362,17 @@ definitions: path: type: string type: object + response.IgnoredApp: + properties: + detailID: + type: integer + icon: + type: string + name: + type: string + version: + type: string + type: object response.NginxParam: properties: name: @@ -3560,7 +3593,7 @@ paths: description: 获取应用更新版本 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get app list update @@ -3618,6 +3651,21 @@ paths: summary: Get app detail by id tags: - App + /apps/ingored: + get: + consumes: + - application/json + description: 获取忽略的应用版本 + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.IgnoredApp' + security: + - ApiKeyAuth: [] + summary: Get Ignore App + tags: + - App /apps/install: post: consumes: @@ -3781,7 +3829,7 @@ paths: $ref: '#/definitions/request.AppInstalledIgnoreUpgrade' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: ignore App Update @@ -3829,7 +3877,7 @@ paths: $ref: '#/definitions/request.AppInstalledOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate installed app @@ -3896,7 +3944,7 @@ paths: $ref: '#/definitions/request.AppInstalledUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change app params @@ -3923,7 +3971,7 @@ paths: $ref: '#/definitions/request.PortUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change app port @@ -3952,7 +4000,7 @@ paths: $ref: '#/definitions/request.AppInstalledSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: List app installed @@ -3963,7 +4011,7 @@ paths: description: 同步已安装应用列表 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Sync app installed @@ -3989,7 +4037,7 @@ paths: $ref: '#/definitions/request.AppSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: List apps @@ -4023,7 +4071,7 @@ paths: description: 同步应用列表 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Sync app list @@ -4051,7 +4099,7 @@ paths: description: 判断是否为demo环境 responses: "200": - description: "" + description: OK summary: Check System isDemo tags: - Auth @@ -4060,7 +4108,7 @@ paths: description: 获取系统安全登录状态 responses: "200": - description: "" + description: OK summary: Load safety status tags: - Auth @@ -4089,7 +4137,7 @@ paths: description: 用户登出 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: User logout @@ -4129,7 +4177,7 @@ paths: $ref: '#/definitions/dto.ContainerOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create container @@ -4157,7 +4205,7 @@ paths: $ref: '#/definitions/dto.OperationWithName' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Clean container log @@ -4184,7 +4232,7 @@ paths: $ref: '#/definitions/dto.ComposeCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create compose @@ -4211,7 +4259,7 @@ paths: $ref: '#/definitions/dto.ComposeOperation' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate compose @@ -4261,7 +4309,7 @@ paths: $ref: '#/definitions/dto.ComposeCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Test compose @@ -4288,7 +4336,7 @@ paths: $ref: '#/definitions/dto.ComposeUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update compose @@ -4345,7 +4393,7 @@ paths: $ref: '#/definitions/dto.LogOption' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update docker daemon.json log option @@ -4371,7 +4419,7 @@ paths: $ref: '#/definitions/dto.DaemonJsonUpdateByFile' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update docker daemon.json by upload file @@ -4397,7 +4445,7 @@ paths: $ref: '#/definitions/dto.DockerOperation' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate docker @@ -4485,7 +4533,7 @@ paths: $ref: '#/definitions/dto.ImageLoad' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load image @@ -4585,7 +4633,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete image @@ -4612,7 +4660,7 @@ paths: $ref: '#/definitions/dto.ImageSave' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Save image @@ -4665,7 +4713,7 @@ paths: $ref: '#/definitions/dto.ImageTag' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Tag image @@ -4749,7 +4797,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: List containers @@ -4782,7 +4830,7 @@ paths: $ref: '#/definitions/dto.NetworkCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create network @@ -4809,7 +4857,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete network @@ -4860,7 +4908,7 @@ paths: $ref: '#/definitions/dto.ContainerOperation' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate Container @@ -4936,7 +4984,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create image repo @@ -4965,7 +5013,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete image repo @@ -5024,7 +5072,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load repo status @@ -5046,7 +5094,7 @@ paths: - application/json responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update image repo @@ -5164,7 +5212,7 @@ paths: $ref: '#/definitions/dto.ComposeTemplateCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create compose template @@ -5191,7 +5239,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete compose template @@ -5248,7 +5296,7 @@ paths: $ref: '#/definitions/dto.ComposeTemplateUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update compose template @@ -5281,7 +5329,7 @@ paths: $ref: '#/definitions/dto.ContainerOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update container @@ -5309,7 +5357,7 @@ paths: $ref: '#/definitions/dto.ContainerUpgrade' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Upgrade container @@ -5337,7 +5385,7 @@ paths: $ref: '#/definitions/dto.VolumeCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create volume @@ -5364,7 +5412,7 @@ paths: $ref: '#/definitions/dto.BatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete volume @@ -5438,7 +5486,7 @@ paths: $ref: '#/definitions/dto.CronjobCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create cronjob @@ -5466,7 +5514,7 @@ paths: $ref: '#/definitions/dto.CronjobBatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete cronjob @@ -5499,7 +5547,7 @@ paths: $ref: '#/definitions/dto.CronjobDownload' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download cronjob records @@ -5532,7 +5580,7 @@ paths: $ref: '#/definitions/dto.OperateByID' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Handle cronjob once @@ -5565,7 +5613,7 @@ paths: $ref: '#/definitions/dto.CronjobClean' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Clean job records @@ -5642,7 +5690,7 @@ paths: $ref: '#/definitions/dto.CronjobUpdateStatus' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update cronjob status @@ -5676,7 +5724,7 @@ paths: $ref: '#/definitions/dto.CronjobUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update cronjob @@ -5761,7 +5809,7 @@ paths: $ref: '#/definitions/dto.MysqlDBCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create mysql database @@ -5801,7 +5849,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change mysql access @@ -5834,7 +5882,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change mysql password @@ -5867,7 +5915,7 @@ paths: $ref: '#/definitions/dto.MysqlConfUpdateByFile' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update mysql conf by upload file @@ -5893,7 +5941,7 @@ paths: $ref: '#/definitions/dto.MysqlDBDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete mysql database @@ -5950,7 +5998,7 @@ paths: $ref: '#/definitions/dto.UpdateDescription' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update mysql database description @@ -6043,7 +6091,7 @@ paths: $ref: '#/definitions/dto.RedisConfUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update redis conf @@ -6069,7 +6117,7 @@ paths: $ref: '#/definitions/dto.RedisConfUpdateByFile' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update redis conf by file @@ -6095,7 +6143,7 @@ paths: $ref: '#/definitions/dto.ChangeDBInfo' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change redis password @@ -6134,7 +6182,7 @@ paths: $ref: '#/definitions/dto.RedisConfPersistenceUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update redis persistence conf @@ -6234,7 +6282,7 @@ paths: $ref: '#/definitions/dto.MysqlVariablesUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update mysql variables @@ -6260,7 +6308,7 @@ paths: $ref: '#/definitions/request.FileCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create file @@ -6287,7 +6335,7 @@ paths: $ref: '#/definitions/request.FileBatchDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Batch delete file @@ -6314,7 +6362,7 @@ paths: $ref: '#/definitions/request.FilePathCheck' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Check file exist @@ -6341,7 +6389,7 @@ paths: $ref: '#/definitions/request.FileDownload' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Chunk Download file @@ -6365,7 +6413,7 @@ paths: type: file responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: ChunkUpload file @@ -6385,7 +6433,7 @@ paths: $ref: '#/definitions/request.FileCompress' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Compress file @@ -6441,7 +6489,7 @@ paths: $ref: '#/definitions/request.FileDeCompress' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Decompress file @@ -6468,7 +6516,7 @@ paths: $ref: '#/definitions/request.FileDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete file @@ -6495,7 +6543,7 @@ paths: $ref: '#/definitions/request.FileDownload' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download file @@ -6522,7 +6570,7 @@ paths: $ref: '#/definitions/dto.FilePath' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download file with path @@ -6571,7 +6619,7 @@ paths: $ref: '#/definitions/request.FileCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change file mode @@ -6599,7 +6647,7 @@ paths: $ref: '#/definitions/request.FileMove' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Move file @@ -6627,7 +6675,7 @@ paths: $ref: '#/definitions/request.FileRoleUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change file owner @@ -6656,7 +6704,7 @@ paths: $ref: '#/definitions/request.FileRename' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change file name @@ -6684,7 +6732,7 @@ paths: $ref: '#/definitions/request.FileEdit' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update file content @@ -6733,7 +6781,7 @@ paths: $ref: '#/definitions/request.DirSizeReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load file size @@ -6781,7 +6829,7 @@ paths: type: file responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Upload file @@ -6832,7 +6880,7 @@ paths: $ref: '#/definitions/request.FileWget' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Wget file @@ -6861,7 +6909,7 @@ paths: $ref: '#/definitions/dto.GroupCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -6889,7 +6937,7 @@ paths: $ref: '#/definitions/dto.OperateByID' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete group @@ -6952,7 +7000,7 @@ paths: $ref: '#/definitions/dto.GroupUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update group @@ -6980,7 +7028,7 @@ paths: $ref: '#/definitions/dto.SSHConf' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update host ssh setting by file @@ -7006,7 +7054,7 @@ paths: $ref: '#/definitions/dto.GenerateSSH' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Generate host ssh secret @@ -7092,7 +7140,7 @@ paths: $ref: '#/definitions/dto.GenerateLoad' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load host ssh secret @@ -7112,7 +7160,7 @@ paths: $ref: '#/definitions/dto.SettingUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update host ssh setting @@ -7140,7 +7188,7 @@ paths: $ref: '#/definitions/dto.HostOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create host @@ -7180,7 +7228,7 @@ paths: $ref: '#/definitions/dto.CommandOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create command @@ -7208,7 +7256,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete command @@ -7263,7 +7311,7 @@ paths: $ref: '#/definitions/dto.CommandOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update command @@ -7290,7 +7338,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete host @@ -7336,7 +7384,7 @@ paths: $ref: '#/definitions/dto.BatchRuleOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -7356,7 +7404,7 @@ paths: $ref: '#/definitions/dto.AddrRuleOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -7413,7 +7461,7 @@ paths: $ref: '#/definitions/dto.PortRuleOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -7463,7 +7511,7 @@ paths: $ref: '#/definitions/dto.AddrRuleUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -7483,7 +7531,7 @@ paths: $ref: '#/definitions/dto.PortRuleUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create group @@ -7548,7 +7596,7 @@ paths: $ref: '#/definitions/dto.HostConnTest' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Test host conn by info @@ -7592,7 +7640,7 @@ paths: $ref: '#/definitions/dto.HostOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update host @@ -7620,7 +7668,7 @@ paths: $ref: '#/definitions/dto.ChangeHostGroup' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update host group @@ -7740,7 +7788,7 @@ paths: $ref: '#/definitions/request.NginxConfigFileUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update OpenResty conf by upload file @@ -7803,7 +7851,7 @@ paths: $ref: '#/definitions/request.NginxConfigUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update OpenResty conf @@ -7834,7 +7882,7 @@ paths: $ref: '#/definitions/request.ProcessReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Stop Process @@ -7861,7 +7909,7 @@ paths: $ref: '#/definitions/request.RuntimeCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create runtime @@ -7887,7 +7935,7 @@ paths: type: string responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get runtime @@ -7907,7 +7955,7 @@ paths: $ref: '#/definitions/request.RuntimeDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete runtime @@ -7934,7 +7982,7 @@ paths: $ref: '#/definitions/request.RuntimeSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: List runtimes @@ -7954,7 +8002,7 @@ paths: $ref: '#/definitions/request.RuntimeUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update runtime @@ -7981,7 +8029,7 @@ paths: $ref: '#/definitions/dto.BackupOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create backup account @@ -8008,7 +8056,7 @@ paths: $ref: '#/definitions/dto.CommonBackup' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Backup system data @@ -8037,7 +8085,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete backup account @@ -8085,7 +8133,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete backup record @@ -8118,7 +8166,7 @@ paths: $ref: '#/definitions/dto.DownloadRecord' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Download backup record @@ -8146,7 +8194,7 @@ paths: $ref: '#/definitions/dto.RecordSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Page backup records @@ -8166,7 +8214,7 @@ paths: $ref: '#/definitions/dto.CommonRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Recover system data @@ -8196,7 +8244,7 @@ paths: $ref: '#/definitions/dto.CommonRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Recover system data by upload @@ -8288,7 +8336,7 @@ paths: $ref: '#/definitions/dto.BackupOperate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update backup account @@ -8328,7 +8376,7 @@ paths: $ref: '#/definitions/dto.PasswordUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Reset system password expired @@ -8373,7 +8421,7 @@ paths: $ref: '#/definitions/dto.MfaCredential' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Bind mfa @@ -8390,7 +8438,7 @@ paths: description: 清空监控数据 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Clean monitor datas @@ -8416,7 +8464,7 @@ paths: $ref: '#/definitions/dto.PasswordUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system password @@ -8442,7 +8490,7 @@ paths: $ref: '#/definitions/dto.PortUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system port @@ -8473,7 +8521,7 @@ paths: description: 获取系统可用状态 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load system available status @@ -8493,7 +8541,7 @@ paths: $ref: '#/definitions/dto.SnapshotCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create system snapshot @@ -8521,7 +8569,7 @@ paths: $ref: '#/definitions/dto.BatchDeleteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete system backup @@ -8554,7 +8602,7 @@ paths: $ref: '#/definitions/dto.UpdateDescription' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update snapshot description @@ -8588,7 +8636,7 @@ paths: $ref: '#/definitions/dto.SnapshotImport' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Import system snapshot @@ -8616,7 +8664,7 @@ paths: $ref: '#/definitions/dto.SnapshotRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Recover system backup @@ -8649,7 +8697,7 @@ paths: $ref: '#/definitions/dto.SnapshotRecover' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Rollback system backup @@ -8717,7 +8765,7 @@ paths: $ref: '#/definitions/dto.SSLUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system ssl @@ -8735,7 +8783,7 @@ paths: description: 加载系统可用时区 responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load time zone options @@ -8784,7 +8832,7 @@ paths: $ref: '#/definitions/dto.SettingUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update system setting @@ -8812,7 +8860,7 @@ paths: $ref: '#/definitions/dto.Upgrade' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Load release notes by version @@ -8831,7 +8879,7 @@ paths: $ref: '#/definitions/dto.Upgrade' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Upgrade @@ -8858,7 +8906,7 @@ paths: $ref: '#/definitions/request.WebsiteCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create website @@ -9011,7 +9059,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website acme account @@ -9066,7 +9114,7 @@ paths: $ref: '#/definitions/request.NginxAuthReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get AuthBasic conf @@ -9086,7 +9134,7 @@ paths: $ref: '#/definitions/request.NginxAuthUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get AuthBasic conf @@ -9152,7 +9200,7 @@ paths: $ref: '#/definitions/request.NginxConfigUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update nginx conf @@ -9185,7 +9233,7 @@ paths: $ref: '#/definitions/request.WebsiteDefaultUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Change default server @@ -9219,7 +9267,7 @@ paths: $ref: '#/definitions/request.WebsiteDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website @@ -9252,7 +9300,7 @@ paths: $ref: '#/definitions/request.WebsiteUpdateDirPermission' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update Site Dir permission @@ -9285,7 +9333,7 @@ paths: $ref: '#/definitions/request.WebsiteUpdateDir' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update Site Dir @@ -9318,7 +9366,7 @@ paths: $ref: '#/definitions/request.WebsiteDnsAccountCreate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Create website dns account @@ -9345,7 +9393,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website dns account @@ -9400,7 +9448,7 @@ paths: $ref: '#/definitions/request.WebsiteDnsAccountUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website dns account @@ -9479,7 +9527,7 @@ paths: $ref: '#/definitions/request.WebsiteDomainDelete' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website domain @@ -9512,7 +9560,7 @@ paths: $ref: '#/definitions/request.NginxCommonReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get AntiLeech conf @@ -9532,7 +9580,7 @@ paths: $ref: '#/definitions/request.NginxAntiLeechUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update AntiLeech @@ -9603,7 +9651,7 @@ paths: $ref: '#/definitions/request.WebsiteNginxUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website nginx conf @@ -9636,7 +9684,7 @@ paths: $ref: '#/definitions/request.WebsiteOp' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Operate website @@ -9685,7 +9733,7 @@ paths: $ref: '#/definitions/request.WebsitePHPConfigUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website php conf @@ -9739,7 +9787,7 @@ paths: $ref: '#/definitions/request.WebsitePHPFileUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update php conf @@ -9772,7 +9820,7 @@ paths: $ref: '#/definitions/request.WebsiteProxyReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get proxy conf @@ -9792,7 +9840,7 @@ paths: $ref: '#/definitions/request.WebsiteProxyConfig' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update proxy conf @@ -9825,7 +9873,7 @@ paths: $ref: '#/definitions/request.NginxProxyUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update proxy file @@ -9858,7 +9906,7 @@ paths: $ref: '#/definitions/request.NginxRewriteReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Get rewrite conf @@ -9878,7 +9926,7 @@ paths: $ref: '#/definitions/request.NginxRewriteUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update rewrite conf @@ -9961,7 +10009,7 @@ paths: type: integer responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Search website ssl by id @@ -9981,7 +10029,7 @@ paths: $ref: '#/definitions/request.WebsiteResourceReq' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Delete website ssl @@ -10014,7 +10062,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLRenew' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Reset website ssl @@ -10071,7 +10119,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLSearch' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Page website ssl @@ -10091,7 +10139,7 @@ paths: $ref: '#/definitions/request.WebsiteSSLUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update ssl @@ -10123,7 +10171,7 @@ paths: type: integer responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Search website ssl by website id @@ -10143,7 +10191,7 @@ paths: $ref: '#/definitions/request.WebsiteUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website @@ -10192,7 +10240,7 @@ paths: $ref: '#/definitions/request.WebsiteWafUpdate' responses: "200": - description: "" + description: OK security: - ApiKeyAuth: [] summary: Update website waf conf diff --git a/frontend/src/api/interface/app.ts b/frontend/src/api/interface/app.ts index e2a4b4cab..ed05a71d3 100644 --- a/frontend/src/api/interface/app.ts +++ b/frontend/src/api/interface/app.ts @@ -187,4 +187,11 @@ export namespace App { allowPort: boolean; dockerCompose: string; } + + export interface IgnoredApp { + name: string; + detailID: number; + version: string; + icon: string; + } } diff --git a/frontend/src/api/modules/app.ts b/frontend/src/api/modules/app.ts index f8fb943cf..989f3edf9 100644 --- a/frontend/src/api/modules/app.ts +++ b/frontend/src/api/modules/app.ts @@ -93,3 +93,7 @@ export const UpdateAppInstallParams = (req: any) => { export const IgnoreUpgrade = (req: any) => { return http.post(`apps/installed/ignore`, req); }; + +export const GetIgnoredApp = () => { + return http.get(`apps/ignored/detail`); +}; diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index fc7165082..cbf8c4776 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -44,7 +44,7 @@ const message = { refresh: 'Refresh', get: 'Get', upgrade: 'Upgrade', - ignoreUpgrade: 'Ignore upgrade', + ignore: 'Ignore upgrade', copy: 'Copy', random: 'Random', }, @@ -1198,6 +1198,9 @@ const message = { 'Currently, if the port external access is not checked, it will not be able to access through the external network IP: port. Do you want to continue?', restoreWarn: 'The restore operation will delete the current data of the application and restart it. This operation cannot be rolled back, continue?', + showIgnore: 'View ignore application', + cancelIgnore: 'Cancel ignore', + ignoreList: 'ignore list', }, website: { website: 'Website', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 2755073c6..f57c70a74 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -44,7 +44,7 @@ const message = { refresh: '刷新', get: '獲取', upgrade: '升級', - ignoreUpgrade: '忽略升級', + ignore: '忽略升級', copy: '復製', random: '隨機密碼', }, @@ -1139,6 +1139,9 @@ const message = { upgradeHelper: '異常應用需要先同步到正常狀態', installWarn: '當前未勾選端口外部訪問,將無法通過外網IP:端口訪問,是否繼續? ', restoreWarn: '恢復操作將刪除該應用當前數據並重啟。此操作不可回滾,是否繼續?', + showIgnore: '查看忽略應用', + cancelIgnore: '取消忽略', + ignoreList: '忽略列表', }, website: { website: '網站', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 2110a6de7..0613008c0 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -44,7 +44,7 @@ const message = { refresh: '刷新', get: '获取', upgrade: '升级', - ignoreUpgrade: '忽略升级', + ignore: '忽略升级', copy: '复制', random: '随机密码', }, @@ -1145,6 +1145,9 @@ const message = { upgradeHelper: '异常应用需要先同步到正常状态', installWarn: '当前未勾选端口外部访问,将无法通过外网IP:端口访问,是否继续?', restoreWarn: '恢复操作将删除该应用当前数据并重启。此操作不可回滚,是否继续?', + showIgnore: '查看忽略应用', + cancelIgnore: '取消忽略', + ignoreList: '忽略列表', }, website: { website: '网站', diff --git a/frontend/src/views/app-store/installed/ignore/index.vue b/frontend/src/views/app-store/installed/ignore/index.vue new file mode 100644 index 000000000..ed8087fe1 --- /dev/null +++ b/frontend/src/views/app-store/installed/ignore/index.vue @@ -0,0 +1,85 @@ + + + + diff --git a/frontend/src/views/app-store/installed/index.vue b/frontend/src/views/app-store/installed/index.vue index c05352a0e..8e1f506b6 100644 --- a/frontend/src/views/app-store/installed/index.vue +++ b/frontend/src/views/app-store/installed/index.vue @@ -46,6 +46,9 @@ {{ $t('app.sync') }} + + {{ $t('app.showIgnore') }} +