Skip to content

Commit 52f7df0

Browse files
feat(runtime): correct typo in variable name (#7172)
1 parent 38d1cac commit 52f7df0

File tree

16 files changed

+30
-31
lines changed

16 files changed

+30
-31
lines changed

backend/app/service/runtime.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
8383
if exist != nil {
8484
return nil, buserr.New(constant.ErrImageExist)
8585
}
86-
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
86+
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
8787
if !fileOp.Stat(create.CodeDir) {
8888
return nil, buserr.New(constant.ErrPathNotFound)
8989
}
@@ -133,7 +133,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
133133
if err = handlePHP(create, runtime, fileOp, appVersionDir); err != nil {
134134
return nil, err
135135
}
136-
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
136+
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
137137
runtime.Port = create.Port
138138
if err = handleNodeAndJava(create, runtime, fileOp, appVersionDir); err != nil {
139139
return nil, err
@@ -217,7 +217,7 @@ func (r *RuntimeService) Delete(runtimeDelete request.RuntimeDelete) error {
217217
global.LOG.Errorf("delete image id [%s] error %v", imageID, err)
218218
}
219219
}
220-
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
220+
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
221221
if out, err := compose.Down(runtime.GetComposePath()); err != nil && !runtimeDelete.ForceDelete {
222222
if out != "" {
223223
return errors.New(out)
@@ -300,7 +300,7 @@ func (r *RuntimeService) Get(id uint) (*response.RuntimeDTO, error) {
300300
}
301301
}
302302
res.AppParams = appParams
303-
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
303+
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
304304
res.Params = make(map[string]interface{})
305305
envs, err := gotenv.Unmarshal(runtime.Env)
306306
if err != nil {
@@ -361,7 +361,7 @@ func (r *RuntimeService) Update(req request.RuntimeUpdate) error {
361361
if exist != nil {
362362
return buserr.New(constant.ErrImageExist)
363363
}
364-
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
364+
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
365365
if runtime.Port != req.Port {
366366
if err = checkPortExist(req.Port); err != nil {
367367
return err
@@ -441,7 +441,7 @@ func (r *RuntimeService) Update(req request.RuntimeUpdate) error {
441441
return err
442442
}
443443
go buildRuntime(runtime, imageID, req.Rebuild)
444-
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
444+
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
445445
runtime.Version = req.Version
446446
runtime.CodeDir = req.CodeDir
447447
runtime.Port = req.Port

backend/app/service/runtime_utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,9 @@ func handleParams(create request.RuntimeCreate, projectDir string) (composeConte
354354
if err != nil {
355355
return
356356
}
357-
case constant.RuntimeDoNet:
357+
case constant.RuntimeDotNet:
358358
create.Params["CODE_DIR"] = create.CodeDir
359-
create.Params["DONET_VERSION"] = create.Version
359+
create.Params["DOTNET_VERSION"] = create.Version
360360
create.Params["PANEL_APP_PORT_HTTP"] = create.Port
361361
composeContent, err = handleCompose(env, composeContent, create, projectDir)
362362
if err != nil {
@@ -408,7 +408,7 @@ func handleCompose(env gotenv.Env, composeContent []byte, create request.Runtime
408408
ports = append(ports, "${HOST_IP}:${PANEL_APP_PORT_HTTP}:${JAVA_APP_PORT}")
409409
case constant.RuntimeGo:
410410
ports = append(ports, "${HOST_IP}:${PANEL_APP_PORT_HTTP}:${GO_APP_PORT}")
411-
case constant.RuntimePython, constant.RuntimeDoNet:
411+
case constant.RuntimePython, constant.RuntimeDotNet:
412412
ports = append(ports, "${HOST_IP}:${PANEL_APP_PORT_HTTP}:${APP_PORT}")
413413
}
414414

backend/app/service/website.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
352352
}
353353
website.Proxy = proxy
354354
}
355-
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
355+
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
356356
website.Proxy = fmt.Sprintf("127.0.0.1:%d", runtime.Port)
357357
}
358358
}

backend/app/service/website_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func configDefaultNginx(website *model.Website, domains []model.WebsiteDomain, a
277277
server.UpdateRoot(rootIndex)
278278
server.UpdatePHPProxy([]string{website.Proxy}, "")
279279
}
280-
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
280+
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
281281
proxy := fmt.Sprintf("http://127.0.0.1:%d", runtime.Port)
282282
server.UpdateRootProxy([]string{proxy})
283283
}

backend/constant/common.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,9 @@ var WebUrlMap = map[string]struct{}{
9696
"/websites/runtimes/php": {},
9797
"/websites/runtimes/node": {},
9898
"/websites/runtimes/java": {},
99-
"/websites/runtimes/net": {},
10099
"/websites/runtimes/go": {},
101100
"/websites/runtimes/python": {},
102-
"/websites/runtimes/donet": {},
101+
"/websites/runtimes/dotnet": {},
103102

104103
"/login": {},
105104

backend/constant/runtime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const (
1919
RuntimeJava = "java"
2020
RuntimeGo = "go"
2121
RuntimePython = "python"
22-
RuntimeDoNet = "donet"
22+
RuntimeDotNet = "dotnet"
2323

2424
RuntimeProxyUnix = "unix"
2525
RuntimeProxyTcp = "tcp"

frontend/src/lang/modules/en.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2428,7 +2428,7 @@ const message = {
24282428
goDirHelper: 'The directory must contain go files or binary files, subdirectories are also acceptable',
24292429
pythonHelper:
24302430
'Please fill in the complete startup command, for example: pip install -r requirements.txt && python manage.py runserver 0.0.0.0:5000',
2431-
donetHelper: 'Please fill in the complete startup comman, for example: dotnet MyWebApp.dll',
2431+
dotnetHelper: 'Please fill in the complete startup comman, for example: dotnet MyWebApp.dll',
24322432
},
24332433
process: {
24342434
pid: 'Process ID',

frontend/src/lang/modules/tw.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,7 @@ const message = {
22472247
goDirHelper: '目錄中要包含 go 文件或者二進制文件,子目錄中包含也可',
22482248
pythonHelper:
22492249
'請填入完整啟動指令,例如:pip install -r requirements.txt && python manage.py runserver 0.0.0.0:5000',
2250-
donetHelper: '請填入完整啟動指令,例如 dotnet MyWebApp.dll',
2250+
dotnetHelper: '請填入完整啟動指令,例如 dotnet MyWebApp.dll',
22512251
},
22522252
process: {
22532253
pid: '進程ID',

frontend/src/lang/modules/zh.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2249,7 +2249,7 @@ const message = {
22492249
goDirHelper: '目录中要包含 go 文件或者二进制文件,子目录中包含也可',
22502250
pythonHelper:
22512251
'请填写完整启动命令,例如:pip install -r requirements.txt && python manage.py runserver 0.0.0.0:5000',
2252-
donetHelper: '请填写完整启动命令,例如 dotnet MyWebApp.dll',
2252+
dotnetHelper: '请填写完整启动命令,例如 dotnet MyWebApp.dll',
22532253
},
22542254
process: {
22552255
pid: '进程ID',

frontend/src/routers/modules/website.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ const webSiteRouter = {
8989
},
9090
},
9191
{
92-
path: '/websites/runtimes/donet',
93-
name: 'doNet',
92+
path: '/websites/runtimes/dotnet',
93+
name: 'dotNet',
9494
hidden: true,
95-
component: () => import('@/views/website/runtime/donet/index.vue'),
95+
component: () => import('@/views/website/runtime/dotnet/index.vue'),
9696
meta: {
9797
activeMenu: '/websites/runtimes/php',
9898
requiresAuth: false,

0 commit comments

Comments
 (0)