From ac5b0f3e56837b4ff05651f243aa3de327293f85 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 3 Jun 2025 20:43:20 +1000 Subject: [PATCH] Change stats graph to vX.Y from vX.Y.Z, add star-history --- app/Http/Controllers/StatsController.php | 7 +++++++ resources/views/stats.blade.php | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/app/Http/Controllers/StatsController.php b/app/Http/Controllers/StatsController.php index f6110b0..e161de8 100644 --- a/app/Http/Controllers/StatsController.php +++ b/app/Http/Controllers/StatsController.php @@ -11,10 +11,17 @@ 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'"); + */ + + $case = CaseBuilder::whenRaw("version ~ '-dev-'")->thenRaw("CONCAT(SPLIT_PART(SPLIT_PART(version,'-',1),'.',1),'.',SPLIT_PART(SPLIT_PART(version,'-',1),'.',2),'-',SPLIT_PART(version,'-',2))") + ->whenRaw("version ~ '-00000000$'")->thenRaw("CONCAT(SPLIT_PART(SPLIT_PART(version,'-',1),'.',1),'.',SPLIT_PART(SPLIT_PART(version,'-',1),'.',2),'-GIT')") + ->whenRaw("version ~ '^v[0-9]+\.[0-9]+'")->thenRaw("CONCAT(SPLIT_PART(SPLIT_PART(version,'-',1),'.',1),'.',SPLIT_PART(SPLIT_PART(version,'-',1),'.',2))") + ->elseRaw("'unknown'"); $stats = SiteVersion::select([ DB::raw('DATE(site_versions.created_at) AS created_at'), diff --git a/resources/views/stats.blade.php b/resources/views/stats.blade.php index b02833f..018ffaa 100644 --- a/resources/views/stats.blade.php +++ b/resources/views/stats.blade.php @@ -11,6 +11,12 @@

+
+ +
+ +
+