From cd4b6936c80f245ce40e28f9d2caeaa8e64f3d90 Mon Sep 17 00:00:00 2001 From: iglocska Date: Fri, 6 Mar 2020 10:06:31 +0100 Subject: [PATCH] new: [widgets] Whoami widget added --- app/Lib/Dashboard/MispAdminSyncTestWidget.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Lib/Dashboard/MispAdminSyncTestWidget.php b/app/Lib/Dashboard/MispAdminSyncTestWidget.php index 2a97bb0ea..2df884f6d 100644 --- a/app/Lib/Dashboard/MispAdminSyncTestWidget.php +++ b/app/Lib/Dashboard/MispAdminSyncTestWidget.php @@ -8,7 +8,7 @@ class MispAdminSyncTestWidget public $height = 2; public $params = array(); public $description = 'Basic widget showing some server statistics in regards to MISP.'; - public $cacheLifetime = 5; + public $cacheLifetime = 1; public function handler($user, $options = array()) @@ -20,6 +20,9 @@ class MispAdminSyncTestWidget 'recursive' => -1 )); $data = array(); + if (empty($servers)) { + return array(); + } $syncTestErrorCodes = $this->Server->syncTestErrorCodes; foreach ($servers as $server) { $result = $this->Server->runConnectionTest($server['Server']['id']);