diff --git a/app/Views/dashboardsCollector.php b/app/Views/dashboardsCollector.php index 8e18c1f2b..d17008edb 100644 --- a/app/Views/dashboardsCollector.php +++ b/app/Views/dashboardsCollector.php @@ -3,15 +3,17 @@ # SPDX-License-Identifier: AGPL-3.0-or-later include 'shared/collection_functions.php'; $every = ''; -if (stripos($data[0]->{'hour'}, '*/') !== false) { - $every = str_replace('*/', '', $data[0]->{'hour'}) . ' hours'; -} -if (stripos($data[0]->{'minute'}, '*/') !== false) { - $minute = str_replace('*/', '', $data[0]->{'minute'}); - if ($every != "") { - $every .= ', ' . $minute . ' minutes'; - } else { - $every = $minute . ' minutes'; +if (!empty($data[0]) and $included[0]->attributes->type === 'collector') { + if (stripos($data[0]->{'hour'}, '*/') !== false) { + $every = str_replace('*/', '', $data[0]->{'hour'}) . ' hours'; + } + if (stripos($data[0]->{'minute'}, '*/') !== false) { + $minute = str_replace('*/', '', $data[0]->{'minute'}); + if ($every != "") { + $every .= ', ' . $minute . ' minutes'; + } else { + $every = $minute . ' minutes'; + } } } ?> diff --git a/app/Views/shared/header.php b/app/Views/shared/header.php index 072bc2873..4c15d6403 100644 --- a/app/Views/shared/header.php +++ b/app/Views/shared/header.php @@ -27,6 +27,9 @@ function my_comparison($asort, $bsort) $dashboard = (!empty($user->dashboard_id)) ? $user->dashboard_id : 1; $homepage = url_to('dashboardsExecute', $dashboard); } +if (!empty($config->servers)) { + $homepage = url_to('dashboardCollector'); +} ?> @@ -503,13 +506,18 @@ function my_comparison($asort, $bsort)