Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 951ab25

Browse files
fix: Resolve the issue of ignoring MySQL failures (1Panel-dev#9734)
Refs 1Panel-dev#9718
1 parent 0316cb0 commit 951ab25

File tree

5 files changed

+25
-28
lines changed

5 files changed

+25
-28
lines changed

‎agent/app/dto/response/app_ignore_upgrade.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ type AppIgnoreUpgradeDTO struct {
66
AppDetailID uint `json:"appDetailID"`
77
Scope string `json:"scope"`
88
Version string `json:"version"`
9-
Icon string `json:"icon"`
9+
Name string `json:"name"`
1010
}

‎agent/app/service/app_ingore_upgrade.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (a AppIgnoreUpgradeService) List() ([]response.AppIgnoreUpgradeDTO, error)
4040
_ = appIgnoreUpgradeRepo.Delete(repo.WithByID(ignore.ID))
4141
continue
4242
}
43-
dto.Icon = app.Icon
43+
dto.Name = app.Name
4444
if ignore.Scope == "version" {
4545
appDetail, err := appDetailRepo.GetFirst(repo.WithByID(ignore.AppDetailID))
4646
if errors.Is(err, gorm.ErrRecordNotFound) {

‎agent/app/service/app_utils.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,10 @@ func ignoreUpdate(installed model.AppInstall) bool {
17641764
if installed.App.Type == "php" || installed.Status == constant.StatusInstalling {
17651765
return true
17661766
}
1767+
ignores, _ := appIgnoreUpgradeRepo.List(appDetailRepo.WithAppId(installed.AppId), appIgnoreUpgradeRepo.WithScope("all"))
1768+
if len(ignores) > 0 {
1769+
return true
1770+
}
17671771
if installed.App.Key == constant.AppMysql {
17681772
majorVersion := getMajorVersion(installed.Version)
17691773
appDetails, _ := appDetailRepo.GetBy(appDetailRepo.WithAppId(installed.App.ID))
@@ -1774,8 +1778,7 @@ func ignoreUpdate(installed model.AppInstall) bool {
17741778
}
17751779
return true
17761780
}
1777-
ignores, _ := appIgnoreUpgradeRepo.List(appDetailRepo.WithAppId(installed.AppId), appIgnoreUpgradeRepo.WithScope("all"))
1778-
return len(ignores) > 0
1781+
return false
17791782
}
17801783

17811784
func RequestDownloadCallBack(downloadCallBackUrl string) {

‎frontend/src/api/interface/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export namespace App {
282282
name: string;
283283
detailID: number;
284284
version: string;
285-
icon: string;
285+
scope: string;
286286
}
287287

288288
export interface AppUpdateVersionReq {

‎frontend/src/views/app-store/installed/ignore/index.vue

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
11
<template>
22
<DrawerPro v-model="open" :header="$t('app.ignoreList')" @close="handleClose" size="small">
33
<template #content>
4-
<el-row :gutter="5">
5-
<el-col v-for="(app, index) in apps" :key="index">
6-
<el-card class="app-margin">
7-
<el-row :gutter="20">
8-
<el-col :span="6">
9-
<el-avatar shape="square" :size="60" :src="'data:image/png;base64,' + app.icon" />
10-
</el-col>
11-
<el-col :span="12">
12-
<span>{{ app.name }}</span>
13-
<div>
14-
<el-tag v-if="app.version != ''">{{ app.version }}</el-tag>
15-
<el-tag v-else>{{ $t('commons.table.all') + $t('app.version') }}</el-tag>
16-
</div>
17-
</el-col>
18-
<el-col :span="6">
19-
<el-button type="primary" link @click="cancelIgnore(app.ID)">
20-
{{ $t('app.cancelIgnore') }}
21-
</el-button>
22-
</el-col>
23-
</el-row>
24-
</el-card>
25-
</el-col>
26-
</el-row>
4+
<el-table :data="apps">
5+
<el-table-column prop="name" :label="$t('app.app')" />
6+
<el-table-column prop="scope" :label="$t('license.trialInfo')">
7+
<template #default="{ row }">
8+
<el-tag v-if="row.version != ''">{{ row.version }}</el-tag>
9+
<el-tag v-else>{{ $t('commons.table.all') + $t('app.version') }}</el-tag>
10+
</template>
11+
</el-table-column>
12+
<el-table-column prop="scope" :label="$t('commons.table.operate')">
13+
<template #default="{ row }">
14+
<el-button type="primary" link @click="cancelIgnore(row.ID)">
15+
{{ $t('app.cancelIgnore') }}
16+
</el-button>
17+
</template>
18+
</el-table-column>
19+
</el-table>
2720
</template>
2821
<template #footer>
2922
<span class="dialog-footer">
@@ -58,6 +51,7 @@ const getApps = async () => {
5851
try {
5952
const res = await getIgnoredApp();
6053
apps.value = res.data;
54+
console.log(apps.value);
6155
} catch (error) {}
6256
};
6357

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /