mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-11 17:15:44 +08:00
feat: Ignore application upgrades to bypass all subsequent versions (#8418)
Refs https://github.com/1Panel-dev/1Panel/issues/6978
This commit is contained in:
parent
5a1e010788
commit
66aeb38419
80 changed files with 684 additions and 307 deletions
|
@ -160,7 +160,7 @@ func (b *BaseApi) DeleteOllamaModel(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags AI
|
||||
|
@ -211,7 +211,7 @@ func (b *BaseApi) BindDomain(c *gin.Context) {
|
|||
helper.BadRequest(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags AI
|
||||
|
@ -252,5 +252,5 @@ func (b *BaseApi) UpdateBindDomain(c *gin.Context) {
|
|||
helper.BadRequest(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ func (b *BaseApi) SyncApp(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
|
@ -74,7 +74,7 @@ func (b *BaseApi) SyncLocalApp(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
go appService.SyncAppListFromLocal(req.TaskID)
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
|
@ -147,22 +147,6 @@ func (b *BaseApi) GetAppDetailByID(c *gin.Context) {
|
|||
helper.SuccessWithData(c, appDetailDTO)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
// @Summary Get Ignore App
|
||||
// @Accept json
|
||||
// @Success 200 {array} response.IgnoredApp
|
||||
// @Security ApiKeyAuth
|
||||
// @Security Timestamp
|
||||
// @Router /apps/ignored [get]
|
||||
func (b *BaseApi) GetIgnoredApp(c *gin.Context) {
|
||||
res, err := appService.GetIgnoredApp()
|
||||
if err != nil {
|
||||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithData(c, res)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
// @Summary Install app
|
||||
// @Accept json
|
||||
|
@ -227,7 +211,7 @@ func (b *BaseApi) UpdateAppstoreConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
|
|
66
agent/app/api/v2/app_ignore_upgrade.go
Normal file
66
agent/app/api/v2/app_ignore_upgrade.go
Normal file
|
@ -0,0 +1,66 @@
|
|||
package v2
|
||||
|
||||
import (
|
||||
"github.com/1Panel-dev/1Panel/agent/app/api/v2/helper"
|
||||
"github.com/1Panel-dev/1Panel/agent/app/dto/request"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// @Tags App
|
||||
// @Summary List Upgrade Ignored App
|
||||
// @Accept json
|
||||
// @Success 200 {array} model.AppIgnoreUpgrade
|
||||
// @Security ApiKeyAuth
|
||||
// @Security Timestamp
|
||||
// @Router /apps/ignored/detail [get]
|
||||
func (b *BaseApi) ListAppIgnored(c *gin.Context) {
|
||||
res, err := appIgnoreUpgradeService.List()
|
||||
if err != nil {
|
||||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithData(c, res)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
// @Summary Ignore Upgrade App
|
||||
// @Accept json
|
||||
// @Param request body request.AppIgnoreUpgradeReq true "request"
|
||||
// @Success 200
|
||||
// @Security ApiKeyAuth
|
||||
// @Security Timestamp
|
||||
// @Router /apps/installed/ignore [post]
|
||||
// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"忽略应用升级","formatEN":"Ignore application upgrade"}
|
||||
func (b *BaseApi) IgnoreAppUpgrade(c *gin.Context) {
|
||||
var req request.AppIgnoreUpgradeReq
|
||||
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
||||
return
|
||||
}
|
||||
if err := appIgnoreUpgradeService.CreateAppIgnore(req); err != nil {
|
||||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// 写一个去掉忽略的接口
|
||||
// @Tags App
|
||||
// @Summary Cancel Ignore Upgrade App
|
||||
// @Accept json
|
||||
// @Param request body request.ReqWithID true "request"
|
||||
// @Success 200
|
||||
// @Security ApiKeyAuth
|
||||
// @Security Timestamp
|
||||
// @Router /apps/ignored/cancel [post]
|
||||
// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"取消忽略应用升级","formatEN":"Cancel ignore application upgrade"}
|
||||
func (b *BaseApi) CancelIgnoreAppUpgrade(c *gin.Context) {
|
||||
var req request.ReqWithID
|
||||
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
||||
return
|
||||
}
|
||||
if err := appIgnoreUpgradeService.Delete(req); err != nil {
|
||||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.Success(c)
|
||||
}
|
|
@ -158,7 +158,7 @@ func (b *BaseApi) SyncInstalled(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
|
@ -179,7 +179,7 @@ func (b *BaseApi) OperateInstalled(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
|
@ -239,7 +239,7 @@ func (b *BaseApi) ChangeAppPort(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
|
@ -304,28 +304,7 @@ func (b *BaseApi) UpdateInstalled(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
// @Summary ignore App Update
|
||||
// @Accept json
|
||||
// @Param request body request.AppInstalledIgnoreUpgrade true "request"
|
||||
// @Success 200
|
||||
// @Security ApiKeyAuth
|
||||
// @Security Timestamp
|
||||
// @Router /apps/installed/ignore [post]
|
||||
// @x-panel-log {"bodyKeys":["installId"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"忽略应用 [installId] 版本升级","formatEN":"Application param update [installId]"}
|
||||
func (b *BaseApi) IgnoreUpgrade(c *gin.Context) {
|
||||
var req request.AppInstalledIgnoreUpgrade
|
||||
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
||||
return
|
||||
}
|
||||
if err := appInstallService.IgnoreUpgrade(req); err != nil {
|
||||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags App
|
||||
|
@ -346,5 +325,5 @@ func (b *BaseApi) UpdateAppConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ func (b *BaseApi) CheckBackupUsed(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
func (b *BaseApi) SyncBackupAccount(c *gin.Context) {
|
||||
|
@ -36,7 +36,7 @@ func (b *BaseApi) SyncBackupAccount(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Backup Account
|
||||
|
@ -58,7 +58,7 @@ func (b *BaseApi) CreateBackup(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Backup Account
|
||||
|
@ -78,7 +78,7 @@ func (b *BaseApi) RefreshToken(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Backup Account
|
||||
|
@ -122,7 +122,7 @@ func (b *BaseApi) DeleteBackup(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Backup Account
|
||||
|
@ -144,7 +144,7 @@ func (b *BaseApi) UpdateBackup(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Backup Account
|
||||
|
@ -321,7 +321,7 @@ func (b *BaseApi) UpdateRecordDescription(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Backup Account
|
||||
|
@ -343,7 +343,7 @@ func (b *BaseApi) DeleteBackupRecord(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Backup Account
|
||||
|
@ -406,7 +406,7 @@ func (b *BaseApi) Backup(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Backup Account
|
||||
|
@ -461,7 +461,7 @@ func (b *BaseApi) Recover(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Backup Account
|
||||
|
@ -501,5 +501,5 @@ func (b *BaseApi) RecoverByUpload(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ func (b *BaseApi) CreateClam(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Clam
|
||||
|
@ -47,7 +47,7 @@ func (b *BaseApi) UpdateClam(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Clam
|
||||
|
@ -69,7 +69,7 @@ func (b *BaseApi) UpdateClamStatus(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Clam
|
||||
|
@ -135,7 +135,7 @@ func (b *BaseApi) OperateClam(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Clam
|
||||
|
@ -157,7 +157,7 @@ func (b *BaseApi) CleanClamRecord(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Clam
|
||||
|
@ -249,7 +249,7 @@ func (b *BaseApi) UpdateFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Clam
|
||||
|
@ -271,7 +271,7 @@ func (b *BaseApi) DeleteClam(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Clam
|
||||
|
@ -293,5 +293,5 @@ func (b *BaseApi) HandleClamScan(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ func (b *BaseApi) CreateComposeTemplate(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Compose-template
|
||||
|
@ -91,7 +91,7 @@ func (b *BaseApi) DeleteComposeTemplate(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Compose-template
|
||||
|
@ -116,5 +116,5 @@ func (b *BaseApi) UpdateComposeTemplate(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ func (b *BaseApi) CreateCompose(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Compose
|
||||
|
@ -158,7 +158,7 @@ func (b *BaseApi) OperatorCompose(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container
|
||||
|
@ -180,7 +180,7 @@ func (b *BaseApi) ContainerUpdate(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container
|
||||
|
@ -252,7 +252,7 @@ func (b *BaseApi) ContainerCreate(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container
|
||||
|
@ -273,7 +273,7 @@ func (b *BaseApi) ContainerCreateByCommand(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container
|
||||
|
@ -295,7 +295,7 @@ func (b *BaseApi) ContainerUpgrade(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container
|
||||
|
@ -340,7 +340,7 @@ func (b *BaseApi) CleanContainerLog(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container
|
||||
|
@ -362,7 +362,7 @@ func (b *BaseApi) ContainerRename(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container
|
||||
|
@ -383,7 +383,7 @@ func (b *BaseApi) ContainerCommit(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container
|
||||
|
@ -405,7 +405,7 @@ func (b *BaseApi) ContainerOperation(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container
|
||||
|
@ -526,7 +526,7 @@ func (b *BaseApi) DeleteNetwork(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Network
|
||||
|
@ -548,7 +548,7 @@ func (b *BaseApi) CreateNetwork(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Volume
|
||||
|
@ -613,7 +613,7 @@ func (b *BaseApi) DeleteVolume(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Volume
|
||||
|
@ -635,7 +635,7 @@ func (b *BaseApi) CreateVolume(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Compose
|
||||
|
@ -657,7 +657,7 @@ func (b *BaseApi) ComposeUpdate(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container
|
||||
|
|
|
@ -28,7 +28,7 @@ func (b *BaseApi) CreateCronjob(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Cronjob
|
||||
|
@ -168,7 +168,7 @@ func (b *BaseApi) CleanRecord(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Cronjob
|
||||
|
@ -190,7 +190,7 @@ func (b *BaseApi) DeleteCronjob(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Cronjob
|
||||
|
@ -212,7 +212,7 @@ func (b *BaseApi) UpdateCronjob(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Cronjob
|
||||
|
@ -234,7 +234,7 @@ func (b *BaseApi) UpdateCronjobStatus(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Cronjob
|
||||
|
@ -280,5 +280,5 @@ func (b *BaseApi) HandleOnce(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ func (b *BaseApi) UpdateAppLauncher(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Dashboard
|
||||
|
@ -165,5 +165,5 @@ func (b *BaseApi) SystemRestart(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ func (b *BaseApi) CreateDatabase(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database
|
||||
|
@ -194,7 +194,7 @@ func (b *BaseApi) DeleteDatabase(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database
|
||||
|
@ -224,5 +224,5 @@ func (b *BaseApi) UpdateDatabase(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -70,5 +70,5 @@ func (b *BaseApi) UpdateDBConfByFile(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ func (b *BaseApi) CreateMysql(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Mysql
|
||||
|
@ -68,7 +68,7 @@ func (b *BaseApi) BindUser(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Mysql
|
||||
|
@ -90,7 +90,7 @@ func (b *BaseApi) UpdateMysqlDescription(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Mysql
|
||||
|
@ -121,7 +121,7 @@ func (b *BaseApi) ChangeMysqlPassword(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Mysql
|
||||
|
@ -143,7 +143,7 @@ func (b *BaseApi) ChangeMysqlAccess(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Mysql
|
||||
|
@ -165,7 +165,7 @@ func (b *BaseApi) UpdateMysqlVariables(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Mysql
|
||||
|
@ -230,7 +230,7 @@ func (b *BaseApi) LoadDBFromRemote(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Mysql
|
||||
|
@ -277,7 +277,7 @@ func (b *BaseApi) DeleteMysql(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
tx.Commit()
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Mysql
|
||||
|
|
|
@ -37,7 +37,7 @@ func (b *BaseApi) CreatePostgresql(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Postgresql
|
||||
|
@ -59,7 +59,7 @@ func (b *BaseApi) BindPostgresqlUser(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Postgresql
|
||||
|
@ -81,7 +81,7 @@ func (b *BaseApi) UpdatePostgresqlDescription(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Postgresql
|
||||
|
@ -103,7 +103,7 @@ func (b *BaseApi) ChangePostgresqlPrivileges(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Postgresql
|
||||
|
@ -134,7 +134,7 @@ func (b *BaseApi) ChangePostgresqlPassword(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Postgresql
|
||||
|
@ -182,7 +182,7 @@ func (b *BaseApi) LoadPostgresqlDBFromRemote(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Postgresql
|
||||
|
@ -228,5 +228,5 @@ func (b *BaseApi) DeletePostgresql(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
tx.Commit()
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ func (b *BaseApi) InstallCli(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Redis
|
||||
|
@ -112,7 +112,7 @@ func (b *BaseApi) UpdateRedisConf(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Redis
|
||||
|
@ -143,7 +143,7 @@ func (b *BaseApi) ChangeRedisPassword(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Database Redis
|
||||
|
@ -165,5 +165,5 @@ func (b *BaseApi) UpdateRedisPersistenceConf(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ func (b *BaseApi) UpdateDeviceByFile(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Device
|
||||
|
@ -120,7 +120,7 @@ func (b *BaseApi) UpdateDeviceConf(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Device
|
||||
|
@ -141,7 +141,7 @@ func (b *BaseApi) UpdateDeviceHost(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Device
|
||||
|
@ -170,7 +170,7 @@ func (b *BaseApi) UpdateDevicePasswd(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Device
|
||||
|
@ -192,7 +192,7 @@ func (b *BaseApi) UpdateDeviceSwap(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Device
|
||||
|
@ -246,5 +246,5 @@ func (b *BaseApi) SystemClean(c *gin.Context) {
|
|||
|
||||
deviceService.Clean(req)
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ func (b *BaseApi) UpdateDaemonJson(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Docker
|
||||
|
@ -100,7 +100,7 @@ func (b *BaseApi) UpdateLogOption(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Docker
|
||||
|
@ -123,7 +123,7 @@ func (b *BaseApi) UpdateIpv6Option(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Docker
|
||||
|
@ -146,7 +146,7 @@ func (b *BaseApi) UpdateDaemonJsonByFile(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Docker
|
||||
|
@ -169,5 +169,5 @@ func (b *BaseApi) OperateDocker(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -13,8 +13,9 @@ type BaseApi struct{}
|
|||
var (
|
||||
dashboardService = service.NewIDashboardService()
|
||||
|
||||
appService = service.NewIAppService()
|
||||
appInstallService = service.NewIAppInstalledService()
|
||||
appService = service.NewIAppService()
|
||||
appInstallService = service.NewIAppInstalledService()
|
||||
appIgnoreUpgradeService = service.NewIAppIgnoreUpgradeService()
|
||||
|
||||
aiToolService = service.NewIAIToolService()
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ func (b *BaseApi) OperateFail2Ban(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Fail2ban
|
||||
|
@ -87,7 +87,7 @@ func (b *BaseApi) OperateSSHD(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Fail2ban
|
||||
|
@ -109,7 +109,7 @@ func (b *BaseApi) UpdateFail2BanConf(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Fail2ban
|
||||
|
@ -148,5 +148,5 @@ func (b *BaseApi) UpdateFail2BanConfByFile(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -71,5 +71,5 @@ func (b *BaseApi) DeleteFavorite(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ func (b *BaseApi) CreateFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -134,7 +134,7 @@ func (b *BaseApi) DeleteFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -156,7 +156,7 @@ func (b *BaseApi) BatchDeleteFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -178,7 +178,7 @@ func (b *BaseApi) ChangeFileMode(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -199,7 +199,7 @@ func (b *BaseApi) ChangeFileOwner(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -221,7 +221,7 @@ func (b *BaseApi) CompressFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -243,7 +243,7 @@ func (b *BaseApi) DeCompressFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -286,7 +286,7 @@ func (b *BaseApi) SaveContent(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -452,7 +452,7 @@ func (b *BaseApi) ChangeFileName(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -497,7 +497,7 @@ func (b *BaseApi) MoveFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -830,7 +830,7 @@ func (b *BaseApi) BatchChangeModeAndOwner(c *gin.Context) {
|
|||
if err := fileService.BatchChangeModeAndOwner(req); err != nil {
|
||||
helper.InternalServer(c, err)
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
func (b *BaseApi) GetPathByType(c *gin.Context) {
|
||||
|
|
|
@ -68,7 +68,7 @@ func (b *BaseApi) OperateFirewall(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Firewall
|
||||
|
@ -90,7 +90,7 @@ func (b *BaseApi) OperatePortRule(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// OperateForwardRule
|
||||
|
@ -113,7 +113,7 @@ func (b *BaseApi) OperateForwardRule(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Firewall
|
||||
|
@ -135,7 +135,7 @@ func (b *BaseApi) OperateIPRule(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Firewall
|
||||
|
@ -156,7 +156,7 @@ func (b *BaseApi) BatchOperateRule(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Firewall
|
||||
|
@ -177,7 +177,7 @@ func (b *BaseApi) UpdateFirewallDescription(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Firewall
|
||||
|
@ -198,7 +198,7 @@ func (b *BaseApi) UpdatePortRule(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Firewall
|
||||
|
@ -219,5 +219,5 @@ func (b *BaseApi) UpdateAddrRule(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ func (b *BaseApi) OperateFtp(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags FTP
|
||||
|
@ -125,7 +125,7 @@ func (b *BaseApi) CreateFtp(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags FTP
|
||||
|
@ -147,7 +147,7 @@ func (b *BaseApi) DeleteFtp(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags FTP
|
||||
|
@ -164,7 +164,7 @@ func (b *BaseApi) SyncFtp(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags FTP
|
||||
|
@ -194,5 +194,5 @@ func (b *BaseApi) UpdateFtp(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ func (b *BaseApi) CreateGroup(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Group
|
||||
|
@ -47,7 +47,7 @@ func (b *BaseApi) DeleteGroup(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Group
|
||||
|
@ -69,7 +69,7 @@ func (b *BaseApi) UpdateGroup(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Group
|
||||
|
|
|
@ -6,5 +6,5 @@ import (
|
|||
)
|
||||
|
||||
func (b *BaseApi) CheckHealth(c *gin.Context) {
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ func SuccessWithData(ctx *gin.Context, data interface{}) {
|
|||
ctx.Abort()
|
||||
}
|
||||
|
||||
func SuccessWithOutData(ctx *gin.Context) {
|
||||
func Success(ctx *gin.Context) {
|
||||
res := dto.Response{
|
||||
Code: http.StatusOK,
|
||||
Message: "success",
|
||||
|
|
|
@ -47,7 +47,7 @@ func (b *BaseApi) InitToolConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Host tool
|
||||
|
@ -69,7 +69,7 @@ func (b *BaseApi) OperateTool(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Host tool
|
||||
|
@ -137,7 +137,7 @@ func (b *BaseApi) OperateProcess(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Host tool
|
||||
|
|
|
@ -85,7 +85,7 @@ func (b *BaseApi) ImageBuild(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Image
|
||||
|
@ -108,7 +108,7 @@ func (b *BaseApi) ImagePull(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Image
|
||||
|
@ -131,7 +131,7 @@ func (b *BaseApi) ImagePush(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Image
|
||||
|
@ -178,7 +178,7 @@ func (b *BaseApi) ImageSave(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Image
|
||||
|
@ -201,7 +201,7 @@ func (b *BaseApi) ImageTag(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Image
|
||||
|
@ -224,5 +224,5 @@ func (b *BaseApi) ImageLoad(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ func (b *BaseApi) CheckRepoStatus(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Image-repo
|
||||
|
@ -92,7 +92,7 @@ func (b *BaseApi) CreateRepo(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Image-repo
|
||||
|
@ -115,7 +115,7 @@ func (b *BaseApi) DeleteRepo(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Container Image-repo
|
||||
|
@ -138,5 +138,5 @@ func (b *BaseApi) UpdateRepo(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ func (b *BaseApi) CleanMonitor(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Monitor
|
||||
|
@ -81,7 +81,7 @@ func (b *BaseApi) UpdateMonitorSetting(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
func (b *BaseApi) GetNetworkOptions(c *gin.Context) {
|
||||
|
|
|
@ -61,7 +61,7 @@ func (b *BaseApi) UpdateNginxConfigByScope(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags OpenResty
|
||||
|
@ -98,7 +98,7 @@ func (b *BaseApi) UpdateNginxFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags OpenResty
|
||||
|
@ -119,7 +119,7 @@ func (b *BaseApi) BuildNginx(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags OpenResty
|
||||
|
@ -140,7 +140,7 @@ func (b *BaseApi) UpdateNginxModule(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags OpenResty
|
||||
|
|
|
@ -61,7 +61,7 @@ func (b *BaseApi) CreatePHPExtensions(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags PHP Extensions
|
||||
|
@ -81,7 +81,7 @@ func (b *BaseApi) UpdatePHPExtensions(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags PHP Extensions
|
||||
|
@ -101,5 +101,5 @@ func (b *BaseApi) DeletePHPExtensions(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -34,5 +34,5 @@ func (b *BaseApi) StopProcess(c *gin.Context) {
|
|||
helper.BadRequest(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ func (b *BaseApi) ReduceRecycleBinFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
@ -65,7 +65,7 @@ func (b *BaseApi) ClearRecycleBinFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags File
|
||||
|
|
|
@ -72,7 +72,7 @@ func (b *BaseApi) DeleteRuntime(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -114,7 +114,7 @@ func (b *BaseApi) UpdateRuntime(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Runtime
|
||||
|
@ -179,7 +179,7 @@ func (b *BaseApi) OperateRuntime(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Runtime
|
||||
|
@ -221,7 +221,7 @@ func (b *BaseApi) OperateNodeModules(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Runtime
|
||||
|
@ -236,7 +236,7 @@ func (b *BaseApi) SyncStatus(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Runtime
|
||||
|
@ -279,7 +279,7 @@ func (b *BaseApi) InstallPHPExtension(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Runtime
|
||||
|
@ -300,7 +300,7 @@ func (b *BaseApi) UnInstallPHPExtension(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Runtime
|
||||
|
@ -343,7 +343,7 @@ func (b *BaseApi) UpdatePHPConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Runtime
|
||||
|
@ -364,7 +364,7 @@ func (b *BaseApi) UpdatePHPFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Runtime
|
||||
|
@ -405,7 +405,7 @@ func (b *BaseApi) UpdateFPMConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Runtime
|
||||
|
@ -470,7 +470,7 @@ func (b *BaseApi) OperateSupervisorProcess(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Runtime
|
||||
|
|
|
@ -36,7 +36,7 @@ func (b *BaseApi) GetSettingInfo(c *gin.Context) {
|
|||
// @Security Timestamp
|
||||
// @Router /settings/search/available [get]
|
||||
func (b *BaseApi) GetSystemAvailable(c *gin.Context) {
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Setting
|
||||
|
@ -58,7 +58,7 @@ func (b *BaseApi) UpdateSetting(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Setting
|
||||
|
|
|
@ -40,7 +40,7 @@ func (b *BaseApi) CreateSnapshot(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Setting
|
||||
|
@ -62,7 +62,7 @@ func (b *BaseApi) RecreateSnapshot(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Setting
|
||||
|
@ -84,7 +84,7 @@ func (b *BaseApi) ImportSnapshot(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Setting
|
||||
|
@ -106,7 +106,7 @@ func (b *BaseApi) UpdateSnapDescription(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Setting
|
||||
|
@ -153,7 +153,7 @@ func (b *BaseApi) RecoverSnapshot(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Setting
|
||||
|
@ -175,7 +175,7 @@ func (b *BaseApi) RollbackSnapshot(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags System Setting
|
||||
|
@ -197,5 +197,5 @@ func (b *BaseApi) DeleteSnapshot(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ func (b *BaseApi) OperateSSH(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags SSH
|
||||
|
@ -62,7 +62,7 @@ func (b *BaseApi) UpdateSSH(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags SSH
|
||||
|
@ -84,7 +84,7 @@ func (b *BaseApi) UpdateSSHByfile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags SSH
|
||||
|
@ -106,7 +106,7 @@ func (b *BaseApi) GenerateSSH(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags SSH
|
||||
|
|
|
@ -84,7 +84,7 @@ func (b *BaseApi) CreateWebsite(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -106,7 +106,7 @@ func (b *BaseApi) OpWebsite(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -128,7 +128,7 @@ func (b *BaseApi) DeleteWebsite(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -149,7 +149,7 @@ func (b *BaseApi) UpdateWebsite(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -237,7 +237,7 @@ func (b *BaseApi) UpdateNginxConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website HTTPS
|
||||
|
@ -326,7 +326,7 @@ func (b *BaseApi) UpdateWebsiteNginxConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -369,7 +369,7 @@ func (b *BaseApi) ChangeDefaultServer(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website PHP
|
||||
|
@ -390,7 +390,7 @@ func (b *BaseApi) ChangePHPVersion(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -432,7 +432,7 @@ func (b *BaseApi) UpdateRewriteConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -453,7 +453,7 @@ func (b *BaseApi) UpdateSiteDir(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -474,7 +474,7 @@ func (b *BaseApi) UpdateSiteDirPermission(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -517,7 +517,7 @@ func (b *BaseApi) UpdateProxyConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -538,7 +538,7 @@ func (b *BaseApi) UpdateProxyConfigFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -579,7 +579,7 @@ func (b *BaseApi) UpdateAuthConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -620,7 +620,7 @@ func (b *BaseApi) UpdatePathAuthConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -661,7 +661,7 @@ func (b *BaseApi) UpdateAntiLeech(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -683,7 +683,7 @@ func (b *BaseApi) UpdateRedirectConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -725,7 +725,7 @@ func (b *BaseApi) UpdateRedirectConfigFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -788,7 +788,7 @@ func (b *BaseApi) UpdateDefaultHtml(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -830,7 +830,7 @@ func (b *BaseApi) CreateLoadBalance(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -850,7 +850,7 @@ func (b *BaseApi) DeleteLoadBalance(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -870,7 +870,7 @@ func (b *BaseApi) UpdateLoadBalance(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -890,7 +890,7 @@ func (b *BaseApi) UpdateLoadBalanceFile(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
func (b *BaseApi) ChangeWebsiteGroup(c *gin.Context) {
|
||||
|
@ -902,7 +902,7 @@ func (b *BaseApi) ChangeWebsiteGroup(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -922,7 +922,7 @@ func (b *BaseApi) UpdateProxyCache(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Summary Get website proxy cache config
|
||||
|
@ -964,7 +964,7 @@ func (b *BaseApi) SetRealIPConfig(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -1044,7 +1044,7 @@ func (b *BaseApi) ChangeWebsiteDatabase(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -1064,7 +1064,7 @@ func (b *BaseApi) OperateCustomRewrite(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website
|
||||
|
@ -1099,5 +1099,5 @@ func (b *BaseApi) ClearProxyCache(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -71,5 +71,5 @@ func (b *BaseApi) DeleteWebsiteAcmeAccount(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ func (b *BaseApi) DeleteWebsiteCA(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website CA
|
||||
|
@ -144,7 +144,7 @@ func (b *BaseApi) RenewWebsiteCA(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website CA
|
||||
|
|
|
@ -49,7 +49,7 @@ func (b *BaseApi) CreateWebsiteDnsAccount(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website DNS
|
||||
|
@ -70,7 +70,7 @@ func (b *BaseApi) UpdateWebsiteDnsAccount(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website DNS
|
||||
|
@ -91,5 +91,5 @@ func (b *BaseApi) DeleteWebsiteDnsAccount(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ func (b *BaseApi) DeleteWebDomain(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website Domain
|
||||
|
@ -89,5 +89,5 @@ func (b *BaseApi) UpdateWebDomain(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ func (b *BaseApi) ApplyWebsiteSSL(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website SSL
|
||||
|
@ -127,7 +127,7 @@ func (b *BaseApi) DeleteWebsiteSSL(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website SSL
|
||||
|
@ -192,7 +192,7 @@ func (b *BaseApi) UpdateWebsiteSSL(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website SSL
|
||||
|
@ -213,7 +213,7 @@ func (b *BaseApi) UploadWebsiteSSL(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Website SSL
|
||||
|
|
7
agent/app/dto/request/app_ignore_upgrade.go
Normal file
7
agent/app/dto/request/app_ignore_upgrade.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package request
|
||||
|
||||
type AppIgnoreUpgradeReq struct {
|
||||
AppID uint `json:"appID" validate:"required"`
|
||||
AppDetailID uint `json:"appDetailID"`
|
||||
Scope string `json:"scope" validate:"required,oneof=all version"`
|
||||
}
|
5
agent/app/dto/request/common.go
Normal file
5
agent/app/dto/request/common.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
package request
|
||||
|
||||
type ReqWithID struct {
|
||||
ID uint `json:"id" validate:"required"`
|
||||
}
|
10
agent/app/dto/response/app_ignore_upgrade.go
Normal file
10
agent/app/dto/response/app_ignore_upgrade.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package response
|
||||
|
||||
type AppIgnoreUpgradeDTO struct {
|
||||
ID uint `json:"ID"`
|
||||
AppID uint `json:"appID"`
|
||||
AppDetailID uint `json:"appDetailID"`
|
||||
Scope string `json:"scope"`
|
||||
Version string `json:"version"`
|
||||
Icon string `json:"icon"`
|
||||
}
|
|
@ -12,5 +12,4 @@ type AppDetail struct {
|
|||
DownloadUrl string `json:"downloadUrl"`
|
||||
DownloadCallBackUrl string `json:"downloadCallBackUrl"`
|
||||
Update bool `json:"update"`
|
||||
IgnoreUpgrade bool `json:"ignoreUpgrade"`
|
||||
}
|
||||
|
|
8
agent/app/model/app_ignore_upgrade.go
Normal file
8
agent/app/model/app_ignore_upgrade.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
package model
|
||||
|
||||
type AppIgnoreUpgrade struct {
|
||||
BaseModel
|
||||
AppID uint `json:"appID"`
|
||||
AppDetailID uint `json:"appDetailID"`
|
||||
Scope string `json:"scope"`
|
||||
}
|
41
agent/app/repo/app_ignore_upgrade.go
Normal file
41
agent/app/repo/app_ignore_upgrade.go
Normal file
|
@ -0,0 +1,41 @@
|
|||
package repo
|
||||
|
||||
import (
|
||||
"github.com/1Panel-dev/1Panel/agent/app/model"
|
||||
"github.com/1Panel-dev/1Panel/agent/global"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type AppIgnoreUpgradeRepo struct {
|
||||
}
|
||||
|
||||
type IAppIgnoreUpgradeRepo interface {
|
||||
WithScope(scope string) DBOption
|
||||
List(opts ...DBOption) ([]model.AppIgnoreUpgrade, error)
|
||||
Create(appIgnoreUpgrade *model.AppIgnoreUpgrade) error
|
||||
Delete(opts ...DBOption) error
|
||||
}
|
||||
|
||||
func NewIAppIgnoreUpgradeRepo() IAppIgnoreUpgradeRepo {
|
||||
return &AppIgnoreUpgradeRepo{}
|
||||
}
|
||||
|
||||
func (a AppIgnoreUpgradeRepo) WithScope(scope string) DBOption {
|
||||
return func(g *gorm.DB) *gorm.DB {
|
||||
return g.Where("scope = ?", scope)
|
||||
}
|
||||
}
|
||||
|
||||
func (a AppIgnoreUpgradeRepo) List(opts ...DBOption) ([]model.AppIgnoreUpgrade, error) {
|
||||
var appIgnoreUpgradeList []model.AppIgnoreUpgrade
|
||||
err := getDb(opts...).Find(&appIgnoreUpgradeList).Error
|
||||
return appIgnoreUpgradeList, err
|
||||
}
|
||||
|
||||
func (a AppIgnoreUpgradeRepo) Create(appIgnoreUpgrade *model.AppIgnoreUpgrade) error {
|
||||
return global.DB.Create(appIgnoreUpgrade).Error
|
||||
}
|
||||
|
||||
func (a AppIgnoreUpgradeRepo) Delete(opts ...DBOption) error {
|
||||
return getDb(opts...).Delete(&model.AppIgnoreUpgrade{}).Error
|
||||
}
|
|
@ -73,7 +73,7 @@ func (a AppInstallResourceRpo) DeleteBy(ctx context.Context, opts ...DBOption) e
|
|||
return getTx(ctx, opts...).Delete(&model.AppInstallResource{}).Error
|
||||
}
|
||||
|
||||
func (a *AppInstallResourceRpo) BatchUpdateBy(maps map[string]interface{}, opts ...DBOption) error {
|
||||
func (a AppInstallResourceRpo) BatchUpdateBy(maps map[string]interface{}, opts ...DBOption) error {
|
||||
db := getDb(opts...).Model(&model.AppInstallResource{})
|
||||
if len(opts) == 0 {
|
||||
db = db.Where("1=1")
|
||||
|
|
|
@ -46,7 +46,6 @@ type IAppService interface {
|
|||
GetAppUpdate() (*response.AppUpdateRes, error)
|
||||
GetAppDetailByID(id uint) (*response.AppDetailDTO, error)
|
||||
SyncAppListFromLocal(taskID string)
|
||||
GetIgnoredApp() ([]response.IgnoredApp, error)
|
||||
|
||||
GetAppstoreConfig() (*response.AppstoreConfig, error)
|
||||
UpdateAppstoreConfig(req request.AppstoreUpdate) error
|
||||
|
@ -326,27 +325,6 @@ 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(repo.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(req request.AppInstallCreate) (appInstall *model.AppInstall, err error) {
|
||||
if err = docker.CreateDefaultDockerNetwork(); err != nil {
|
||||
err = buserr.WithDetail("Err1PanelNetworkFailed", err.Error(), nil)
|
||||
|
|
76
agent/app/service/app_ingore_upgrade.go
Normal file
76
agent/app/service/app_ingore_upgrade.go
Normal file
|
@ -0,0 +1,76 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"github.com/1Panel-dev/1Panel/agent/app/dto/request"
|
||||
"github.com/1Panel-dev/1Panel/agent/app/dto/response"
|
||||
"github.com/1Panel-dev/1Panel/agent/app/model"
|
||||
"github.com/1Panel-dev/1Panel/agent/app/repo"
|
||||
"github.com/pkg/errors"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type AppIgnoreUpgradeService struct {
|
||||
}
|
||||
|
||||
type IAppIgnoreUpgradeService interface {
|
||||
List() ([]response.AppIgnoreUpgradeDTO, error)
|
||||
CreateAppIgnore(req request.AppIgnoreUpgradeReq) error
|
||||
Delete(req request.ReqWithID) error
|
||||
}
|
||||
|
||||
func NewIAppIgnoreUpgradeService() IAppIgnoreUpgradeService {
|
||||
return AppIgnoreUpgradeService{}
|
||||
}
|
||||
|
||||
func (a AppIgnoreUpgradeService) List() ([]response.AppIgnoreUpgradeDTO, error) {
|
||||
var res []response.AppIgnoreUpgradeDTO
|
||||
ignores, err := appIgnoreUpgradeRepo.List()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, ignore := range ignores {
|
||||
dto := response.AppIgnoreUpgradeDTO{
|
||||
ID: ignore.ID,
|
||||
AppID: ignore.AppID,
|
||||
AppDetailID: ignore.AppDetailID,
|
||||
Scope: ignore.Scope,
|
||||
}
|
||||
app, err := appRepo.GetFirst(repo.WithByID(ignore.AppID))
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
_ = appIgnoreUpgradeRepo.Delete(repo.WithByID(ignore.ID))
|
||||
continue
|
||||
}
|
||||
dto.Icon = app.Icon
|
||||
if ignore.Scope == "version" {
|
||||
appDetail, err := appDetailRepo.GetFirst(repo.WithByID(ignore.AppDetailID))
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
_ = appIgnoreUpgradeRepo.Delete(repo.WithByID(ignore.ID))
|
||||
continue
|
||||
}
|
||||
dto.Version = appDetail.Version
|
||||
}
|
||||
res = append(res, dto)
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func (a AppIgnoreUpgradeService) CreateAppIgnore(req request.AppIgnoreUpgradeReq) error {
|
||||
appIgnoreUpgrade := model.AppIgnoreUpgrade{
|
||||
AppID: req.AppID,
|
||||
Scope: req.Scope,
|
||||
}
|
||||
if req.Scope == "version" {
|
||||
appIgnoreUpgrade.AppDetailID = req.AppDetailID
|
||||
}
|
||||
if req.Scope == "all" {
|
||||
_ = appIgnoreUpgradeRepo.Delete(appInstallRepo.WithAppId(req.AppID))
|
||||
}
|
||||
if err := appIgnoreUpgradeRepo.Create(&appIgnoreUpgrade); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a AppIgnoreUpgradeService) Delete(req request.ReqWithID) error {
|
||||
return appIgnoreUpgradeRepo.Delete(repo.WithByID(req.ID))
|
||||
}
|
|
@ -50,7 +50,6 @@ type IAppInstallService interface {
|
|||
SearchForWebsite(req request.AppInstalledSearch) ([]response.AppInstallDTO, error)
|
||||
Operate(req request.AppInstalledOperate) error
|
||||
Update(req request.AppInstalledUpdate) error
|
||||
IgnoreUpgrade(req request.AppInstalledIgnoreUpgrade) error
|
||||
SyncAll(systemInit bool) error
|
||||
GetServices(key string) ([]response.AppService, error)
|
||||
GetUpdateVersions(req request.AppUpdateVersion) ([]dto.AppVersion, error)
|
||||
|
@ -446,15 +445,6 @@ func (a *AppInstallService) Update(req request.AppInstalledUpdate) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (a *AppInstallService) IgnoreUpgrade(req request.AppInstalledIgnoreUpgrade) error {
|
||||
appDetail, err := appDetailRepo.GetFirst(repo.WithByID(req.DetailID))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
appDetail.IgnoreUpgrade = req.Operate == "ignore"
|
||||
return appDetailRepo.Update(context.Background(), appDetail)
|
||||
}
|
||||
|
||||
func (a *AppInstallService) SyncAll(systemInit bool) error {
|
||||
allList, err := appInstallRepo.ListBy(context.Background())
|
||||
if err != nil {
|
||||
|
@ -558,7 +548,8 @@ func (a *AppInstallService) GetUpdateVersions(req request.AppUpdateVersion) ([]d
|
|||
return versions, err
|
||||
}
|
||||
for _, detail := range details {
|
||||
if detail.IgnoreUpgrade {
|
||||
ignores, _ := appIgnoreUpgradeRepo.List(runtimeRepo.WithDetailId(detail.ID), appIgnoreUpgradeRepo.WithScope("version"))
|
||||
if len(ignores) > 0 {
|
||||
continue
|
||||
}
|
||||
if common.IsCrossVersion(install.Version, detail.Version) && !app.CrossVersionUpdate {
|
||||
|
|
|
@ -1490,7 +1490,8 @@ func handleInstalled(appInstallList []model.AppInstall, updated bool, sync bool)
|
|||
}
|
||||
var versions []string
|
||||
for _, detail := range details {
|
||||
if detail.IgnoreUpgrade || installed.Version == "latest" {
|
||||
ignores, _ := appIgnoreUpgradeRepo.List(runtimeRepo.WithDetailId(detail.ID), appIgnoreUpgradeRepo.WithScope("version"))
|
||||
if len(ignores) > 0 || installed.Version == "latest" {
|
||||
continue
|
||||
}
|
||||
if common.IsCrossVersion(installed.Version, detail.Version) && !app.CrossVersionUpdate {
|
||||
|
@ -1782,6 +1783,10 @@ func ignoreUpdate(installed model.AppInstall) bool {
|
|||
}
|
||||
return true
|
||||
}
|
||||
ignores, _ := appIgnoreUpgradeRepo.List(appDetailRepo.WithAppId(installed.AppId), appIgnoreUpgradeRepo.WithScope("all"))
|
||||
if len(ignores) > 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ var (
|
|||
appInstallRepo = repo.NewIAppInstallRepo()
|
||||
launcherRepo = repo.NewILauncherRepo()
|
||||
appInstallResourceRepo = repo.NewIAppInstallResourceRpo()
|
||||
appIgnoreUpgradeRepo = repo.NewIAppIgnoreUpgradeRepo()
|
||||
|
||||
aiRepo = repo.NewIAiRepo()
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package service
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
@ -234,11 +235,13 @@ func opNginx(containerName, operate string) error {
|
|||
err error
|
||||
)
|
||||
cmdMgr := cmd.NewCommandMgr(cmd.WithTimeout(20 * time.Second))
|
||||
cmdStr := fmt.Sprintf("docker exec -i %s nginx ", containerName)
|
||||
if operate == constant.NginxCheck {
|
||||
out, err = cmdMgr.RunWithStdout("docker", "exec", "-i", containerName, "nginx -t")
|
||||
cmdStr = cmdStr + "-t"
|
||||
} else {
|
||||
out, err = cmdMgr.RunWithStdout("docker", "exec", "-i", containerName, "nginx -s reload")
|
||||
cmdStr = cmdStr + "-s reload"
|
||||
}
|
||||
out, err = cmdMgr.RunWithStdoutBashC(cmdStr)
|
||||
if err != nil {
|
||||
if out != "" {
|
||||
return errors.New(out)
|
||||
|
|
|
@ -219,6 +219,7 @@ ErrRuleNotExist: "规则不存在"
|
|||
ErrParseIP: "IP 格式错误"
|
||||
ErrDefaultIP: "default 为保留名称,请更换其他名称"
|
||||
ErrGroupInUse: "IP 组被黑/白名单使用,无法删除"
|
||||
ErrIPGroupAclUse: "IP 组被网站 {{ .name }} 自定义规则使用,无法删除"
|
||||
ErrGroupExist: "IP 组名称已存在"
|
||||
ErrIPRange: "IP 范围错误"
|
||||
ErrIPExist: "IP 已存在"
|
||||
|
|
|
@ -29,6 +29,7 @@ func InitAgentDB() {
|
|||
migrations.InitDefault,
|
||||
migrations.UpdateWebsiteExpireDate,
|
||||
migrations.AddLocalSSHSetting,
|
||||
migrations.AddAppIgnore,
|
||||
})
|
||||
if err := m.Migrate(); err != nil {
|
||||
global.LOG.Error(err)
|
||||
|
|
|
@ -59,6 +59,7 @@ var AddTable = &gormigrate.Migration{
|
|||
&model.WebsiteDomain{},
|
||||
&model.WebsiteSSL{},
|
||||
&model.Group{},
|
||||
&model.AppIgnoreUpgrade{},
|
||||
)
|
||||
},
|
||||
}
|
||||
|
@ -321,3 +322,13 @@ var AddLocalSSHSetting = &gormigrate.Migration{
|
|||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
var AddAppIgnore = &gormigrate.Migration{
|
||||
ID: "20250408-add-app-ignore",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
if err := tx.AutoMigrate(&model.AppIgnoreUpgrade{}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ func (a *AppRouter) InitRouter(Router *gin.RouterGroup) {
|
|||
appRouter.GET("/details/:id", baseApi.GetAppDetailByID)
|
||||
appRouter.POST("/install", baseApi.InstallApp)
|
||||
appRouter.GET("/tags", baseApi.GetAppTags)
|
||||
|
||||
appRouter.POST("/installed/check", baseApi.CheckAppInstalled)
|
||||
appRouter.POST("/installed/loadport", baseApi.LoadPort)
|
||||
appRouter.POST("/installed/conninfo", baseApi.LoadConnInfo)
|
||||
|
@ -35,11 +36,13 @@ func (a *AppRouter) InitRouter(Router *gin.RouterGroup) {
|
|||
appRouter.POST("/installed/conf", baseApi.GetDefaultConfig)
|
||||
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)
|
||||
appRouter.POST("/installed/update/versions", baseApi.GetUpdateVersions)
|
||||
appRouter.POST("/installed/config/update", baseApi.UpdateAppConfig)
|
||||
appRouter.POST("/store/update", baseApi.UpdateAppstoreConfig)
|
||||
appRouter.GET("/store/config", baseApi.GetAppstoreConfig)
|
||||
|
||||
appRouter.POST("/installed/ignore", baseApi.IgnoreAppUpgrade)
|
||||
appRouter.GET("/ignored/detail", baseApi.ListAppIgnored)
|
||||
appRouter.POST("/ignored/cancel", baseApi.CancelIgnoreAppUpgrade)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ func (b *BaseApi) LogOut(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Auth
|
||||
|
|
|
@ -27,7 +27,7 @@ func (b *BaseApi) CreateBackup(c *gin.Context) {
|
|||
helper.InternalServer(c, err)
|
||||
return
|
||||
}
|
||||
helper.SuccessWithOutData(c)
|
||||
helper.Success(c)
|
||||
}
|
||||
|
||||
// @Tags Backup Account
|
||||
|
|
|
@ -52,7 +52,7 @@ export namespace App {
|
|||
}
|
||||
|
||||
export interface AppDetail extends CommonModel {
|
||||
appId: string;
|
||||
appId: number;
|
||||
icon: string;
|
||||
version: string;
|
||||
readme: string;
|
||||
|
@ -132,7 +132,7 @@ export namespace App {
|
|||
|
||||
export interface AppInstalled extends CommonModel {
|
||||
name: string;
|
||||
appId: number;
|
||||
appID: number;
|
||||
appDetailId: string;
|
||||
env: string;
|
||||
status: string;
|
||||
|
@ -272,6 +272,16 @@ export namespace App {
|
|||
updateVersion?: string;
|
||||
}
|
||||
|
||||
export interface AppIgnoreReq {
|
||||
appID: number;
|
||||
appDetailID: number;
|
||||
scope: string;
|
||||
}
|
||||
|
||||
export interface CancelAppIgnore {
|
||||
id: number;
|
||||
}
|
||||
|
||||
export interface AppStoreSync {
|
||||
taskID: string;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ export const updateAppInstallParams = (req: any) => {
|
|||
return http.post<any>(`apps/installed/params/update`, req);
|
||||
};
|
||||
|
||||
export const ignoreUpgrade = (req: any) => {
|
||||
export const ignoreUpgrade = (req: App.AppIgnoreReq) => {
|
||||
return http.post<any>(`apps/installed/ignore`, req);
|
||||
};
|
||||
|
||||
|
@ -103,6 +103,10 @@ export const getIgnoredApp = () => {
|
|||
return http.get<App.IgnoredApp>(`apps/ignored/detail`);
|
||||
};
|
||||
|
||||
export const cancelAppIgnore = (req: App.CancelAppIgnore) => {
|
||||
return http.post(`apps/ignored/cancel`, req);
|
||||
};
|
||||
|
||||
export const updateInstallConfig = (req: App.AppConfigUpdate) => {
|
||||
return http.post(`apps/installed/config/update`, req);
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@ export const searchWebsites = (req: Website.WebSiteSearch) => {
|
|||
};
|
||||
|
||||
export const listWebsites = () => {
|
||||
return http.get<Website.WebsiteDTO>(`/websites/list`);
|
||||
return http.get<Website.WebsiteDTO[]>(`/websites/list`);
|
||||
};
|
||||
|
||||
export const createWebsite = (req: Website.WebSiteCreateReq) => {
|
||||
|
|
|
@ -264,6 +264,14 @@ export const Patterns = [
|
|||
value: 'regex',
|
||||
hidden: ['Method'],
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('xpack.waf.belongToIpGroup'),
|
||||
value: 'belongToIpGroup',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('xpack.waf.notBelongToIpGroup'),
|
||||
value: 'notBelongToIpGroup',
|
||||
},
|
||||
];
|
||||
|
||||
export const HttpCodes = [
|
||||
|
@ -275,6 +283,10 @@ export const HttpCodes = [
|
|||
label: i18n.global.t('xpack.waf.forbidden'),
|
||||
value: 403,
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('xpack.waf.notFound'),
|
||||
value: 404,
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('xpack.waf.noRes'),
|
||||
value: 444,
|
||||
|
@ -283,6 +295,14 @@ export const HttpCodes = [
|
|||
label: i18n.global.t('xpack.waf.serverErr'),
|
||||
value: 500,
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('xpack.waf.serviceUnavailable'),
|
||||
value: 503,
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('xpack.waf.gatewayTimeout'),
|
||||
value: 504,
|
||||
},
|
||||
];
|
||||
|
||||
export const HttpMethods = [
|
||||
|
|
|
@ -2091,6 +2091,8 @@ const message = {
|
|||
'Before installing a custom app store package, please ensure that there are no installed apps.',
|
||||
forceUninstall: 'Force Uninstall',
|
||||
syncCustomApp: 'Sync Custom App',
|
||||
ignoreAll: 'Ignore all subsequent versions',
|
||||
ignoreVersion: 'Ignore specified version',
|
||||
},
|
||||
website: {
|
||||
primaryDomain: 'Primary Domain',
|
||||
|
@ -3016,6 +3018,11 @@ const message = {
|
|||
strictHelper: 'Use stricter rules to validate requests',
|
||||
saveLog: 'Save Log',
|
||||
remoteURLHelper: 'The remote URL needs to ensure one IP per line and no other characters',
|
||||
notFound: 'Not Found (404)',
|
||||
serviceUnavailable: 'Service Unavailable (503)',
|
||||
gatewayTimeout: 'Gateway Timeout (504)',
|
||||
belongToIpGroup: 'Belongs to IP Group',
|
||||
notBelongToIpGroup: 'Does not belong to IP Group',
|
||||
},
|
||||
monitor: {
|
||||
name: 'Website Monitoring',
|
||||
|
|
|
@ -1994,6 +1994,8 @@ const message = {
|
|||
'カスタムアプリストアパッケージをインストールする前に、インストールされているアプリがないことを確認してください。',
|
||||
forceUninstall: '強制アンインストール',
|
||||
syncCustomApp: 'カスタムアプリを同期',
|
||||
ignoreAll: '後続のすべてのバージョンを無視',
|
||||
ignoreVersion: '指定されたバージョンを無視',
|
||||
},
|
||||
website: {
|
||||
primaryDomain: 'プライマリドメイン',
|
||||
|
@ -2876,6 +2878,11 @@ const message = {
|
|||
strictHelper: 'より厳格なルールを使用してリクエストを検証します',
|
||||
saveLog: 'ログを保存',
|
||||
remoteURLHelper: 'リモート URL は、1行に1つのIPで、他の文字がないことを保証する必要があります',
|
||||
notFound: 'Not Found (404)',
|
||||
serviceUnavailable: 'サービスを利用できません (503)',
|
||||
gatewayTimeout: 'ゲートウェイタイムアウト (504)',
|
||||
belongToIpGroup: 'IP グループに属しています',
|
||||
notBelongToIpGroup: 'IP グループに属していません',
|
||||
},
|
||||
monitor: {
|
||||
name: 'ウェブサイトモニタリング',
|
||||
|
|
|
@ -1962,6 +1962,8 @@ const message = {
|
|||
customAppHelper: '사용자 정의 앱 스토어 패키지를 설치하기 전에 설치된 앱이 없는지 확인하십시오.',
|
||||
forceUninstall: '강제 제거',
|
||||
syncCustomApp: 'カスタムアプリを同期',
|
||||
ignoreAll: '후속 모든 버전 무시',
|
||||
ignoreVersion: '지정된 버전 무시',
|
||||
},
|
||||
website: {
|
||||
primaryDomain: '기본 도메인',
|
||||
|
@ -2831,6 +2833,11 @@ const message = {
|
|||
strictHelper: '더 엄격한 규칙을 사용하여 요청을 검증합니다',
|
||||
saveLog: '로그 저장',
|
||||
remoteURLHelper: '원격 URL은 한 줄에 하나의 IP만 포함하고 다른 문자는 포함하지 않아야 합니다',
|
||||
notFound: 'Not Found (404)',
|
||||
serviceUnavailable: '서비스 불가 (503)',
|
||||
gatewayTimeout: '게이트웨이 시간 초과 (504)',
|
||||
belongToIpGroup: 'IP 그룹에 속함',
|
||||
notBelongToIpGroup: 'IP 그룹에 속하지 않음',
|
||||
},
|
||||
monitor: {
|
||||
name: '웹사이트 모니터링',
|
||||
|
|
|
@ -2048,6 +2048,8 @@ const message = {
|
|||
'Sebelum memasang pakej kedai aplikasi tersuai, sila pastikan tidak ada aplikasi yang dipasang.',
|
||||
forceUninstall: 'Paksa Nyahpasang',
|
||||
syncCustomApp: 'Segerakan Aplikasi Tersuai',
|
||||
ignoreAll: 'Abaikan semua versi berikutnya',
|
||||
ignoreVersion: 'Abaikan versi yang ditentukan',
|
||||
},
|
||||
website: {
|
||||
primaryDomain: 'Domain Utama',
|
||||
|
@ -2941,6 +2943,11 @@ const message = {
|
|||
strictHelper: 'Gunakan peraturan yang lebih ketat untuk mengesahkan permintaan',
|
||||
saveLog: 'Simpan Log',
|
||||
remoteURLHelper: 'URL jauh perlu memastikan satu IP setiap baris dan tiada aksara lain',
|
||||
notFound: 'Not Found (404)',
|
||||
serviceUnavailable: 'Perkhidmatan Tidak Tersedia (503)',
|
||||
gatewayTimeout: 'Timeout Gateway (504)',
|
||||
belongToIpGroup: 'Tergolong dalam Kumpulan IP',
|
||||
notBelongToIpGroup: 'Tidak tergolong dalam Kumpulan IP',
|
||||
},
|
||||
monitor: {
|
||||
name: 'Pemantauan Laman Web',
|
||||
|
|
|
@ -2040,6 +2040,8 @@ const message = {
|
|||
'Antes de instalar um pacote de loja de aplicativos personalizado, certifique-se de que não há aplicativos instalados.',
|
||||
forceUninstall: 'Desinstalação Forçada',
|
||||
syncCustomApp: 'Sincronizar Aplicativo Personalizado',
|
||||
ignoreAll: 'Ignorar todas as versões subsequentes',
|
||||
ignoreVersion: 'Ignorar versão especificada',
|
||||
},
|
||||
website: {
|
||||
primaryDomain: 'Domínio principal',
|
||||
|
@ -2942,6 +2944,11 @@ const message = {
|
|||
strictHelper: 'Usa regras mais rigorosas para validar solicitações',
|
||||
saveLog: 'Salvar log',
|
||||
remoteURLHelper: 'O URL remoto precisa garantir um IP por linha e nenhum outro caractere',
|
||||
notFound: 'Not Found (404)',
|
||||
serviceUnavailable: 'Serviço Indisponível (503)',
|
||||
gatewayTimeout: 'Tempo Limite da Porta de Entrada (504)',
|
||||
belongToIpGroup: 'Pertence ao Grupo de IP',
|
||||
notBelongToIpGroup: 'Não pertence ao Grupo de IP',
|
||||
},
|
||||
monitor: {
|
||||
name: 'Monitoramento de Websites',
|
||||
|
|
|
@ -2040,6 +2040,8 @@ const message = {
|
|||
'Перед установкой пользовательского пакета из магазина приложений убедитесь, что нет установленных приложений.',
|
||||
forceUninstall: 'Принудительное удаление',
|
||||
syncCustomApp: 'Синхронизировать пользовательское приложение',
|
||||
ignoreAll: 'Игнорировать все последующие версии',
|
||||
ignoreVersion: 'Игнорировать указанную версию',
|
||||
},
|
||||
website: {
|
||||
primaryDomain: 'Основной домен',
|
||||
|
@ -2935,6 +2937,11 @@ const message = {
|
|||
strictHelper: 'Использует более строгие правила для проверки запросов',
|
||||
saveLog: 'Сохранить лог',
|
||||
remoteURLHelper: 'Удаленный URL должен содержать один IP на строку и не содержать других символов',
|
||||
notFound: 'Not Found (404)',
|
||||
serviceUnavailable: 'Сервис недоступен (503)',
|
||||
gatewayTimeout: 'Тайм-аут шлюза (504)',
|
||||
belongToIpGroup: 'Принадлежит к группе IP',
|
||||
notBelongToIpGroup: 'Не принадлежит к группе IP',
|
||||
},
|
||||
monitor: {
|
||||
name: 'Мониторинг веб-сайта',
|
||||
|
|
|
@ -1936,6 +1936,8 @@ const message = {
|
|||
customAppHelper: '在安裝自訂應用商店包之前,請確保沒有任何已安裝的應用。',
|
||||
forceUninstall: '強制卸載',
|
||||
syncCustomApp: '同步自訂應用',
|
||||
ignoreAll: '忽略後續所有版本',
|
||||
ignoreVersion: '忽略指定版本',
|
||||
},
|
||||
website: {
|
||||
primaryDomain: '主域名',
|
||||
|
@ -2796,6 +2798,11 @@ const message = {
|
|||
strictHelper: '使用更嚴格的規則來校驗請求',
|
||||
saveLog: '保存日誌',
|
||||
remoteURLHelper: '遠程 URL 需要保證每行一個 IP 並且沒有其他字符',
|
||||
notFound: 'Not Found (404)',
|
||||
serviceUnavailable: '服務不可用 (503)',
|
||||
gatewayTimeout: '網關超時 (504)',
|
||||
belongToIpGroup: '屬於 IP 組',
|
||||
notBelongToIpGroup: '不屬於 IP 組',
|
||||
},
|
||||
monitor: {
|
||||
name: '網站監控',
|
||||
|
|
|
@ -1926,6 +1926,8 @@ const message = {
|
|||
customAppHelper: '在使用自定义应用商店仓库之前,请确保没有任何已安装的应用。',
|
||||
forceUninstall: '强制卸载',
|
||||
syncCustomApp: '同步自定义应用',
|
||||
ignoreAll: '忽略后续所有版本',
|
||||
ignoreVersion: '忽略指定版本',
|
||||
},
|
||||
website: {
|
||||
primaryDomain: '主域名',
|
||||
|
@ -2784,6 +2786,11 @@ const message = {
|
|||
strictHelper: '使用更严格的规则来校验请求',
|
||||
saveLog: '保存日志',
|
||||
remoteURLHelper: '远程 URL 需要保证每行一个 IP 并且没有其他字符',
|
||||
notFound: 'Not Found (404)',
|
||||
serviceUnavailable: '服务不可用 (503)',
|
||||
gatewayTimeout: '网关超时 (504)',
|
||||
belongToIpGroup: '属于 IP 组',
|
||||
notBelongToIpGroup: '不属于 IP 组',
|
||||
},
|
||||
monitor: {
|
||||
name: '网站监控',
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
<template>
|
||||
<DrawerPro v-model="open" :header="$t('commons.button.ignore')" :resource="resourceName" @close="handleClose">
|
||||
<el-form @submit.prevent ref="updateRef" :rules="rules" label-position="top" :model="req">
|
||||
<el-form-item>
|
||||
<el-radio-group v-model="req.scope">
|
||||
<el-radio-button :label="$t('app.ignoreAll')" value="all" />
|
||||
<el-radio-button :label="$t('app.ignoreVersion')" value="version" />
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('app.versionSelect')" prop="appDetailID" v-if="req.scope === 'version'">
|
||||
<el-select v-model="req.appDetailID">
|
||||
<el-option
|
||||
v-for="(version, index) in versions"
|
||||
:key="index"
|
||||
:value="version.detailId"
|
||||
:label="version.version"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose" :disabled="loading">{{ $t('commons.button.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="submit" :disabled="loading">
|
||||
{{ $t('commons.button.confirm') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</DrawerPro>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { App } from '@/api/interface/app';
|
||||
import { getAppUpdateVersions, ignoreUpgrade } from '@/api/modules/app';
|
||||
import bus from '@/global/bus';
|
||||
import { Rules } from '@/global/form-rules';
|
||||
import i18n from '@/lang';
|
||||
import { MsgSuccess } from '@/utils/message';
|
||||
|
||||
const open = ref(false);
|
||||
const resourceName = ref('');
|
||||
const req = reactive({
|
||||
appID: 0,
|
||||
appDetailID: 0,
|
||||
scope: 'all',
|
||||
});
|
||||
const versions = ref();
|
||||
const appInstallID = ref(0);
|
||||
const rules = ref<any>({
|
||||
appDetailID: [Rules.requiredSelect],
|
||||
});
|
||||
const loading = ref(false);
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
const handleClose = () => {
|
||||
open.value = false;
|
||||
};
|
||||
|
||||
const acceptParams = (apppInstall: App.AppInstalled) => {
|
||||
appInstallID.value = apppInstall.id;
|
||||
req.appID = apppInstall.appID;
|
||||
getVersions();
|
||||
open.value = true;
|
||||
};
|
||||
|
||||
const getVersions = async () => {
|
||||
try {
|
||||
const res = await getAppUpdateVersions({ appInstallID: appInstallID.value });
|
||||
versions.value = res.data || [];
|
||||
if (versions.value.length > 0) {
|
||||
req.appDetailID = versions.value[0].detailId;
|
||||
}
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
const submit = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
await ignoreUpgrade(req);
|
||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||
handleClose();
|
||||
bus.emit('upgrade', true);
|
||||
emit('close');
|
||||
} catch (error) {
|
||||
return;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
defineExpose({
|
||||
acceptParams,
|
||||
});
|
||||
</script>
|
|
@ -11,11 +11,12 @@
|
|||
<el-col :span="12">
|
||||
<span>{{ app.name }}</span>
|
||||
<div class="app-margin">
|
||||
<el-tag>{{ app.version }}</el-tag>
|
||||
<el-tag v-if="app.version != ''">{{ app.version }}</el-tag>
|
||||
<el-tag v-else>{{ $t('commons.table.all') + $t('app.version') }}</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" link @click="cancelIgnore(app.detailID)">
|
||||
<el-button type="primary" link @click="cancelIgnore(app.ID)">
|
||||
{{ $t('app.cancelIgnore') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -32,10 +33,11 @@
|
|||
</DrawerPro>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { getIgnoredApp, ignoreUpgrade } from '@/api/modules/app';
|
||||
import { cancelAppIgnore, getIgnoredApp } from '@/api/modules/app';
|
||||
import { ref } from 'vue';
|
||||
import { MsgSuccess } from '@/utils/message';
|
||||
import i18n from '@/lang';
|
||||
import bus from '@/global/bus';
|
||||
|
||||
const open = ref(false);
|
||||
const loading = ref(false);
|
||||
|
@ -61,8 +63,9 @@ const getApps = async () => {
|
|||
|
||||
const cancelIgnore = async (id: number) => {
|
||||
loading.value = true;
|
||||
await ignoreUpgrade({ detailID: id, operate: 'cancel' })
|
||||
await cancelAppIgnore({ id: id })
|
||||
.then(() => {
|
||||
bus.emit('upgrade', true);
|
||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
|
@ -218,7 +218,7 @@
|
|||
round
|
||||
size="small"
|
||||
:disabled="installed.status === 'Upgrading'"
|
||||
@click="openOperate(installed, 'ignore')"
|
||||
@click="ignoreApp(installed)"
|
||||
v-if="mode === 'upgrade'"
|
||||
>
|
||||
{{ $t('commons.button.ignore') }}
|
||||
|
@ -392,6 +392,7 @@
|
|||
<ComposeLogs ref="composeLogRef" />
|
||||
<TaskLog ref="taskLogRef" @close="search" />
|
||||
<Detail ref="detailRef" />
|
||||
<IgnoreApp ref="ignoreAppRef" @close="search" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -423,6 +424,7 @@ import { MsgSuccess } from '@/utils/message';
|
|||
import { toFolder } from '@/global/business';
|
||||
import TaskLog from '@/components/log/task/index.vue';
|
||||
import Detail from '@/views/app-store/detail/index.vue';
|
||||
import IgnoreApp from '@/views/app-store/installed/ignore/create/index.vue';
|
||||
|
||||
const data = ref<any>();
|
||||
const loading = ref(false);
|
||||
|
@ -466,6 +468,7 @@ const mode = ref('installed');
|
|||
const moreTag = ref('');
|
||||
const defaultLink = ref('');
|
||||
const detailRef = ref();
|
||||
const ignoreAppRef = ref();
|
||||
|
||||
const options = {
|
||||
modifiers: [
|
||||
|
@ -538,7 +541,7 @@ const search = async () => {
|
|||
const openOperate = (row: any, op: string) => {
|
||||
operateReq.installId = row.id;
|
||||
operateReq.operate = op;
|
||||
if (op == 'upgrade' || op == 'ignore') {
|
||||
if (op == 'upgrade') {
|
||||
upgradeRef.value.acceptParams(row.id, row.name, row.dockerCompose, op, row.app);
|
||||
} else if (op == 'delete') {
|
||||
appInstalledDeleteCheck(row.id).then(async (res) => {
|
||||
|
@ -558,6 +561,10 @@ const openIgnore = () => {
|
|||
ignoreRef.value.acceptParams();
|
||||
};
|
||||
|
||||
const ignoreApp = (row: App.AppInstalled) => {
|
||||
ignoreAppRef.value.acceptParams(row);
|
||||
};
|
||||
|
||||
const operate = async () => {
|
||||
open.value = false;
|
||||
loading.value = true;
|
||||
|
|
|
@ -35,6 +35,11 @@
|
|||
>
|
||||
<el-form-item :label="$t('app.versionSelect')" prop="detailId">
|
||||
<el-select v-model="operateReq.version" @change="getVersions(operateReq.version)">
|
||||
<el-option
|
||||
v-if="operateReq.operate == 'ignore'"
|
||||
:value="'all'"
|
||||
:label="$t('commons.table.all') + $t('app.version')"
|
||||
></el-option>
|
||||
<el-option
|
||||
v-for="(version, index) in versions"
|
||||
:key="index"
|
||||
|
@ -124,6 +129,11 @@ const newCompose = ref('');
|
|||
const useNewCompose = ref(false);
|
||||
const appInstallID = ref(0);
|
||||
const taskLogRef = ref();
|
||||
const ignoreAppReq = reactive({
|
||||
appID: 0,
|
||||
appDetailID: 0,
|
||||
scope: 'app',
|
||||
});
|
||||
|
||||
const toLink = (link: string) => {
|
||||
window.open(link, '_blank');
|
||||
|
@ -163,6 +173,10 @@ const acceptParams = (id: number, name: string, dockerCompose: string, op: strin
|
|||
oldContent.value = dockerCompose;
|
||||
appInstallID.value = id;
|
||||
getVersions('');
|
||||
ignoreAppReq.appID = appDetail.appId;
|
||||
if (op === 'ignore') {
|
||||
operateReq.detailId = -1;
|
||||
}
|
||||
open.value = true;
|
||||
};
|
||||
|
||||
|
@ -212,7 +226,7 @@ const operate = async () => {
|
|||
loading.value = false;
|
||||
});
|
||||
} else {
|
||||
await ignoreUpgrade(operateReq)
|
||||
await ignoreUpgrade(ignoreAppReq)
|
||||
.then(() => {
|
||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||
bus.emit('upgrade', true);
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<span class="input-help" v-if="ssl.provider === 'dnsManual'">
|
||||
{{ $t('ssl.dnsMauanlHelper') }}
|
||||
</span>
|
||||
<span class="input-help" v-if="ssl.provider === 'http'">
|
||||
<span class="input-help text-red-500" v-if="ssl.provider === 'http'">
|
||||
{{ $t('ssl.httpHelper') }}
|
||||
</span>
|
||||
<span class="input-help text-red-500" v-if="ssl.provider === 'http'">
|
||||
|
|
Loading…
Add table
Reference in a new issue