Skip to content

Commit ff2e280

Browse files
committed
chore: Fix some internationalization content
1 parent d9a5418 commit ff2e280

File tree

5 files changed

+76
-31
lines changed

5 files changed

+76
-31
lines changed

agent/app/dto/firewall.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type RuleSearch struct {
1919
}
2020

2121
type FirewallOperation struct {
22-
Operation string `json:"operation" validate:"required,oneof=start stop restart disablePing enablePing"`
22+
Operation string `json:"operation" validate:"required,oneof=start stop restart disableBanPing enableBanPing"`
2323
WithDockerRestart bool `json:"withDockerRestart"`
2424
}
2525

agent/app/service/device_clean.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -687,11 +687,6 @@ func loadLogTree(fileOp fileUtils.FileOp) []dto.CleanTree {
687687
size2, _ := fileOp.GetDirSize(path2)
688688
treeData = append(treeData, dto.CleanTree{ID: uuid.NewString(), Label: "task_log", Size: uint64(size2), Children: list2, Type: "task_log"})
689689

690-
path3 := path.Join(global.Dir.TmpDir, "script")
691-
list3 := loadTreeWithAllFile(true, path3, "script", path3, fileOp)
692-
size3, _ := fileOp.GetDirSize(path3)
693-
treeData = append(treeData, dto.CleanTree{ID: uuid.NewString(), Label: "script", Size: uint64(size3), Children: list3, Type: "script", IsRecommend: true})
694-
695690
websiteLogList := loadWebsiteLogTree(fileOp)
696691
logTotalSize := uint64(0)
697692
for _, websiteLog := range websiteLogList {

agent/app/service/firewall.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ func (u *FirewallService) OperateFirewall(req dto.FirewallOperation) error {
201201
return err
202202
}
203203
needRestartDocker = true
204-
case "disablePing":
204+
case "disableBanPing":
205205
if err := firewall.UpdatePingStatus("0"); err != nil {
206206
_ = settingRepo.Update("BanPing", constant.StatusDisable)
207207
return err
208208
}
209209
return nil
210-
case "enablePing":
210+
case "enableBanPing":
211211
if err := firewall.UpdatePingStatus("1"); err != nil {
212212
_ = settingRepo.Update("BanPing", constant.StatusEnable)
213213
return err

core/cmd/server/docs/docs.go

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22560,6 +22560,12 @@ const docTemplate = `{
2256022560
},
2256122561
"dto.CleanData": {
2256222562
"properties": {
22563+
"backupClean": {
22564+
"items": {
22565+
"$ref": "#/definitions/dto.CleanTree"
22566+
},
22567+
"type": "array"
22568+
},
2256322569
"containerClean": {
2256422570
"items": {
2256522571
"$ref": "#/definitions/dto.CleanTree"
@@ -22821,10 +22827,7 @@ const docTemplate = `{
2282122827
"dto.ComposeCreate": {
2282222828
"properties": {
2282322829
"env": {
22824-
"items": {
22825-
"type": "string"
22826-
},
22827-
"type": "array"
22830+
"type": "string"
2282822831
},
2282922832
"file": {
2283022833
"type": "string"
@@ -22857,6 +22860,9 @@ const docTemplate = `{
2285722860
},
2285822861
"dto.ComposeLogClean": {
2285922862
"properties": {
22863+
"detailPath": {
22864+
"type": "string"
22865+
},
2286022866
"name": {
2286122867
"type": "string"
2286222868
},
@@ -22972,11 +22978,11 @@ const docTemplate = `{
2297222978
"content": {
2297322979
"type": "string"
2297422980
},
22981+
"detailPath": {
22982+
"type": "string"
22983+
},
2297522984
"env": {
22976-
"items": {
22977-
"type": "string"
22978-
},
22979-
"type": "array"
22985+
"type": "string"
2298022986
},
2298122987
"name": {
2298222988
"type": "string"
@@ -24591,8 +24597,8 @@ const docTemplate = `{
2459124597
"start",
2459224598
"stop",
2459324599
"restart",
24594-
"disablePing",
24595-
"enablePing"
24600+
"disableBanPing",
24601+
"enableBanPing"
2459624602
],
2459724603
"type": "string"
2459824604
},
@@ -25254,6 +25260,9 @@ const docTemplate = `{
2525425260
},
2525525261
"dto.InspectReq": {
2525625262
"properties": {
25263+
"detail": {
25264+
"type": "string"
25265+
},
2525725266
"id": {
2525825267
"type": "string"
2525925268
},
@@ -27541,7 +27550,8 @@ const docTemplate = `{
2754127550
"ssl": {
2754227551
"enum": [
2754327552
"Enable",
27544-
"Disable"
27553+
"Disable",
27554+
"Mux"
2754527555
],
2754627556
"type": "string"
2754727557
},
@@ -29048,6 +29058,9 @@ const docTemplate = `{
2904829058
"id": {
2904929059
"type": "integer"
2905029060
},
29061+
"isIP": {
29062+
"type": "boolean"
29063+
},
2905129064
"keyType": {
2905229065
"type": "string"
2905329066
},
@@ -29689,6 +29702,9 @@ const docTemplate = `{
2968929702
},
2969029703
"mountPoint": {
2969129704
"type": "string"
29705+
},
29706+
"noFail": {
29707+
"type": "boolean"
2969229708
}
2969329709
},
2969429710
"required": [
@@ -32179,6 +32195,9 @@ const docTemplate = `{
3217932195
"content": {
3218032196
"type": "string"
3218132197
},
32198+
"sync": {
32199+
"type": "boolean"
32200+
},
3218232201
"type": {
3218332202
"type": "string"
3218432203
}
@@ -32535,6 +32554,9 @@ const docTemplate = `{
3253532554
"id": {
3253632555
"type": "integer"
3253732556
},
32557+
"isIp": {
32558+
"type": "boolean"
32559+
},
3253832560
"keyType": {
3253932561
"type": "string"
3254032562
},
@@ -34692,6 +34714,9 @@ const docTemplate = `{
3469234714
"id": {
3469334715
"type": "integer"
3469434716
},
34717+
"isIP": {
34718+
"type": "boolean"
34719+
},
3469534720
"keyType": {
3469634721
"type": "string"
3469734722
},
@@ -34782,4 +34807,4 @@ var SwaggerInfo = &swag.Spec{
3478234807

3478334808
func init() {
3478434809
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
34785-
}
34810+
}

core/cmd/server/docs/swagger.json

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22556,6 +22556,12 @@
2255622556
},
2255722557
"dto.CleanData": {
2255822558
"properties": {
22559+
"backupClean": {
22560+
"items": {
22561+
"$ref": "#/definitions/dto.CleanTree"
22562+
},
22563+
"type": "array"
22564+
},
2255922565
"containerClean": {
2256022566
"items": {
2256122567
"$ref": "#/definitions/dto.CleanTree"
@@ -22817,10 +22823,7 @@
2281722823
"dto.ComposeCreate": {
2281822824
"properties": {
2281922825
"env": {
22820-
"items": {
22821-
"type": "string"
22822-
},
22823-
"type": "array"
22826+
"type": "string"
2282422827
},
2282522828
"file": {
2282622829
"type": "string"
@@ -22853,6 +22856,9 @@
2285322856
},
2285422857
"dto.ComposeLogClean": {
2285522858
"properties": {
22859+
"detailPath": {
22860+
"type": "string"
22861+
},
2285622862
"name": {
2285722863
"type": "string"
2285822864
},
@@ -22968,11 +22974,11 @@
2296822974
"content": {
2296922975
"type": "string"
2297022976
},
22977+
"detailPath": {
22978+
"type": "string"
22979+
},
2297122980
"env": {
22972-
"items": {
22973-
"type": "string"
22974-
},
22975-
"type": "array"
22981+
"type": "string"
2297622982
},
2297722983
"name": {
2297822984
"type": "string"
@@ -24587,8 +24593,8 @@
2458724593
"start",
2458824594
"stop",
2458924595
"restart",
24590-
"disablePing",
24591-
"enablePing"
24596+
"disableBanPing",
24597+
"enableBanPing"
2459224598
],
2459324599
"type": "string"
2459424600
},
@@ -25250,6 +25256,9 @@
2525025256
},
2525125257
"dto.InspectReq": {
2525225258
"properties": {
25259+
"detail": {
25260+
"type": "string"
25261+
},
2525325262
"id": {
2525425263
"type": "string"
2525525264
},
@@ -27537,7 +27546,8 @@
2753727546
"ssl": {
2753827547
"enum": [
2753927548
"Enable",
27540-
"Disable"
27549+
"Disable",
27550+
"Mux"
2754127551
],
2754227552
"type": "string"
2754327553
},
@@ -29044,6 +29054,9 @@
2904429054
"id": {
2904529055
"type": "integer"
2904629056
},
29057+
"isIP": {
29058+
"type": "boolean"
29059+
},
2904729060
"keyType": {
2904829061
"type": "string"
2904929062
},
@@ -29685,6 +29698,9 @@
2968529698
},
2968629699
"mountPoint": {
2968729700
"type": "string"
29701+
},
29702+
"noFail": {
29703+
"type": "boolean"
2968829704
}
2968929705
},
2969029706
"required": [
@@ -32175,6 +32191,9 @@
3217532191
"content": {
3217632192
"type": "string"
3217732193
},
32194+
"sync": {
32195+
"type": "boolean"
32196+
},
3217832197
"type": {
3217932198
"type": "string"
3218032199
}
@@ -32531,6 +32550,9 @@
3253132550
"id": {
3253232551
"type": "integer"
3253332552
},
32553+
"isIp": {
32554+
"type": "boolean"
32555+
},
3253432556
"keyType": {
3253532557
"type": "string"
3253632558
},
@@ -34688,6 +34710,9 @@
3468834710
"id": {
3468934711
"type": "integer"
3469034712
},
34713+
"isIP": {
34714+
"type": "boolean"
34715+
},
3469134716
"keyType": {
3469234717
"type": "string"
3469334718
},

0 commit comments

Comments
 (0)