mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Update test-template.php * Test-Template.php - Use AlertData Class * Update test-template.php
This commit is contained in:
committed by
Neil Lathwood
parent
d47f96d5c3
commit
83f414552d
@@ -5,6 +5,7 @@ $init_modules = ['alerts', 'alerts-cli'];
|
||||
require __DIR__ . '/../includes/init.php';
|
||||
|
||||
use LibreNMS\Alert\Template;
|
||||
use LibreNMS\Alert\AlertData;
|
||||
|
||||
$options = getopt('t:h:r:p:s:d::');
|
||||
|
||||
@@ -26,9 +27,11 @@ if (isset($options['t']) && isset($options['h']) && isset($options['r'])) {
|
||||
$obj['transport'] = $options['p'];
|
||||
}
|
||||
$type = new Template;
|
||||
$obj['alert'] = new AlertData($obj);
|
||||
$obj['title'] = $type->getTitle($obj);
|
||||
$obj['msg'] = $type->getBody($obj);
|
||||
unset($obj['template']);
|
||||
unset($obj['alert']);
|
||||
print_r($obj);
|
||||
} else {
|
||||
c_echo("
|
||||
|
||||
Reference in New Issue
Block a user