You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
changedetection.io/changedetectionio/templates/_common_fields.jinja

101 lines
6.3 KiB

{% from '_helpers.jinja' import render_field %}
{% macro render_common_settings_form(form, current_base_url) %}
<div class="pure-control-group">
{{ render_field(form.notification_urls, rows=5, placeholder="Examples:
Gitter - gitter://token/room
Office365 - o365://TenantID:AccountEmail/ClientID/ClientSecret/TargetEmail
AWS SNS - sns://AccessKeyID/AccessSecretKey/RegionName/+PhoneNo
SMTPS - mailtos://user:pass@mail.domain.com?to=receivingAddress@example.com")
}}
UI improvements (#412) * Update CONTRIBUTING.md * Add option for tags on import (#377) * Add option for tags on import and backup * .add_watch() can accept empty tag Use https://changedetection.io/CHANGELOG.txt as a nice default page to watch * plaintext mime type fix - Don't attempt to extract HTML content from plaintext, this will remove lines and break changedetection (#391) * #323 Adding note about discord:// 2000 char limit (#392) * Adding note about discord:// 2000 char limit * Ability to use a generated salted password in deployments as env var SALTED_PASS (#397) * Ability to use a generated salted password in deployments as env var SALTED_PASS * Offer instance on Lemonade Tidy README * Update README - Tidy up sections * Update README - Fix docker section * Update README.md * /preview format doesnt need <pre> - fixing too many returnlines in content on diff/preview page * fixed the reference to wiki for rpi section (#402) * Add notification note - tgram:// bots cant send messages to other bots, so you should specify chat ID of non-bot user. * Notification error log handler (#403) * Add a notifications debug/error log interface (Link available under the notification URLs list) * Refactor tests for notification error log handler (#404) * Introduce -h option to allow listening not on 0.0.0.0. (#406) * Fix typo in the startup create-directory command suggestion (#405) * Use flask url_for() for webdriver chrome icon instead of relative path * merging latest upstream changes Co-authored-by: dgtlmoon <dgtlmoon@gmail.com> Co-authored-by: Tim Loderhose <timlod@users.noreply.github.com> Co-authored-by: Radu Ursache <3800336+rursache@users.noreply.github.com> Co-authored-by: Alexander Aleksandrovič Klimov <al2klimov@gmail.com>
3 years ago
<div class="pure-form-message-inline">
<ul>
<li>Use <a target=_new href="https://github.com/caronc/apprise">AppRise URLs</a> for notification to just about any service! <i><a target=_new href="https://github.com/dgtlmoon/changedetection.io/wiki/Notification-configuration-notes">Please read the notification services wiki here for important configuration notes</a></i>.</li>
<li><code>discord://</code> will silently fail if the total message length is more than 2000 chars.</li>
<li><code>tgram://</code> bots cant send messages to other bots, so you should specify chat ID of non-bot user.</li>
<li>Go here for <a href="{{url_for('notification_logs')}}">Notification debug logs</a></li>
</ul>
</div>
</div>
<div id="notification-customisation">
<div class="pure-control-group">
{{ render_field(form.notification_title, class="m-d") }}
<span class="pure-form-message-inline">Title for all notifications</span>
</div>
<div class="pure-control-group">
{{ render_field(form.notification_body , rows=5) }}
<span class="pure-form-message-inline">Body for all notifications</span>
</div>
<div class="pure-control-group">
{{ render_field(form.notification_format , rows=5) }}
<span class="pure-form-message-inline">Format for all notifications</span>
</div>
<div class="pure-controls">
<span class="pure-form-message-inline">
These tokens can be used in the notification body and title to
customise the notification text.
</span>
<table class="pure-table" id="token-table">
<thead>
<tr>
<th>Token</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>{base_url}</code></td>
<td>The URL of the changedetection.io instance you are running.</td>
</tr>
<tr>
<td><code>{watch_url}</code></td>
<td>The URL being watched.</td>
</tr>
<tr>
<td><code>{watch_uuid}</code></td>
<td>The UUID of the watch.</td>
</tr>
<tr>
<td><code>{watch_title}</code></td>
<td>The title of the watch.</td>
</tr>
<tr>
<td><code>{watch_tag}</code></td>
<td>The tag of the watch.</td>
</tr>
<tr>
<td><code>{preview_url}</code></td>
<td>The URL of the preview page generated by changedetection.io.</td>
</tr>
<tr>
<td><code>{diff}</code></td>
<td>The diff output - differences only</td>
</tr>
<tr>
<td><code>{diff_full}</code></td>
<td>The diff output - full difference output</td>
</tr>
<tr>
<td><code>{diff_url}</code></td>
<td>The URL of the diff page generated by changedetection.io.</td>
</tr>
<tr>
<td><code>{current_snapshot}</code></td>
<td>The current snapshot value, useful when combined with JSON or CSS filters
</td>
</tr>
</tbody>
</table>
<span class="pure-form-message-inline">
URLs generated by changedetection.io (such as <code>{diff_url}</code>) require the <code>BASE_URL</code> environment variable set.<br/>
Your <code>BASE_URL</code> var is currently "{{current_base_url}}"
</span>
</div>
</div>
<div class="pure-control-group">
{{ render_field(form.trigger_check) }}
</div>
{% endmacro %}