From 2ee13d5434c25477278eab4365b38584f5972c08 Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Sat, 27 Jan 2024 14:33:42 +0500 Subject: [PATCH] wip --- composer.json | 12 +- composer.lock | 151 +++++++++--------- config/disk-metrics.php | 24 --- config/pulse-about-application.php | 2 +- config/pulse.php | 35 +++- resources/views/vendor/disk-metrics/.gitkeep | 0 .../livewire/disk-metrics.blade.php | 65 -------- .../views/vendor/pulse/dashboard.blade.php | 20 ++- 8 files changed, 123 insertions(+), 186 deletions(-) delete mode 100644 config/disk-metrics.php delete mode 100644 resources/views/vendor/disk-metrics/.gitkeep delete mode 100644 resources/views/vendor/disk-metrics/livewire/disk-metrics.blade.php diff --git a/composer.json b/composer.json index 79f0ada..de08a5f 100644 --- a/composer.json +++ b/composer.json @@ -8,8 +8,6 @@ "php": "^8.1", "denniseilander/pulse-about-application": "^0.1.1", "eolica/nova-locale-switcher": "dev-support-nova-4", - "outl1ne/nova-grid": "dev-revert-back", - "geowrgetudor/disk-metrics": "^1.2", "guzzlehttp/guzzle": "^7.2", "konsulting/nova-target": "^1.0", "laravel/framework": "^10.10", @@ -17,16 +15,18 @@ "laravel/pulse": "^1.0@beta", "laravel/sanctum": "^3.3", "laravel/tinker": "^2.8", + "maantje/pulse-database": "^0.1.0", "morrislaptop/laravel-pulse-4xx": "^0.0.2", + "nurmuhammet/nova-custom-html": "^1.0", "nurmuhammet/nova-inputmask": "^1.0", + "outl1ne/nova-grid": "dev-revert-back", "outl1ne/nova-translatable": "^2.2", "spatie/laravel-backup": "^8.4", "spatie/laravel-permission": "^6.1", "spatie/laravel-translatable": "^6.5", "spatie/nova-backup-tool": "^5.0", "stepanenko3/nova-logs-tool": "^2.1", - "trin4ik/nova-switcher": "^0.4.0", - "nurmuhammet/nova-custom-html": "*" + "trin4ik/nova-switcher": "^0.4.0" }, "require-dev": { "fakerphp/faker": "^1.9.1", @@ -86,10 +86,6 @@ "1": { "type": "vcs", "url": "https://github.com/nurmuhammet-ali/nova-grid" - }, - "2": { - "type": "path", - "url": "/Users/nurmuhammetallanov/code/package-development/laravel/nova/custom-html" } }, "config": { diff --git a/composer.lock b/composer.lock index 4dd0762..c38bd58 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "080f37bf6161786b9084d839177d7e34", + "content-hash": "72940f1cdfb2570167bdb444d8b28b15", "packages": [ { "name": "brick/math", @@ -1148,74 +1148,6 @@ ], "time": "2023-10-12T05:21:21+00:00" }, - { - "name": "geowrgetudor/disk-metrics", - "version": "1.2", - "source": { - "type": "git", - "url": "https://github.com/geowrgetudor/disk-metrics.git", - "reference": "a6323b0ceae580c95b91b9181449678bc92afd04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/geowrgetudor/disk-metrics/zipball/a6323b0ceae580c95b91b9181449678bc92afd04", - "reference": "a6323b0ceae580c95b91b9181449678bc92afd04", - "shasum": "" - }, - "require": { - "illuminate/contracts": "^10.0", - "laravel/pulse": "^1.0@beta", - "php": "^8.1", - "spatie/laravel-package-tools": "^1.14.0" - }, - "require-dev": { - "laravel/pint": "^1.0", - "nunomaduro/collision": "^7.8", - "orchestra/testbench": "^8.8", - "pestphp/pest": "^2.20", - "pestphp/pest-plugin-arch": "^2.0", - "pestphp/pest-plugin-laravel": "^2.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Geow\\DiskMetrics\\DiskMetricsServiceProvider" - ], - "aliases": { - "DiskMetrics": "Geow\\DiskMetrics\\Facades\\DiskMetrics" - } - } - }, - "autoload": { - "psr-4": { - "Geow\\DiskMetrics\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "George Tudor", - "email": "georgebitq@gmail.com", - "role": "Developer" - } - ], - "description": "Monitor disk size, file & directory count for Laravel Pulse", - "homepage": "https://github.com/geowrgetudor/disk-metrics", - "keywords": [ - "disk-metrics", - "laravel", - "pulse" - ], - "support": { - "issues": "https://github.com/geowrgetudor/disk-metrics/issues", - "source": "https://github.com/geowrgetudor/disk-metrics/tree/1.2" - }, - "time": "2023-12-06T10:46:42+00:00" - }, { "name": "graham-campbell/result-type", "version": "v1.1.2", @@ -3133,6 +3065,60 @@ ], "time": "2024-01-26T14:25:51+00:00" }, + { + "name": "maantje/pulse-database", + "version": "v0.1.0", + "source": { + "type": "git", + "url": "https://github.com/maantje/pulse-database.git", + "reference": "ec5408a4357923294412d3d12dd86951e19ec60f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maantje/pulse-database/zipball/ec5408a4357923294412d3d12dd86951e19ec60f", + "reference": "ec5408a4357923294412d3d12dd86951e19ec60f", + "shasum": "" + }, + "require": { + "illuminate/support": "*", + "laravel/pulse": "^1.0.0@beta", + "php": "^8.1" + }, + "require-dev": { + "mockery/mockery": "^1.5.0", + "orchestra/testbench": "^8", + "phpunit/phpunit": "^10" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Maantje\\Pulse\\Database\\DatabaseServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Maantje\\Pulse\\Database\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jamie Schouten", + "email": "j4mie@hey.com" + } + ], + "description": "A Laravel Pulse card for database status", + "support": { + "issues": "https://github.com/maantje/pulse-database/issues", + "source": "https://github.com/maantje/pulse-database/tree/v0.1.0" + }, + "time": "2023-12-10T21:55:46+00:00" + }, { "name": "monolog/monolog", "version": "3.5.0", @@ -3760,11 +3746,17 @@ }, { "name": "nurmuhammet/nova-custom-html", - "version": "dev-main", + "version": "1.0.10", + "source": { + "type": "git", + "url": "https://github.com/nurmuhammet-ali/nova-custom-html.git", + "reference": "d8d424b54d254f93ff838cb15772c443dfbac8fd" + }, "dist": { - "type": "path", - "url": "/Users/nurmuhammetallanov/code/package-development/laravel/nova/custom-html", - "reference": "d48cce3deb162a0ef18f279dd92083c8588e74e1" + "type": "zip", + "url": "https://api.github.com/repos/nurmuhammet-ali/nova-custom-html/zipball/d8d424b54d254f93ff838cb15772c443dfbac8fd", + "reference": "d8d424b54d254f93ff838cb15772c443dfbac8fd", + "shasum": "" }, "require": { "php": "^7.3|^8.0" @@ -3782,6 +3774,7 @@ "Nurmuhammet\\NovaCustomHtml\\": "src/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -3790,9 +3783,11 @@ "laravel", "nova" ], - "transport-options": { - "relative": false - } + "support": { + "issues": "https://github.com/nurmuhammet-ali/nova-custom-html/issues", + "source": "https://github.com/nurmuhammet-ali/nova-custom-html/tree/1.0.10" + }, + "time": "2024-01-26T20:59:45+00:00" }, { "name": "nurmuhammet/nova-inputmask", @@ -12225,8 +12220,8 @@ "minimum-stability": "dev", "stability-flags": { "eolica/nova-locale-switcher": 20, - "outl1ne/nova-grid": 20, - "laravel/pulse": 10 + "laravel/pulse": 10, + "outl1ne/nova-grid": 20 }, "prefer-stable": true, "prefer-lowest": false, diff --git a/config/disk-metrics.php b/config/disk-metrics.php deleted file mode 100644 index 45aef8e..0000000 --- a/config/disk-metrics.php +++ /dev/null @@ -1,24 +0,0 @@ - [ - 'local' => [], - // 'public' => [], - // 's3' => [] - ], - - /** - * How often (in minutes) should the Laravel Pulse capture data? - * The value should be greated than 1! - * Default: 10 - */ - 'record_interval' => 1 -]; diff --git a/config/pulse-about-application.php b/config/pulse-about-application.php index 980d818..776a572 100644 --- a/config/pulse-about-application.php +++ b/config/pulse-about-application.php @@ -12,6 +12,6 @@ return [ // 'environment', // 'cache', // 'drivers', - // 'livewire', + 'livewire', ], ]; diff --git a/config/pulse.php b/config/pulse.php index 0b2c5bc..864e0d3 100644 --- a/config/pulse.php +++ b/config/pulse.php @@ -224,14 +224,41 @@ return [ ], ], - \Geow\DiskMetrics\Recorders\DiskRecorder::class => [ - 'enabled' => env('GEOW_DISK_METRICS', true), - ], - \Morrislaptop\LaravelPulse4xx\FourXxRecorder::class => [ 'enabled' => env('PULSE_4XX_ENABLED', true), 'sample_rate' => env('PULSE_4XX_SAMPLE_RATE', 1), 'ignore' => [], ], + + \Maantje\Pulse\Database\Recorders\DatabaseRecorder::class => [ + 'connections' => [ + 'pgsql' => [ + 'values' => [ + 'Connections', + 'Threads_connected', + 'Threads_running', + 'Innodb_buffer_pool_reads', + 'Innodb_buffer_pool_read_requests', + 'Innodb_buffer_pool_pages_total', + 'Max_used_connections' + ], + 'aggregates' => [ + 'avg' => [ + 'Threads_connected', + 'Threads_running', + 'Innodb_buffer_pool_reads', + 'Innodb_buffer_pool_read_requests', + 'Innodb_buffer_pool_pages_total', + ], + 'max' => [ + // + ], + 'count' => [ + // + ], + ], + ] + ] + ], ], ]; diff --git a/resources/views/vendor/disk-metrics/.gitkeep b/resources/views/vendor/disk-metrics/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/resources/views/vendor/disk-metrics/livewire/disk-metrics.blade.php b/resources/views/vendor/disk-metrics/livewire/disk-metrics.blade.php deleted file mode 100644 index c2aea54..0000000 --- a/resources/views/vendor/disk-metrics/livewire/disk-metrics.blade.php +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - @if (empty($data)) - - @else - - - - - - - - - {{ __('Disk') }} - {{ __('Directories') }} - {{ __('Files') }} - {{ __('Size') }} - - - - @foreach ($data as $diskName => $details) - - - - - {{ ucfirst($diskName) }} - -

- @if ($details['disk_data']['root']) - {{ $details['disk_data']['root'] }} - @endif - @if ($details['disk_data']['bucket']) - {{ $details['disk_data']['bucket'] }} - @endif -

-
- - @if (isset($details['metrics']['directory_count'])) - {{ $details['metrics']['directory_count']->value }} - @endif - - - @if (isset($details['metrics']['file_count'])) - {{ $details['metrics']['file_count']->value }} - @endif - - - @if (isset($details['metrics']['total_size'])) - {{ $details['metrics']['total_size']->value }} - @endif - - - @endforeach - -
- @endif -
-
diff --git a/resources/views/vendor/pulse/dashboard.blade.php b/resources/views/vendor/pulse/dashboard.blade.php index 7d0494e..76b1c4e 100644 --- a/resources/views/vendor/pulse/dashboard.blade.php +++ b/resources/views/vendor/pulse/dashboard.blade.php @@ -1,18 +1,26 @@ - - - - - - + + + + + + + + + +