mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Add section comments to get_connectivity_html() (#2807)
This commit is contained in:
@@ -346,6 +346,10 @@ impl Context {
|
|||||||
<body>"#
|
<body>"#
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
|
// =============================================================================================
|
||||||
|
// Get the states from the RwLock
|
||||||
|
// =============================================================================================
|
||||||
|
|
||||||
let lock = self.scheduler.read().await;
|
let lock = self.scheduler.read().await;
|
||||||
let (folders_states, smtp) = match &*lock {
|
let (folders_states, smtp) = match &*lock {
|
||||||
Scheduler::Running {
|
Scheduler::Running {
|
||||||
@@ -380,6 +384,13 @@ impl Context {
|
|||||||
};
|
};
|
||||||
drop(lock);
|
drop(lock);
|
||||||
|
|
||||||
|
// =============================================================================================
|
||||||
|
// Add e.g.
|
||||||
|
// Incoming messages
|
||||||
|
// - "Inbox": Connected
|
||||||
|
// - "Sent": Connected
|
||||||
|
// =============================================================================================
|
||||||
|
|
||||||
ret += &format!("<h3>{}</h3><ul>", stock_str::incoming_messages(self).await);
|
ret += &format!("<h3>{}</h3><ul>", stock_str::incoming_messages(self).await);
|
||||||
for (folder, watch, state) in &folders_states {
|
for (folder, watch, state) in &folders_states {
|
||||||
let w = self.get_config(*watch).await.ok_or_log(self);
|
let w = self.get_config(*watch).await.ok_or_log(self);
|
||||||
@@ -417,6 +428,12 @@ impl Context {
|
|||||||
}
|
}
|
||||||
ret += "</ul>";
|
ret += "</ul>";
|
||||||
|
|
||||||
|
// =============================================================================================
|
||||||
|
// Add e.g.
|
||||||
|
// Outgoing messages
|
||||||
|
// Your last message was sent successfully
|
||||||
|
// =============================================================================================
|
||||||
|
|
||||||
ret += &format!(
|
ret += &format!(
|
||||||
"<h3>{}</h3><ul><li>",
|
"<h3>{}</h3><ul><li>",
|
||||||
stock_str::outgoing_messages(self).await
|
stock_str::outgoing_messages(self).await
|
||||||
@@ -427,6 +444,13 @@ impl Context {
|
|||||||
ret += &*escaper::encode_minimal(&detailed.to_string_smtp(self).await);
|
ret += &*escaper::encode_minimal(&detailed.to_string_smtp(self).await);
|
||||||
ret += "</li></ul>";
|
ret += "</li></ul>";
|
||||||
|
|
||||||
|
// =============================================================================================
|
||||||
|
// Add e.g.
|
||||||
|
// Storage on testrun.org
|
||||||
|
// 1.34 GiB of 2 GiB used
|
||||||
|
// [======67%===== ]
|
||||||
|
// =============================================================================================
|
||||||
|
|
||||||
let domain = dc_tools::EmailAddress::new(
|
let domain = dc_tools::EmailAddress::new(
|
||||||
&self
|
&self
|
||||||
.get_config(Config::ConfiguredAddr)
|
.get_config(Config::ConfiguredAddr)
|
||||||
@@ -527,6 +551,8 @@ impl Context {
|
|||||||
}
|
}
|
||||||
ret += "</ul>";
|
ret += "</ul>";
|
||||||
|
|
||||||
|
// =============================================================================================
|
||||||
|
|
||||||
ret += "</body></html>\n";
|
ret += "</body></html>\n";
|
||||||
Ok(ret)
|
Ok(ret)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user