diff --git a/library/Kubernetes/Web/Widget/IcingaStateReason/IcingaStateReasonRow.php b/library/Kubernetes/Web/Widget/IcingaStateReason/IcingaStateReasonRow.php index a1f39ca0..0d90e62d 100644 --- a/library/Kubernetes/Web/Widget/IcingaStateReason/IcingaStateReasonRow.php +++ b/library/Kubernetes/Web/Widget/IcingaStateReason/IcingaStateReasonRow.php @@ -30,6 +30,11 @@ public function __construct( public function assemble(): void { + $isValidDelta = !empty($this->parentName) && str_contains($this->name, $this->parentName); + $nameElement = $isValidDelta + ? new HighlightDelta($this->name, $this->parentName, new Attributes(['class' => 'tooltip-holder', 'title' => $this->tooltip])) + : new HtmlElement('span', new Attributes(['class' => 'tooltip-holder', 'title' => $this->tooltip]), new Text($this->name)); + $this->addHtml( new HtmlElement( 'span', @@ -40,11 +45,7 @@ public function assemble(): void new HtmlElement( 'span', new Attributes(['class' => 'reason']), - new HighlightDelta( - $this->name, - $this->parentName ?? '', - new Attributes(['class' => 'tooltip-holder', 'title' => $this->tooltip]) - ), + $nameElement, new Text(' ' . $this->reason) ) ); diff --git a/library/Kubernetes/Web/Widget/IcingaStateReason/ServiceIcingaStateReason.php b/library/Kubernetes/Web/Widget/IcingaStateReason/ServiceIcingaStateReason.php index eac46ae6..f1dcff68 100644 --- a/library/Kubernetes/Web/Widget/IcingaStateReason/ServiceIcingaStateReason.php +++ b/library/Kubernetes/Web/Widget/IcingaStateReason/ServiceIcingaStateReason.php @@ -69,7 +69,7 @@ protected function assemble(): void "warning" => 1, "critical" => 2, "unknown" => 3, - "peding" => 99, + "pending" => 99, }; } $this->addHtml($podRows);