mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
fix: 解决运行环境版本与已安装应用版本不一致的问题 (#980)
Closes https://github.com/1Panel-dev/1Panel/issues/978
This commit is contained in:
parent
8ddaa26a57
commit
27cc3bcccd
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-drawer :close-on-click-modal="false" v-model="open" size="50%">
|
<el-drawer :close-on-click-modal="false" v-model="open" size="50%">
|
||||||
<template #header>
|
<template #header>
|
||||||
<DrawerHeader :header="$t('runtime.' + mode)" :back="handleClose" />
|
<DrawerHeader :header="$t('runtime.' + mode)" :resource="runtime.name" :back="handleClose" />
|
||||||
</template>
|
</template>
|
||||||
<el-row v-loading="loading">
|
<el-row v-loading="loading">
|
||||||
<el-col :span="22" :offset="1">
|
<el-col :span="22" :offset="1">
|
||||||
@ -48,7 +48,11 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-select v-model="runtime.version" :disabled="mode === 'edit'">
|
<el-select
|
||||||
|
v-model="runtime.version"
|
||||||
|
:disabled="mode === 'edit'"
|
||||||
|
@change="changeVersion()"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(version, index) in appVersions"
|
v-for="(version, index) in appVersions"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -207,6 +211,16 @@ const changeApp = (appId: number) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const changeVersion = () => {
|
||||||
|
initParam.value = false;
|
||||||
|
GetAppDetail(runtime.value.appId, runtime.value.version, 'runtime').then((res) => {
|
||||||
|
runtime.value.appDetailId = res.data.id;
|
||||||
|
runtime.value.image = res.data.image + ':' + runtime.value.version;
|
||||||
|
appParams.value = res.data.params;
|
||||||
|
initParam.value = true;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const getApp = (appkey: string, mode: string) => {
|
const getApp = (appkey: string, mode: string) => {
|
||||||
GetApp(appkey).then((res) => {
|
GetApp(appkey).then((res) => {
|
||||||
appVersions.value = res.data.versions || [];
|
appVersions.value = res.data.versions || [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user