Add a tip about pending migrations on update view

This commit is contained in:
Alexandre Aubin 2020-06-04 18:13:50 +02:00
parent b3bbd15033
commit 7bf9669a4e
3 changed files with 10 additions and 0 deletions

View file

@ -50,6 +50,8 @@
// System update & upgrade
app.get('#/update', function (c) {
c.api('PUT', '/update', {}, function(data) {
c.api('GET', '/migrations?pending', {}, function(pending_migrations) {
data.pending_migrations = pending_migrations.migrations;
c.view('tools/tools_update', data, function() {
// Configure buttons behaviors
$("button[data-upgrade]").on("click", function() {
@ -85,6 +87,7 @@
});
});
});
});
// Display journals list
app.get('#/tools/logs', function (c) {

View file

@ -228,6 +228,7 @@
"logs_share_with_yunopaste": "Share with YunoPaste",
"logs_more": "Display more lines",
"path_url": "Path",
"pending_migrations": "There are some pending migrations waiting to be ran. Please go to the <a href='#/tools/migrations'>Tools > Migrations</a> view to run them.",
"port": "Port",
"ports": "Ports",
"postinstall": "Post-installation",

View file

@ -5,6 +5,12 @@
<div class="separator"></div>
{{#if pending_migrations}}
<div class="alert alert-warning">
{{t 'pending_migrations' "#/tools/migrations"}}
</div>
{{/if}}
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title"><span class="fa-fw fa-server"></span> {{t 'system'}}</h2>