$graphsLink = _('Graphs'); $discoveryLink = _('Discovery'); $webLink = _('Web'); } $configurationArray = array($hostLink, new CSpan(array($applicationsLink, SPACE, '(' . $this->data['host']['applications'] . ')'), 'overview-link'), new CSpan(array($itemsLink, SPACE, '(' . $this->data['host']['items'] . ')'), 'overview-link'), new CSpan(array($triggersLink, SPACE, '(' . $this->data['host']['triggers'] . ')'), 'overview-link'), new CSpan(array($graphsLink, SPACE, '(' . $this->data['host']['graphs'] . ')'), 'overview-link'), new CSpan(array($discoveryLink, SPACE, '(' . $this->data['host']['discoveries'] . ')'), 'overview-link'), new CSpan(array($webLink, SPACE, '(' . $this->data['host']['httpTests'] . ')'), 'overview-link')); $overviewFormList->addRow(_('Configuration'), $configurationArray); $hostInventoriesTab = new CTabView(array('remember' => true)); $hostInventoriesTab->setSelected(0); $hostInventoriesTab->addTab('overviewTab', _('Overview'), $overviewFormList); /* * Details tab */ $detailsFormList = new CFormList(); $inventoryValues = false; if ($this->data['host']['inventory']) { foreach ($this->data['host']['inventory'] as $key => $value) { if (!zbx_empty($value)) { $detailsFormList->addRow($this->data['tableTitles'][$key]['title'], new CSpan(zbx_str2links($value), 'text-field')); $inventoryValues = true; } } } if (!$inventoryValues) { $hostInventoriesTab->setDisabled(array(1)); } $hostInventoriesTab->addTab('detailsTab', _('Details'), $detailsFormList); // append tabs and form $hostInventoriesForm->addItem($hostInventoriesTab); $hostInventoriesForm->addItem(makeFormFooter(null, new CButtonCancel(url_param('groupid')))); $hostInventoryWidget->addItem($hostInventoriesForm); return $hostInventoryWidget;