mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 02:53:42 +08:00
2d68e5d942
This commit introduces scheduled problem checks for the admin dashboard, which are long running or otherwise cumbersome problem checks that will be run every 10 minutes rather than every time the dashboard is loaded. If these scheduled checks add a problem, the problem will remain until it is cleared or until the scheduled job runs again. An example of a check that should be scheduled is validating credentials against an external provider. This commit also introduces the concept of a `priority` to the problems generated by `AdminDashboardData` and the scheduled checks. This is `low` by default, and can be set to `high`, but this commit does not change any part of the UI with this information, only adds a CSS class. I will be making a follow up PR to check group SMTP credentials.
28 lines
877 B
Handlebars
28 lines
877 B
Handlebars
{{#if foundProblems}}
|
|
<div class="section dashboard-problems">
|
|
<div class="section-title">
|
|
<h2>
|
|
{{d-icon "heart"}}
|
|
{{i18n "admin.dashboard.problems_found"}}
|
|
</h2>
|
|
</div>
|
|
|
|
<div class="section-body">
|
|
{{#conditional-loading-section isLoading=loadingProblems}}
|
|
<div class="problem-messages">
|
|
<ul>
|
|
{{#each problems 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}}
|