Skip to content

Commit

Permalink
Improved docs, added contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
mooxbot committed Feb 6, 2024
1 parent c837cc7 commit b6d605e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,11 @@ class JobMonitorDemo implements ShouldQueue
}
```

Now you can monitor the progress of your job in the Filament UI.

## Authorization

I use Filament Shield instead, so that code is not heavily tested. Please leave a feedback, if you struggle.
We use Filament Shield instead, so that code is not heavily tested. Please leave a feedback, if you struggle.

If you would like to prevent certain users from accessing your page, you can register a policy:

Expand Down Expand Up @@ -275,15 +277,25 @@ This will prevent the navigation item(s) from being registered.

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## License
## Contribute

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
We welcome every contribution! It would be awesome, if you:

- Create an Issue in this Repo that contains information about the problem or idea. We'll reply within a couple of days.
- Create a Pull Request in the [Monorepo](https://github.com/mooxphp/moox). Please do not PR to our read-only repos, they are not prepared for code changes. Only the monorepo has quality gates and automated tests.
- Translate Moox using [Weblate](https://hosted.weblate.org/engage/moox/).
- Tell other people about Moox or link to us.
- Consider a [donation or sponsorship](https://github.com/sponsors/mooxphp).

## Sponsors

The initial development of this plugin was sponsored by [heco gmbh, Germany](https://heco.de). A huge thank you for investing in Open Source!
The initial development of Moox was sponsored by [heco gmbh, Germany](https://heco.de). A huge thank you for investing in Open Source!

If you use this plugin, please consider a small donation to keep this project under maintenance. Especially if it is a commercial project, it is pretty easy to calculate. A few bucks for a developer to build a great product or a hungry developer that produces bugs or - the worst case - needs to abandon the project. Yes, I am happy about every little sunshine in my wallet ;-)
If you use this plugin, please consider a small donation to keep this project under maintenance. Especially if it is a commercial project, it is pretty easy to calculate. A few bucks for a developer to build a great product or a hungry developer that produces bugs or - the worst case - needs to abandon the project. Yes, we are happy about every little sunshine in our wallet ;-)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

## Credits

Expand Down
10 changes: 7 additions & 3 deletions src/Resources/JobsResource/Widgets/JobStatsOverview.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ protected function getCards(): array
->select($aggregationColumns)
->first();

if ($aggregatedInfo) {
$averageTime = property_exists($aggregatedInfo, 'average_time_elapsed') ? ceil((float) $aggregatedInfo->average_time_elapsed).'s' : '0';
$totalTime = property_exists($aggregatedInfo, 'total_time_elapsed') ? $this->formatSeconds($aggregatedInfo->total_time_elapsed).'s' : '0';
if (isset($aggregatedInfo->average_time_elapsed)) {
$averageTime = ($aggregatedInfo->average_time_elapsed) ? ceil((float) $aggregatedInfo->average_time_elapsed).'s' : '0';
} else {
$averageTime = '0';
}

if (isset($aggregatedInfo->total_time_elapsed)) {
$totalTime = ($aggregatedInfo->total_time_elapsed) ? $this->formatSeconds($aggregatedInfo->total_time_elapsed) : '0';
} else {
$totalTime = '0';
}

Expand Down

0 comments on commit b6d605e

Please sign in to comment.