mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
feat: expose queue driver, schedule status (#3593)
* feat: expose queue driver, schedule status * Apply fixes from StyleCI * docblock * fix inheritdoc * Add info link for scheduler setup * Remove unsed import * fix: phpstan error * Only show scheduler status when jobs are registered * Apply fixes from StyleCI * add ItemList priorities * Add translations * Include schedule status in info console cmd * Apply fixes from StyleCI * Move identifyX logic into shared 'ApplicationInfoProvider' * Apply fixes from StyleCI * uniform data layout * inject queue Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
@@ -5,6 +5,7 @@ import ItemList from '../../common/utils/ItemList';
|
||||
import Dropdown from '../../common/components/Dropdown';
|
||||
import Button from '../../common/components/Button';
|
||||
import LoadingModal from './LoadingModal';
|
||||
import LinkButton from '../../common/components/LinkButton';
|
||||
|
||||
export default class StatusWidget extends DashboardWidget {
|
||||
className() {
|
||||
@@ -30,9 +31,26 @@ export default class StatusWidget extends DashboardWidget {
|
||||
</Dropdown>
|
||||
);
|
||||
|
||||
items.add('version-flarum', [<strong>Flarum</strong>, <br />, app.forum.attribute('version')]);
|
||||
items.add('version-php', [<strong>PHP</strong>, <br />, app.data.phpVersion]);
|
||||
items.add('version-mysql', [<strong>MySQL</strong>, <br />, app.data.mysqlVersion]);
|
||||
items.add('version-flarum', [<strong>Flarum</strong>, <br />, app.forum.attribute('version')], 100);
|
||||
items.add('version-php', [<strong>PHP</strong>, <br />, app.data.phpVersion], 90);
|
||||
items.add('version-mysql', [<strong>MySQL</strong>, <br />, app.data.mysqlVersion], 80);
|
||||
if (app.data.schedulerStatus) {
|
||||
items.add(
|
||||
'schedule-status',
|
||||
[
|
||||
<span>
|
||||
<strong>Scheduler</strong>{' '}
|
||||
<LinkButton href="https://discuss.flarum.org/d/24118" external={true} target="_blank" icon="fas fa-info-circle" />
|
||||
</span>,
|
||||
<br />,
|
||||
app.data.schedulerStatus,
|
||||
],
|
||||
70
|
||||
);
|
||||
}
|
||||
|
||||
items.add('queue-driver', [<strong>Queue Driver</strong>, <br />, app.data.queueDriver], 60);
|
||||
items.add('session-driver', [<strong>Session Driver</strong>, <br />, app.data.sessionDriver], 50);
|
||||
|
||||
return items;
|
||||
}
|
||||
|
Reference in New Issue
Block a user