Added highcharts stats via /stats
This commit is contained in:
parent
ef4ee6ea96
commit
e6827082cb
31
app/Http/Controllers/StatsController.php
Normal file
31
app/Http/Controllers/StatsController.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use AgliPanci\LaravelCase\Facades\CaseBuilder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
use App\Models\SiteVersion;
|
||||
|
||||
class StatsController extends Controller
|
||||
{
|
||||
public function home()
|
||||
{
|
||||
$case = CaseBuilder::whenRaw("version ~ '-dev-'")->thenRaw("CONCAT(SPLIT_PART(version,'-',1),'-',SPLIT_PART(version,'-',2))")
|
||||
->whenRaw("version ~ '-00000000$'")->thenRaw("CONCAT(SPLIT_PART(version,'-',1),'-GIT')")
|
||||
->whenRaw("version ~ '^v[0-9]+\.[0-9]+\.[0-9]+'")->thenRaw("SPLIT_PART(version,'-',1)")
|
||||
->elseRaw("'unknown'");
|
||||
|
||||
$stats = SiteVersion::select([
|
||||
DB::raw('DATE(site_versions.created_at) AS created_at'),
|
||||
//'site_versions.version',
|
||||
DB::raw('count(distinct site_id) as total')
|
||||
])
|
||||
->selectRaw($case->toRaw().' AS ver')
|
||||
->groupBy([DB::raw('DATE(site_versions.created_at)'),'ver'])
|
||||
;
|
||||
|
||||
return view('stats')
|
||||
->with('query',$stats->get());
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SiteVersion extends Model
|
||||
@ -12,4 +13,10 @@ class SiteVersion extends Model
|
||||
{
|
||||
return $this->belongsTo(Site::class);
|
||||
}
|
||||
|
||||
/* ATTRIBUTES */
|
||||
public function getDateAttribute(): int
|
||||
{
|
||||
return Carbon::parse($this->attributes['created_at'])->timestamp*1000;
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.4",
|
||||
"aglipanci/laravel-eloquent-case": "^4.0",
|
||||
"laravel/framework": "^11.31"
|
||||
},
|
||||
"require-dev": {
|
||||
|
289
composer.lock
generated
289
composer.lock
generated
@ -4,20 +4,84 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "9ffd11e9421b54c6369d6daf6977fba4",
|
||||
"content-hash": "3040c4431d0d1c693ba760c2d3220471",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brick/math",
|
||||
"version": "0.12.1",
|
||||
"name": "aglipanci/laravel-eloquent-case",
|
||||
"version": "4.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/brick/math.git",
|
||||
"reference": "f510c0a40911935b77b86859eb5223d58d660df1"
|
||||
"url": "https://github.com/aglipanci/laravel-eloquent-case.git",
|
||||
"reference": "4b3e2352f62b878e8ab534a24ab360835c82aab7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1",
|
||||
"reference": "f510c0a40911935b77b86859eb5223d58d660df1",
|
||||
"url": "https://api.github.com/repos/aglipanci/laravel-eloquent-case/zipball/4b3e2352f62b878e8ab534a24ab360835c82aab7",
|
||||
"reference": "4b3e2352f62b878e8ab534a24ab360835c82aab7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/database": "^9.0|^10|^11|^12.0",
|
||||
"illuminate/support": "^9.0|^10|^11|^12.0",
|
||||
"php": "^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"nunomaduro/larastan": "^2.0",
|
||||
"orchestra/testbench": "^6.23.0|^7.0.0|^10.0",
|
||||
"phpunit/phpunit": "^9.3.9|^11.5.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"aliases": {
|
||||
"CaseBuilder": "CaseBuilder"
|
||||
},
|
||||
"providers": [
|
||||
"AgliPanci\\LaravelCase\\LaravelCaseServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"AgliPanci\\LaravelCase\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Agli Panci",
|
||||
"email": "agli.panci@gmail.com",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Eduard Lleshi",
|
||||
"email": "eduard.lleshi@gmail.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Adds CASE statement support to Laravel Query Builder.",
|
||||
"homepage": "https://github.com/aglipanci/laravel-case",
|
||||
"support": {
|
||||
"issues": "https://github.com/aglipanci/laravel-eloquent-case/issues",
|
||||
"source": "https://github.com/aglipanci/laravel-eloquent-case/tree/4.0.0"
|
||||
},
|
||||
"time": "2025-02-18T10:45:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "brick/math",
|
||||
"version": "0.12.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/brick/math.git",
|
||||
"reference": "866551da34e9a618e64a819ee1e01c20d8a588ba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/brick/math/zipball/866551da34e9a618e64a819ee1e01c20d8a588ba",
|
||||
"reference": "866551da34e9a618e64a819ee1e01c20d8a588ba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -26,7 +90,7 @@
|
||||
"require-dev": {
|
||||
"php-coveralls/php-coveralls": "^2.2",
|
||||
"phpunit/phpunit": "^10.1",
|
||||
"vimeo/psalm": "5.16.0"
|
||||
"vimeo/psalm": "6.8.8"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@ -56,7 +120,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/brick/math/issues",
|
||||
"source": "https://github.com/brick/math/tree/0.12.1"
|
||||
"source": "https://github.com/brick/math/tree/0.12.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -64,7 +128,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-11-29T23:19:16+00:00"
|
||||
"time": "2025-02-28T13:11:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "carbonphp/carbon-doctrine-types",
|
||||
@ -1056,16 +1120,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v11.42.1",
|
||||
"version": "v11.44.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "ff392f42f6c55cc774ce75553a11c6b031da67f8"
|
||||
"reference": "0883d4175f4e2b5c299e7087ad3c74f2ce195c6d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/ff392f42f6c55cc774ce75553a11c6b031da67f8",
|
||||
"reference": "ff392f42f6c55cc774ce75553a11c6b031da67f8",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/0883d4175f4e2b5c299e7087ad3c74f2ce195c6d",
|
||||
"reference": "0883d4175f4e2b5c299e7087ad3c74f2ce195c6d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1173,7 +1237,7 @@
|
||||
"league/flysystem-read-only": "^3.25.1",
|
||||
"league/flysystem-sftp-v3": "^3.25.1",
|
||||
"mockery/mockery": "^1.6.10",
|
||||
"orchestra/testbench-core": "^9.9.4",
|
||||
"orchestra/testbench-core": "^9.11.2",
|
||||
"pda/pheanstalk": "^5.0.6",
|
||||
"php-http/discovery": "^1.15",
|
||||
"phpstan/phpstan": "^2.0",
|
||||
@ -1267,7 +1331,7 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2025-02-12T20:58:18+00:00"
|
||||
"time": "2025-03-05T15:34:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/prompts",
|
||||
@ -2045,16 +2109,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "3.8.5",
|
||||
"version": "3.8.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/CarbonPHP/carbon.git",
|
||||
"reference": "b1a53a27898639579a67de42e8ced5d5386aa9a4"
|
||||
"reference": "ff2f20cf83bd4d503720632ce8a426dc747bf7fd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/b1a53a27898639579a67de42e8ced5d5386aa9a4",
|
||||
"reference": "b1a53a27898639579a67de42e8ced5d5386aa9a4",
|
||||
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/ff2f20cf83bd4d503720632ce8a426dc747bf7fd",
|
||||
"reference": "ff2f20cf83bd4d503720632ce8a426dc747bf7fd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2147,7 +2211,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-02-11T16:28:45+00:00"
|
||||
"time": "2025-02-20T17:33:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/schema",
|
||||
@ -2917,16 +2981,16 @@
|
||||
},
|
||||
{
|
||||
"name": "ramsey/collection",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ramsey/collection.git",
|
||||
"reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5"
|
||||
"reference": "3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
|
||||
"reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
|
||||
"url": "https://api.github.com/repos/ramsey/collection/zipball/3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109",
|
||||
"reference": "3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2934,25 +2998,22 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"captainhook/plugin-composer": "^5.3",
|
||||
"ergebnis/composer-normalize": "^2.28.3",
|
||||
"fakerphp/faker": "^1.21",
|
||||
"ergebnis/composer-normalize": "^2.45",
|
||||
"fakerphp/faker": "^1.24",
|
||||
"hamcrest/hamcrest-php": "^2.0",
|
||||
"jangregor/phpstan-prophecy": "^1.0",
|
||||
"mockery/mockery": "^1.5",
|
||||
"jangregor/phpstan-prophecy": "^2.1",
|
||||
"mockery/mockery": "^1.6",
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3",
|
||||
"phpcsstandards/phpcsutils": "^1.0.0-rc1",
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
"phpstan/extension-installer": "^1.2",
|
||||
"phpstan/phpstan": "^1.9",
|
||||
"phpstan/phpstan-mockery": "^1.1",
|
||||
"phpstan/phpstan-phpunit": "^1.3",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"psalm/plugin-mockery": "^1.1",
|
||||
"psalm/plugin-phpunit": "^0.18.4",
|
||||
"ramsey/coding-standard": "^2.0.3",
|
||||
"ramsey/conventional-commits": "^1.3",
|
||||
"vimeo/psalm": "^5.4"
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4",
|
||||
"phpspec/prophecy-phpunit": "^2.3",
|
||||
"phpstan/extension-installer": "^1.4",
|
||||
"phpstan/phpstan": "^2.1",
|
||||
"phpstan/phpstan-mockery": "^2.0",
|
||||
"phpstan/phpstan-phpunit": "^2.0",
|
||||
"phpunit/phpunit": "^10.5",
|
||||
"ramsey/coding-standard": "^2.3",
|
||||
"ramsey/conventional-commits": "^1.6",
|
||||
"roave/security-advisories": "dev-latest"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@ -2990,19 +3051,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ramsey/collection/issues",
|
||||
"source": "https://github.com/ramsey/collection/tree/2.0.0"
|
||||
"source": "https://github.com/ramsey/collection/tree/2.1.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/ramsey",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/ramsey/collection",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-31T21:50:55+00:00"
|
||||
"time": "2025-03-02T04:48:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
@ -3397,16 +3448,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/error-handler",
|
||||
"version": "v7.2.3",
|
||||
"version": "v7.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/error-handler.git",
|
||||
"reference": "959a74d044a6db21f4caa6d695648dcb5584cb49"
|
||||
"reference": "aabf79938aa795350c07ce6464dd1985607d95d5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/error-handler/zipball/959a74d044a6db21f4caa6d695648dcb5584cb49",
|
||||
"reference": "959a74d044a6db21f4caa6d695648dcb5584cb49",
|
||||
"url": "https://api.github.com/repos/symfony/error-handler/zipball/aabf79938aa795350c07ce6464dd1985607d95d5",
|
||||
"reference": "aabf79938aa795350c07ce6464dd1985607d95d5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3452,7 +3503,7 @@
|
||||
"description": "Provides tools to manage errors and ease debugging PHP code",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/error-handler/tree/v7.2.3"
|
||||
"source": "https://github.com/symfony/error-handler/tree/v7.2.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -3468,7 +3519,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-01-07T09:39:55+00:00"
|
||||
"time": "2025-02-02T20:27:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
@ -3770,16 +3821,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v7.2.3",
|
||||
"version": "v7.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-kernel.git",
|
||||
"reference": "caae9807f8e25a9b43ce8cc6fafab6cf91f0cc9b"
|
||||
"reference": "9f1103734c5789798fefb90e91de4586039003ed"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/caae9807f8e25a9b43ce8cc6fafab6cf91f0cc9b",
|
||||
"reference": "caae9807f8e25a9b43ce8cc6fafab6cf91f0cc9b",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f1103734c5789798fefb90e91de4586039003ed",
|
||||
"reference": "9f1103734c5789798fefb90e91de4586039003ed",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3864,7 +3915,7 @@
|
||||
"description": "Provides a structured process for converting a Request into a Response",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-kernel/tree/v7.2.3"
|
||||
"source": "https://github.com/symfony/http-kernel/tree/v7.2.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -3880,7 +3931,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-01-29T07:40:13+00:00"
|
||||
"time": "2025-02-26T11:01:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mailer",
|
||||
@ -3964,16 +4015,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/mime",
|
||||
"version": "v7.2.3",
|
||||
"version": "v7.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/mime.git",
|
||||
"reference": "2fc3b4bd67e4747e45195bc4c98bea4628476204"
|
||||
"reference": "87ca22046b78c3feaff04b337f33b38510fd686b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/mime/zipball/2fc3b4bd67e4747e45195bc4c98bea4628476204",
|
||||
"reference": "2fc3b4bd67e4747e45195bc4c98bea4628476204",
|
||||
"url": "https://api.github.com/repos/symfony/mime/zipball/87ca22046b78c3feaff04b337f33b38510fd686b",
|
||||
"reference": "87ca22046b78c3feaff04b337f33b38510fd686b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -4028,7 +4079,7 @@
|
||||
"mime-type"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/mime/tree/v7.2.3"
|
||||
"source": "https://github.com/symfony/mime/tree/v7.2.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -4044,7 +4095,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-01-27T11:08:17+00:00"
|
||||
"time": "2025-02-19T08:51:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
@ -4684,16 +4735,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v7.2.0",
|
||||
"version": "v7.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e"
|
||||
"reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e",
|
||||
"reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf",
|
||||
"reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -4725,7 +4776,7 @@
|
||||
"description": "Executes commands in sub-processes",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/process/tree/v7.2.0"
|
||||
"source": "https://github.com/symfony/process/tree/v7.2.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -4741,7 +4792,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-11-06T14:24:19+00:00"
|
||||
"time": "2025-02-05T08:33:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
@ -4996,16 +5047,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v7.2.2",
|
||||
"version": "v7.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "e2674a30132b7cc4d74540d6c2573aa363f05923"
|
||||
"reference": "283856e6981286cc0d800b53bd5703e8e363f05a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/e2674a30132b7cc4d74540d6c2573aa363f05923",
|
||||
"reference": "e2674a30132b7cc4d74540d6c2573aa363f05923",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/283856e6981286cc0d800b53bd5703e8e363f05a",
|
||||
"reference": "283856e6981286cc0d800b53bd5703e8e363f05a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5071,7 +5122,7 @@
|
||||
"description": "Provides tools to internationalize your application",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/translation/tree/v7.2.2"
|
||||
"source": "https://github.com/symfony/translation/tree/v7.2.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -5087,7 +5138,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-12-07T08:18:10+00:00"
|
||||
"time": "2025-02-13T10:27:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation-contracts",
|
||||
@ -5862,16 +5913,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/pint",
|
||||
"version": "v1.20.0",
|
||||
"version": "v1.21.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/pint.git",
|
||||
"reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b"
|
||||
"reference": "531fa0871fbde719c51b12afa3a443b8f4e4b425"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/pint/zipball/53072e8ea22213a7ed168a8a15b96fbb8b82d44b",
|
||||
"reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b",
|
||||
"url": "https://api.github.com/repos/laravel/pint/zipball/531fa0871fbde719c51b12afa3a443b8f4e4b425",
|
||||
"reference": "531fa0871fbde719c51b12afa3a443b8f4e4b425",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5879,15 +5930,15 @@
|
||||
"ext-mbstring": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xml": "*",
|
||||
"php": "^8.1.0"
|
||||
"php": "^8.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.66.0",
|
||||
"illuminate/view": "^10.48.25",
|
||||
"larastan/larastan": "^2.9.12",
|
||||
"laravel-zero/framework": "^10.48.25",
|
||||
"friendsofphp/php-cs-fixer": "^3.68.5",
|
||||
"illuminate/view": "^11.42.0",
|
||||
"larastan/larastan": "^3.0.4",
|
||||
"laravel-zero/framework": "^11.36.1",
|
||||
"mockery/mockery": "^1.6.12",
|
||||
"nunomaduro/termwind": "^1.17.0",
|
||||
"nunomaduro/termwind": "^2.3",
|
||||
"pestphp/pest": "^2.36.0"
|
||||
},
|
||||
"bin": [
|
||||
@ -5924,7 +5975,7 @@
|
||||
"issues": "https://github.com/laravel/pint/issues",
|
||||
"source": "https://github.com/laravel/pint"
|
||||
},
|
||||
"time": "2025-01-14T16:20:53+00:00"
|
||||
"time": "2025-02-18T03:18:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/sail",
|
||||
@ -6474,23 +6525,23 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "11.0.8",
|
||||
"version": "11.0.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "418c59fd080954f8c4aa5631d9502ecda2387118"
|
||||
"reference": "14d63fbcca18457e49c6f8bebaa91a87e8e188d7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/418c59fd080954f8c4aa5631d9502ecda2387118",
|
||||
"reference": "418c59fd080954f8c4aa5631d9502ecda2387118",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/14d63fbcca18457e49c6f8bebaa91a87e8e188d7",
|
||||
"reference": "14d63fbcca18457e49c6f8bebaa91a87e8e188d7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"nikic/php-parser": "^5.3.1",
|
||||
"nikic/php-parser": "^5.4.0",
|
||||
"php": ">=8.2",
|
||||
"phpunit/php-file-iterator": "^5.1.0",
|
||||
"phpunit/php-text-template": "^4.0.1",
|
||||
@ -6502,7 +6553,7 @@
|
||||
"theseer/tokenizer": "^1.2.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^11.5.0"
|
||||
"phpunit/phpunit": "^11.5.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-pcov": "PHP extension that provides line coverage",
|
||||
@ -6540,7 +6591,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
||||
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.8"
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.9"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -6548,7 +6599,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-12-11T12:34:27+00:00"
|
||||
"time": "2025-02-25T13:26:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
@ -6797,16 +6848,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "11.5.7",
|
||||
"version": "11.5.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "e1cb706f019e2547039ca2c839898cd5f557ee5d"
|
||||
"reference": "d42785840519401ed2113292263795eb4c0f95da"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e1cb706f019e2547039ca2c839898cd5f557ee5d",
|
||||
"reference": "e1cb706f019e2547039ca2c839898cd5f557ee5d",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d42785840519401ed2113292263795eb4c0f95da",
|
||||
"reference": "d42785840519401ed2113292263795eb4c0f95da",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -6816,18 +6867,18 @@
|
||||
"ext-mbstring": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"myclabs/deep-copy": "^1.12.1",
|
||||
"myclabs/deep-copy": "^1.13.0",
|
||||
"phar-io/manifest": "^2.0.4",
|
||||
"phar-io/version": "^3.2.1",
|
||||
"php": ">=8.2",
|
||||
"phpunit/php-code-coverage": "^11.0.8",
|
||||
"phpunit/php-code-coverage": "^11.0.9",
|
||||
"phpunit/php-file-iterator": "^5.1.0",
|
||||
"phpunit/php-invoker": "^5.0.1",
|
||||
"phpunit/php-text-template": "^4.0.1",
|
||||
"phpunit/php-timer": "^7.0.1",
|
||||
"sebastian/cli-parser": "^3.0.2",
|
||||
"sebastian/code-unit": "^3.0.2",
|
||||
"sebastian/comparator": "^6.3.0",
|
||||
"sebastian/comparator": "^6.3.1",
|
||||
"sebastian/diff": "^6.0.2",
|
||||
"sebastian/environment": "^7.2.0",
|
||||
"sebastian/exporter": "^6.3.0",
|
||||
@ -6878,7 +6929,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.7"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.12"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -6894,7 +6945,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-02-06T16:10:05+00:00"
|
||||
"time": "2025-03-07T07:31:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psy/psysh",
|
||||
@ -7147,16 +7198,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
"version": "6.3.0",
|
||||
"version": "6.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||
"reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115"
|
||||
"reference": "24b8fbc2c8e201bb1308e7b05148d6ab393b6959"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d4e47a769525c4dd38cea90e5dcd435ddbbc7115",
|
||||
"reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/24b8fbc2c8e201bb1308e7b05148d6ab393b6959",
|
||||
"reference": "24b8fbc2c8e201bb1308e7b05148d6ab393b6959",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -7175,7 +7226,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "6.2-dev"
|
||||
"dev-main": "6.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -7215,7 +7266,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/comparator/issues",
|
||||
"security": "https://github.com/sebastianbergmann/comparator/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/comparator/tree/6.3.0"
|
||||
"source": "https://github.com/sebastianbergmann/comparator/tree/6.3.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -7223,7 +7274,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-01-06T10:28:19+00:00"
|
||||
"time": "2025-03-07T06:57:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/complexity",
|
||||
|
122
resources/views/stats.blade.php
Normal file
122
resources/views/stats.blade.php
Normal file
@ -0,0 +1,122 @@
|
||||
<script src="https://code.highcharts.com/highcharts.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/exporting.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/export-data.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
|
||||
|
||||
<figure class="highcharts-figure">
|
||||
<div id="container"></div>
|
||||
<p class="highcharts-description">
|
||||
This shows the number of sites that have queried the version server to see if there is an update, and thus reporting
|
||||
there version at the same time.
|
||||
</p>
|
||||
</figure>
|
||||
|
||||
<script>
|
||||
Highcharts.chart('container', {
|
||||
chart: {
|
||||
type: 'area',
|
||||
zoomType: 'x',
|
||||
},
|
||||
title: {
|
||||
text: 'PLA version activity'
|
||||
},
|
||||
subtitle: {
|
||||
text: 'Source: ' +
|
||||
'<a href="https://demo.phpldapadmin.org/"' +
|
||||
'target="_blank">PLA</a>'
|
||||
},
|
||||
credits: {
|
||||
enabled: false
|
||||
},
|
||||
xAxis: {
|
||||
type: 'datetime',
|
||||
title: {
|
||||
text: 'Time'
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
//useHTML: true,
|
||||
text: '# Sites'
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
shared: true,
|
||||
headerFormat: '<span style="font-size:12px"><b>{point.key}</b></span>' +
|
||||
'<br>'
|
||||
},
|
||||
plotOptions: {
|
||||
area: {
|
||||
stacking: 'normal',
|
||||
lineColor: '#666666',
|
||||
lineWidth: 1,
|
||||
marker: {
|
||||
lineWidth: 1,
|
||||
lineColor: '#666666'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
series: [
|
||||
@foreach($query->groupBy('ver') as $label => $o)
|
||||
{
|
||||
name: '{{ $label }}',
|
||||
data: {!! $o->map(fn($item)=>['x'=>$item->date,'y'=>$item->total]) !!}
|
||||
},
|
||||
@endforeach
|
||||
]
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#container {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.highcharts-figure,
|
||||
.highcharts-data-table table {
|
||||
min-width: 310px;
|
||||
max-width: 800px;
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
.highcharts-data-table table {
|
||||
font-family: Verdana, sans-serif;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #ebebeb;
|
||||
margin: 10px auto;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.highcharts-data-table caption {
|
||||
padding: 1em 0;
|
||||
font-size: 1.2em;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.highcharts-data-table th {
|
||||
font-weight: 600;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.highcharts-data-table td,
|
||||
.highcharts-data-table th,
|
||||
.highcharts-data-table caption {
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.highcharts-data-table thead tr,
|
||||
.highcharts-data-table tr:nth-child(even) {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.highcharts-data-table tr:hover {
|
||||
background: #f1f7ff;
|
||||
}
|
||||
|
||||
.highcharts-description {
|
||||
margin: 0.3rem 10px;
|
||||
}
|
||||
</style>
|
@ -2,11 +2,12 @@
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
use App\Http\Controllers\VersionController;
|
||||
use App\Http\Controllers\{StatsController,VersionController};
|
||||
|
||||
Route::get('/', function () {
|
||||
Route::get('/', function(){
|
||||
return redirect()
|
||||
->to('https://demo.phpldapadmin.org');
|
||||
});
|
||||
|
||||
Route::get('/stats',[StatsController::class,'home']);
|
||||
Route::post('{version}',[VersionController::class,'main']);
|
Loading…
x
Reference in New Issue
Block a user