mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 02:25:05 +00:00
dashboard: clean up previous slightly
This commit is contained in:
parent
ea410547e3
commit
8e8adeca9a
@ -34,9 +34,9 @@ use OPNsense\Core\Config;
|
||||
|
||||
class DashboardController extends ApiControllerBase
|
||||
{
|
||||
private function getTranslations($id)
|
||||
private function getTranslations()
|
||||
{
|
||||
$translations = [
|
||||
return [
|
||||
'cpu' => [
|
||||
'title' => gettext('CPU Usage'),
|
||||
'total' => gettext('Total'),
|
||||
@ -48,8 +48,6 @@ class DashboardController extends ApiControllerBase
|
||||
'title' => gettext('Interfaces'),
|
||||
]
|
||||
];
|
||||
|
||||
return $translations[$id] ?? [];
|
||||
}
|
||||
|
||||
private function canAccessEndpoints($fname)
|
||||
@ -122,7 +120,7 @@ class DashboardController extends ApiControllerBase
|
||||
$result['modules'][] = [
|
||||
'id' => $id,
|
||||
'module' => basename($module),
|
||||
'translations' => $this->getTranslations($id)
|
||||
'translations' => $this->getTranslations()[$id] ?? []
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user