it-novum / openITCOCKPIT

openITCOCKPIT is an Open Source system monitoring tool built for different monitoring engines like Nagios, Naemon and Prometheus.
https://openitcockpit.io/
GNU General Public License v3.0
263 stars 50 forks source link

SLA Information not visible on Service Browser #1671

Closed kbilev closed 5 months ago

kbilev commented 5 months ago

Describe the bug On the Service Browser (/#!/services/browser/id) the SLA Button is not shown, when a SLA is defined via the Host Template.

To Reproduce Steps to reproduce the behavior:

  1. Create a Host via Hosttemplate that has a SLA associated
  2. Create a Service and goto the browser.
  3. You don't get the SLA button (ng-show="slaOverview")

Expected behavior Display the SLA Button

Versions

Additional context When a Host SLA is defined via hosttemplate, the sla_id field remains null in the host. In the ServicesController.php public function loadSlaInformation() it is only checked if the host has an sla_id defined ( $hostSlaId = $host['Host']['sla_id']; ). When it is null, a second check needs to be done to get the sla_id via the hosttemplate.

kbilev commented 5 months ago

to complete the bugreport: the function in the SLA plugin also only checks for the host sla_id

ibering commented 5 months ago

ITC-3189