summaryrefslogtreecommitdiffstats
path: root/library/Toplevelview/Monitoring/Servicestatus.php
blob: e43572f8ad959b6fe3f0ce245c513960c67aff4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/* Copyright (C) 2017 Icinga Development Team <info@icinga.com> */

namespace Icinga\Module\Toplevelview\Monitoring;

use Icinga\Data\ConnectionInterface;
use Icinga\Module\Monitoring\Backend\MonitoringBackend;
use Icinga\Module\Monitoring\DataView\Servicestatus as IcingaServiceStatus;

class Servicestatus extends IcingaServiceStatus
{
    /** @noinspection PhpMissingParentConstructorInspection */
    /**
     * @param ConnectionInterface $connection
     * @param array|null          $columns
     * @noinspection PhpMissingParentConstructorInspection
     */
    public function __construct(ConnectionInterface $connection, array $columns = null, $options = null)
    {
        /** @var MonitoringBackend $connection */
        $this->connection = $connection;
        $this->query = new ServicestatusQuery($connection->getResource(), $columns, $options);
    }

    /**
     * {@inheritdoc}
     */
    public function getColumns()
    {
        return array_merge(
            parent::getColumns(),
            array(
                //'service_in_notification_period',
                'service_notification_period',
            )
        );
    }
}