2025-02-26 13:10:45 -08:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}Shout.dev: Projects: {{ project.name }}{% endblock %}
|
|
|
|
|
|
|
|
{% block main %}
|
|
|
|
{% include "breadcrumbs.html" %}
|
|
|
|
<main class="container mt-5">
|
|
|
|
<section class="mb-4">
|
|
|
|
<h1>Project: <code>{{ project.name }}</code></h1>
|
|
|
|
</section>
|
2025-04-23 12:57:10 -07:00
|
|
|
<section class="mb-4">
|
|
|
|
<h2>Watchdog Timer</h2>
|
|
|
|
{% if let Some(watchdog) = watchdog %}
|
|
|
|
<p>
|
|
|
|
Watchdog timer was last refreshed at
|
|
|
|
<code>{{ watchdog.last_set_at.to_rfc3339_opts(chrono::SecondsFormat::Secs, true) }}</code>
|
|
|
|
and is set to time out at
|
|
|
|
<code>{{ watchdog.expiration.to_rfc3339_opts(chrono::SecondsFormat::Secs, true) }}</code>.
|
|
|
|
</p>
|
|
|
|
<div class="alert alert-primary" role="alert">
|
|
|
|
{% else %}
|
|
|
|
<p>
|
|
|
|
Watchdog timer is not active.
|
|
|
|
</p>
|
|
|
|
<div class="alert alert-primary" role="alert">
|
|
|
|
<p>
|
|
|
|
Taking inspiration from the
|
|
|
|
<a
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
href="https://en.wikipedia.org/wiki/Watchdog_timer"
|
|
|
|
>"computer operating properly timers"</a>
|
|
|
|
of embedded programming, a project's watchdog timer will trigger an
|
|
|
|
alert to all enabled channels when it is not refreshed within a
|
|
|
|
certain duration. For example, if you have a background job that is
|
|
|
|
expected to run every 15 minutes, setting a watchdog timer with a
|
|
|
|
timeout of 20 minutes at the end of each run will cause Shout.dev to
|
|
|
|
notify you if the job begins to fail or hang.
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
<p class="mb-0">
|
|
|
|
To set or refresh the watchdog for this project:
|
|
|
|
<code>
|
|
|
|
{{ frontend_host }}{{base_path}}/watchdog?project={{ project.name|urlencode }}&timeout_minutes=20&key=******
|
|
|
|
</code>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</section>
|
2025-02-26 13:10:45 -08:00
|
|
|
<section class="mb-4">
|
|
|
|
<h2>Enabled Channels</h2>
|
|
|
|
<form
|
|
|
|
method="post"
|
2025-04-04 13:42:10 -07:00
|
|
|
action="{{ breadcrumbs.join("update-enabled-channels") }}"
|
2025-02-26 13:10:45 -08:00
|
|
|
>
|
|
|
|
<div class="mb-3">
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Channel Name</th>
|
|
|
|
<th>Enabled</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for channel in team_channels %}
|
2025-04-23 12:57:10 -07:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="enable-channel-switch-{{ channel.id.simple() }}">
|
|
|
|
<a
|
|
|
|
target="_blank"
|
|
|
|
href="{{ breadcrumbs.join(format!("../../channels/{}", channel.id.simple()).as_str()) }}"
|
2025-02-26 13:10:45 -08:00
|
|
|
>
|
2025-04-23 12:57:10 -07:00
|
|
|
{{ channel.name }}
|
|
|
|
</a>
|
|
|
|
</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input
|
|
|
|
class="form-check-input"
|
|
|
|
{% if enabled_channel_ids.contains(channel.id) %}
|
|
|
|
checked=""
|
|
|
|
{% endif %}
|
|
|
|
type="checkbox"
|
|
|
|
name="enabled_channels"
|
|
|
|
value="{{ channel.id.simple() }}"
|
|
|
|
id="enable-channel-switch-{{ channel.id.simple() }}"
|
|
|
|
>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2025-02-26 13:10:45 -08:00
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
|
|
<button class="btn btn-primary" type="submit">Save</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
{% endblock %}
|