mirror of
https://github.com/YGGverse/nexy.git
synced 2026-04-01 01:35:28 +00:00
implement connections count with template macro, add --show-hidden option, fix configuration variable names
This commit is contained in:
parent
8cdd7ea8ae
commit
c484a59579
8 changed files with 119 additions and 19 deletions
|
|
@ -32,6 +32,7 @@ impl Connection {
|
|||
}
|
||||
|
||||
pub fn handle(mut self) {
|
||||
self.session.event.connection.update(&self.address.client);
|
||||
let mut t = 0; // total bytes
|
||||
match self.request() {
|
||||
Ok(q) => {
|
||||
|
|
@ -71,7 +72,11 @@ impl Connection {
|
|||
Response::File(b) => b,
|
||||
Response::Directory(ref s, is_root) => {
|
||||
&if is_root {
|
||||
self.session.template.welcome(Some(s))
|
||||
self.session.template.welcome(
|
||||
Some(s),
|
||||
Some(self.session.event.connection.hosts()),
|
||||
Some(self.session.event.connection.hits()),
|
||||
)
|
||||
} else {
|
||||
self.session.template.index(Some(s))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue