Skip to content

Commit

Permalink
Use size constants from StateBall
Browse files Browse the repository at this point in the history
  • Loading branch information
jrauh01 committed Jan 23, 2025
1 parent f073eed commit 60e6fe8
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion library/Kubernetes/Common/DefaultListItemVisual.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected function assembleVisual(BaseHtmlElement $visual): void
$size = match ($this->getViewMode()) {
ViewModeSwitcher::VIEW_MODE_MINIMAL,
ViewModeSwitcher::VIEW_MODE_COMMON => 'sm',
ViewModeSwitcher::VIEW_MODE_DETAILED => 'm',
ViewModeSwitcher::VIEW_MODE_DETAILED => StateBall::SIZE_MEDIUM,
};

$visual->addHtml(new StateBall($this->item->icinga_state, $size));
Expand Down
2 changes: 1 addition & 1 deletion library/Kubernetes/Web/CronJobListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function assembleVisual(BaseHtmlElement $visual): void
$size = match ($this->getViewMode()) {
ViewModeSwitcher::VIEW_MODE_MINIMAL,
ViewModeSwitcher::VIEW_MODE_COMMON => 'sm',
ViewModeSwitcher::VIEW_MODE_DETAILED => 'm',
ViewModeSwitcher::VIEW_MODE_DETAILED => StateBall::SIZE_MEDIUM,
};

// TODO add icinga state then replace function by DefaultListItemVisual trait
Expand Down
2 changes: 1 addition & 1 deletion library/Kubernetes/Web/IngressListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function assembleVisual(BaseHtmlElement $visual): void
$size = match ($this->getViewMode()) {
ViewModeSwitcher::VIEW_MODE_MINIMAL,
ViewModeSwitcher::VIEW_MODE_COMMON => 'sm',
ViewModeSwitcher::VIEW_MODE_DETAILED => 'm',
ViewModeSwitcher::VIEW_MODE_DETAILED => StateBall::SIZE_MEDIUM,
};

// TODO add icinga state then replace function by DefaultListItemVisual trait
Expand Down
2 changes: 1 addition & 1 deletion library/Kubernetes/Web/NamespaceListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function assembleVisual(BaseHtmlElement $visual): void
$size = match ($this->getViewMode()) {
ViewModeSwitcher::VIEW_MODE_MINIMAL,
ViewModeSwitcher::VIEW_MODE_COMMON => 'sm',
ViewModeSwitcher::VIEW_MODE_DETAILED => 'm',
ViewModeSwitcher::VIEW_MODE_DETAILED => StateBall::SIZE_MEDIUM,
};

// TODO add icinga state then replace function by DefaultListItemVisual trait
Expand Down
3 changes: 2 additions & 1 deletion library/Kubernetes/Web/PersistentVolumeClaimListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use ipl\Web\Widget\HorizontalKeyValue;
use ipl\Web\Widget\Icon;
use ipl\Web\Widget\Link;
use ipl\Web\Widget\StateBall;

class PersistentVolumeClaimListItem extends BaseListItem
{
Expand Down Expand Up @@ -110,7 +111,7 @@ protected function assembleVisual(BaseHtmlElement $visual): void
$size = match ($this->getViewMode()) {
ViewModeSwitcher::VIEW_MODE_MINIMAL,
ViewModeSwitcher::VIEW_MODE_COMMON => 'sm',
ViewModeSwitcher::VIEW_MODE_DETAILED => 'm',
ViewModeSwitcher::VIEW_MODE_DETAILED => StateBall::SIZE_MEDIUM,
};

$visual->addHtml(
Expand Down
3 changes: 2 additions & 1 deletion library/Kubernetes/Web/PersistentVolumeListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use ipl\Web\Widget\HorizontalKeyValue;
use ipl\Web\Widget\Icon;
use ipl\Web\Widget\Link;
use ipl\Web\Widget\StateBall;

class PersistentVolumeListItem extends BaseListItem
{
Expand Down Expand Up @@ -99,7 +100,7 @@ protected function assembleVisual(BaseHtmlElement $visual): void
$size = match ($this->getViewMode()) {
ViewModeSwitcher::VIEW_MODE_MINIMAL,
ViewModeSwitcher::VIEW_MODE_COMMON => 'sm',
ViewModeSwitcher::VIEW_MODE_DETAILED => 'm',
ViewModeSwitcher::VIEW_MODE_DETAILED => StateBall::SIZE_MEDIUM,
};

$visual->addHtml(
Expand Down
2 changes: 1 addition & 1 deletion library/Kubernetes/Web/ServiceListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function assembleVisual(BaseHtmlElement $visual): void
$size = match ($this->getViewMode()) {
ViewModeSwitcher::VIEW_MODE_MINIMAL,
ViewModeSwitcher::VIEW_MODE_COMMON => 'sm',
ViewModeSwitcher::VIEW_MODE_DETAILED => 'm',
ViewModeSwitcher::VIEW_MODE_DETAILED => StateBall::SIZE_MEDIUM,
};

// TODO add icinga state then replace function by DefaultListItemVisual trait
Expand Down

0 comments on commit 60e6fe8

Please sign in to comment.