diff options
Diffstat (limited to 'ui/include/views/monitoring.history.php')
-rw-r--r-- | ui/include/views/monitoring.history.php | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/ui/include/views/monitoring.history.php b/ui/include/views/monitoring.history.php index f20ef746389..23e3480b0a2 100644 --- a/ui/include/views/monitoring.history.php +++ b/ui/include/views/monitoring.history.php @@ -26,7 +26,7 @@ $this->includeJsFile('monitoring.history.js.php'); $web_layout_mode = CViewHelper::loadLayoutMode(); -$historyWidget = (new CWidget())->setWebLayoutMode($web_layout_mode); +$html_page = (new CHtmlPage())->setWebLayoutMode($web_layout_mode); $header = [ 'left' => _n('%1$s item', '%1$s items', count($data['items'])), @@ -52,12 +52,8 @@ if ($data['items']) { } if ((count($data['items']) == 1 || $same_host) && $data['itemids']) { - $header['left'] = [ - $host_name, - NAME_DELIMITER, - count($data['items']) == 1 ? $item['name'] : $header['left'] - ]; - $header_row[] = implode('', $header['left']); + $header['left'] = $host_name.NAME_DELIMITER.(count($data['items']) == 1 ? $item['name'] : $header['left']); + $header_row[] = $header['left']; } else { $header_row[] = $header['left']; @@ -103,7 +99,7 @@ if ($data['action'] !== HISTORY_GRAPH && $data['action'] !== HISTORY_BATCH_GRAPH } if ($data['action'] == HISTORY_GRAPH && count($data['items']) == 1) { - $action_list->addItem(get_icon('favourite', [ + $action_list->addItem(get_icon('favorite', [ 'fav' => 'web.favorite.graphids', 'elid' => $item['itemid'], 'elname' => 'itemid' @@ -222,7 +218,7 @@ if ($data['itemids']) { // append plaintext to widget if ($data['plaintext']) { foreach ($header_row as $text) { - $historyWidget->addItem([new CSpan($text), BR()]); + $html_page->addItem([new CSpan($text), BR()]); } if ($data['itemids']) { @@ -231,11 +227,11 @@ if ($data['plaintext']) { foreach ($screen as $text) { $pre->addItem([$text, BR()]); } - $historyWidget->addItem($pre); + $html_page->addItem($pre); } } else { - $historyWidget + $html_page ->setTitle($header['left']) ->setDocUrl(CDocHelper::getUrl(CDocHelper::MONITORING_HISTORY)) ->setControls((new CTag('nav', true, $header['right']))->setAttribute('aria-label', _('Content controls'))); @@ -272,10 +268,10 @@ else { if ($data['itemids']) { if ($data['action'] !== HISTORY_LATEST) { - $historyWidget->addItem($filter_form); + $html_page->addItem($filter_form); } - $historyWidget->addItem($screen->get()); + $html_page->addItem($screen->get()); if ($data['action'] !== HISTORY_LATEST) { CScreenBuilder::insertScreenStandardJs($screen->timeline); @@ -283,10 +279,10 @@ else { } else { if ($filter_tab) { - $historyWidget->addItem($filter_form); + $html_page->addItem($filter_form); } - $historyWidget->addItem( + $html_page->addItem( (new CTableInfo()) ->setHeader([ (new CColHeader(_('Timestamp')))->addClass(ZBX_STYLE_CELL_WIDTH), @@ -298,4 +294,4 @@ else { } } -$historyWidget->show(); +$html_page->show(); |