mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
feat(runtime): correct typo in variable name (#7172)
This commit is contained in:
parent
38d1cac5d9
commit
52f7df0350
@ -83,7 +83,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
|
||||
if exist != nil {
|
||||
return nil, buserr.New(constant.ErrImageExist)
|
||||
}
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
|
||||
if !fileOp.Stat(create.CodeDir) {
|
||||
return nil, buserr.New(constant.ErrPathNotFound)
|
||||
}
|
||||
@ -133,7 +133,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
|
||||
if err = handlePHP(create, runtime, fileOp, appVersionDir); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
|
||||
runtime.Port = create.Port
|
||||
if err = handleNodeAndJava(create, runtime, fileOp, appVersionDir); err != nil {
|
||||
return nil, err
|
||||
@ -217,7 +217,7 @@ func (r *RuntimeService) Delete(runtimeDelete request.RuntimeDelete) error {
|
||||
global.LOG.Errorf("delete image id [%s] error %v", imageID, err)
|
||||
}
|
||||
}
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
|
||||
if out, err := compose.Down(runtime.GetComposePath()); err != nil && !runtimeDelete.ForceDelete {
|
||||
if out != "" {
|
||||
return errors.New(out)
|
||||
@ -300,7 +300,7 @@ func (r *RuntimeService) Get(id uint) (*response.RuntimeDTO, error) {
|
||||
}
|
||||
}
|
||||
res.AppParams = appParams
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
|
||||
res.Params = make(map[string]interface{})
|
||||
envs, err := gotenv.Unmarshal(runtime.Env)
|
||||
if err != nil {
|
||||
@ -361,7 +361,7 @@ func (r *RuntimeService) Update(req request.RuntimeUpdate) error {
|
||||
if exist != nil {
|
||||
return buserr.New(constant.ErrImageExist)
|
||||
}
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
|
||||
if runtime.Port != req.Port {
|
||||
if err = checkPortExist(req.Port); err != nil {
|
||||
return err
|
||||
@ -441,7 +441,7 @@ func (r *RuntimeService) Update(req request.RuntimeUpdate) error {
|
||||
return err
|
||||
}
|
||||
go buildRuntime(runtime, imageID, req.Rebuild)
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
|
||||
runtime.Version = req.Version
|
||||
runtime.CodeDir = req.CodeDir
|
||||
runtime.Port = req.Port
|
||||
|
@ -354,9 +354,9 @@ func handleParams(create request.RuntimeCreate, projectDir string) (composeConte
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
case constant.RuntimeDoNet:
|
||||
case constant.RuntimeDotNet:
|
||||
create.Params["CODE_DIR"] = create.CodeDir
|
||||
create.Params["DONET_VERSION"] = create.Version
|
||||
create.Params["DOTNET_VERSION"] = create.Version
|
||||
create.Params["PANEL_APP_PORT_HTTP"] = create.Port
|
||||
composeContent, err = handleCompose(env, composeContent, create, projectDir)
|
||||
if err != nil {
|
||||
@ -408,7 +408,7 @@ func handleCompose(env gotenv.Env, composeContent []byte, create request.Runtime
|
||||
ports = append(ports, "${HOST_IP}:${PANEL_APP_PORT_HTTP}:${JAVA_APP_PORT}")
|
||||
case constant.RuntimeGo:
|
||||
ports = append(ports, "${HOST_IP}:${PANEL_APP_PORT_HTTP}:${GO_APP_PORT}")
|
||||
case constant.RuntimePython, constant.RuntimeDoNet:
|
||||
case constant.RuntimePython, constant.RuntimeDotNet:
|
||||
ports = append(ports, "${HOST_IP}:${PANEL_APP_PORT_HTTP}:${APP_PORT}")
|
||||
}
|
||||
|
||||
|
@ -352,7 +352,7 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
|
||||
}
|
||||
website.Proxy = proxy
|
||||
}
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
|
||||
website.Proxy = fmt.Sprintf("127.0.0.1:%d", runtime.Port)
|
||||
}
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ func configDefaultNginx(website *model.Website, domains []model.WebsiteDomain, a
|
||||
server.UpdateRoot(rootIndex)
|
||||
server.UpdatePHPProxy([]string{website.Proxy}, "")
|
||||
}
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDoNet:
|
||||
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
|
||||
proxy := fmt.Sprintf("http://127.0.0.1:%d", runtime.Port)
|
||||
server.UpdateRootProxy([]string{proxy})
|
||||
}
|
||||
|
@ -96,10 +96,9 @@ var WebUrlMap = map[string]struct{}{
|
||||
"/websites/runtimes/php": {},
|
||||
"/websites/runtimes/node": {},
|
||||
"/websites/runtimes/java": {},
|
||||
"/websites/runtimes/net": {},
|
||||
"/websites/runtimes/go": {},
|
||||
"/websites/runtimes/python": {},
|
||||
"/websites/runtimes/donet": {},
|
||||
"/websites/runtimes/dotnet": {},
|
||||
|
||||
"/login": {},
|
||||
|
||||
|
@ -19,7 +19,7 @@ const (
|
||||
RuntimeJava = "java"
|
||||
RuntimeGo = "go"
|
||||
RuntimePython = "python"
|
||||
RuntimeDoNet = "donet"
|
||||
RuntimeDotNet = "dotnet"
|
||||
|
||||
RuntimeProxyUnix = "unix"
|
||||
RuntimeProxyTcp = "tcp"
|
||||
|
@ -2428,7 +2428,7 @@ const message = {
|
||||
goDirHelper: 'The directory must contain go files or binary files, subdirectories are also acceptable',
|
||||
pythonHelper:
|
||||
'Please fill in the complete startup command, for example: pip install -r requirements.txt && python manage.py runserver 0.0.0.0:5000',
|
||||
donetHelper: 'Please fill in the complete startup comman, for example: dotnet MyWebApp.dll',
|
||||
dotnetHelper: 'Please fill in the complete startup comman, for example: dotnet MyWebApp.dll',
|
||||
},
|
||||
process: {
|
||||
pid: 'Process ID',
|
||||
|
@ -2247,7 +2247,7 @@ const message = {
|
||||
goDirHelper: '目錄中要包含 go 文件或者二進制文件,子目錄中包含也可',
|
||||
pythonHelper:
|
||||
'請填入完整啟動指令,例如:pip install -r requirements.txt && python manage.py runserver 0.0.0.0:5000',
|
||||
donetHelper: '請填入完整啟動指令,例如 dotnet MyWebApp.dll',
|
||||
dotnetHelper: '請填入完整啟動指令,例如 dotnet MyWebApp.dll',
|
||||
},
|
||||
process: {
|
||||
pid: '進程ID',
|
||||
|
@ -2249,7 +2249,7 @@ const message = {
|
||||
goDirHelper: '目录中要包含 go 文件或者二进制文件,子目录中包含也可',
|
||||
pythonHelper:
|
||||
'请填写完整启动命令,例如:pip install -r requirements.txt && python manage.py runserver 0.0.0.0:5000',
|
||||
donetHelper: '请填写完整启动命令,例如 dotnet MyWebApp.dll',
|
||||
dotnetHelper: '请填写完整启动命令,例如 dotnet MyWebApp.dll',
|
||||
},
|
||||
process: {
|
||||
pid: '进程ID',
|
||||
|
@ -89,10 +89,10 @@ const webSiteRouter = {
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/websites/runtimes/donet',
|
||||
name: 'doNet',
|
||||
path: '/websites/runtimes/dotnet',
|
||||
name: 'dotNet',
|
||||
hidden: true,
|
||||
component: () => import('@/views/website/runtime/donet/index.vue'),
|
||||
component: () => import('@/views/website/runtime/dotnet/index.vue'),
|
||||
meta: {
|
||||
activeMenu: '/websites/runtimes/php',
|
||||
requiresAuth: false,
|
||||
|
@ -237,7 +237,7 @@ const openInstall = (app: App.App) => {
|
||||
case 'java':
|
||||
case 'go':
|
||||
case 'python':
|
||||
case 'donet':
|
||||
case 'dotnet':
|
||||
router.push({ path: '/websites/runtimes/' + app.type });
|
||||
break;
|
||||
default:
|
||||
|
@ -146,7 +146,7 @@ const openInstall = () => {
|
||||
case 'java':
|
||||
case 'go':
|
||||
case 'python':
|
||||
case 'donet':
|
||||
case 'dotnet':
|
||||
router.push({ path: '/websites/runtimes/' + app.value.type });
|
||||
break;
|
||||
default:
|
||||
|
@ -71,7 +71,7 @@ const goInstall = (key: string, type: string) => {
|
||||
case 'java':
|
||||
case 'go':
|
||||
case 'python':
|
||||
case 'donet':
|
||||
case 'dotnet':
|
||||
router.push({ path: '/websites/runtimes/' + type });
|
||||
break;
|
||||
default:
|
||||
|
@ -95,7 +95,7 @@
|
||||
</ComplexTable>
|
||||
</template>
|
||||
</LayoutContent>
|
||||
<OperateDonet ref="operateRef" @close="search" />
|
||||
<OperateDotnet ref="operateRef" @close="search" />
|
||||
<Delete ref="deleteRef" @close="search" />
|
||||
<ComposeLogs ref="composeLogRef" />
|
||||
<PortJumpDialog ref="dialogPortJumpRef" />
|
||||
@ -108,7 +108,7 @@ import { onMounted, onUnmounted, reactive, ref, computed } from 'vue';
|
||||
import { Runtime } from '@/api/interface/runtime';
|
||||
import { OperateRuntime, RuntimeDeleteCheck, SearchRuntimes, SyncRuntime } from '@/api/modules/runtime';
|
||||
import { dateFormat } from '@/utils/util';
|
||||
import OperateDonet from '@/views/website/runtime/donet/operate/index.vue';
|
||||
import OperateDotnet from '@/views/website/runtime/dotnet/operate/index.vue';
|
||||
import Status from '@/components/status/index.vue';
|
||||
import Delete from '@/views/website/runtime/delete/index.vue';
|
||||
import i18n from '@/lang';
|
||||
@ -147,7 +147,7 @@ const req = reactive<Runtime.RuntimeReq>({
|
||||
name: '',
|
||||
page: 1,
|
||||
pageSize: 40,
|
||||
type: 'donet',
|
||||
type: 'dotnet',
|
||||
});
|
||||
const buttons = [
|
||||
{
|
||||
@ -213,7 +213,7 @@ const sync = () => {
|
||||
};
|
||||
|
||||
const openCreate = () => {
|
||||
operateRef.value.acceptParams({ type: 'donet', mode: 'create' });
|
||||
operateRef.value.acceptParams({ type: 'dotnet', mode: 'create' });
|
||||
};
|
||||
|
||||
const openDetail = (row: Runtime.Runtime) => {
|
@ -76,7 +76,7 @@
|
||||
<el-form-item :label="$t('runtime.runScript')" prop="params.EXEC_SCRIPT">
|
||||
<el-input v-model="runtime.params['EXEC_SCRIPT']"></el-input>
|
||||
<span class="input-help">
|
||||
{{ $t('runtime.donetHelper') }}
|
||||
{{ $t('runtime.dotnetHelper') }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-row :gutter="20">
|
||||
@ -174,7 +174,7 @@ const mode = ref('create');
|
||||
const editParams = ref<App.InstallParams[]>();
|
||||
const appVersions = ref<string[]>([]);
|
||||
const appReq = reactive({
|
||||
type: 'donet',
|
||||
type: 'dotnet',
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
resource: 'remote',
|
||||
@ -193,7 +193,7 @@ const initData = (type: string) => ({
|
||||
port: 8080,
|
||||
exposedPorts: [],
|
||||
});
|
||||
let runtime = reactive<Runtime.RuntimeCreate>(initData('donet'));
|
||||
let runtime = reactive<Runtime.RuntimeCreate>(initData('dotnet'));
|
||||
const rules = ref<any>({
|
||||
name: [Rules.requiredInput, Rules.appName],
|
||||
appID: [Rules.requiredSelect],
|
@ -31,7 +31,7 @@ const buttons = [
|
||||
},
|
||||
{
|
||||
label: '.NET',
|
||||
path: '/websites/runtimes/donet',
|
||||
path: '/websites/runtimes/dotnet',
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user