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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
<?php
namespace Icinga\Module\Map\Forms\Config;
use Icinga\Application\Config;
use Icinga\Forms\ConfigForm;
class GeneralConfigForm extends ConfigForm
{
/**
* Initialize this form
*/
public function init()
{
$this->setName('form_config_map_general');
$this->setSubmitLabel($this->translate('Save Changes'));
}
/**
* {@inheritdoc}
*/
public function createElements(array $formData)
{
$this->addElement(
'text',
'map_default_lat',
array(
'placeholder' => '52.520645',
'label' => $this->translate('Default latitude (WGS84)'),
'description' => $this->translate('Default map position (latitude)'),
'required' => false
)
);
$this->addElement(
'text',
'map_default_long',
array(
'placeholder' => '13.409779',
'label' => $this->translate('Default longitude (WGS84)'),
'description' => $this->translate('Default map position (longitude)'),
'required' => false
)
);
$this->addElement(
'text',
'map_default_zoom',
array(
'placeholder' => '6',
'label' => $this->translate('Default zoom level'),
'description' => $this->translate('Default zoom level of the map'),
'required' => false
)
);
$this->addElement(
'text',
'map_max_zoom',
array(
'placeholder' => '19',
'label' => $this->translate('Maximum zoom level'),
'description' => $this->translate('Maximum zoom level of the map'),
'required' => false
)
);
$this->addElement(
'text',
'map_max_native_zoom',
array(
'placeholder' => '19',
'label' => $this->translate('Maximum native zoom level '),
'description' => $this->translate('Maximum zoom level natively supported by the map'),
'required' => false
)
);
$this->addElement(
'text',
'map_min_zoom',
array(
'placeholder' => '2',
'label' => $this->translate('Minimal zoom level'),
'description' => $this->translate('Minimal zoom level of the map'),
'required' => false
)
);
$this->addElement(
'text',
'map_tile_url',
array(
'placeholder' => '//\{s\}.tile.openstreetmap.org/\{z\}/\{x\}/\{y\}.png',
'label' => $this->translate('URL for tile server'),
'description' => $this->translate('Escaped server url, for leaflet tilelayer'),
'required' => false,
)
);
$this->addElement(
'text',
'map_dashlet_height',
array(
'placeholder' => '300',
'label' => $this->translate('Dashlet height'),
'description' => $this->translate('Dashlet height'),
'required' => false
)
);
$this->addElement(
'select',
'map_stateType',
array(
'label' => $this->translate('State type'),
'description' => $this->translate('State type for status indication'),
'multiOptions' => array(
'soft' => 'soft',
'hard' => 'hard'
),
)
);
$this->addElement(
'text',
'map_disable_cluster_at_zoom',
array(
'label' => $this->translate('Disable clustering at zoomlevel'),
'description' => $this->translate('Don\'t cluster marker at a certain zoomlevel. Use 1 for disabling clustering'),
'required' => false,
)
);
$this->addElement(
'checkbox',
'map_cluster_problem_count',
array(
'label' => $this->translate('Show number of problems in cluster'),
'description' => $this->translate('Show number of problems in cluster instead of the number of markers'),
'required' => false,
'default' => false,
)
);
}
}
|