mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-22 00:00:50 +00:00
feat: Add “Remove old images during app upgrade” configuration to the App Store. (#13092)
This commit is contained in:
@@ -99,6 +99,7 @@ type AppInstallUpgrade struct {
|
||||
DetailID uint `json:"detailId"`
|
||||
Backup bool `json:"backup"`
|
||||
PullImage bool `json:"pullImage"`
|
||||
DeleteImage bool `json:"deleteImage"`
|
||||
DockerCompose string `json:"dockerCompose"`
|
||||
TaskID string `json:"taskID"`
|
||||
}
|
||||
|
||||
@@ -294,6 +294,7 @@ func (a *AppInstallService) Operate(req request.AppInstalledOperate) error {
|
||||
DetailID: req.DetailId,
|
||||
Backup: req.Backup,
|
||||
PullImage: req.PullImage,
|
||||
DeleteImage: req.DeleteImage,
|
||||
DockerCompose: req.DockerCompose,
|
||||
TaskID: req.TaskID,
|
||||
}
|
||||
|
||||
+110
-24
@@ -365,33 +365,13 @@ func deleteAppInstall(deleteReq request.AppInstallDelete) error {
|
||||
return err
|
||||
}
|
||||
if deleteReq.DeleteImage {
|
||||
delImageStr := i18n.GetMsgByKey("TaskDelete") + i18n.GetMsgByKey("Image")
|
||||
content, err := op.GetContent(install.GetEnvPath())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
images, err := docker.GetImagesFromDockerCompose(content, []byte(install.DockerCompose))
|
||||
if err != nil {
|
||||
if err = deleteAppImagesByCompose(t, content, []byte(install.DockerCompose), nil); err != nil {
|
||||
return err
|
||||
}
|
||||
client, err := docker.NewClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.Close()
|
||||
for _, image := range images {
|
||||
imageID, err := client.GetImageIDByName(image)
|
||||
if err == nil {
|
||||
imgStr := delImageStr + image
|
||||
t.Log(imgStr)
|
||||
|
||||
if err = client.DeleteImage(imageID); err != nil {
|
||||
t.LogFailedWithErr(imgStr, err)
|
||||
continue
|
||||
}
|
||||
t.LogSuccess(delImageStr + image)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tx, ctx := helper.GetTxAndContext()
|
||||
@@ -476,6 +456,69 @@ func deleteAppInstall(deleteReq request.AppInstallDelete) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type appImageID struct {
|
||||
name string
|
||||
id string
|
||||
}
|
||||
|
||||
func getAppImageIDsByCompose(client docker.Client, envContent, composeContent []byte) ([]appImageID, error) {
|
||||
images, err := docker.GetImagesFromDockerCompose(envContent, composeContent)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
imageIDs := make([]appImageID, 0, len(images))
|
||||
for _, image := range images {
|
||||
imageID, err := client.GetImageIDByName(image)
|
||||
if err == nil && imageID != "" {
|
||||
imageIDs = append(imageIDs, appImageID{name: image, id: imageID})
|
||||
}
|
||||
}
|
||||
return imageIDs, nil
|
||||
}
|
||||
|
||||
func deleteAppImagesByCompose(t *task.Task, envContent, composeContent []byte, excludeImages []string) error {
|
||||
client, err := docker.NewClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.Close()
|
||||
|
||||
imageIDs, err := getAppImageIDsByCompose(client, envContent, composeContent)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return deleteAppImagesByIDs(t, client, imageIDs, excludeImages)
|
||||
}
|
||||
|
||||
func deleteAppImagesByIDs(t *task.Task, client docker.Client, imageIDs []appImageID, excludeImages []string) error {
|
||||
delImageStr := i18n.GetMsgByKey("TaskDelete") + i18n.GetMsgByKey("Image")
|
||||
excludeImageIDs := make(map[string]struct{}, len(excludeImages))
|
||||
for _, image := range excludeImages {
|
||||
imageID, err := client.GetImageIDByName(image)
|
||||
if err == nil && imageID != "" {
|
||||
excludeImageIDs[imageID] = struct{}{}
|
||||
}
|
||||
}
|
||||
deletedImageIDs := make(map[string]struct{}, len(imageIDs))
|
||||
for _, image := range imageIDs {
|
||||
if _, ok := excludeImageIDs[image.id]; ok {
|
||||
continue
|
||||
}
|
||||
if _, ok := deletedImageIDs[image.id]; ok {
|
||||
continue
|
||||
}
|
||||
deletedImageIDs[image.id] = struct{}{}
|
||||
imgStr := delImageStr + image.name
|
||||
t.Log(imgStr)
|
||||
if err := client.DeleteImage(image.id); err != nil {
|
||||
t.LogFailedWithErr(imgStr, err)
|
||||
continue
|
||||
}
|
||||
t.LogSuccess(imgStr)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func deleteLink(del dto.DelAppLink) error {
|
||||
install := del.Install
|
||||
resources, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithAppInstallId(install.ID))
|
||||
@@ -759,6 +802,8 @@ func upgradeInstall(req request.AppInstallUpgrade) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
oldEnvContent := append([]byte(nil), content...)
|
||||
oldDockerCompose := install.DockerCompose
|
||||
if install.App.Key == vllmAppKeyForUpgrade {
|
||||
envs := make(map[string]interface{})
|
||||
if err = json.Unmarshal([]byte(install.Env), &envs); err != nil {
|
||||
@@ -828,6 +873,19 @@ func upgradeInstall(req request.AppInstallUpgrade) error {
|
||||
install.Version = detail.Version
|
||||
install.AppDetailId = req.DetailID
|
||||
|
||||
var oldImageIDs []appImageID
|
||||
if req.DeleteImage {
|
||||
dockerCLi, err := docker.NewClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
oldImageIDs, err = getAppImageIDsByCompose(dockerCLi, oldEnvContent, []byte(oldDockerCompose))
|
||||
dockerCLi.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if req.PullImage {
|
||||
images, err := docker.GetImagesFromDockerCompose(content, []byte(install.DockerCompose))
|
||||
if err != nil {
|
||||
@@ -840,8 +898,12 @@ func upgradeInstall(req request.AppInstallUpgrade) error {
|
||||
defer dockerCLi.Close()
|
||||
for _, image := range images {
|
||||
t.Log(i18n.GetWithName("PullImageStart", image))
|
||||
if err = dockerCLi.PullImageWithProcess(t, image); err != nil {
|
||||
return buserr.WithNameAndErr("ErrDockerPullImage", "", err)
|
||||
if pullErr := dockerCLi.PullImageWithProcess(t, image); pullErr != nil {
|
||||
if exist, _ := dockerCLi.ImageExists(image); exist {
|
||||
t.Log(i18n.GetMsgByKey("UseExistImage"))
|
||||
continue
|
||||
}
|
||||
return buserr.WithNameAndErr("ErrDockerPullImage", "", pullErr)
|
||||
}
|
||||
exist, err := dockerCLi.ImageExists(image)
|
||||
if err != nil || !exist {
|
||||
@@ -901,7 +963,31 @@ func upgradeInstall(req request.AppInstallUpgrade) error {
|
||||
}
|
||||
t.LogSuccess(logStr)
|
||||
install.Status = constant.StatusRunning
|
||||
return appInstallRepo.Save(context.Background(), &install)
|
||||
if err = appInstallRepo.Save(context.Background(), &install); err != nil {
|
||||
return err
|
||||
}
|
||||
if req.DeleteImage {
|
||||
newEnvContent, err := fileOp.GetContent(install.GetEnvPath())
|
||||
if err != nil {
|
||||
t.LogFailedWithErr(i18n.GetMsgByKey("TaskDelete")+i18n.GetMsgByKey("Image"), err)
|
||||
return nil
|
||||
}
|
||||
excludeImages, err := docker.GetImagesFromDockerCompose(newEnvContent, []byte(install.DockerCompose))
|
||||
if err != nil {
|
||||
t.LogFailedWithErr(i18n.GetMsgByKey("TaskDelete")+i18n.GetMsgByKey("Image"), err)
|
||||
return nil
|
||||
}
|
||||
dockerCLi, err := docker.NewClient()
|
||||
if err != nil {
|
||||
t.LogFailedWithErr(i18n.GetMsgByKey("TaskDelete")+i18n.GetMsgByKey("Image"), err)
|
||||
return nil
|
||||
}
|
||||
defer dockerCLi.Close()
|
||||
if err = deleteAppImagesByIDs(t, dockerCLi, oldImageIDs, excludeImages); err != nil {
|
||||
t.LogFailedWithErr(i18n.GetMsgByKey("TaskDelete")+i18n.GetMsgByKey("Image"), err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
rollBackApp := func(t *task.Task) {
|
||||
|
||||
@@ -4986,6 +4986,15 @@
|
||||
"formatZH": "更新[scope]频率访问限制",
|
||||
"formatEN": "update [scope] CC config"
|
||||
},
|
||||
"/xpack/waf/rule/common/apply": {
|
||||
"bodyKeys": [
|
||||
"scope"
|
||||
],
|
||||
"paramKeys": [],
|
||||
"beforeFunctions": [],
|
||||
"formatZH": "应用规则 [scope] 到网站",
|
||||
"formatEN": "apply rule [scope] to websites"
|
||||
},
|
||||
"/xpack/waf/rule/common/create": {
|
||||
"bodyKeys": [
|
||||
"scope"
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ require (
|
||||
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
|
||||
github.com/compose-spec/compose-go/v2 v2.11.0
|
||||
github.com/creack/pty v1.1.24
|
||||
github.com/docker/cli v29.5.3+incompatible
|
||||
github.com/docker/cli v29.6.0+incompatible
|
||||
github.com/docker/docker v28.5.2+incompatible
|
||||
github.com/docker/go-connections v0.7.0
|
||||
github.com/fsnotify/fsnotify v1.10.1
|
||||
@@ -49,7 +49,7 @@ require (
|
||||
github.com/tencentyun/cos-go-sdk-v5 v0.7.74
|
||||
github.com/tomasen/fcgi_client v0.0.0-20180423082037-2bb3d819fd19
|
||||
github.com/upyun/go-sdk v2.1.0+incompatible
|
||||
go.mongodb.org/mongo-driver/v2 v2.6.1
|
||||
go.mongodb.org/mongo-driver/v2 v2.7.0
|
||||
golang.org/x/crypto v0.53.0
|
||||
golang.org/x/net v0.56.0
|
||||
golang.org/x/oauth2 v0.36.0
|
||||
|
||||
+4
-4
@@ -230,8 +230,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr
|
||||
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||
github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8=
|
||||
github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
github.com/docker/cli v29.5.3+incompatible h1:nbEFfz774vBwQ5KRYv7c/AghjReqnGISvrRhzjV0evs=
|
||||
github.com/docker/cli v29.5.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/cli v29.6.0+incompatible h1:nw9himxMMZ7eIeherJNlKQq+acnlzGgHd+4uf10QRSc=
|
||||
github.com/docker/cli v29.6.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM=
|
||||
github.com/docker/docker v28.5.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker-credential-helpers v0.9.5 h1:EFNN8DHvaiK8zVqFA2DT6BjXE0GzfLOZ38ggPTKePkY=
|
||||
@@ -898,8 +898,8 @@ go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lL
|
||||
go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo=
|
||||
go.mongodb.org/mongo-driver v1.17.9 h1:IexDdCuuNJ3BHrELgBlyaH9p60JXAvdzWR128q+U5tU=
|
||||
go.mongodb.org/mongo-driver v1.17.9/go.mod h1:LlOhpH5NUEfhxcAwG0UEkMqwYcc4JU18gtCdGudk/tQ=
|
||||
go.mongodb.org/mongo-driver/v2 v2.6.1 h1:YyGZ2lt+4Nv+dWuiGMKoyWuxmBSlGLH5jllheKiQGu0=
|
||||
go.mongodb.org/mongo-driver/v2 v2.6.1/go.mod h1:yOI9kBsufol30iFsl1slpdq1I0eHPzybRWdyYUs8K/0=
|
||||
go.mongodb.org/mongo-driver/v2 v2.7.0 h1:RO+zqavD2/GCL3cxOMyZhx6R9Irzr8/6gsoqx5tcY/c=
|
||||
go.mongodb.org/mongo-driver/v2 v2.7.0/go.mod h1:yOI9kBsufol30iFsl1slpdq1I0eHPzybRWdyYUs8K/0=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
|
||||
@@ -246,12 +246,13 @@ type TerminalInfo struct {
|
||||
}
|
||||
|
||||
type AppstoreUpdate struct {
|
||||
Scope string `json:"scope" validate:"required,oneof=UninstallDeleteImage UpgradeBackup UninstallDeleteBackup InstallAllowPort"`
|
||||
Scope string `json:"scope" validate:"required,oneof=UninstallDeleteImage UpgradeBackup UpgradeDeleteImage UninstallDeleteBackup InstallAllowPort"`
|
||||
Status string `json:"status" validate:"required,oneof=Disable Enable"`
|
||||
}
|
||||
type AppstoreConfig struct {
|
||||
UninstallDeleteImage string `json:"uninstallDeleteImage"`
|
||||
UpgradeBackup string `json:"upgradeBackup"`
|
||||
UpgradeDeleteImage string `json:"upgradeDeleteImage"`
|
||||
UninstallDeleteBackup string `json:"uninstallDeleteBackup"`
|
||||
InstallAllowPort string `json:"installAllowPort"`
|
||||
}
|
||||
|
||||
@@ -704,6 +704,10 @@ func (u *SettingService) GetAppstoreConfig() (*dto.AppstoreConfig, error) {
|
||||
if res.UpgradeBackup == "" {
|
||||
res.UpgradeBackup = constant.StatusDisable
|
||||
}
|
||||
res.UpgradeDeleteImage, _ = settingRepo.GetValueByKey("UpgradeDeleteImage")
|
||||
if res.UpgradeDeleteImage == "" {
|
||||
res.UpgradeDeleteImage = constant.StatusDisable
|
||||
}
|
||||
res.UninstallDeleteBackup, _ = settingRepo.GetValueByKey("UninstallDeleteBackup")
|
||||
if res.UninstallDeleteBackup == "" {
|
||||
res.UninstallDeleteBackup = constant.StatusDisable
|
||||
|
||||
@@ -31046,6 +31046,9 @@ const docTemplate = `{
|
||||
},
|
||||
"upgradeBackup": {
|
||||
"type": "string"
|
||||
},
|
||||
"upgradeDeleteImage": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -31056,6 +31059,7 @@ const docTemplate = `{
|
||||
"enum": [
|
||||
"UninstallDeleteImage",
|
||||
"UpgradeBackup",
|
||||
"UpgradeDeleteImage",
|
||||
"UninstallDeleteBackup",
|
||||
"InstallAllowPort"
|
||||
],
|
||||
@@ -41502,6 +41506,9 @@ const docTemplate = `{
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"taskID": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -41519,11 +41526,17 @@ const docTemplate = `{
|
||||
},
|
||||
"request.RuntimeDelete": {
|
||||
"properties": {
|
||||
"deleteImage": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"forceDelete": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"taskID": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
|
||||
@@ -31042,6 +31042,9 @@
|
||||
},
|
||||
"upgradeBackup": {
|
||||
"type": "string"
|
||||
},
|
||||
"upgradeDeleteImage": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -31052,6 +31055,7 @@
|
||||
"enum": [
|
||||
"UninstallDeleteImage",
|
||||
"UpgradeBackup",
|
||||
"UpgradeDeleteImage",
|
||||
"UninstallDeleteBackup",
|
||||
"InstallAllowPort"
|
||||
],
|
||||
@@ -41498,6 +41502,9 @@
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"taskID": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -41515,11 +41522,17 @@
|
||||
},
|
||||
"request.RuntimeDelete": {
|
||||
"properties": {
|
||||
"deleteImage": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"forceDelete": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"taskID": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
|
||||
@@ -4986,6 +4986,15 @@
|
||||
"formatZH": "更新[scope]频率访问限制",
|
||||
"formatEN": "update [scope] CC config"
|
||||
},
|
||||
"/xpack/waf/rule/common/apply": {
|
||||
"bodyKeys": [
|
||||
"scope"
|
||||
],
|
||||
"paramKeys": [],
|
||||
"beforeFunctions": [],
|
||||
"formatZH": "应用规则 [scope] 到网站",
|
||||
"formatEN": "apply rule [scope] to websites"
|
||||
},
|
||||
"/xpack/waf/rule/common/create": {
|
||||
"bodyKeys": [
|
||||
"scope"
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
module github.com/1Panel-dev/1Panel/core
|
||||
|
||||
go 1.25.7
|
||||
go 1.26.1
|
||||
|
||||
require (
|
||||
github.com/1panel-dev/base64Captcha v1.3.8
|
||||
@@ -16,7 +16,7 @@ require (
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/gorilla/websocket v1.5.3
|
||||
github.com/jinzhu/copier v0.4.0
|
||||
github.com/johnfercher/maroto/v2 v2.3.0
|
||||
github.com/johnfercher/maroto/v2 v2.4.0
|
||||
github.com/nicksnyder/go-i18n/v2 v2.6.1
|
||||
github.com/oschwald/maxminddb-golang v1.13.1
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||
@@ -82,7 +82,6 @@ require (
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/johnfercher/go-tree v1.1.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/jung-kurt/gofpdf v1.16.2 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||
github.com/kr/fs v0.1.0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
@@ -94,6 +93,7 @@ require (
|
||||
github.com/pdfcpu/pdfcpu v0.11.1 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.3.0 // indirect
|
||||
github.com/philhofer/fwd v1.2.0 // indirect
|
||||
github.com/phpdave11/gofpdf v1.4.3 // indirect
|
||||
github.com/quic-go/qpack v0.6.0 // indirect
|
||||
github.com/quic-go/quic-go v0.59.0 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
|
||||
+7
-6
@@ -129,13 +129,11 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/johnfercher/go-tree v1.1.0 h1:L0Fs5jLR1uA2e/CwfHjNdO/Lt4IGQ46QgxarAC1yeXs=
|
||||
github.com/johnfercher/go-tree v1.1.0/go.mod h1:DUO6QkXIFh1K7jeGBIkLCZaeUgnkdQAsB64FDSoHswg=
|
||||
github.com/johnfercher/maroto/v2 v2.3.0 h1:dmxDeKY2oK90tZaq7039RUEmu+Ynuf82DYuOQD4Tpxk=
|
||||
github.com/johnfercher/maroto/v2 v2.3.0/go.mod h1:/LfW6AQGZzsG6xUixcfyxkKztDoszdwC+G2jNRl8bss=
|
||||
github.com/johnfercher/maroto/v2 v2.4.0 h1:Nc/jA2RCZvNZESrQj41HJOgtkwmerSHd5FUbP4dRrIE=
|
||||
github.com/johnfercher/maroto/v2 v2.4.0/go.mod h1:Nnxa3g4f+vzdx/u/dUgx/52HnrCOCt5QBPSdeSlkFZQ=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
||||
github.com/jung-kurt/gofpdf v1.16.2 h1:jgbatWHfRlPYiK85qgevsZTHviWXKwB1TTiKdz5PtRc=
|
||||
github.com/jung-kurt/gofpdf v1.16.2/go.mod h1:1hl7y57EsiPAkLbOwzpzqgx1A30nQCk/YmFV8S2vmK0=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
|
||||
@@ -169,7 +167,9 @@ github.com/pelletier/go-toml/v2 v2.3.0 h1:k59bC/lIZREW0/iVaQR8nDHxVq8OVlIzYCOJf4
|
||||
github.com/pelletier/go-toml/v2 v2.3.0/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
|
||||
github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
|
||||
github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
|
||||
github.com/phpdave11/gofpdi v1.0.7/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
|
||||
github.com/phpdave11/gofpdf v1.4.3 h1:M/zHvS8FO3zh9tUd2RCOPEjyuVcs281FCyF22Qlz/IA=
|
||||
github.com/phpdave11/gofpdf v1.4.3/go.mod h1:MAwzoUIgD3J55u0rxIG2eu37c+XWhBtXSpPAhnQXf/o=
|
||||
github.com/phpdave11/gofpdi v1.0.15/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
@@ -211,8 +211,9 @@ github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjb
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=
|
||||
github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
|
||||
@@ -38,6 +38,7 @@ func Init() {
|
||||
migrations.UpdateAiModelMenuStructure,
|
||||
migrations.AddDocSourceSetting,
|
||||
migrations.AddAppStoreInstallAllowPortSetting,
|
||||
migrations.AddAppStoreUpgradeDeleteImageSetting,
|
||||
migrations.AddUserManagementMenu,
|
||||
migrations.AddOpsReportMenu,
|
||||
migrations.AddAIBenchmarkMenu,
|
||||
|
||||
@@ -193,6 +193,9 @@ var InitSetting = &gormigrate.Migration{
|
||||
if err := tx.Create(&model.Setting{Key: "UpgradeBackup", Value: "Enable"}).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.Create(&model.Setting{Key: "UpgradeDeleteImage", Value: constant.StatusDisable}).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.Create(&model.Setting{Key: "UninstallDeleteBackup", Value: constant.StatusDisable}).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -877,6 +880,23 @@ var AddAppStoreInstallAllowPortSetting = &gormigrate.Migration{
|
||||
},
|
||||
}
|
||||
|
||||
var AddAppStoreUpgradeDeleteImageSetting = &gormigrate.Migration{
|
||||
ID: "20260622-add-app-store-upgrade-delete-image-setting",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
var setting model.Setting
|
||||
if err := tx.Where("key = ?", "UpgradeDeleteImage").First(&setting).Error; err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return tx.Create(&model.Setting{Key: "UpgradeDeleteImage", Value: constant.StatusDisable}).Error
|
||||
}
|
||||
return err
|
||||
}
|
||||
if setting.Value == "" {
|
||||
return tx.Model(&model.Setting{}).Where("key = ?", "UpgradeDeleteImage").Update("value", constant.StatusDisable).Error
|
||||
}
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
var UpdateAiLocalModelMenuTitle = &gormigrate.Migration{
|
||||
ID: "20260307-update-ai-local-model-menu-title",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
|
||||
Generated
+87
-95
@@ -24,7 +24,7 @@
|
||||
"axios": "^1.17.0",
|
||||
"codemirror": "^6.0.2",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dompurify": "^3.4.9",
|
||||
"dompurify": "^3.4.11",
|
||||
"echarts": "^5.5.0",
|
||||
"element-plus": "2.14.0",
|
||||
"js-base64": "^3.7.7",
|
||||
@@ -51,12 +51,12 @@
|
||||
"@tailwindcss/postcss": "^4.3.0",
|
||||
"@types/node": "^25.9.1",
|
||||
"@types/uuid": "^11.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.61.0",
|
||||
"@typescript-eslint/parser": "^8.61.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.61.1",
|
||||
"@typescript-eslint/parser": "^8.61.1",
|
||||
"@vitejs/plugin-vue": "^6.0.7",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
||||
"@vue/compiler-sfc": "^3.5.35",
|
||||
"autoprefixer": "^10.4.7",
|
||||
"autoprefixer": "^10.5.0",
|
||||
"esbuild": "^0.28.0",
|
||||
"eslint": "^10.4.1",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
@@ -3048,17 +3048,17 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.61.0.tgz",
|
||||
"integrity": "sha512-bFNvl9ZczlVb+wR2Akszf3gHfKVj/8WanXaGJ3UstTA7brNKg0cNdk6X1Psu5V7MZ2oQtzZKOEzIUehaoxbDGw==",
|
||||
"version": "8.61.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.61.1.tgz",
|
||||
"integrity": "sha512-ZPlVl3PB3et/59Ne0fv/sci6ZXz4T4Hp4nTJ56i/Y0gR89ARb+KphojTq6j+56E5PIezmOIOOWyY+aWQFd+IkQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.12.2",
|
||||
"@typescript-eslint/scope-manager": "8.61.0",
|
||||
"@typescript-eslint/type-utils": "8.61.0",
|
||||
"@typescript-eslint/utils": "8.61.0",
|
||||
"@typescript-eslint/visitor-keys": "8.61.0",
|
||||
"@typescript-eslint/scope-manager": "8.61.1",
|
||||
"@typescript-eslint/type-utils": "8.61.1",
|
||||
"@typescript-eslint/utils": "8.61.1",
|
||||
"@typescript-eslint/visitor-keys": "8.61.1",
|
||||
"ignore": "^7.0.5",
|
||||
"natural-compare": "^1.4.0",
|
||||
"ts-api-utils": "^2.5.0"
|
||||
@@ -3071,7 +3071,7 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^8.61.0",
|
||||
"@typescript-eslint/parser": "^8.61.1",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
@@ -3087,17 +3087,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.61.0.tgz",
|
||||
"integrity": "sha512-5B7PfA2e1NQGCnDHd/0lW7W3gvp3d59Ryw54FYO8Uswxo9f6ikw3AZV+Xj/TvpImmpsiYyUqAfhC6kJID1jF6w==",
|
||||
"version": "8.61.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.61.1.tgz",
|
||||
"integrity": "sha512-PJ5vePq5/ognBbrIcoC5+SHO5dfpeLPzP9FpLkzWrguoYQEeeSjlJpVwOpo1JRSTEi7dRcwNy4h4dzV70PqHcg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.61.0",
|
||||
"@typescript-eslint/types": "8.61.0",
|
||||
"@typescript-eslint/typescript-estree": "8.61.0",
|
||||
"@typescript-eslint/visitor-keys": "8.61.0",
|
||||
"@typescript-eslint/scope-manager": "8.61.1",
|
||||
"@typescript-eslint/types": "8.61.1",
|
||||
"@typescript-eslint/typescript-estree": "8.61.1",
|
||||
"@typescript-eslint/visitor-keys": "8.61.1",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3113,14 +3113,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.61.0.tgz",
|
||||
"integrity": "sha512-DV42F7MLJO6Rax7SK1yg43tcnEfGUrurSpSxKuVX+a3RCTzBlH3fuxprrOJXKCJGAaw82xXocikJ0uQaqwXgGA==",
|
||||
"version": "8.61.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.61.1.tgz",
|
||||
"integrity": "sha512-PrC4JYGmR241lYnfhmKGTXkFqv8+ymbTFgSAY0fVXpY82/QkMw5TZPl+vGzuDDU2QYJk9fIDOBTntF+yDv9LEA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/tsconfig-utils": "^8.61.0",
|
||||
"@typescript-eslint/types": "^8.61.0",
|
||||
"@typescript-eslint/tsconfig-utils": "^8.61.1",
|
||||
"@typescript-eslint/types": "^8.61.1",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3135,14 +3135,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.61.0.tgz",
|
||||
"integrity": "sha512-IWdXFHFSb6mlC3HPc7QsLDm5zYEbUla6trDEHf32D3/dnuUyXd87plScSNXSbm0/RxMvObpI17sv/EDTGrGZkA==",
|
||||
"version": "8.61.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.61.1.tgz",
|
||||
"integrity": "sha512-L2bdIeoQS8FlKAvONAr20w6OcLXeB+qiDKbAooS9A0Ben+iSIkBef0FxqwKWYqt5sa0i4KJtxVyVmhMylKzF5w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.61.0",
|
||||
"@typescript-eslint/visitor-keys": "8.61.0"
|
||||
"@typescript-eslint/types": "8.61.1",
|
||||
"@typescript-eslint/visitor-keys": "8.61.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3153,9 +3153,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.61.0.tgz",
|
||||
"integrity": "sha512-O5Amvdv9ztMpxpf+vmFULGG78IE6Qwdr3bCGvqwG4nwc9H2qXkOYJJnRbRHyMkQTjv1d03olqwwwzHLMqpFePQ==",
|
||||
"version": "8.61.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.61.1.tgz",
|
||||
"integrity": "sha512-UN/H4di+OO7EWx2ovME+8t31YO+KVnK0RRKEHR3kOt21/Ay8BOq3M1OMvWs5vNiqcFCYGYoxK3MXPZzmMUE+yg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3170,15 +3170,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.61.0.tgz",
|
||||
"integrity": "sha512-TuBiQYIkd97yBfInHCTKVYMbX4kvEmpOEuixIuzCU9p8BGT1SfyyO0d0IfDMbPIHcjn/hWnusUX5e8v5Xg+X8A==",
|
||||
"version": "8.61.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.61.1.tgz",
|
||||
"integrity": "sha512-GYRicKmVK0C4fsKgaACaknOUAq9Oa2kwsjnpFhFcS/5p4Ht5IP9OVLbgIgcK4SRk92nVHFluurg1lumD9dBcLw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.61.0",
|
||||
"@typescript-eslint/typescript-estree": "8.61.0",
|
||||
"@typescript-eslint/utils": "8.61.0",
|
||||
"@typescript-eslint/types": "8.61.1",
|
||||
"@typescript-eslint/typescript-estree": "8.61.1",
|
||||
"@typescript-eslint/utils": "8.61.1",
|
||||
"debug": "^4.4.3",
|
||||
"ts-api-utils": "^2.5.0"
|
||||
},
|
||||
@@ -3195,9 +3195,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "8.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.61.0.tgz",
|
||||
"integrity": "sha512-9QTQpZ5Iin4CdIodfbDQFSeiSJKidgYJYug1P9CC2xWgUTvlmixViqDZNciMjwLBZyJnG4tGmPl97rVAFb1AJg==",
|
||||
"version": "8.61.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.61.1.tgz",
|
||||
"integrity": "sha512-G+CRlPqLv7Bz1IZVs03x5K59F1veqL0EJUROAdGhKsEq8qOiRiZbI+HUojPq5l0fEGOKModD9br6lObhB8zkoA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3209,16 +3209,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.61.0.tgz",
|
||||
"integrity": "sha512-42zatd5qSvvcV1JdDBCLxYRznvP4eIHpPoZXdkPFnAmanA4FuZ5dibSnCBggY8hQnqajPpoGjXFdZ7fIJKQnlA==",
|
||||
"version": "8.61.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.61.1.tgz",
|
||||
"integrity": "sha512-u+oQD3BqYWPc8YV9Zab4vaJElJuwOLPRc10Jm1o/qS+6Qwen14HCWwx0Seo4LnSn2wxea2Ik8DxPt2/FHmuhrg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.61.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.61.0",
|
||||
"@typescript-eslint/types": "8.61.0",
|
||||
"@typescript-eslint/visitor-keys": "8.61.0",
|
||||
"@typescript-eslint/project-service": "8.61.1",
|
||||
"@typescript-eslint/tsconfig-utils": "8.61.1",
|
||||
"@typescript-eslint/types": "8.61.1",
|
||||
"@typescript-eslint/visitor-keys": "8.61.1",
|
||||
"debug": "^4.4.3",
|
||||
"minimatch": "^10.2.2",
|
||||
"semver": "^7.7.3",
|
||||
@@ -3276,16 +3276,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.61.0.tgz",
|
||||
"integrity": "sha512-3bzFt7ImFMW/jVYwJamDoe/dMOdFLSC6pom6rRjdh4SZJEYupyMzem8e7vKZLclLfpHjlwSAXOUxtKxGXUiLqA==",
|
||||
"version": "8.61.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.61.1.tgz",
|
||||
"integrity": "sha512-1+P/3Dj6jvtybE1q0HQ6yBt/gq+oKJyLdEv4HdnqasaEXRSYCAsD59mXEVQnM/ULNdQxbX77tdG4jPRjIS6knA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.9.1",
|
||||
"@typescript-eslint/scope-manager": "8.61.0",
|
||||
"@typescript-eslint/types": "8.61.0",
|
||||
"@typescript-eslint/typescript-estree": "8.61.0"
|
||||
"@typescript-eslint/scope-manager": "8.61.1",
|
||||
"@typescript-eslint/types": "8.61.1",
|
||||
"@typescript-eslint/typescript-estree": "8.61.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3300,13 +3300,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.61.0.tgz",
|
||||
"integrity": "sha512-QVLZu3ZPQEE+HICQyAMZ2yLQhxf0meY/wx6Hx14YcTNj13JB3qHlX3lJ02L3fLGHgERRH71kvYDwiXIguT3AjQ==",
|
||||
"version": "8.61.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.61.1.tgz",
|
||||
"integrity": "sha512-6fJ9MHWtK14C1DSkiMlHUSOmrVebL7150xZJBlJiL62jjhIA4JmOq6flwBgDxIdBKKdoiZRel+dfPD5MLfny3w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.61.0",
|
||||
"@typescript-eslint/types": "8.61.1",
|
||||
"eslint-visitor-keys": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3909,9 +3909,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/autoprefixer": {
|
||||
"version": "10.4.22",
|
||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.22.tgz",
|
||||
"integrity": "sha512-ARe0v/t9gO28Bznv6GgqARmVqcWOV3mfgUPn9becPHMiD3o9BwlRgaeccZnwTpZ7Zwqrm+c1sUSsMxIzQzc8Xg==",
|
||||
"version": "10.5.0",
|
||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.0.tgz",
|
||||
"integrity": "sha512-FMhOoZV4+qR6aTUALKX2rEqGG+oyATvwBt9IIzVR5rMa2HRWPkxf+P+PAJLD1I/H5/II+HuZcBJYEFBpq39ong==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -3929,10 +3929,9 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"browserslist": "^4.27.0",
|
||||
"caniuse-lite": "^1.0.30001754",
|
||||
"browserslist": "^4.28.2",
|
||||
"caniuse-lite": "^1.0.30001787",
|
||||
"fraction.js": "^5.3.4",
|
||||
"normalize-range": "^0.1.2",
|
||||
"picocolors": "^1.1.1",
|
||||
"postcss-value-parser": "^4.2.0"
|
||||
},
|
||||
@@ -4020,9 +4019,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.28.1",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz",
|
||||
"integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",
|
||||
"version": "4.28.2",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",
|
||||
"integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -4041,11 +4040,11 @@
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.9.0",
|
||||
"caniuse-lite": "^1.0.30001759",
|
||||
"electron-to-chromium": "^1.5.263",
|
||||
"node-releases": "^2.0.27",
|
||||
"update-browserslist-db": "^1.2.0"
|
||||
"baseline-browser-mapping": "^2.10.12",
|
||||
"caniuse-lite": "^1.0.30001782",
|
||||
"electron-to-chromium": "^1.5.328",
|
||||
"node-releases": "^2.0.36",
|
||||
"update-browserslist-db": "^1.2.3"
|
||||
},
|
||||
"bin": {
|
||||
"browserslist": "cli.js"
|
||||
@@ -4998,9 +4997,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/dompurify": {
|
||||
"version": "3.4.9",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.9.tgz",
|
||||
"integrity": "sha512-4dPSRMRDqHvs0V4YDFCsaIZo4if5u0xM+llyxiM2fwuZFdKArUBAF3VtI2+n8NKg9P870WMdYk0UhqQNoWXbfQ==",
|
||||
"version": "3.4.11",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.11.tgz",
|
||||
"integrity": "sha512-zhlUV12GsaRzMsf9q5M254YhA4+VuF0fG+QFqu6aYpoGlKtz+w8//jBcGVYBgQkR5GHjUomejY84AV+/uPbWdw==",
|
||||
"license": "(MPL-2.0 OR Apache-2.0)",
|
||||
"optionalDependencies": {
|
||||
"@types/trusted-types": "^2.0.7"
|
||||
@@ -5146,9 +5145,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.266",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.266.tgz",
|
||||
"integrity": "sha512-kgWEglXvkEfMH7rxP5OSZZwnaDWT7J9EoZCujhnpLbfi0bbNtRkgdX2E3gt0Uer11c61qCYktB3hwkAS325sJg==",
|
||||
"version": "1.5.376",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.376.tgz",
|
||||
"integrity": "sha512-cUVA7/RvbFTEuw/i3obUwDTRIXojaxkResf+ibByPFxjc6XK3VNtcQXV0NSbAlJ0FMjcJGgftVVB4Qo184EXvA==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
@@ -7896,11 +7895,14 @@
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/node-releases": {
|
||||
"version": "2.0.27",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz",
|
||||
"integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
|
||||
"version": "2.0.48",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.48.tgz",
|
||||
"integrity": "sha512-1uz8041X6LoI6ZSdZacM9lVY28vuzDlSKitnpbSNK0RfKoIJkX29NBPVEFXhnuSuEOA9Ww0xnPJ+ILWbGAv8DA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-package-data": {
|
||||
"version": "3.0.3",
|
||||
@@ -7918,16 +7920,6 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-range": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
|
||||
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-wheel-es": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
|
||||
@@ -9893,9 +9885,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.2.tgz",
|
||||
"integrity": "sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA==",
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
|
||||
"integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"axios": "^1.17.0",
|
||||
"codemirror": "^6.0.2",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dompurify": "^3.4.9",
|
||||
"dompurify": "^3.4.11",
|
||||
"echarts": "^5.5.0",
|
||||
"element-plus": "2.14.0",
|
||||
"js-base64": "^3.7.7",
|
||||
@@ -62,12 +62,12 @@
|
||||
"@tailwindcss/postcss": "^4.3.0",
|
||||
"@types/node": "^25.9.1",
|
||||
"@types/uuid": "^11.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.61.0",
|
||||
"@typescript-eslint/parser": "^8.61.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.61.1",
|
||||
"@typescript-eslint/parser": "^8.61.1",
|
||||
"@vitejs/plugin-vue": "^6.0.7",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
||||
"@vue/compiler-sfc": "^3.5.35",
|
||||
"autoprefixer": "^10.4.7",
|
||||
"autoprefixer": "^10.5.0",
|
||||
"esbuild": "^0.28.0",
|
||||
"eslint": "^10.4.1",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
|
||||
@@ -345,6 +345,7 @@ export namespace App {
|
||||
uninstallDeleteImage: string;
|
||||
uninstallDeleteBackup: string;
|
||||
upgradeBackup: string;
|
||||
upgradeDeleteImage: string;
|
||||
installAllowPort: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -3172,6 +3172,7 @@ const message = {
|
||||
uninstallDeleteBackup: 'Uninstall App - Delete Backup',
|
||||
uninstallDeleteImage: 'Uninstall App - Delete Image',
|
||||
upgradeBackup: 'Backup App Before Upgrade',
|
||||
upgradeDeleteImage: 'Upgrade App - Delete Old Image',
|
||||
installAllowPort: 'Open external port access by default when installing apps',
|
||||
noAppHelper: 'No application detected, go to the task center to view the app store sync log',
|
||||
isEdirWarn: 'Changes to docker-compose.yml were detected. Please review the diff.',
|
||||
@@ -4696,6 +4697,7 @@ const message = {
|
||||
redisConfig: 'Redis Configuration',
|
||||
redisHelper: 'Enable Redis to persist temporarily blocked IPs',
|
||||
wafHelper: 'All websites will lose protection after closing',
|
||||
websiteWafHelper: 'This website will lose protection after closing',
|
||||
attackIP: 'Attacking IP',
|
||||
attackParam: 'Attack Details',
|
||||
execRule: 'Hit Rule',
|
||||
@@ -4723,6 +4725,7 @@ const message = {
|
||||
initHelper:
|
||||
'The initialization operation will clear the existing WAF configuration. Are you sure you want to initialize? ',
|
||||
mainSwitch: 'Main Switch',
|
||||
websiteSwitch: 'Switch',
|
||||
websiteAlert: 'Please create a website first',
|
||||
defaultUrlBlack: 'URL Rules',
|
||||
htmlRes: 'Intercept Page',
|
||||
|
||||
@@ -3233,6 +3233,7 @@ const message = {
|
||||
uninstallDeleteBackup: 'Desinstalar - Eliminar respaldo',
|
||||
uninstallDeleteImage: 'Desinstalar - Eliminar imagen',
|
||||
upgradeBackup: 'Respaldar app antes de actualizar',
|
||||
upgradeDeleteImage: 'Actualizar app - Eliminar imagen antigua',
|
||||
installAllowPort: 'Abrir el acceso externo al puerto por defecto al instalar apps',
|
||||
noAppHelper:
|
||||
'No se detectó ninguna aplicación, por favor vaya al centro de tareas para ver el registro de sincronización de la tienda de aplicaciones',
|
||||
@@ -4753,6 +4754,7 @@ const message = {
|
||||
redisConfig: 'Configuración Redis',
|
||||
redisHelper: 'Habilita Redis para persistir IPs bloqueadas temporalmente',
|
||||
wafHelper: 'Todos los sitios perderán protección al deshabilitar',
|
||||
websiteWafHelper: 'Este sitio perderá la protección al deshabilitar',
|
||||
attackIP: 'IP atacante',
|
||||
attackParam: 'Detalles del ataque',
|
||||
execRule: 'Regla aplicada',
|
||||
@@ -4778,6 +4780,7 @@ const message = {
|
||||
'La primera vez es necesario inicializar. El archivo de configuración será modificado y la configuración previa se perderá. Haz copia de seguridad',
|
||||
initHelper: 'La inicialización borrará la configuración existente del WAF. ¿Seguro que quieres continuar?',
|
||||
mainSwitch: 'Interruptor principal',
|
||||
websiteSwitch: 'Interruptor',
|
||||
websiteAlert: 'Crea un sitio primero',
|
||||
defaultUrlBlack: 'Reglas de URL',
|
||||
htmlRes: 'Página de intercepción',
|
||||
|
||||
@@ -3196,6 +3196,7 @@ const message = {
|
||||
uninstallDeleteBackup: 'アプリをアンインストール - バックアップを削除',
|
||||
uninstallDeleteImage: 'アプリをアンインストール - イメージを削除',
|
||||
upgradeBackup: 'アプリのアップグレード前にアプリをバックアップ',
|
||||
upgradeDeleteImage: 'アプリをアップグレード - 古いイメージを削除',
|
||||
installAllowPort: 'アプリインストール時に外部アクセスを既定で有効化',
|
||||
noAppHelper: 'アプリケーションが検出されませんでした。タスクセンターでアプリストアの同期ログを確認してください',
|
||||
isEdirWarn: 'docker-compose.yml ファイルの変更が検出されました。差分を確認してください。',
|
||||
@@ -4727,6 +4728,7 @@ const message = {
|
||||
redisConfig: 'Redis設定',
|
||||
redisHelper: 'Redisを有効にして、一時的にブロックされたIPを永続化します',
|
||||
wafHelper: 'WAFを閉じると、すべてのウェブサイトが保護を失います',
|
||||
websiteWafHelper: 'WAFを閉じると、このウェブサイトが保護を失います',
|
||||
attackIP: '攻撃IP',
|
||||
attackParam: '攻撃詳細',
|
||||
execRule: 'ヒットしたルール',
|
||||
@@ -4752,6 +4754,7 @@ const message = {
|
||||
'初回使用時には初期化が必要です。ウェブサイトの設定ファイルが変更され、元のWAF設定が失われます。事前にOpenRestyのバックアップを取ってください',
|
||||
initHelper: '初期化操作により、既存のWAF設定がクリアされます。初期化してもよろしいですか?',
|
||||
mainSwitch: 'メインスイッチ',
|
||||
websiteSwitch: 'スイッチ',
|
||||
websiteAlert: 'まずウェブサイトを作成してください',
|
||||
defaultUrlBlack: 'URLルール',
|
||||
htmlRes: 'インターセプトページ',
|
||||
|
||||
@@ -3126,6 +3126,7 @@ const message = {
|
||||
uninstallDeleteBackup: '앱 제거 - 백업 삭제',
|
||||
uninstallDeleteImage: '앱 제거 - 이미지 삭제',
|
||||
upgradeBackup: '앱 업그레이드 전 앱 백업',
|
||||
upgradeDeleteImage: '앱 업그레이드 - 이전 이미지 삭제',
|
||||
installAllowPort: '앱 설치 시 기본으로 외부 포트 접근 허용',
|
||||
noAppHelper: '애플리케이션이 감지되지 않았습니다. 작업 센터에서 앱 스토어 동기화 로그를 확인해 주세요',
|
||||
isEdirWarn: 'docker-compose.yml 파일 변경이 감지되었습니다. 차이점을 확인해 주세요.',
|
||||
@@ -4632,6 +4633,7 @@ const message = {
|
||||
redisConfig: 'Redis 설정',
|
||||
redisHelper: 'Redis 를 활성화하여 일시적으로 차단된 IP를 유지합니다.',
|
||||
wafHelper: 'WAF 를 종료하면 모든 웹사이트 보호가 해제됩니다.',
|
||||
websiteWafHelper: 'WAF 를 종료하면 이 웹사이트 보호가 해제됩니다.',
|
||||
attackIP: '공격 IP',
|
||||
attackParam: '공격 세부사항',
|
||||
execRule: '적용된 규칙',
|
||||
@@ -4656,6 +4658,7 @@ const message = {
|
||||
'처음 사용 시 초기화가 필요하며, 웹사이트 설정 파일이 수정됩니다. 기존 WAF 설정은 손실될 수 있습니다. 미리 백업해 주세요.',
|
||||
initHelper: '초기화 작업은 기존 WAF 설정을 삭제합니다. 초기화하시겠습니까?',
|
||||
mainSwitch: '메인 스위치',
|
||||
websiteSwitch: '스위치',
|
||||
websiteAlert: '먼저 웹사이트를 생성해 주세요.',
|
||||
defaultUrlBlack: 'URL 규칙',
|
||||
htmlRes: '차단 페이지',
|
||||
|
||||
@@ -3239,6 +3239,7 @@ const message = {
|
||||
uninstallDeleteBackup: 'Cop Terhapus Semasa Nyahpasang Aplikasi',
|
||||
uninstallDeleteImage: 'Imej Terhapus Semasa Nyahpasang Aplikasi',
|
||||
upgradeBackup: 'Sandaran Aplikasi Sebelum Naik Taraf',
|
||||
upgradeDeleteImage: 'Naik Taraf Aplikasi - Padam Imej Lama',
|
||||
installAllowPort: 'Buka akses port luaran secara lalai semasa memasang aplikasi',
|
||||
noAppHelper: 'Tiada aplikasi dikesan, sila pergi ke pusat tugas untuk melihat log penyegerakan kedai aplikasi',
|
||||
isEdirWarn: 'Perubahan pada fail docker-compose.yml telah dikesan. Sila semak perbezaannya.',
|
||||
@@ -4784,6 +4785,7 @@ const message = {
|
||||
redisConfig: 'Konfigurasi Redis',
|
||||
redisHelper: 'Aktifkan Redis untuk menyimpan IP yang disekat sementara',
|
||||
wafHelper: 'Semua laman web akan kehilangan perlindungan selepas menutup',
|
||||
websiteWafHelper: 'Laman web ini akan kehilangan perlindungan selepas menutup',
|
||||
attackIP: 'IP Serangan',
|
||||
attackParam: 'Butiran Serangan',
|
||||
execRule: 'Peraturan Dilanggar',
|
||||
@@ -4811,6 +4813,7 @@ const message = {
|
||||
initHelper:
|
||||
'Operasi penyediaan akan membersihkan konfigurasi WAF yang sedia ada. Adakah anda pasti mahu menyediakan semula?',
|
||||
mainSwitch: 'Suis Utama',
|
||||
websiteSwitch: 'Suis',
|
||||
websiteAlert: 'Sila cipta laman web terlebih dahulu',
|
||||
defaultUrlBlack: 'Peraturan URL',
|
||||
htmlRes: 'Halaman Sekat',
|
||||
|
||||
@@ -3369,6 +3369,7 @@ const message = {
|
||||
uninstallDeleteBackup: 'Desinstalar Aplicativo - Excluir Backup',
|
||||
uninstallDeleteImage: 'Desinstalar Aplicativo - Excluir Imagem',
|
||||
upgradeBackup: 'Fazer Backup do Aplicativo Antes de Atualizar',
|
||||
upgradeDeleteImage: 'Atualizar Aplicativo - Excluir Imagem Antiga',
|
||||
installAllowPort: 'Abrir acesso externo à porta por padrão ao instalar aplicativos',
|
||||
noAppHelper:
|
||||
'Nenhuma aplicação detectada, por favor vá ao centro de tarefas para visualizar o log de sincronização da loja de aplicativos',
|
||||
@@ -4925,6 +4926,7 @@ const message = {
|
||||
redisConfig: 'Configuração do Redis',
|
||||
redisHelper: 'Ativar o Redis para persistir IPs temporariamente bloqueados',
|
||||
wafHelper: 'Todos os sites perderão proteção após o fechamento',
|
||||
websiteWafHelper: 'Este site perderá a proteção após o fechamento',
|
||||
attackIP: 'IP atacante',
|
||||
attackParam: 'Detalhes do ataque',
|
||||
execRule: 'Regra atingida',
|
||||
@@ -4952,6 +4954,7 @@ const message = {
|
||||
initHelper:
|
||||
'A operação de inicialização apagará a configuração WAF existente. Tem certeza de que deseja inicializar?',
|
||||
mainSwitch: 'Interruptor principal',
|
||||
websiteSwitch: 'Interruptor',
|
||||
websiteAlert: 'Por favor, crie um site primeiro',
|
||||
defaultUrlBlack: 'Regras de URL',
|
||||
htmlRes: 'Página de interceptação',
|
||||
|
||||
@@ -3229,6 +3229,7 @@ const message = {
|
||||
uninstallDeleteBackup: 'Деинсталляция приложения - Удаление резервной копии',
|
||||
uninstallDeleteImage: 'Деинсталляция приложения - Удаление образа',
|
||||
upgradeBackup: 'Резервное копирование приложения перед обновлением',
|
||||
upgradeDeleteImage: 'Обновление приложения - Удалить старый образ',
|
||||
installAllowPort: 'По умолчанию открывать внешний доступ к порту при установке приложения',
|
||||
noAppHelper:
|
||||
'Приложения не обнаружены, пожалуйста, перейдите в центр задач для просмотра журнала синхронизации магазина приложений',
|
||||
@@ -4776,6 +4777,7 @@ const message = {
|
||||
redisConfig: 'Конфигурация Redis',
|
||||
redisHelper: 'Включите Redis для сохранения временно заблокированных IP-адресов',
|
||||
wafHelper: 'Все сайты потеряют защиту после отключения',
|
||||
websiteWafHelper: 'Этот сайт потеряет защиту после отключения',
|
||||
attackIP: 'IP атакующего',
|
||||
attackParam: 'Детали атаки',
|
||||
execRule: 'Срабатывающее правило',
|
||||
@@ -4802,6 +4804,7 @@ const message = {
|
||||
'Необходима инициализация для первого использования, файл конфигурации сайта будет изменен, и оригинальная конфигурация WAF будет потеряна. Пожалуйста, сделайте резервную копию OpenResty заранее',
|
||||
initHelper: 'Инициализация удалит текущую конфигурацию WAF. Вы уверены, что хотите инициализировать?',
|
||||
mainSwitch: 'Главный переключатель',
|
||||
websiteSwitch: 'Переключатель',
|
||||
websiteAlert: 'Пожалуйста, создайте сайт сначала',
|
||||
defaultUrlBlack: 'Правила для URL',
|
||||
htmlRes: 'Страница перехвата',
|
||||
|
||||
@@ -3235,6 +3235,7 @@ const message = {
|
||||
uninstallDeleteBackup: 'Uygulamayı Kaldır - Yedeği Sil',
|
||||
uninstallDeleteImage: 'Uygulamayı Kaldır - Görüntüyü Sil',
|
||||
upgradeBackup: 'Yükseltmeden Önce Uygulamayı Yedekle',
|
||||
upgradeDeleteImage: 'Uygulamayı Yükselt - Eski Görüntüyü Sil',
|
||||
installAllowPort: 'Uygulama kurulurken varsayılan olarak dış port erişimini aç',
|
||||
noAppHelper:
|
||||
'Uygulama tespit edilmedi, lütfen uygulama mağazası senkronizasyon günlüğünü görüntülemek için görev merkezine gidin',
|
||||
@@ -4774,6 +4775,7 @@ const message = {
|
||||
redisConfig: 'Redis Yapılandırması',
|
||||
redisHelper: 'Geçici olarak engellenen IP’leri sürdürmek için Redis’i etkinleştirin',
|
||||
wafHelper: 'WAF kapatıldığında tüm web siteleri korumayı kaybeder',
|
||||
websiteWafHelper: 'WAF kapatıldığında bu web sitesi korumayı kaybeder',
|
||||
attackIP: 'Saldıran IP',
|
||||
attackParam: 'Saldırı Detayları',
|
||||
execRule: 'Vurulan Kural',
|
||||
@@ -4800,6 +4802,7 @@ const message = {
|
||||
'İlk kullanım için başlatma gereklidir, web sitesi yapılandırma dosyası değiştirilecek ve mevcut WAF yapılandırması kaybolacaktır. Lütfen önceden OpenResty’yi yedeklediğinizden emin olun',
|
||||
initHelper: 'Başlatma işlemi mevcut WAF yapılandırmasını temizler. Başlatmak istediğinizden emin misiniz?',
|
||||
mainSwitch: 'Ana Anahtar',
|
||||
websiteSwitch: 'Anahtar',
|
||||
websiteAlert: 'Lütfen önce bir web sitesi oluşturun',
|
||||
defaultUrlBlack: 'URL Kuralları',
|
||||
htmlRes: 'Engelleme Sayfası',
|
||||
|
||||
@@ -2952,6 +2952,7 @@ const message = {
|
||||
uninstallDeleteBackup: '移除應用-刪除備份',
|
||||
uninstallDeleteImage: '移除應用-刪除映像',
|
||||
upgradeBackup: '應用升級前備份應用',
|
||||
upgradeDeleteImage: '升級應用-刪除舊映像',
|
||||
installAllowPort: '安裝應用預設開啟埠外部存取',
|
||||
noAppHelper: '未偵測到應用程式,請前往任務中心檢視應用商店同步日誌',
|
||||
isEdirWarn: '偵測到 docker-compose.yml 檔案被修改,請檢視對比',
|
||||
@@ -4385,6 +4386,7 @@ const message = {
|
||||
redisConfig: 'Redis 設定',
|
||||
redisHelper: '開啟 Redis 可以將暫時封鎖的 IP 持久化',
|
||||
wafHelper: '關閉之後所有網站將失去防護',
|
||||
websiteWafHelper: '關閉之後此網站將失去防護',
|
||||
attackIP: '攻擊 IP',
|
||||
attackParam: '攻擊訊息',
|
||||
execRule: '命中規則',
|
||||
@@ -4407,6 +4409,7 @@ const message = {
|
||||
initAlert: '首次使用需要初始化,會修改網站設定檔案,原有的 WAF 設定會遺失,請一定提前備份 OpenResty',
|
||||
initHelper: '初始化操作將清除現有的 WAF 設定,您確定要進行初始化嗎? ',
|
||||
mainSwitch: '總開關',
|
||||
websiteSwitch: '開關',
|
||||
websiteAlert: '請先建立網站',
|
||||
defaultUrlBlack: 'URL 規則',
|
||||
htmlRes: '攔截頁面',
|
||||
|
||||
@@ -2944,6 +2944,7 @@ const message = {
|
||||
uninstallDeleteBackup: '卸载应用-删除备份',
|
||||
uninstallDeleteImage: '卸载应用-删除镜像',
|
||||
upgradeBackup: '应用升级前备份应用',
|
||||
upgradeDeleteImage: '升级应用-删除旧镜像',
|
||||
installAllowPort: '安装应用默认打开端口外部访问',
|
||||
noAppHelper: '未检测到应用,请前往任务中心查看应用商店同步日志',
|
||||
isEdirWarn: '检测到 docker-compose.yml 文件被修改,请查看对比',
|
||||
@@ -3841,6 +3842,7 @@ const message = {
|
||||
redisConfig: 'Redis 配置',
|
||||
redisHelper: '开启 Redis 可以将临时拉黑的 IP 持久化',
|
||||
wafHelper: '关闭之后所有网站将失去防护',
|
||||
websiteWafHelper: '关闭之后此网站将失去防护',
|
||||
attackIP: '攻击 IP',
|
||||
attackParam: '攻击信息',
|
||||
execRule: '命中规则',
|
||||
@@ -3863,6 +3865,7 @@ const message = {
|
||||
initAlert: '首次使用需要初始化,会修改网站配置文件,原有的 WAF 配置会丢失,请一定提前备份 OpenResty',
|
||||
initHelper: '初始化操作将清除现有的 WAF 配置,您确定要进行初始化吗?',
|
||||
mainSwitch: '总开关',
|
||||
websiteSwitch: '开关',
|
||||
websiteAlert: '请先创建网站',
|
||||
defaultUrlBlack: 'URL 规则',
|
||||
htmlRes: '拦截页面',
|
||||
|
||||
@@ -65,6 +65,9 @@
|
||||
<el-checkbox v-model="operateReq.pullImage" :label="$t('app.pullImage')" size="large" />
|
||||
<span class="input-help">{{ $t('app.pullImageHelper') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item prop="deleteImage" v-if="operateReq.operate === 'upgrade'">
|
||||
<el-checkbox v-model="operateReq.deleteImage" :label="$t('app.upgradeDeleteImage')" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div v-if="operateReq.operate === 'upgrade'">
|
||||
<el-text type="danger" v-if="isEdit">{{ $t('app.isEdirWarn') }}</el-text>
|
||||
@@ -121,6 +124,7 @@ const operateReq = reactive({
|
||||
installId: 0,
|
||||
backup: true,
|
||||
pullImage: true,
|
||||
deleteImage: false,
|
||||
version: '',
|
||||
dockerCompose: '',
|
||||
taskID: '',
|
||||
@@ -188,16 +192,17 @@ const initData = async () => {
|
||||
useNewCompose.value = false;
|
||||
operateReq.backup = config.data.upgradeBackup == 'Enable';
|
||||
operateReq.pullImage = true;
|
||||
operateReq.deleteImage = config.data.upgradeDeleteImage == 'Enable';
|
||||
operateReq.dockerCompose = '';
|
||||
};
|
||||
|
||||
const acceptParams = (appInstall: App.AppInstallDto, op: string, opNode?: string) => {
|
||||
initData();
|
||||
if (opNode) {
|
||||
node.value = opNode;
|
||||
} else {
|
||||
node.value = currentNode.value;
|
||||
}
|
||||
initData();
|
||||
isEdit.value = appInstall.isEdit;
|
||||
currentVersion.value = appInstall.version;
|
||||
currentAppKey.value = appInstall.appKey;
|
||||
|
||||
@@ -42,6 +42,16 @@
|
||||
@change="updateConfig('UpgradeBackup', config.upgradeBackup)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('app.upgradeDeleteImage')" prop="upgradeDeleteImage">
|
||||
<el-switch
|
||||
v-permission
|
||||
v-model="config.upgradeDeleteImage"
|
||||
active-value="Enable"
|
||||
inactive-value="Disable"
|
||||
:loading="loading"
|
||||
@change="updateConfig('UpgradeDeleteImage', config.upgradeDeleteImage)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('app.installAllowPort')" prop="installAllowPort">
|
||||
<el-switch
|
||||
v-permission
|
||||
@@ -85,6 +95,7 @@ const config = ref({
|
||||
uninstallDeleteImage: '',
|
||||
uninstallDeleteBackup: '',
|
||||
upgradeBackup: '',
|
||||
upgradeDeleteImage: '',
|
||||
installAllowPort: '',
|
||||
});
|
||||
const loading = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user