feat: 增加一些提示信息 (#1234)

This commit is contained in:
zhengkunwang223 2023-06-02 14:31:19 +08:00 committed by GitHub
parent 9a45ce3110
commit a8b7c3d8c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 1 deletions

View File

@ -10,6 +10,13 @@ WEB_PATH=$(BASE_PAH)/frontend
SERVER_PATH=$(BASE_PAH)/backend SERVER_PATH=$(BASE_PAH)/backend
MAIN= $(BASE_PAH)/cmd/server/main.go MAIN= $(BASE_PAH)/cmd/server/main.go
APP_NAME=1panel APP_NAME=1panel
ASSERT_PATH= $(BASE_PAH)/cmd/server/web/asserts
clean_asserts:
rm -rf $(ASSERT_PATH)
upx_bin:
upx $(BUILD_PATH)/$(APP_NAME)
build_frontend: build_frontend:
cd $(WEB_PATH) && npm install && npm run build:dev cd $(WEB_PATH) && npm install && npm run build:dev

View File

@ -812,7 +812,7 @@ func (a AppService) SyncAppListFromRemote() error {
} else { } else {
if d.Status == constant.AppTakeDown { if d.Status == constant.AppTakeDown {
runtime, _ := runtimeRepo.GetFirst(runtimeRepo.WithDetailId(d.ID)) runtime, _ := runtimeRepo.GetFirst(runtimeRepo.WithDetailId(d.ID))
if runtime.ID > 0 { if runtime != nil {
continue continue
} }
deleteDetails = append(deleteDetails, d) deleteDetails = append(deleteDetails, d)

View File

@ -1176,6 +1176,8 @@ const message = {
takeDown: 'TakeDown', takeDown: 'TakeDown',
allReadyInstalled: 'Installed', allReadyInstalled: 'Installed',
installHelper: 'Configuring image acceleration can solve the problem of image pull failure', installHelper: 'Configuring image acceleration can solve the problem of image pull failure',
upgradeHelper:
'If the upgrade fails or the abnormal application needs to be synchronized to the normal state first',
}, },
website: { website: {
website: 'Website', website: 'Website',

View File

@ -1156,6 +1156,7 @@ const message = {
takeDown: '已废弃', takeDown: '已废弃',
allReadyInstalled: '已安装', allReadyInstalled: '已安装',
installHelper: '配置镜像加速可以解决镜像拉取失败的问题', installHelper: '配置镜像加速可以解决镜像拉取失败的问题',
upgradeHelper: '升级失败或者异常应用需要先同步到正常状态',
}, },
website: { website: {
website: '网站', website: '网站',

View File

@ -64,6 +64,11 @@
</span> </span>
</template> </template>
</el-alert> </el-alert>
<el-alert type="info" :closable="false" v-if="mode === 'upgrade'">
<template #default>
<span>{{ $t('app.upgradeHelper') }}</span>
</template>
</el-alert>
<div class="update-prompt" v-if="data == null"> <div class="update-prompt" v-if="data == null">
<span>{{ mode === 'upgrade' ? $t('app.updatePrompt') : $t('app.installPrompt') }}</span> <span>{{ mode === 'upgrade' ? $t('app.updatePrompt') : $t('app.installPrompt') }}</span>
<div> <div>