summaryrefslogtreecommitdiffstats
path: root/library/Director/Web/Table/ObjectsTableHost.php
blob: 5128e0407ee0d3c9488762fbdf275bfcb6c4136e (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
<?php

namespace Icinga\Module\Director\Web\Table;

use gipfl\IcingaWeb2\Table\Extension\MultiSelect;

class ObjectsTableHost extends ObjectsTable
{
    use MultiSelect;

    protected $type = 'host';

    protected $searchColumns = [
        'o.object_name',
        'o.display_name',
        'o.address',
    ];

    protected $columns = [
        'object_name'  => 'o.object_name',
        'display_name' => 'o.display_name',
        'address'      => 'o.address',
        'disabled'     => 'o.disabled',
        'uuid'         => 'o.uuid',
    ];

    protected $showColumns = [
        'object_name' => 'Hostname',
        'address'     => 'Address'
    ];

    public function assemble()
    {
        $this->enableMultiSelect(
            'director/hosts/edit',
            'director/hosts',
            ['uuid']
        );
    }
}