mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Add test notification for all agents
This commit is contained in:
parent
1e616fa585
commit
f31c4dcccd
3 changed files with 59 additions and 52 deletions
|
@ -66,6 +66,27 @@ from plexpy import helpers
|
|||
% endfor
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-md-12">
|
||||
<h4>Test ${agent['name']}</h4>
|
||||
<p class="help-block">Test if ${agent['name']} notifications are working. See logs for troubleshooting.</p>
|
||||
<div class="form-group">
|
||||
<label for="test_subject">Subject Line</label>
|
||||
<input class="form-control" type="text" id="test_subject" name="test_subject" value="PlexPy">
|
||||
<p class="help-block">Set a custom subject line.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="test_body">Message Body</label>
|
||||
<input class="form-control" type="text" id="test_body" name="test_body" value="Test notification">
|
||||
<p class="help-block">Set a custom body.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<input type="button" class="btn btn-bright" id="test_notifier" name="test_notifier" value="Test ${agent['name']}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -120,16 +141,21 @@ from plexpy import helpers
|
|||
$.get("/twitterStep2", { 'key': twitter_key }, function (data) { $('#ajaxMsg').html("<i class='fa fa-check'></i> " + data); });
|
||||
$('#ajaxMsg').addClass('success').fadeIn().delay(3000).fadeOut();
|
||||
});
|
||||
$('#testTwitter').click(function () {
|
||||
$.get("/testTwitter",
|
||||
function (data) { $('#ajaxMsg').html("<i class='fa fa-check'></i> " + data); });
|
||||
$('#ajaxMsg').addClass('success').fadeIn().delay(3000).fadeOut();
|
||||
});
|
||||
|
||||
$('#testIFTTT').click(function () {
|
||||
$.get("/test_ifttt",
|
||||
function (data) { $('#ajaxMsg').html("<i class='fa fa-check'></i> " + data); });
|
||||
$('#ajaxMsg').addClass('success').fadeIn().delay(3000).fadeOut();
|
||||
$('#test_notifier').click(function () {
|
||||
doAjaxCall('set_notification_config', $(this), 'tabs', true);
|
||||
$.ajax({
|
||||
url: 'test_notifier',
|
||||
data: { config_id: '${agent["id"]}',
|
||||
subject: $('#test_subject').val(),
|
||||
body: $('#test_body').val() },
|
||||
cache: false,
|
||||
async: true,
|
||||
complete: function (xhr, status) {
|
||||
msg = '<i class="fa fa-check"></i> ' + xhr.responseText;
|
||||
showMsg(msg, false, true, 2000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#testSlack').click(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue