public function actionSave()
 {
     $help = new CHelp();
     $help->setAttributes(CRequest::getArray($help::getClassName()));
     if ($help->validate()) {
         $help->save();
         if ($this->continueEdit()) {
             $this->redirect("?action=edit&id=" . $help->getId());
         } else {
             $this->redirect("?action=index");
         }
     }
     $this->addCSSInclude("_modules/_redactor/redactor.css");
     $this->addJSInclude("_modules/_redactor/redactor.min.js");
     $this->setData("help", $help);
     $this->renderView("_help/add.tpl");
 }
Exemplo n.º 2
0
        $row = new CRow(null);
        $row->addItem(new CCol(SPACE, 'normal'));
        for ($i = 0; $i < TRIGGER_SEVERITY_COUNT; $i++) {
            $row->addItem(new CCol(SPACE, getSeverityStyle($i)));
        }
        $col = new CTable('', 'blink overview-mon-severities');
        $col->addRow($row);
        // double div necassary for FireFox
        $col = new CCol(new CDiv(new CDiv($col), 'overview-mon-severities-container'));
        $hintTable->addRow(array($col, _s('Age less than %s', convertUnitsS($config['blink_period']))));
    }
    $hintTable->addRow(array(new CCol(SPACE), _('No trigger')));
} else {
    $hintTable->addRow(array(new CCol(SPACE), _('OK or no trigger')));
}
$help = new CHelp('web.view.php', 'right');
$help->setHint($hintTable, '', '', true, false);
// header right
$overviewWidget->addPageHeader(_('OVERVIEW'), array(get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen'])), SPACE, $help));
// header left
$styleComboBox = new CComboBox('view_style', $this->data['view_style'], 'submit()');
$styleComboBox->addItem(STYLE_TOP, _('Top'));
$styleComboBox->addItem(STYLE_LEFT, _('Left'));
$hostLocationForm = new CForm('get');
$hostLocationForm->addVar('groupid', $this->data['groupid']);
$hostLocationForm->additem(array(_('Hosts location'), SPACE, $styleComboBox));
$overviewWidget->addHeader($hostLocationForm);
if ($config['dropdown_first_entry'] || $this->data['pageFilter']->applicationsSelected || $this->data['pageFilter']->groupsSelected) {
    if ($this->data['type'] == SHOW_DATA) {
        $dataTable = getItemsDataOverview(array_keys($this->data['pageFilter']->hosts), $this->data['pageFilter']->application, $this->data['view_style']);
    } elseif ($this->data['type'] == SHOW_TRIGGERS) {
$config = select_config();
// blinking preview in help popup (only if blinking is enabled)
if ($config['blink_period'] > 0) {
    $row = new CRow(null);
    $row->addItem(new CCol(SPACE, 'normal'));
    for ($i = 0; $i < TRIGGER_SEVERITY_COUNT; $i++) {
        $row->addItem(new CCol(SPACE, getSeverityStyle($i)));
    }
    $col = new CTable('', 'blink overview-mon-severities');
    $col->addRow($row);
    // double div necassary for FireFox
    $col = new CCol(new CDiv(new CDiv($col), 'overview-mon-severities-container'));
    $hintTable->addRow(array($col, _s('Age less than %s', convertUnitsS($config['blink_period']))));
}
$hintTable->addRow(array(new CCol(SPACE), _('No trigger')));
$help = new CHelp();
$help->setHint($hintTable);
// header right
$overviewWidget->addPageHeader(_('OVERVIEW'), array(get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen'])), SPACE, $help));
// header left
$styleComboBox = new CComboBox('view_style', $this->data['view_style'], 'submit()');
$styleComboBox->addItem(STYLE_TOP, _('Top'));
$styleComboBox->addItem(STYLE_LEFT, _('Left'));
$hostLocationForm = new CForm('get');
$hostLocationForm->addVar('groupid', $this->data['groupid']);
$hostLocationForm->additem(array(_('Hosts location'), SPACE, $styleComboBox));
$overviewWidget->addHeader($hostLocationForm);
// filter
$filter = $this->data['filter'];
$filterFormView = new CView('common.filter.trigger', array('overview' => true, 'filter' => array('showTriggers' => $filter['showTriggers'], 'ackStatus' => $filter['ackStatus'], 'showSeverity' => $filter['showSeverity'], 'statusChange' => $filter['statusChange'], 'statusChangeDays' => $filter['statusChangeDays'], 'txtSelect' => $filter['txtSelect'], 'application' => $filter['application'], 'inventory' => $filter['inventory'], 'showMaintenance' => $filter['showMaintenance'], 'hostId' => $this->data['hostid'], 'groupId' => $this->data['groupid'], 'fullScreen' => $this->data['fullscreen'])));
$filterForm = $filterFormView->render();
Exemplo n.º 4
0
            $value = str_replace('\\"', '"', addslashes($value));
            //			$value = preg_replace("/([^\\\])\'/uU", "$1\\\'", $value);
            if (!empty($value)) {
                $output .= "\t'" . zbx_strtoupper($key) . "'=>\t\t\t'" . $value . "',\n";
            }
        }
        $output .= '
	);
?>
';
        print $output;
        die;
    }
}
if (isset($_REQUEST['next'])) {
    $help = new CHelp('web.view.php');
    $help_table = new CTableInfo();
    $help_table->setAttribute('style', 'width: 600px;');
    if ($_REQUEST['extlang'] == 'new') {
        $help_table->addRow(array(S_STEP . SPACE . '1:', S_NEW_LOCALE_STEP_1));
        $help_table->addRow(array(S_STEP . SPACE . '2:', S_NEW_LOCALE_STEP_2));
        $help_table->addRow(array(S_STEP . SPACE . '3:', array(S_NEW_LOCALE_STEP_3_1, BR(), S_NEW_LOCALE_STEP_3_2)));
        $help_table->addRow(array(S_STEP . SPACE . '4:', array(S_NEW_LOCALE_STEP_4_1, BR(), S_NEW_LOCALE_STEP_4_2, BR(), S_NEW_LOCALE_STEP_4_3, BR(), S_NEW_LOCALE_STEP_4_4, BR(), S_NEW_LOCALE_STEP_4_5)));
    } else {
        $help_table->addRow(array(S_STEP . SPACE . '1:', S_UPDATE_LOCALE_1));
        $help_table->addRow(array(S_STEP . SPACE . '2:', S_UPDATE_LOCALE_2));
        $help_table->addRow(array(S_STEP . SPACE . '3:', S_UPDATE_LOCALE_3));
    }
    $help->setHint($help_table);
    show_table_header(S_LOCALES);
    $frmLcls = new CFormTable(SPACE . S_CREATE . SPACE . S_LOCALE_SMALL . SPACE . S_FROM_SMALL . SPACE . $ZBX_LOCALES[$_REQUEST['srclang']], 'locales.php?action=1', 'post', null, 'form');
Exemplo n.º 5
0
$PAGE_GROUPS = get_viewed_groups(PERM_READ_ONLY, $params);
$PAGE_HOSTS = get_viewed_hosts(PERM_READ_ONLY, $PAGE_GROUPS['selected'], $params);
validate_group($PAGE_GROUPS, $PAGE_HOSTS);
$form = new CForm();
$form->setMethod('get');
$available_groups = $PAGE_GROUPS['groupids'];
$cmbGroups = new CComboBox('groupid', $PAGE_GROUPS['selected'], 'javascript: submit();');
foreach ($PAGE_GROUPS['groups'] as $groupid => $name) {
    $cmbGroups->addItem($groupid, get_node_name_by_elid($groupid) . $name);
}
$form->addItem(array(S_GROUP . SPACE, $cmbGroups, SPACE));
$cmbType = new CComboBox('type', $_REQUEST['type'], 'submit()');
$cmbType->addItem(SHOW_TRIGGERS, S_TRIGGERS);
$cmbType->addItem(SHOW_DATA, S_DATA);
$form->addItem(array(S_TYPE . SPACE, $cmbType));
$help = new CHelp('web.view.php', 'right');
$help_table = new CTableInfo();
$help_table->setAttribute('style', 'width: 200px');
if ($_REQUEST['type'] == SHOW_TRIGGERS) {
    $help_table->addRow(array(new CCol(SPACE, 'normal'), S_DISABLED));
}
foreach (array(1, 2, 3, 4, 5) as $tr_severity) {
    $help_table->addRow(array(new CCol(get_severity_description($tr_severity), get_severity_style($tr_severity)), S_ENABLED));
}
$help_table->addRow(array(new CCol(SPACE, 'unknown_trigger'), S_UNKNOWN));
if ($_REQUEST['type'] == SHOW_TRIGGERS) {
    $col = new CCol(SPACE, 'unknown_trigger');
    $col->setAttribute('style', 'background-image: url(images/gradients/blink1.gif); ' . 'background-position: top left; background-repeat: repeate;');
    $help_table->addRow(array($col, S_5_MIN));
    $col = new CCol(SPACE, 'unknown_trigger');
    $col->setAttribute('style', 'background-image: url(images/gradients/blink2.gif); ' . 'background-position: top left; background-repeat: repeate;');
Exemplo n.º 6
0
$PAGE_GROUPS = get_viewed_groups(PERM_READ_ONLY, $params);
$PAGE_HOSTS = get_viewed_hosts(PERM_READ_ONLY, $PAGE_GROUPS['selected'], $params);
validate_group($PAGE_GROUPS, $PAGE_HOSTS);
$form = new CForm();
$form->setMethod('get');
$available_groups = $PAGE_GROUPS['groupids'];
$cmbGroups = new CComboBox('groupid', $PAGE_GROUPS['selected'], 'javascript: submit();');
foreach ($PAGE_GROUPS['groups'] as $groupid => $name) {
    $cmbGroups->addItem($groupid, get_node_name_by_elid($groupid) . $name);
}
$form->addItem(array(S_GROUP . SPACE, $cmbGroups, SPACE));
$cmbType = new CComboBox('type', $_REQUEST['type'], 'submit()');
$cmbType->addItem(SHOW_TRIGGERS, S_TRIGGERS);
$cmbType->addItem(SHOW_DATA, S_DATA);
$form->addItem(array(S_TYPE . SPACE, $cmbType));
$help = new CHelp('web.view.php', 'right');
$help_table = new CTableInfo();
$help_table->addOption('style', 'width: 200px');
if ($_REQUEST['type'] == SHOW_TRIGGERS) {
    $help_table->addRow(array(new CCol(SPACE, 'normal'), S_DISABLED));
}
foreach (array(1, 2, 3, 4, 5) as $tr_severity) {
    $help_table->addRow(array(new CCol(get_severity_description($tr_severity), get_severity_style($tr_severity)), S_ENABLED));
}
$help_table->addRow(array(new CCol(SPACE, 'unknown_trigger'), S_UNKNOWN));
if ($_REQUEST['type'] == SHOW_TRIGGERS) {
    $col = new CCol(SPACE, 'unknown_trigger');
    $col->addOption('style', 'background-image: url(images/gradients/blink1.gif); ' . 'background-position: top left; background-repeat: repeate;');
    $help_table->addRow(array($col, S_5_MIN));
    $col = new CCol(SPACE, 'unknown_trigger');
    $col->addOption('style', 'background-image: url(images/gradients/blink2.gif); ' . 'background-position: top left; background-repeat: repeate;');