| Transport Name | Transport Type | Default | Details | Action | ' . $transport['name'] . ' | '; echo '' . $transport['type'] . ' | '; if ($transport['is_default'] == true) { echo 'Yes | '; } else { echo 'No | '; } echo "";
// Iterate through transport config template to display config details
$class = 'LibreNMS\\Alert\\Transport\\' . ucfirst($transport['type']);
if (! method_exists($class, 'configTemplate')) {
//skip
continue;
}
$tmp = call_user_func($class . '::configTemplate');
$transport_config = json_decode($transport['config'], true);
foreach ($tmp['config'] as $item) {
if ($item['type'] == 'oauth') {
continue;
}
$val = $transport_config[$item['name']];
if ($item['type'] == 'password') {
$val = '••••••••';
}
// Match value to key name for select inputs
if ($item['type'] == 'select') {
$val = array_search($val, $item['options']);
}
echo '' . $item['title'] . ': ' . $val . ' '; } echo ' | ';
echo '';
// Add action buttons for admin users only
if (Auth::user()->hasGlobalAdmin()) {
echo " ";
echo " ";
echo "";
echo " ";
echo ' ';
}
echo ' | ';
echo "\r\n";
}
?>
|---|
| Transport Group | Members | Action | ' . $group['name'] . ' | '; //List out the members of each group $query = 'SELECT `transport_type`, `transport_name` FROM `transport_group_transport` AS `a` LEFT JOIN `alert_transports` AS `b` ON `a`.`transport_id`=`b`.`transport_id` WHERE `transport_group_id`=? order by `transport_name`'; $members = dbFetchRows($query, [$group['id']]); echo '';
foreach ($members as $member) {
echo '' . ucfirst($member['transport_type']) . ': ' . $member['transport_name'] . ' '; } echo ' | ';
echo '';
if (Auth::user()->hasGlobalAdmin()) {
echo " ";
echo " ";
echo "";
echo ' ';
}
echo ' | ';
echo '';
}
?>
|---|