danda 71cf752b41 feat: add neptune-core rpc connection watchdog
closes #1

Implements a background watchdog task that:
1. calls neptune-core /network rpc every N seconds (default: 10)
2. emits log message on any state change
3. sends detailed email alert to admin on any state change

Changes:
* AppState now has internal Arc<RwLock<AppStateInner>> to permit
  watchdog task to mutate the rpc_client field.
* adjust application to AppState changes (use locks)
* not_found functions no longer accept state arg
* move state initialization into AppState::init()
* add optional alert parameters: admin-email, smtp-*
* add neptune_rpc module with watchdog task
* add alert_email module
* simplify main()
* log warnings if alert parameters not set
* add chrono dep
* add lettre dep
2024-05-25 19:16:36 -07:00

35 lines
615 B
HTML

<html>
<head>
<title>Not Found</title>
{{html_escaper::Trusted(include_str!( concat!(env!("CARGO_MANIFEST_DIR"), "/templates/web/html/components/head.html")))}}
</head>
<body>
<main class="container">
<article>
<header class="center-text"><h3>Not found</h3></header>
<section>
These are not the droids you're looking for.
</section>
%% if self.error_msg.len() > 0 {
<section>
Hint: {{self.error_msg}}
</section>
%% }
</article>
<article>
<p>
<a href="/">Home</a>
| <a href='/block/genesis'>Genesis</a>
| <a href='/block/tip'>Tip</a>
</p>
</article>
</main>
</body>
</html>