summaryrefslogtreecommitdiffstats
path: root/library/Icingadb/Model/ServicegroupSummary.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Icingadb/Model/ServicegroupSummary.php')
-rw-r--r--library/Icingadb/Model/ServicegroupSummary.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/library/Icingadb/Model/ServicegroupSummary.php b/library/Icingadb/Model/ServicegroupSummary.php
index 89a0953..c15ef07 100644
--- a/library/Icingadb/Model/ServicegroupSummary.php
+++ b/library/Icingadb/Model/ServicegroupSummary.php
@@ -13,6 +13,22 @@ use ipl\Sql\Connection;
use ipl\Sql\Expression;
use ipl\Sql\Select;
+/**
+ * @property string $id
+ * @property string $display_name
+ * @property string $name_ci
+ * @property string $name
+ * @property int $services_critical_handled
+ * @property int $services_critical_unhandled
+ * @property int $services_ok
+ * @property int $services_pending
+ * @property int $services_total
+ * @property int $services_unknown_handled
+ * @property int $services_unknown_unhandled
+ * @property int $services_warning_handled
+ * @property int $services_warning_unhandled
+ * @property int $services_severity
+ */
class ServicegroupSummary extends UnionModel
{
public static function on(Connection $db)
@@ -55,8 +71,9 @@ class ServicegroupSummary extends UnionModel
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)'
@@ -96,7 +113,7 @@ class ServicegroupSummary extends UnionModel
public function getSearchColumns()
{
- return ['display_name'];
+ return ['name_ci', 'display_name'];
}
public function getDefaultSort()
@@ -116,6 +133,7 @@ class ServicegroupSummary extends UnionModel
[
'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',
@@ -130,6 +148,7 @@ class ServicegroupSummary extends UnionModel
[
'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'),