Allow all notification agents to send links

This commit is contained in:
ljm42
2021-04-16 11:45:40 -07:00
parent 4c33c6562a
commit 2480ff0837

View File

@@ -76,7 +76,6 @@ function testService(name) {
form.append('<input type="hidden" name="#env[]" value="SUBJECT='+name+' test.">');
form.append('<input type="hidden" name="#env[]" value="DESCRIPTION='+name+' test.">');
form.append('<input type="hidden" name="#env[]" value="IMPORTANCE=normal">');
// note: not all agents will process the LINK parameter
// host is normally added to link by the notify script. add it here since calling the agent directly.
form.append('<input type="hidden" name="#env[]" value="LINK='+window.location.origin+'/Settings/Notifications">');
form.submit();
@@ -91,7 +90,7 @@ function initDropdown() {
<input type="hidden" name="#arg[2]" value="">
</form>
<?
$fields = ['Event','Subject','Timestamp','Description','Importance','Content'];
$fields = ['Event','Subject','Timestamp','Description','Importance','Content','Link'];
$xml_file = "webGui/include/NotificationAgents.xml";
$xml = @simplexml_load_file($xml_file) or die(_("Failed to open")." $xml_file");
foreach ($xml->Agent as $agent) {