From cde4d6a09fb5a7a56323bd68c8da786c7dddd6be Mon Sep 17 00:00:00 2001 From: Kevin Zink Date: Tue, 11 Apr 2023 01:58:50 +0200 Subject: [PATCH] Add link to hosts mgmt (ipmi) interface (#14905) * Add link to hosts mgmt (ipmi) interface * Fix Style * Fix style * Fix Lint * Update DeviceController.php Mgmt > IPMI --- app/Http/Controllers/DeviceController.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/Http/Controllers/DeviceController.php b/app/Http/Controllers/DeviceController.php index 75fc5e54bd..6918b7c32d 100644 --- a/app/Http/Controllers/DeviceController.php +++ b/app/Http/Controllers/DeviceController.php @@ -200,6 +200,17 @@ class DeviceController extends Controller 'onclick' => 'http_fallback(this); return false;', ]; + // IPMI + if ($device->attribs->firstWhere('attrib_type', 'ipmi_hostname')) { + $device_links['ipmi'] = [ + 'icon' => 'fa-microchip', + 'url' => 'https://' . $device->attribs->firstWhere('attrib_type', 'ipmi_hostname')->attrib_value, + 'title' => __('IPMI'), + 'external' => true, + 'onclick' => 'http_fallback(this); return false;', + ]; + } + // SSH $ssh_url = Config::has('gateone.server') ? Config::get('gateone.server') . '?ssh=ssh://' . (Config::get('gateone.use_librenms_user') ? Auth::user()->username . '@' : '') . $device['hostname'] . '&location=' . $device['hostname']