Пример #1
0
<?php

$no_refresh = true;
$config_groups = get_config_by_group('external');
$oxidized_conf = array(array('name' => 'oxidized.enabled', 'descr' => 'Enable Oxidized support', 'type' => 'checkbox'), array('name' => 'oxidized.url', 'descr' => 'URL to your Oxidized API', 'type' => 'text'), array('name' => 'oxidized.features.versioning', 'descr' => 'Enable config versioning access', 'type' => 'checkbox'), array('name' => 'oxidized.group_support', 'descr' => 'Enable the return of groups to Oxidized', 'type' => 'checkbox'), array('name' => 'oxidized.default_group', 'descr' => 'Set the default group returned', 'type' => 'text'));
$unixagent_conf = array(array('name' => 'unix-agent.port', 'descr' => 'Default unix-agent port', 'type' => 'text'), array('name' => 'unix-agent.connection-timeout', 'descr' => 'Connection timeout', 'type' => 'text'), array('name' => 'unix-agent.read-timeout', 'descr' => 'Read timeout', 'type' => 'text'));
$rrdtool_conf = array(array('name' => 'rrdtool', 'descr' => 'Path to rrdtool binary', 'type' => 'text'), array('name' => 'rrdtool_tune', 'descr' => 'Tune all rrd port files to use max values', 'type' => 'checkbox'));
echo '
<div class="panel-group" id="accordion">
    <form class="form-horizontal" role="form" action="" method="post">
';
echo generate_dynamic_config_panel('Oxidized integration', true, $config_groups, $oxidized_conf);
echo generate_dynamic_config_panel('Unix-agent integration', true, $config_groups, $unixagent_conf);
echo generate_dynamic_config_panel('RRDTool Setup', true, $config_groups, $rrdtool_conf);
echo '
    </form>
</div>
';
Пример #2
0
            </div>
        </div>
    </div>
</div>
<!-- End Boxcar Modal -->

<?php 
if (isset($_GET['error'])) {
    print_error('We had issues connecting to your Pager Duty account, please try again');
}
if (isset($_GET['account']) && isset($_GET['service_key']) && isset($_GET['service_name'])) {
    set_config_name('alert.transports.pagerduty', $_GET['service_key']);
    set_config_name('alert.pagerduty.account', $_GET['account']);
    set_config_name('alert.pagerduty.service', $_GET['service_name']);
}
$config_groups = get_config_by_group('alerting');
if (isset($config['base_url'])) {
    $callback = $config['base_url'] . '/' . $_SERVER['REQUEST_URI'] . '/';
} else {
    $callback = get_url() . '/';
}
$callback = urlencode($callback);
$general_conf = array(array('name' => 'alert.disable', 'descr' => 'Disable alerting', 'type' => 'checkbox'), array('name' => 'alert.admins', 'descr' => 'Issue alerts to admins', 'type' => 'checkbox'), array('name' => 'alert.globals', 'descr' => 'Issue alerts to read only users', 'type' => 'checkbox'), array('name' => 'alert.syscontact', 'descr' => 'Issue alerts to sysContact', 'type' => 'checkbox'), array('name' => 'alert.default_only', 'descr' => 'Send alerts to default contact only', 'type' => 'checkbox'), array('name' => 'alert.default_mail', 'descr' => 'Default contact', 'type' => 'text'), array('name' => 'alert.tolerance_window', 'descr' => 'Tolerance window for cron', 'type' => 'text'), array('name' => 'alert.fixed-contacts', 'descr' => 'Updates to contact email addresses not honored', 'type' => 'checkbox'));
$mail_conf = array(array('name' => 'alert.transports.mail', 'descr' => 'Enable email alerting', 'type' => 'checkbox'), array('name' => 'email_backend', 'descr' => 'How to deliver mail', 'options' => $dyn_config['email_backend'], 'type' => 'select'), array('name' => 'email_user', 'descr' => 'From name', 'type' => 'text'), array('name' => 'email_from', 'descr' => 'From email address', 'type' => 'text'), array('name' => 'email_html', 'descr' => 'Use HTML emails', 'type' => 'checkbox'), array('name' => 'email_sendmail_path', 'descr' => 'Sendmail path', 'type' => 'text'), array('name' => 'email_smtp_host', 'descr' => 'SMTP Host', 'type' => 'text'), array('name' => 'email_smtp_port', 'descr' => 'SMTP Port', 'type' => 'text'), array('name' => 'email_smtp_timeout', 'descr' => 'SMTP Timeout', 'type' => 'text'), array('name' => 'email_smtp_secure', 'descr' => 'SMTP Secure', 'type' => 'select', 'options' => $dyn_config['email_smtp_secure']), array('name' => 'email_smtp_auth', 'descr' => 'SMTP Authentication', 'type' => 'checkbox'), array('name' => 'email_smtp_username', 'descr' => 'SMTP Authentication Username', 'type' => 'text'), array('name' => 'email_smtp_password', 'descr' => 'SMTP Authentication Password', 'type' => 'text'));
echo '
<div class="panel-group" id="accordion">
    <form class="form-horizontal" role="form" action="" method="post">
';
echo generate_dynamic_config_panel('General alert settings', $config_groups, $general_conf);
echo generate_dynamic_config_panel('Email transport', $config_groups, $mail_conf, 'mail');
echo '
Пример #3
0
<?php

$no_refresh = true;
$config_groups = get_config_by_group('webui');
$search_conf = array(array('name' => 'webui.global_search_result_limit', 'descr' => 'Set the max search result limit', 'type' => 'text'));
echo '
<div class="panel-group" id="accordion">
    <form class="form-horizontal" role="form" action="" method="post">
';
echo generate_dynamic_config_panel('Search settings', true, $config_groups, $search_conf);
echo '
    </form>
</div>
';