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 // System update & upgrade
app.get('#/update', function (c) { app.get('#/update', function (c) {
c.api('PUT', '/update', {}, function(data) { 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() { c.view('tools/tools_update', data, function() {
// Configure buttons behaviors // Configure buttons behaviors
$("button[data-upgrade]").on("click", function() { $("button[data-upgrade]").on("click", function() {
@ -84,6 +86,7 @@
}); });
}); });
}); });
});
}); });
// Display journals list // Display journals list

View file

@ -228,6 +228,7 @@
"logs_share_with_yunopaste": "Share with YunoPaste", "logs_share_with_yunopaste": "Share with YunoPaste",
"logs_more": "Display more lines", "logs_more": "Display more lines",
"path_url": "Path", "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", "port": "Port",
"ports": "Ports", "ports": "Ports",
"postinstall": "Post-installation", "postinstall": "Post-installation",

View file

@ -5,6 +5,12 @@
<div class="separator"></div> <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 panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h2 class="panel-title"><span class="fa-fw fa-server"></span> {{t 'system'}}</h2> <h2 class="panel-title"><span class="fa-fw fa-server"></span> {{t 'system'}}</h2>