diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php
index e29c1d863..21121d0ce 100644
--- a/html/includes/functions.inc.php
+++ b/html/includes/functions.inc.php
@@ -1179,3 +1179,73 @@ function dynamic_override_config($type, $name, $device) {
return '';
}
}//end dynamic_override_config()
+
+function generate_dynamic_config_panel($title,$end_panel=true,$config_groups,$items=array(),$transport='') {
+ $anchor = md5($title);
+ $output = '
+
Global Settings
diff --git a/html/pages/settings/alerting.inc.php b/html/pages/settings/alerting.inc.php
index f6c1bda0a..d76303183 100644
--- a/html/pages/settings/alerting.inc.php
+++ b/html/pages/settings/alerting.inc.php
@@ -195,197 +195,95 @@ else {
$callback = urlencode($callback);
+$general_conf = array(
+ 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_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 '