mirror of
https://github.com/chibicitiberiu/ytsm.git
synced 2024-02-24 05:43:31 +00:00
Improve error handling for settings. Instead of failing with an exception, an alert is displayed on the main page when something isn't set properly.
This commit is contained in:
@ -24,6 +24,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'YtManagerApp/index_errors_banner.html' %}
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-3">
|
||||
|
@ -0,0 +1,24 @@
|
||||
{% if config_errors %}
|
||||
<div class="alert alert-danger alert-card mx-auto">
|
||||
<p>Attention! Some critical configuration errors have been found!</p>
|
||||
<ul>
|
||||
{% for err in config_errors %}
|
||||
<li>{{ err }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p>Until these problems are fixed, the server may have encounter serious problems while running.
|
||||
Please correct these errors, and then restart the server.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if config_warnings %}
|
||||
<div class="alert alert-warning alert-card mx-auto">
|
||||
<p>Warning: some configuration problems have been found!</p>
|
||||
<ul>
|
||||
{% for err in config_warnings %}
|
||||
<li>{{ err }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p>We recommend that you fix these issues before continuing.</p>
|
||||
</div>
|
||||
{% endif %}
|
@ -3,6 +3,8 @@
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% include 'YtManagerApp/index_errors_banner.html' %}
|
||||
|
||||
<h1>Hello</h1>
|
||||
<h2>Please log in to continue</h2>
|
||||
|
||||
|
Reference in New Issue
Block a user