mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
show notification on migration if restart is not supported
This commit is contained in:
@@ -143,14 +143,13 @@ class MigrationWizardServlet extends HttpServlet {
|
|||||||
);
|
);
|
||||||
|
|
||||||
Map<String, Object> model = Collections.singletonMap("contextPath", req.getContextPath());
|
Map<String, Object> model = Collections.singletonMap("contextPath", req.getContextPath());
|
||||||
|
|
||||||
respondWithTemplate(resp, model, "templates/repository-migration-restart.mustache");
|
|
||||||
|
|
||||||
ThreadContext.bind(new Subject.Builder(new DefaultSecurityManager()).authenticated(false).buildSubject());
|
ThreadContext.bind(new Subject.Builder(new DefaultSecurityManager()).authenticated(false).buildSubject());
|
||||||
|
|
||||||
if (restarter.isSupported()) {
|
if (restarter.isSupported()) {
|
||||||
|
respondWithTemplate(resp, model, "templates/repository-migration-restart.mustache");
|
||||||
restarter.restart(MigrationWizardServlet.class, "wrote migration data");
|
restarter.restart(MigrationWizardServlet.class, "wrote migration data");
|
||||||
} else {
|
} else {
|
||||||
|
respondWithTemplate(resp, model, "templates/repository-migration-manual-restart.mustache");
|
||||||
LOG.error("Restarting is not supported on this platform.");
|
LOG.error("Restarting is not supported on this platform.");
|
||||||
LOG.error("Please do a manual restart");
|
LOG.error("Please do a manual restart");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{{<layout}}
|
||||||
|
|
||||||
|
{{$title}}SCM-Manager needs to be restarted{{/title}}
|
||||||
|
|
||||||
|
{{$content}}
|
||||||
|
<p class="notification is-warning">
|
||||||
|
The migration is prepared and gets executed after scm-manager is restarted. <br/>
|
||||||
|
Please restart your scm-manager instance.
|
||||||
|
</p>
|
||||||
|
{{/content}}
|
||||||
|
|
||||||
|
{{/layout}}
|
||||||
Reference in New Issue
Block a user