mirror of
https://github.com/discourse/discourse.git
synced 2024-12-13 20:44:14 +08:00
20fe5eceb8
This commit adds a check that runs regularly as per
2d68e5d942
which tests the
credentials of groups with SMTP or IMAP enabled. If any issues
are found with those credentials a high priority problem is added to the
admin dashboard.
This commit also formats the admin dashboard differently if
there are high priority problems, bringing them to the top of
the list and highlighting them.
The problem will be cleared if the issue is fixed before the next
problem check, or if the group's settings are updated with a valid
credential.
45 lines
1.4 KiB
Handlebars
45 lines
1.4 KiB
Handlebars
{{#if foundProblems}}
|
|
<div class="section dashboard-problems">
|
|
<div class="section-title">
|
|
{{#if highPriorityProblems.length}}
|
|
<h2>
|
|
{{d-icon "exclamation-triangle"}}
|
|
{{i18n "admin.dashboard.critical_problems_found"}}
|
|
</h2>
|
|
{{else}}
|
|
<h2>
|
|
{{d-icon "heart"}}
|
|
{{i18n "admin.dashboard.problems_found"}}
|
|
</h2>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div class="section-body">
|
|
{{#conditional-loading-section isLoading=loadingProblems}}
|
|
{{#if highPriorityProblems.length}}
|
|
<div class="problem-messages priority-high">
|
|
<ul>
|
|
{{#each highPriorityProblems as |problem|}}
|
|
<li class={{concat "dashboard-problem " "priority-" problem.priority}}>{{html-safe problem.message}}</li>
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="problem-messages priority-low">
|
|
<ul>
|
|
{{#each lowPriorityProblems as |problem|}}
|
|
<li class={{concat "dashboard-problem " "priority-" problem.priority}}>{{html-safe problem.message}}</li>
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
|
|
<p class="actions">
|
|
{{d-button action=refreshProblems class="btn-default" icon="sync" label="admin.dashboard.refresh_problems"}}
|
|
{{i18n "admin.dashboard.last_checked"}}: {{problemsTimestamp}}
|
|
</p>
|
|
{{/conditional-loading-section}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|