mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
update view: add a note to encourage people to check the release note on the forum when there's a major yunohost upgrade before yoloupgrading
This commit is contained in:
parent
c4d68b7e66
commit
f7d7bcec2d
2 changed files with 16 additions and 7 deletions
|
@ -265,6 +265,7 @@
|
|||
"id": "ID",
|
||||
"ignore": "Ignore",
|
||||
"ignored": "{count} ignored",
|
||||
"important_yunohost_upgrade": "A major YunoHost upgrade is available. It is heavily recommended to carefully read the release note(s) on the forum before upgrading : <a href='https://forum.yunohost.org/tag/ynh_release'>Browse the release notes on the forum</a>",
|
||||
"infos": "Info",
|
||||
"install": "Install",
|
||||
"install_name": "Install {id}",
|
||||
|
|
|
@ -4,17 +4,22 @@
|
|||
skeleton="card-list-skeleton"
|
||||
>
|
||||
<!-- MIGRATIONS WARN -->
|
||||
<b-alert variant="warning" :show="migrationsNotDone">
|
||||
<b-alert variant="warning" :show="pendingMigrations">
|
||||
<icon iname="exclamation-triangle" /> <span v-html="$t('pending_migrations')" />
|
||||
</b-alert>
|
||||
|
||||
<!-- MAJOR YUNOHOST UPGRADE WARN -->
|
||||
<b-alert variant="warning" :show="importantYunohostUpgrade">
|
||||
<icon iname="exclamation-triangle" /> <span v-html="$t('important_yunohost_upgrade')" />
|
||||
</b-alert>
|
||||
|
||||
<!-- SYSTEM UPGRADE -->
|
||||
<card :title="$t('system')" icon="server" no-body>
|
||||
<b-list-group v-if="system" flush>
|
||||
<b-list-group-item v-for="{ name, current_version, new_version } in system" :key="name">
|
||||
<h5 class="m-0">
|
||||
{{ name }}
|
||||
<small>({{ $t('from_to', [current_version, new_version]) }})</small>
|
||||
<small class="text-secondary">({{ $t('from_to', [current_version, new_version]) }})</small>
|
||||
</h5>
|
||||
</b-list-group-item>
|
||||
</b-list-group>
|
||||
|
@ -73,21 +78,24 @@ export default {
|
|||
data () {
|
||||
return {
|
||||
queries: [
|
||||
['GET', 'migrations?pending'],
|
||||
['PUT', 'update/all', {}, 'update']
|
||||
],
|
||||
// API data
|
||||
migrationsNotDone: undefined,
|
||||
system: undefined,
|
||||
apps: undefined
|
||||
apps: undefined,
|
||||
importantYunohostUpgrade: undefined,
|
||||
pendingMigrations: undefined
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onQueriesResponse ({ migrations }, { apps, system }) {
|
||||
this.migrationsNotDone = migrations.length !== 0
|
||||
// eslint-disable-next-line camelcase
|
||||
onQueriesResponse ({ apps, system, important_yunohost_upgrade, pending_migrations }) {
|
||||
this.apps = apps.length ? apps : null
|
||||
this.system = system.length ? system : null
|
||||
// eslint-disable-next-line camelcase
|
||||
this.importantYunohostUpgrade = important_yunohost_upgrade
|
||||
this.pendingMigrations = pending_migrations.length !== 0
|
||||
},
|
||||
|
||||
async performUpgrade ({ type, id = null }) {
|
||||
|
|
Loading…
Add table
Reference in a new issue