Migrations shall be skipped 1 by 1 now

This commit is contained in:
Alexandre Aubin 2019-09-10 16:13:21 +02:00
parent 99e87a0b6e
commit 3e0f25f05f
2 changed files with 6 additions and 4 deletions

View file

@ -347,12 +347,12 @@
} }
}); });
app.get('#/tools/migrations/skip', function (c) { app.get('#/tools/migrations/skip/:migration_id', function (c) {
c.confirm( c.confirm(
y18n.t('migrations'), y18n.t('migrations'),
y18n.t('confirm_migrations_skip'), y18n.t('confirm_migrations_skip'),
function(){ function(){
c.api('/migrations/migrate?skip', function(data) { c.api('/migrations/migrate?skip&targets=' + c.params['migration_id'], function(data) {
store.clear('slide'); store.clear('slide');
c.redirect('#/tools/migrations'); c.redirect('#/tools/migrations');
}, 'POST'); }, 'POST');

View file

@ -11,8 +11,7 @@
<h2 class="panel-title"><span class="fa-fw fa-cogs"></span> {{t 'migrations_pending'}} <h2 class="panel-title"><span class="fa-fw fa-cogs"></span> {{t 'migrations_pending'}}
{{#if pending_migrations}} {{#if pending_migrations}}
<div class="btn-toolbar pull-right"> <div class="btn-toolbar pull-right">
<a href="#/tools/migrations/run" class="btn btn-success" style="margin-top: -3px"><span class="fa-fw fa-play"></span> {{t 'run'}}</a> <a href="#/tools/migrations/run" class="btn btn-sm btn-success"><span class="fa-fw fa-play"></span> {{t 'run'}}</a>
<a href="#/tools/migrations/skip" class="btn btn-warning" style="margin-top: -3px"><span class="fa-fw fa-close"></span> {{t 'skip'}}</a>
</div> </div>
{{/if}} {{/if}}
</h2> </h2>
@ -24,6 +23,9 @@
<div class="list-group-item clearfix"> <div class="list-group-item clearfix">
<h3 class="list-group-item-heading"> <h3 class="list-group-item-heading">
{{ number }}. {{ description }} {{ number }}. {{ description }}
<div class="btn-toolbar pull-right">
<a href="#/tools/migrations/skip/{{ id }}" class="btn btn-xs btn-warning" style="color:white;"><span class="fa-fw fa-close"></span> {{t 'skip'}}</a>
</div>
</h3> </h3>
{{#if disclaimer }} {{#if disclaimer }}
<hr> <hr>