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 {
installs, _ := appInstallRepo.ListBy(appInstallRepo.WithAppId(app.ID))
if len(installs) > 0 {
updateApps = append(updateApps, app)
continue
}
deleteAppIds = append(deleteAppIds, app.ID)

View File

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

View File

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