diff options
Diffstat (limited to 'library/Icingadb/Model/Hostgroupsummary.php')
-rw-r--r-- | library/Icingadb/Model/Hostgroupsummary.php | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/library/Icingadb/Model/Hostgroupsummary.php b/library/Icingadb/Model/Hostgroupsummary.php index a9295bb..172413e 100644 --- a/library/Icingadb/Model/Hostgroupsummary.php +++ b/library/Icingadb/Model/Hostgroupsummary.php @@ -13,6 +13,27 @@ 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 $hosts_down_handled + * @property int $hosts_down_unhandled + * @property int $hosts_pending + * @property int $hosts_total + * @property int $hosts_up + * @property int $hosts_severity + * @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 + */ class Hostgroupsummary extends UnionModel { public static function on(Connection $db) @@ -55,6 +76,8 @@ class Hostgroupsummary extends UnionModel public function getColumns() { return [ + 'name' => 'hostgroup_name', + 'name_ci' => 'hostgroup_name_ci', 'display_name' => 'hostgroup_display_name', 'hosts_down_handled' => new Expression( 'SUM(CASE WHEN host_state = 1' @@ -74,7 +97,6 @@ class Hostgroupsummary extends UnionModel 'SUM(CASE WHEN host_state = 0 THEN 1 ELSE 0 END)' ), 'hosts_severity' => new Expression('MAX(host_severity)'), - 'name' => 'hostgroup_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)' @@ -113,7 +135,7 @@ class Hostgroupsummary extends UnionModel public function getSearchColumns() { - return ['display_name']; + return ['name_ci', 'display_name']; } public function getDefaultSort() @@ -133,6 +155,7 @@ class Hostgroupsummary extends UnionModel [ 'hostgroup_id' => 'hostgroup.id', 'hostgroup_name' => 'hostgroup.name', + 'hostgroup_name_ci' => 'hostgroup.name_ci', 'hostgroup_display_name' => 'hostgroup.display_name', 'host_id' => 'host.id', 'host_state' => 'state.soft_state', @@ -154,6 +177,7 @@ class Hostgroupsummary extends UnionModel [ 'hostgroup_id' => 'hostgroup.id', 'hostgroup_name' => 'hostgroup.name', + 'hostgroup_name_ci' => 'hostgroup.name_ci', 'hostgroup_display_name' => 'hostgroup.display_name', 'host_id' => new Expression('NULL'), 'host_state' => new Expression('NULL'), @@ -172,6 +196,7 @@ class Hostgroupsummary extends UnionModel [ 'hostgroup_id' => 'hostgroup.id', 'hostgroup_name' => 'hostgroup.name', + 'hostgroup_name_ci' => 'hostgroup.name_ci', 'hostgroup_display_name' => 'hostgroup.display_name', 'host_id' => new Expression('NULL'), 'host_state' => new Expression('NULL'), |