summary = $summary; } protected function createDonut(): ValidHtml { $donut = (new Donut()) ->addSlice($this->summary->hosts_up, ['class' => 'slice-state-ok']) ->addSlice($this->summary->hosts_down_handled, ['class' => 'slice-state-critical-handled']) ->addSlice($this->summary->hosts_down_unhandled, ['class' => 'slice-state-critical']) ->addSlice($this->summary->hosts_pending, ['class' => 'slice-state-pending']); return HtmlString::create($donut->render()); } protected function createTotal(): ValidHtml { $url = Links::hosts(); if ($this->hasBaseFilter()) { $url->addFilter(Filter::fromQueryString(QueryString::render($this->getBaseFilter()))); } return new Link( new VerticalKeyValue( tp('Host', 'Hosts', $this->summary->hosts_total), $this->summary->hosts_total ), $url ); } protected function createBadges(): ValidHtml { $badges = new HostStateBadges($this->summary); if ($this->hasBaseFilter()) { $badges->setBaseFilter($this->getBaseFilter()); } return $badges; } }