-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Sirajunnasihin/feature/SlowJobFeature
Feature/slow job feature
- Loading branch information
Showing
6 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ yarn-error.log | |
/.fleet | ||
/.idea | ||
/.vscode | ||
/packages | ||
/packages | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<x-filament-widgets::widget> | ||
<livewire:pulse.slow-jobs cols="{{$this->cols}}" rows="{{$this->rows}}" ignore-after="{{$this->ignoreAfter}}"/> | ||
</x-filament-widgets::widget> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dotswan\FilamentLaravelPulse\Widgets; | ||
|
||
use Filament\Widgets\Widget; | ||
|
||
class PulseSlowJobs extends Widget | ||
{ | ||
protected static string $view = 'filament-laravel-pulse::widgets.pulse-slow-jobs'; | ||
|
||
protected string|int|array $cols; | ||
|
||
protected string $ignoreAfter; | ||
|
||
public function __construct() | ||
{ | ||
$config = config('filament-laravel-pulse.components.slow-jobs'); | ||
$this->columnSpan = $config['columnSpan'] ?? [ | ||
'md' => 5, | ||
'xl' => 5, | ||
]; | ||
$this->cols = $config['cols'] ?? 'full'; | ||
$this->ignoreAfter = $config['ignoreAfter'] ?? '1 hour'; | ||
self::$isDiscovered = $config['isDiscovered'] ?? true; | ||
self::$isLazy = $config['isLazy'] ?? true; | ||
self::$sort = $config['sort'] ?? null; | ||
} | ||
} |