From c77f32e6968082ed4bc838dd2d6b1e323fdef470 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 22 Feb 2024 15:15:16 +0100 Subject: [PATCH] fix: statuses --- app/View/Components/Status/Index.php | 3 +-- config/sentry.php | 2 +- config/version.php | 2 +- .../views/components/status/index.blade.php | 17 ++++++++--------- .../views/livewire/server/delete.blade.php | 1 + .../views/livewire/server/resources.blade.php | 2 +- versions.json | 2 +- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/app/View/Components/Status/Index.php b/app/View/Components/Status/Index.php index 0ee009257..56f4c598b 100644 --- a/app/View/Components/Status/Index.php +++ b/app/View/Components/Status/Index.php @@ -11,12 +11,11 @@ class Index extends Component /** * Create a new component instance. */ - public $status = "exited:unhealthy"; + public function __construct( public $resource = null, public bool $showRefreshButton = true, ) { - $this->status = $resource->status; } /** diff --git a/config/sentry.php b/config/sentry.php index f537dc4d2..a183d2d97 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.222', + 'release' => '4.0.0-beta.223', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index 7fca7b055..6ad89f693 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ startsWith('running')) - -@elseif(str($status)->startsWith('restarting') || - str($status)->startsWith('starting') || - str($status)->startsWith('degraded')) - +@if (str($resource->status)->startsWith('running')) + +@elseif(str($resource->status)->startsWith('restarting') || + str($resource->status)->startsWith('starting') || + str($resource->status)->startsWith('degraded')) + @else - + @endif - -@if (!str($status)->contains('exited') && $showRefreshButton) +@if (!str($resource->status)->contains('exited') && $showRefreshButton)