feat: 已安装列表增加服务端口显示

This commit is contained in:
zhengkunwang223 2023-03-09 13:37:39 +08:00 committed by zhengkunwang223
parent 9a787640eb
commit 275dfc6904
6 changed files with 14 additions and 6 deletions

View File

@ -205,6 +205,7 @@ func updateInstall(installId uint, detailId uint) error {
}
install.DockerCompose = detail.DockerCompose
install.Version = detail.Version
install.AppDetailId = detailId
fileOp := files.NewFileOp()
if err := fileOp.WriteFile(install.GetComposePath(), strings.NewReader(install.DockerCompose), 0775); err != nil {

View File

@ -927,6 +927,8 @@ export default {
updatePrompt: 'The current application is the latest version',
installPrompt: 'No apps installed yet',
updateHelper: 'Updating parameters may cause the application to fail to start, please operate with caution',
updateWarn: 'Update parameters need to rebuild the application, continue? ',
busPort: 'Service Port',
},
website: {
website: 'Website',

View File

@ -937,6 +937,7 @@ export default {
installPrompt: '尚未安装任何应用',
updateHelper: '更新参数可能导致应用无法启动请提前备份并谨慎操作',
updateWarn: '更新参数需要重建应用是否继续',
busPort: '服务端口',
},
website: {
website: '网站',

View File

@ -75,6 +75,7 @@ let submitModel = ref<any>({});
let canEdit = ref(false);
const acceptParams = async (props: ParamProps) => {
canEdit.value = false;
submitModel.value.installId = props.id;
params.value = [];
paramData.value.id = props.id;

View File

@ -128,14 +128,17 @@
plain
round
size="small"
@click="openOperate(installed, 'update')"
@click="openOperate(installed, 'upgrade')"
v-if="mode === 'upgrade'"
>
{{ $t('app.update') }}
{{ $t('app.upgrade') }}
</el-button>
</div>
<div class="d-description">
<el-tag>{{ $t('app.version') }}{{ installed.version }}</el-tag>
<el-tag v-if="installed.httpPort > 0">
{{ $t('app.busPort') }}{{ installed.httpPort }}
</el-tag>
<div class="description">
<span>{{ $t('app.areadyRun') }} {{ getAge(installed.createdAt) }}</span>
</div>
@ -272,7 +275,7 @@ const search = () => {
const openOperate = (row: any, op: string) => {
operateReq.installId = row.id;
operateReq.operate = op;
if (op == 'update') {
if (op == 'upgrade') {
upgradeRef.value.acceptParams(row.id, row.name);
} else if (op == 'delete') {
AppInstalledDeleteCheck(row.id).then(async (res) => {

View File

@ -1,7 +1,7 @@
<template>
<el-drawer :close-on-click-modal="false" v-model="open" size="30%">
<template #header>
<Header :header="$t('app.update')" :resource="resourceName" :back="handleClose"></Header>
<Header :header="$t('app.upgrade')" :resource="resourceName" :back="handleClose"></Header>
</template>
<el-row>
<el-col :span="22" :offset="1">
@ -87,8 +87,8 @@ const operate = async () => {
const onOperate = async () => {
ElMessageBox.confirm(
i18n.global.t('app.operatorHelper', [i18n.global.t('app.update')]),
i18n.global.t('app.update'),
i18n.global.t('app.operatorHelper', [i18n.global.t('app.upgrade')]),
i18n.global.t('app.upgrade'),
{
confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'),