1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

feat: 限制已废弃应用升级和备份 (#1233)

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

View File

@ -474,6 +474,7 @@ func (a AppService) SyncAppListFromLocal() {
if app.Status == constant.AppTakeDown { if app.Status == constant.AppTakeDown {
installs, _ := appInstallRepo.ListBy(appInstallRepo.WithAppId(app.ID)) installs, _ := appInstallRepo.ListBy(appInstallRepo.WithAppId(app.ID))
if len(installs) > 0 { if len(installs) > 0 {
updateApps = append(updateApps, app)
continue continue
} }
deleteAppIds = append(deleteAppIds, app.ID) deleteAppIds = append(deleteAppIds, app.ID)

View File

@ -72,6 +72,7 @@
round round
size="small" size="small"
@click="getAppDetail(app.key)" @click="getAppDetail(app.key)"
:disabled="app.status === 'TakeDown'"
> >
{{ $t('app.install') }} {{ $t('app.install') }}
</el-button> </el-button>

View File

@ -133,7 +133,10 @@
plain plain
round round
size="small" size="small"
:disabled="installed.status !== 'Running'" :disabled="
installed.status !== 'Running' ||
installed.app.status === 'TakeDown'
"
@click="openUploads(installed.app.key, installed.name)" @click="openUploads(installed.app.key, installed.name)"
v-if="mode === 'installed'" v-if="mode === 'installed'"
> >
@ -145,7 +148,10 @@
plain plain
round round
size="small" size="small"
:disabled="installed.status !== 'Running'" :disabled="
installed.status !== 'Running' ||
installed.app.status === 'TakeDown'
"
@click="openBackups(installed.app.key, installed.name)" @click="openBackups(installed.app.key, installed.name)"
v-if="mode === 'installed'" v-if="mode === 'installed'"
> >
@ -157,7 +163,10 @@
plain plain
round round
size="small" size="small"
:disabled="installed.status !== 'Running'" :disabled="
installed.status !== 'Running' ||
installed.app.status === 'TakeDown'
"
@click="openOperate(installed, 'upgrade')" @click="openOperate(installed, 'upgrade')"
v-if="mode === 'upgrade'" v-if="mode === 'upgrade'"
> >