'; echo '

Welcome to your new Observium dashboard!

'; if (isset($mod['vars']['converted'])) { echo 'This was autogenerated based on your previous front page. It can be modified to suit your requirements.
'; } else { echo 'This is an autogenerated default dashboard. It can be modified to suit your requirements.
'; } echo 'Please see the documentation for information about how to configure this dashboard. Including how to delete this widget!'; echo ''; break; case "weathermap": echo '
'; $wmap = dbFetchRow("SELECT * FROM `weathermaps` WHERE `wmap_name` = ?", [$mod['vars']['mapname']]); echo '

' . '' . htmlentities($wmap['wmap_name']) . '

' . '
' . PHP_EOL; echo '
'; echo '
'; echo ''; echo ''; echo ''; echo '
'; echo '
'; echo '
'; break; case "map": echo '
'; print_dash_map($mod, $width, $height); echo '
'; break; case "port_percent": if ($_SESSION['userlevel'] < 5) { echo '
'; echo '
'; echo '
You have insufficient permissions to view this widget.
'; echo '
'; echo '
'; } elseif ($height < 190) { echo '
'; echo 'WARNING This widget is not tall enough to display the requested content. Module Port Percent requires 190px or taller.'; echo '
'; } else { include($config['html_dir'] . "/includes/status-portpercent.inc.php"); } break; case "alert_table": echo '
'; echo '

Alert Status

'; echo '
'; //echo '
'; //echo '
'; print_alert_table(['status' => 'failed', 'pagination' => FALSE, 'short' => TRUE] ); echo '
'; echo '
'; echo '
'; break; case "status_summary": echo '
'; if ($width > 1000) { $div_class = "col-md-6"; } else { $div_class = "col-md-12"; } if ($height < 210) { $hide_group_bar = 1; } include($config['html_dir'] . '/includes/cache-data.inc.php'); include($config['html_dir'] . "/includes/status-summary.inc.php"); echo '
'; break; case "alert_boxes": case "old_status_boxes": //r($height); include($config['html_dir'] . '/includes/cache-data.inc.php'); //$count = round(($width) / 165) * round(($height+10) / 90); // 1.5 wide $count = floor(($width + 10) / 198) * floor(($height + 10) / 96); // 1.5 wide echo '
'; if ($mod['widget_type'] == 'alert_boxes') { print_status_boxes($mod, $count); } else { print_status_boxes($config['frontpage']['device_status'], $count); } echo '
'; break; case "old_status_table": echo '
'; echo '

Status Warnings and Notifications

'; echo '
'; include($config['html_dir'] . '/includes/cache-data.inc.php'); echo generate_status_table($config['frontpage']['device_status']); echo generate_box_close(); break; case "status_donuts": include($config['html_dir'] . "/includes/status-donuts.inc.php"); break; case "syslog": echo '
'; echo ' '; echo '
'; $syslog_vars = array_merge($mod['vars'], ['short' => TRUE, 'pagesize' => ($height - 36) / 26, 'priority' => $config['frontpage']['syslog']['priority']]); print_syslogs($syslog_vars); echo '
'; echo '
'; break; case "syslog_alerts": echo '
'; echo ' '; echo '
'; $alertlog_vars = array_merge($mod['vars'], ['short' => TRUE, 'pagesize' => ($height - 36) / 26]); print_logalert_log($alertlog_vars); echo '
'; echo '
'; break; case "alertlog": echo '
'; echo ' '; echo '
'; $alertlog_vars = array_merge($mod['vars'], ['short' => TRUE, 'pagesize' => ($height - 36) / 26]); print_alert_log($alertlog_vars); echo '
'; echo '
'; break; case "eventlog": echo '
'; echo ' '; echo '
'; $pagesize = floor(($height - 36) / 26); //if($width > 1000) { $pagesize -= 3; $short = FALSE; } else { $short = TRUE; } $eventlog_vars = array_merge($mod['vars'], ['short' => TRUE, 'pagesize' => $pagesize, 'pageno' => 1, 'severity' => $config['frontpage']['eventlog']['severity']]); print_events($eventlog_vars); echo '
'; echo '
'; break; case "realtime": echo '
'; $realtime_link = 'graph-realtime.php?type=bits&id=430082&interval=10'; ?> Your browser does not support SVG! You need to either use Firefox or Chrome, or download the Adobe SVG plugin. '; break; default: $widget_path = $config['html_dir'] . '/includes/widgets/' . $mod['widget_type'] . '.inc.php'; if (is_file($widget_path)) { include($widget_path); } else { echo '
'; echo '
'; echo '

Unconfigured Module

'; echo '
'; echo '
'; break; } } //echo '
'; } function print_dash_map($mod, $width, $height) { global $config; ?>
'; $vars = $mod['vars']; // set the $vars array to be used mostly by geojson include($config['html_dir'] . '/includes/map/leaflet.inc.php'); } // End show_map // EOF