Skip to content

Commit

Permalink
Merge branch 'main' of github.com:paulo-hortelan/requests-graph-pulse
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-hortelan committed Feb 29, 2024
2 parents 39c43e3 + a4f7556 commit 264bc92
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github: paulo-hortelan
ko_fi: paulohortelan
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/paulo-hortelan/requests-graph-pulse/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/paulo-hortelan/requests-graph-pulse/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/paulo-hortelan/requests-graph-pulse/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/paulo-hortelan/requests-graph-pulse/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/paulo-hortelan/requests-graph-pulse.svg?style=flat-square)](https://packagist.org/packages/paulo-hortelan/requests-graph-pulse)
[![Ko-fi](https://img.shields.io/badge/Ko--fi-Buy%20me%20a%20coffee!-%2346b798.svg)](https://ko-fi.com/paulohortelan)

Credits to [Aaron Francis](https://github.com/aarondfrancis) for his Pulse tutorial.

Expand Down Expand Up @@ -87,4 +88,4 @@ Please review [our security policy](../../security/policy) on how to report secu

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
21 changes: 12 additions & 9 deletions resources/views/livewire/requests-graph.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,19 @@
<div wire:key="requests-graph">

@php
function hightestValue($data){
$highest = 0;
foreach($data as $item) {
$max = max($item);
$highest = $max > $highest ? $max : $highest;
if(!function_exists('hightestValue')){
function hightestValue($data){
$highest = 0;
foreach($data as $item) {
$max = max($item);
$highest = $max > $highest ? $max : $highest;
}
return $highest;
}
return $highest;
}
$highest = hightestValue($request->toArray());
@endphp
Expand Down Expand Up @@ -252,4 +255,4 @@ class="h-52 ring-1 ring-gray-900/5 dark:ring-gray-100/10 bg-gray-50 dark:bg-gray
}
}))
</script>
@endscript
@endscript
2 changes: 1 addition & 1 deletion src/RequestsGraphServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function boot(): void
{
parent::boot();

$this->loadViewsFrom(__DIR__ . '/../resources/views', 'requests-graph');
$this->loadViewsFrom(__DIR__.'/../resources/views', 'requests-graph');

$this->callAfterResolving('livewire', function (LivewireManager $livewire, Application $app) {
$livewire->component('requests-graph', RequestsGraph::class);
Expand Down

0 comments on commit 264bc92

Please sign in to comment.