* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * Notification Page * @author Daniel Preussker * @copyright 2015 Daniel Preussker, QuxLabs UG * @license GPL * @package LibreNMS * @subpackage Notifications */ use LibreNMS\Authentication\LegacyAuth; use LibreNMS\ObjectCache; $notifications = new ObjectCache('notifications'); ?>

Notifications

' . $notifications['count'] . ' Unread Notifications '; if (LegacyAuth::user()->hasGlobalAdmin()) { echo ''; } if ($notifications['count'] > 0 && !isset($vars['archive'])) { echo ''; } ?>


'; $class = $notif['severity'] == 2 ? 'text-danger' : 'text-warning'; echo "

"; echo " ${notif['title']}"; echo ""; if ($notif['user_id'] != LegacyAuth::id()) { $sticky_user = LegacyAuth::get()->getUser($notif['user_id']); echo "Sticky by ${sticky_user['username']}"; } else { echo ''; } echo '

'; ?>
>

| Source:

getUser($notif['source']); $notif['source'] = $source_user['username']; } echo '
'; d_echo($notif); $class = 'text-success'; if ($notif['severity'] == 1) { $class='text-warning'; } elseif ($notif['severity'] == 2) { $class = 'text-danger'; } echo "

${notif['title']}"; if (LegacyAuth::user()->hasGlobalAdmin()) { echo ''; } ?>

>

', $notif['body']); ?>

| Source:

Archive

${notif['title']}"; if (LegacyAuth::user()->isAdmin()) { echo ''; } ?>
>

', $notif['body']); ?>

| Source: