-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathHandlerController.php
More file actions
711 lines (633 loc) · 22.6 KB
/
HandlerController.php
File metadata and controls
711 lines (633 loc) · 22.6 KB
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
<?php
namespace Icinga\Module\TrapDirector\Controllers;
use Icinga\Web\Url;
use Exception;
use Icinga\Module\Trapdirector\TrapsController;
use Icinga\Module\Trapdirector\Tables\HandlerTable;
//use Icinga\Web\Form as Form;
/** Rules management
*/
class HandlerController extends TrapsController
{
/** index : list existing rules
*/
public function indexAction()
{
$this->checkReadPermission();
$this->prepareTabs()->activate('status');
$dbConn = $this->getUIDatabase()->getDb();
if ($dbConn === null) throw new \ErrorException('uncatched db error');
$handlerTable = new HandlerTable(
$this->moduleConfig->getTrapRuleName(),
$this->moduleConfig->getHandlerListTitles(),
$this->moduleConfig->getHandlerListDisplayColumns(),
$this->moduleConfig->getHandlerColumns(),
$dbConn->getConnection(),
$this->view,
$this->moduleConfig->urlPath());
$handlerTable->setMaxPerPage($this->itemListDisplay());
$handlerTable->setMibloader($this->getMIB());
$getVars = $this->getRequest()->getParams();
$handlerTable->getParams($getVars);
if ($handlerTable->isOrderSet() == FALSE)
{ // Id no order set order and grouping to categories
$handlerTable->setGrouping('rule_type');
$handlerTable->setCategoriesArray($this->getHandlersCategory());
$handlerTable->setOrder(array('rule_type'=>'DESC'));
}
$this->view->handlerTable = $handlerTable;
// TODO : Obsolete remove after new table validation.
/**
$this->getHandlerListTable()->setConnection($dbConn);
$this->getHandlerListTable()->setMibloader($this->getMIB());
// Apply pagination limits
$this->view->table=$this->applyPaginationLimits($this->getHandlerListTable(),$this->getModuleConfig()->itemListDisplay());
// Set Filter
$this->view->filterEditor = $this->getHandlerListTable()->getFilterEditor($this->getRequest());
//$this->displayExitError('Handler/indexAction','Not implemented');
*/
}
/** test_rule : test a rule
*/
public function testruleAction()
{
$this->checkReadPermission();
$this->getTabs()->add('get',array(
'active' => true,
'label' => $this->translate('Test Rule'),
'url' => Url::fromRequest()
));
if ($this->params->get('rule') !== null)
{
$this->view->rule= $this->params->get('rule');
}
else
{
$this->view->rule='';
}
}
/**
* Setup default veiw values for add action
*/
private function add_setup_vars()
{
// variables to send to view
$this->view->hostlist=array(); // host list to input datalist
$this->view->hostname=''; // Host name in input text
$this->view->serviceGet=false; // Set to true to get list of service if only one host set
$this->view->serviceSet=null; // Select service in services select (must have serviceGet=true).
$this->view->mainoid=''; // Trap OID
$this->view->mib=''; // Trap mib
$this->view->name=''; // Trap name
$this->view->trapListForMIB=array(); // Trap list if mib exists for trap
$this->view->objectList=array(); // objects sent with trap
$this->view->display=''; // Initial display
$this->view->rule=''; // rule display
$this->view->revertOK=''; // revert OK in seconds
$this->view->hostid=-1; // normally set by javascript serviceGet()
$this->view->ruleid=-1; // Rule id in DB for update & delete
$this->view->setToUpdate=false; // set form as update form
$this->view->setRuleMatch=-1; // set action on rule match (default nothing)
$this->view->setRuleNoMatch=-1; // set action on rule no match (default nothing)
$this->view->selectGroup=false; // Select by group if true
$this->view->hostgroupid=-1; // host group id
$this->view->serviceGroupGet=false; // Get list of service for group (set serviceSet to select one)
$this->view->modifier=null;
$this->view->modified=null;
}
/**
* Setup new handler display from existing trap
* @param integer $trapid : trap id in DB
*/
private function add_from_existing($trapid)
{
/********** Setup from existing trap ***************/
// Get the full trap info
$trapDetail=$this->getTrapDetail($trapid);
$hostfilter=$trapDetail->source_ip;
// Get host
try
{
$hosts=$this->getIdoConn()->getHostByIP($hostfilter);
}
catch (Exception $e)
{
$this->displayExitError('Add handler : get host by IP/Name ',$e->getMessage());
}
// if one unique host found -> put id text input
if (count($hosts)==1) {
$this->view->hostname=$hosts[0]->name;
//$hostid=$hosts[0]->id;
// Tell JS to get services when page is loaded
$this->view->serviceGet=true;
}
else
{
foreach($hosts as $key=>$val)
{
array_push($this->view->hostlist,$hosts[$key]->name);
}
}
// set up trap oid and objects received by the trap
$this->view->mainoid=$trapDetail->trap_oid;
if ($trapDetail->trap_name_mib != null)
{
$this->view->mib=$trapDetail->trap_name_mib;
$this->view->name=$trapDetail->trap_name;
$this->view->trapListForMIB=$this->getMIB()
->getTrapList($trapDetail->trap_name_mib);
}
// Get all objects that can be in trap from MIB
$allObjects=$this->getMIB()->getObjectList($trapDetail->trap_oid);
// Get all objects in current Trap
$currentTrapObjects=$this->getTrapobjects($trapid);
$oid_index=1;
foreach ($currentTrapObjects as $key => $val)
{
$currentObjectType='Unknown';
$currentObjectTypeEnum='Unknown';
if (isset($allObjects[$val->oid]['type']))
{
$currentObjectType=$allObjects[$val->oid]['type'];
$currentObjectTypeEnum=$allObjects[$val->oid]['type_enum'];
}
$currentObject=array(
$oid_index,
$val->oid,
$val->oid_name_mib,
$val->oid_name,
$val->value,
$currentObjectType,
$currentObjectTypeEnum
);
$oid_index++;
array_push($this->view->objectList,$currentObject);
// set currrent object to null in allObjects
if (isset($allObjects[$val->oid]))
{
$allObjects[$val->oid]=null;
}
}
if ($allObjects!=null) // in case trap doesn't have objects or is not resolved
{
foreach ($allObjects as $key => $val)
{
if ($val==null) { continue; }
array_push($this->view->objectList, array(
$oid_index,
$key,
$allObjects[$key]['mib'],
$allObjects[$key]['name'],
'',
$allObjects[$key]['type'],
$allObjects[$key]['type_enum']
));
$oid_index++;
}
}
// Add a simple display
$this->view->display='Trap '.$trapDetail->trap_name.' received';
$this->view->create_basic_rule=true;
}
/**
* Check if host & service still exists or set warning message
* @param object $ruleDetail
*/
private function add_check_host_exists($ruleDetail)
{
// Check if hostname still exists
$host_get=$this->getIdoConn()->getHostByName($this->view->hostname);
if (count($host_get)==0)
{
$this->view->warning_message='Host '.$this->view->hostname. ' doesn\'t exists anymore';
$this->view->serviceGet=false;
}
else
{
// Tell JS to get services when page is loaded
$this->view->serviceGet=true;
// get service id for form to set :
$serviceID=$this->getIdoConn()->getServiceIDByName($this->view->hostname,$ruleDetail->service_name);
if (count($serviceID) ==0)
{
$this->view->warning_message=' Service '.$ruleDetail->service_name. ' doesn\'t exists anymore';
}
else
{
$this->view->serviceSet=$serviceID[0]->id;
}
}
}
/**
* Check if hostgroup & service still exists or set warning message
* @param array $ruleDetail
*/
private function add_check_hostgroup_exists($ruleDetail)
{
// Check if groupe exists
$group_get=$this->getIdoConn()->getHostGroupByName($this->view->hostgroupname);
if (count($group_get)==0)
{
$this->view->warning_message='HostGroup '.$this->view->hostgroupname. ' doesn\'t exists anymore';
$this->view->serviceGroupGet=false;
}
else
{
$grpServices=$this->getIdoConn()->getServicesByHostGroupid($group_get[0]->id);
$foundGrpService=0;
foreach ($grpServices as $grpService)
{
if ($grpService[0] == $ruleDetail->service_name)
{
$foundGrpService=1;
$this->view->serviceSet=$ruleDetail->service_name;
}
}
// Tell JS to get services when page is loaded
$this->view->serviceGroupGet=true;
if ($foundGrpService==0)
{
$this->view->warning_message.=' Service '.$ruleDetail->service_name. ' doesn\'t exists anymore';
}
}
}
/**
* Create object list array with all OIDs in rule & display
* Replace in rule & display by $<n>$
* @param string $display
* @param string $rule
* @return array
*/
private function add_create_trap_object_list(&$display, &$rule)
{
$curObjectList=array();
$index=1;
// check in display & rule for : OID(<oid>)
$matches=array();
while ( preg_match('/_OID\(([\.0-9\*]+)\)/',$display,$matches) ||
preg_match('/_OID\(([\.0-9\*]+)\)/',$rule,$matches))
{
$curOid=$matches[1];
if ( (preg_match('/\*/',$curOid) == 0 )
&& ($object=$this->getMIB()->translateOID($curOid)) != null)
{
array_push($curObjectList, array(
$index,
$curOid,
$object['mib'],
$object['name'],
'',
$object['type'],
$object['type_enum']
));
}
else
{
array_push($curObjectList, array(
$index,
$curOid,
'not found',
'not found',
'',
'not found',
'not found'
));
}
$curOid = preg_replace('/\*/','\*',$curOid);
$display=preg_replace('/_OID\('.$curOid.'\)/','\$'.$index.'\$',$display);
$rule=preg_replace('/_OID\('.$curOid.'\)/','\$'.$index.'\$',$rule);
$index++;
}
return $curObjectList;
}
/** Add a handler
* Get params fromid : setup from existing trap (id of trap table)
* Get param ruleid : edit from existing handler (id of rule table)
*/
public function addAction()
{
$this->checkConfigPermission();
// set up tab
$this->prepareTabs();
$this->getTabs()->add('get',array(
'active' => true,
'label' => $this->translate('Add handler'),
'url' => Url::fromRequest()
));
$this->add_setup_vars(); // setup default $this->view variables.
// Get Mib List from DB
$this->view->mibList=$this->getMIB()->getMIBList();
// Get categories
$this->view->categoryList = $this->getHandlersCategory();
//$this->view->trapvalues=false; // Set to true to display 'value' colum in objects
if (($trapid = $this->params->get('fromid')) !== null) {
/********** Setup from existing trap ***************/
$this->add_from_existing($trapid);
return;
}
if ($this->params->get('ruleid') !== null) {
/************* Rule editing ***************/
$ruleid=$this->params->get('ruleid');
$this->view->ruleid=$ruleid;
$this->view->setToUpdate=true;
// Get rule info from DB
$ruleDetail=$this->getRuleDetail($ruleid);
$this->view->hostname=$ruleDetail->host_name;
$this->view->revertOK=$ruleDetail->revert_ok;
$this->view->setRuleMatch=$ruleDetail->action_match;
$this->view->setRuleNoMatch=$ruleDetail->action_nomatch;
$this->view->hostgroupname=$ruleDetail->host_group_name;
$this->view->modified=gmdate("Y-m-d\TH:i:s\Z",$ruleDetail->modified);
$this->view->modifier=$ruleDetail->modifier;
$this->view->comment = $ruleDetail->comment;
$this->view->category = $ruleDetail->category;
// Warning message if host/service don't exists anymore
$this->view->warning_message='';
if ($this->view->hostname != null)
{
$this->view->selectGroup=false;
// Check if hostname still exists
$this->add_check_host_exists($ruleDetail);
}
else
{
$this->view->selectGroup=true;
$this->add_check_hostgroup_exists($ruleDetail); // Check if groupe exists
}
$this->view->mainoid=$ruleDetail->trap_oid;
$oidName=$this->getMIB()->translateOID($ruleDetail->trap_oid);
if ($oidName != null) // oid is found in mibs
{
$this->view->mib=$oidName['mib'];
$this->view->name=$oidName['name'];
$this->view->trapListForMIB=$this->getMIB()
->getTrapList($oidName['mib']);
}
// Create object list with : display & rules references (OID) and complete with all objects if found
$display=$ruleDetail->display;
$rule=$ruleDetail->rule;
// Create object list array with all OIDs in rule & display
$curObjectList=$this->add_create_trap_object_list($display, $rule);
// set display
$this->view->display=$display;
$this->view->rule=$rule;
$this->view->objectList=$curObjectList;
}
}
/** Validate form and output message to user
* @param in postdata
* @return string status : OK / <Message>
**/
protected function handlerformAction()
{
$postData=$this->getRequest()->getPost();
//print_r($postData ).'<br>';
$params=array(
// id (also db) => array('post' => post id, 'val' => default val, 'db' => send to table)
'hostgroup' => array('post' => 'hostgroup', 'db'=>false),
'db_rule' => array('post' => 'db_rule', 'db'=>false),
'hostid' => array('post' => 'hostid', 'db'=>false),
'host_name' => array('post' => 'hostname', 'val' => null, 'db'=>true),
'host_group_name'=> array('post' => null, 'val' => null, 'db'=>true),
'serviceid' => array('post' => 'serviceid', 'db'=>false),
'service_name' => array('post' => 'serviceName', 'db'=>true),
'comment' => array('post' => 'comment', 'val' => '', 'db'=>true),
'rule_type' => array('post' => 'category', 'val' => 0, 'db'=>true),
'trap_oid' => array('post' => 'oid', 'db'=>true),
'revert_ok' => array('post' => 'revertOK', 'val' => 0, 'db'=>true),
'display' => array('post' => 'display', 'val' => '', 'db'=>true),
'rule' => array('post' => 'rule', 'val' => '', 'db'=>true),
'action_match' => array('post' => 'ruleMatch', 'val' => -1, 'db'=>true),
'action_nomatch'=> array('post' => 'ruleNoMatch', 'val' => -1, 'db'=>true),
'ip4' => array('post' => null, 'val' => null, 'db'=>true),
'ip6' => array('post' => null, 'val' => null, 'db'=>true),
'action_form' => array('post' => 'action_form', 'val' => null, 'db'=>false)
);
if (isset($postData[$params['action_form']['post']])
&& $postData[$params['action_form']['post']] == 'delete' )
{
try
{
$this->getUIDatabase()->deleteRule($postData[$params['db_rule']['post']]);
}
catch (Exception $e)
{
$this->_helper->json(array('status'=>$e->getMessage(),'location'=>'Deleting Rule'));
return;
}
//$this->Module()->
$this->_helper->json(array(
'status'=>'OK',
'redirect'=>'trapdirector/handler'
));
}
foreach (array_keys($params) as $key)
{
if ($params[$key]['post']==null) continue; // data not sent in post vars
if (! isset($postData[$params[$key]['post']]))
{
// should not happen as the js checks data
$this->_helper->json(array('status'=>'No ' . $key));
}
else
{
$data=$postData[$params[$key]['post']];
if ($data!=null && $data !="")
{
$params[$key]['val']=$postData[$params[$key]['post']];
}
}
}
$this->getIdoConn(); //Set apiMode
try
{
$isHostGroup=($params['hostgroup']['val'] == 1)?true:false;
if (! $isHostGroup )
{ // checks if selection by host
$hostAddr=$this->getIdoConn()->getHostInfoByID($params['hostid']['val']);
if ($hostAddr === NULL) throw new \Exception("No object found");
$params['ip4']['val']=$hostAddr->ip4;
$params['ip6']['val']=$hostAddr->ip6;
$checkHostName=$hostAddr->name;
if ($params['host_name']['val'] != $checkHostName)
{
$this->_helper->json(array('status'=>"Invalid host id : Please re enter host name"));
return;
}
if ($this->apiMode == TRUE)
{
$serviceName=$this->getIdoConn()->getServiceById($params['serviceid']['val']);
if (count($serviceName) == 0 )
{
$this->_helper->json(array('status'=>"Invalid service id : Please re enter service",'sent'=>$params['serviceid']['val'],'found'=>$serviceName[0]->__name));
return;
}
}
else
{
if (!is_numeric($params['serviceid']['val']))
{
$this->_helper->json(array('status'=>"Invalid service id ". $params['serviceid']['val']));
return;
}
$serviceName=$this->getUIDatabase()->getObjectNameByid($params['serviceid']['val']);
if ($params['service_name']['val'] != $serviceName->name2)
{
$this->_helper->json(array('status'=>"Invalid service id : Please re enter service"));
return;
}
}
}
else
{
if ($this->apiMode == TRUE)
{
$object=$this->getIdoConn()->getHostGroupById($params['hostid']['val']);
if (empty($object) || $params['host_name']['val'] != $object->__name)
{
$this->_helper->json(array('status'=>"Invalid object group id : Please re enter service"));
return;
}
}
else
{
$object=$this->getUIDatabase()->getObjectNameByid($params['hostid']['val']);
if ($params['host_name']['val'] != $object->name1)
{
$this->_helper->json(array('status'=>"Invalid object group id : Please re enter service"));
return;
}
}
// Put param in correct column (group_name)
$params['host_group_name']['val'] = $params['host_name']['val'];
$params['host_name']['val']=null;
}
$dbparams=array();
foreach ($params as $key=>$val)
{
if ($val['db']==true )
{
$dbparams[$key] = $val['val'];
}
}
// echo '<br>'; print_r($dbparams);echo '<br>';
if ($params['db_rule']['val'] == -1 || $params['action_form']['val'] == 'clone')
{ // If no rule number or action is clone, add the handler
$ruleID=$this->getUIDatabase()->addHandlerRule($dbparams);
}
else
{
$this->getUIDatabase()->updateHandlerRule($dbparams,$params['db_rule']['val']);
$ruleID=$params['db_rule']['val'];
}
}
catch (Exception $e)
{
$this->_helper->json(array('status'=>$e->getMessage(),'location'=>'Add/update Rule','line'=>$e->getLine(),'file'=>$e->getFile()));
return;
}
$this->_helper->json(array('status'=>'OK', 'id' => $ruleID));
}
/** Get trap detail by trapid.
* @param integer $trapid : id of trap in received table
* @return array (objects)
*/
protected function getTrapDetail($trapid)
{
if (!preg_match('/^[0-9]+$/',$trapid)) { throw new Exception('Invalid id'); }
$queryArray=$this->getModuleConfig()->trapDetailQuery();
$dbConn = $this->getUIDatabase()->getDbConn();
if ($dbConn === null) throw new \ErrorException('uncatched db error');
// *************** Get main data
// extract columns and titles;
$elmts=NULL;
foreach ($queryArray as $key => $val) {
$elmts[$key]=$val[1];
}
try
{
$query = $dbConn->select()
->from($this->getModuleConfig()->getTrapTableName(),$elmts)
->where('id=?',$trapid);
$trapDetail=$dbConn->fetchRow($query);
if ( $trapDetail == null )
{
$trapDetail = 'NULL';
throw new Exception('No traps was found with id = '.$trapid);
}
}
catch (Exception $e)
{
$this->displayExitError('Add handler : get trap detail returning : '.print_r($trapDetail,true),$e->getMessage());
return;
}
return $trapDetail;
}
/** Get trap objects
* @param integer $trapid : trap id
* @return array : full column in db of trap id
*/
protected function getTrapobjects($trapid)
{
if (!preg_match('/^[0-9]+$/',$trapid)) { throw new Exception('Invalid id'); }
$queryArrayData=$this->getModuleConfig()->trapDataDetailQuery();
$dbConn = $this->getUIDatabase()->getDbConn();
if ($dbConn === null) throw new \ErrorException('uncatched db error');
// *************** Get object data
// extract columns and titles;
$data_elmts=NULL;
foreach ($queryArrayData as $key => $val) {
$data_elmts[$key]=$val[1];
}
try
{
$query = $dbConn->select()
->from($this->moduleConfig->getTrapDataTableName(),$data_elmts)
->where('trap_id=?',$trapid);
$trapDetail=$dbConn->fetchAll($query);
// if ( $trapDetail == null ) throw new Exception('No traps was found with id = '.$trapid);
}
catch (Exception $e)
{
$this->displayExitError('Add handler : get trap data detail : ',$e->getMessage());
return array();
}
return $trapDetail;
}
/** Get rule detail by ruleid.
* @param integer $ruleid int id of rule in rule table
* @return object|array : column objects in db
*
*/
protected function getRuleDetail($ruleid)
{
if (!preg_match('/^[0-9]+$/',$ruleid)) { throw new Exception('Invalid id'); }
$queryArray=$this->getModuleConfig()->ruleDetailQuery();
$dbConn = $this->getUIDatabase()->getDbConn();
if ($dbConn === null) throw new \ErrorException('uncatched db error');
// *************** Get main data
try
{
$query = $dbConn->select()
->from($this->getModuleConfig()->getTrapRuleName(),$queryArray)
->where('id=?',$ruleid);
$ruleDetail=$dbConn->fetchRow($query);
if ( $ruleDetail == null ) throw new Exception('No rule was found with id = '.$ruleid);
}
catch (Exception $e)
{
$this->displayExitError('Update handler : get rule detail',$e->getMessage());
throw new Exception('Error : ' . $e->getMessage());
}
return $ruleDetail;
}
/** Setup tabs for rules
*/
protected function prepareTabs()
{
return $this->getTabs()->add('status', array(
'label' => $this->translate('Trap handlers'),
'url' => $this->getModuleConfig()->urlPath() . '/handler')
);
}
}