|
|
@ -70,32 +70,19 @@ |
|
|
|
{{ ch.value }} |
|
|
|
{% endif %} |
|
|
|
{% elif ch.kind == "webhook" %} |
|
|
|
<table> |
|
|
|
{% if ch.url_down %} |
|
|
|
<tr> |
|
|
|
<td class="preposition">down </td> |
|
|
|
<td>{{ ch.url_down }}</td> |
|
|
|
</tr> |
|
|
|
{% endif %} |
|
|
|
{% if ch.url_up %} |
|
|
|
<tr> |
|
|
|
<td class="preposition">up </td> |
|
|
|
<td>{{ ch.url_up }}</td> |
|
|
|
</tr> |
|
|
|
{% endif %} |
|
|
|
{% if ch.post_data %} |
|
|
|
<tr> |
|
|
|
<td class="preposition">body </td> |
|
|
|
<td>{{ ch.post_data }}</td> |
|
|
|
</tr> |
|
|
|
{% endif %} |
|
|
|
{% if ch.headers %} |
|
|
|
<tr> |
|
|
|
<td class="preposition">headers </td> |
|
|
|
<td>{{ ch.headers }}</td> |
|
|
|
</tr> |
|
|
|
{% endif %} |
|
|
|
</table> |
|
|
|
{% if ch.url_down %} |
|
|
|
<span class="preposition">down</span> {{ ch.url_down }} |
|
|
|
{% endif %} |
|
|
|
{% if ch.url_up and not ch.url_down %} |
|
|
|
<span class="preposition">up</span> {{ ch.url_up }} |
|
|
|
{% endif %} |
|
|
|
{% if ch.url_up or ch.post_data or ch.headers %} |
|
|
|
<a href="#" |
|
|
|
data-toggle="modal" |
|
|
|
data-target="#channel-details-{{ ch.code }}">(details)</a> |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{% elif ch.kind == "pushbullet" %} |
|
|
|
<span class="preposition">API key</span> |
|
|
|
{{ ch.value }} |
|
|
@ -329,6 +316,72 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
{% for ch in channels %} |
|
|
|
{% if ch.kind == "webhook" %} |
|
|
|
<div id="channel-details-{{ ch.code }}" class="modal channel-details"> |
|
|
|
<div class="modal-dialog"> |
|
|
|
<div class="modal-content"> |
|
|
|
<div class="modal-header"> |
|
|
|
<button type="button" class="close" data-dismiss="modal">×</button> |
|
|
|
<h4>Integration Details</h4> |
|
|
|
</div> |
|
|
|
<div class="modal-body"> |
|
|
|
<table> |
|
|
|
<tr> |
|
|
|
<th>Request Method</th> |
|
|
|
<td> |
|
|
|
{% if ch.post_data %} |
|
|
|
POST |
|
|
|
{% else %} |
|
|
|
GET |
|
|
|
{% endif %} |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<th>URL for "down" events</th> |
|
|
|
<td> |
|
|
|
{% if ch.url_down %} |
|
|
|
<code>{{ ch.url_down }}</code> |
|
|
|
{% else %} |
|
|
|
<span class="missing">(not set)</span> |
|
|
|
{% endif %} |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
{% if ch.url_up %} |
|
|
|
<tr> |
|
|
|
<th>URL for "up" events</th> |
|
|
|
<td> |
|
|
|
{% if ch.url_up %} |
|
|
|
<code>{{ ch.url_up }}</code> |
|
|
|
{% else %} |
|
|
|
<span class="missing">(not set)</span> |
|
|
|
{% endif %} |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
{% endif %} |
|
|
|
{% if ch.post_data %} |
|
|
|
<tr> |
|
|
|
<th>POST data</th> |
|
|
|
<td><code>{{ ch.post_data }}</code></td> |
|
|
|
</tr> |
|
|
|
{% endif %} |
|
|
|
{% for k, v in ch.headers.items %} |
|
|
|
<tr> |
|
|
|
<th>Header <code>{{ k }}</code></th> |
|
|
|
<td><code>{{ v }}</code></td> |
|
|
|
</tr> |
|
|
|
{% endfor %} |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
{% endblock %} |
|
|
|
|
|
|
|
{% block scripts %} |
|
|
|