summaryrefslogtreecommitdiffstats
path: root/run.php
blob: 454db18dedbe5eaad9d0b3b6dada6503dbee2029 (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
39
40
41
42
43
44
45
46
47
48
<?php

// Icinga Web 2 Cube Module | (c) 2016 Icinga GmbH | GPLv2

use Icinga\Module\Cube\Cube;

$this->provideHook('cube/Actions', 'Cube/MonitoringActions');
$this->provideHook('cube/IcingaDbActions', 'Cube/IcingaDbActions');

$this->provideHook('icingadb/icingadbSupport');

if (! Cube::isUsingIcingaDb()) {
    $this->addRoute('cube/hosts', new Zend_Controller_Router_Route_Static(
        'cube/hosts',
        [
            'controller'    => 'ido-hosts',
            'action'        => 'index',
            'module'        => 'cube'
        ]
    ));

    $this->addRoute('cube/hosts/details', new Zend_Controller_Router_Route_Static(
        'cube/hosts/details',
        [
            'controller'    => 'ido-hosts',
            'action'        => 'details',
            'module'        => 'cube'
        ]
    ));

    $this->addRoute('cube/services', new Zend_Controller_Router_Route_Static(
        'cube/services',
        [
            'controller'    => 'ido-services',
            'action'        => 'index',
            'module'        => 'cube'
        ]
    ));

    $this->addRoute('cube/services/details', new Zend_Controller_Router_Route_Static(
        'cube/services/details',
        [
            'controller'    => 'ido-services',
            'action'        => 'details',
            'module'        => 'cube'
        ]
    ));
}