Show system name on AbsentNodes echomail
This commit is contained in:
parent
fe18968c57
commit
bf21671a1f
@ -60,19 +60,37 @@ class AbsentNodes extends Echomails
|
|||||||
$msg->addText("The following nodes have had their status changed, because they are absent from the network.\r\r");
|
$msg->addText("The following nodes have had their status changed, because they are absent from the network.\r\r");
|
||||||
|
|
||||||
// Nodes marked HOLD - will be marked down ...
|
// Nodes marked HOLD - will be marked down ...
|
||||||
foreach ($this->aos->filter(fn($item)=>$item->role & Address::NODE_HOLD) as $ao)
|
if (($x=$this->aos->filter(fn($item)=>$item->role & Address::NODE_HOLD))->count()) {
|
||||||
$msg->addText(sprintf('* %s marked HOLD, last seen %d days ago',$ao->ftn4d,$ao->system->last_session->diffInDays($now)).($ao->contacted ? '': ' ^')."\r");
|
$msg->addText("The following nodes have been marked HOLD:\r");
|
||||||
|
|
||||||
|
foreach ($x as $ao)
|
||||||
|
$msg->addText(sprintf('* %s (%s), last seen %d days ago',$ao->ftn4d,$ao->system->name,$ao->system->last_session->diffInDays($now)).($ao->contacted ? '': ' ^')."\r");
|
||||||
|
|
||||||
|
$msg->addText("\r");
|
||||||
|
}
|
||||||
|
|
||||||
// Nodes marked DOWN - will be delisted on...
|
// Nodes marked DOWN - will be delisted on...
|
||||||
foreach ($this->aos->filter(fn($item)=>$item->role & Address::NODE_DOWN) as $ao)
|
if (($x=$this->aos->filter(fn($item)=>$item->role & Address::NODE_DOWN))->count()) {
|
||||||
$msg->addText(sprintf('* %s marked DOWN, last seen %d days ago',$ao->ftn4d,$ao->system->last_session->diffInDays($now)).($ao->contacted ? '': ' ^')."\r");
|
$msg->addText("The following nodes have been marked DOWN:\r");
|
||||||
|
|
||||||
|
foreach ($x as $ao)
|
||||||
|
$msg->addText(sprintf('* %s (%s), last seen %d days ago',$ao->ftn4d,$ao->system->name,$ao->system->last_session->diffInDays($now)).($ao->contacted ? '': ' ^')."\r");
|
||||||
|
|
||||||
|
$msg->addText("\r");
|
||||||
|
}
|
||||||
|
|
||||||
// Nodes DELISTED
|
// Nodes DELISTED
|
||||||
foreach ($this->aos->filter(fn($item)=>! $item->active) as $ao)
|
if (($x=$this->aos->filter(fn($item)=>! $item->active))->count()) {
|
||||||
$msg->addText(sprintf('* %s DE-LISTED, last seen %d days ago',$ao->ftn4d,$ao->system->last_session->diffInDays($now)).($ao->contacted ? '': ' ^')."\r");
|
$msg->addText("The following nodes have been DE-LISTED:\r");
|
||||||
|
|
||||||
|
foreach ($x as $ao)
|
||||||
|
$msg->addText(sprintf('* %s (%s), last seen %d days ago',$ao->ftn4d,$ao->system->name,$ao->system->last_session->diffInDays($now)).($ao->contacted ? '': ' ^')."\r");
|
||||||
|
|
||||||
|
$msg->addText("\r");
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->aos->filter(fn($item)=>(! $item->contacted))->count())
|
if ($this->aos->filter(fn($item)=>(! $item->contacted))->count())
|
||||||
$msg->addText("\r^ Unable to contact these nodes.\r");
|
$msg->addText("^ Unable to contact these nodes.\r");
|
||||||
|
|
||||||
$msg->addText("\rEmails and/or Netmails have been sent to these nodes. If you can help let them know that they have outstanding mail on the Hub, that would be helpful :)");
|
$msg->addText("\rEmails and/or Netmails have been sent to these nodes. If you can help let them know that they have outstanding mail on the Hub, that would be helpful :)");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user