Skip to content

Commit

Permalink
ServicegroupSummary: Support name_ci in quick searches
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Mar 21, 2024
1 parent 26b809f commit e2d8e68
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion library/Icingadb/Model/ServicegroupSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/**
* @property string $id
* @property string $display_name
* @property string $name_ci
* @property string $name
* @property int $services_critical_handled
* @property int $services_critical_unhandled
Expand Down Expand Up @@ -70,8 +71,9 @@ public function getKeyName()
public function getColumns()
{
return [
'display_name' => 'servicegroup_display_name',
'name' => 'servicegroup_name',
'name_ci' => 'servicegroup_name_ci',
'display_name' => 'servicegroup_display_name',
'services_critical_handled' => new Expression(
'SUM(CASE WHEN service_state = 2'
. ' AND (service_handled = \'y\' OR service_reachable = \'n\') THEN 1 ELSE 0 END)'
Expand Down Expand Up @@ -131,6 +133,7 @@ public function getUnions()
[
'servicegroup_id' => 'servicegroup.id',
'servicegroup_name' => 'servicegroup.name',
'servicegroup_name_ci' => 'servicegroup.name_ci',
'servicegroup_display_name' => 'servicegroup.display_name',
'service_id' => 'service.id',
'service_state' => 'state.soft_state',
Expand All @@ -145,6 +148,7 @@ public function getUnions()
[
'servicegroup_id' => 'servicegroup.id',
'servicegroup_name' => 'servicegroup.name',
'servicegroup_name_ci' => 'servicegroup.name_ci',
'servicegroup_display_name' => 'servicegroup.display_name',
'service_id' => new Expression('NULL'),
'service_state' => new Expression('NULL'),
Expand Down

0 comments on commit e2d8e68

Please sign in to comment.