/** * Returns a column object for the given row and field. Add additional service tree related formatting. * * @param $rowId * @param $colName * * @return CCol */ protected function makeCol($rowId, $colName) { $class = null; if ($colName == 'status' && zbx_is_int($this->tree[$rowId][$colName]) && $this->tree[$rowId]['id'] > 0) { $status = $this->tree[$rowId][$colName]; // do not show the severity for information and unclassified triggers if (in_array($status, array(TRIGGER_SEVERITY_INFORMATION, TRIGGER_SEVERITY_NOT_CLASSIFIED))) { $this->tree[$rowId][$colName] = new CSpan(_('OK'), 'green'); } else { $this->tree[$rowId][$colName] = getSeverityCaption($status); $class = getSeverityStyle($status); } } $col = parent::makeCol($rowId, $colName); $col->addClass($class); return $col; }