Updates to node display
This commit is contained in:
@@ -52,29 +52,38 @@ class Model_NODE extends ORMTSM {
|
||||
}
|
||||
|
||||
public function lasttransfertime() {
|
||||
return $this->LASTSESS_DURATION*($this->lasttransferpercent()/100);
|
||||
if ($this->LASTSESS_DURATION)
|
||||
return $this->LASTSESS_DURATION*($this->lasttransferpercent()/100);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function lastsendperformance() {
|
||||
if ($this->lasttransfertime())
|
||||
return $this->LASTSESS_SENT/$this->lasttransfertime()/1024/1024;
|
||||
else
|
||||
return _('N/A');
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function lastreceiveperformance() {
|
||||
if ($this->lasttransfertime())
|
||||
return $this->LASTSESS_RECVD/$this->lasttransfertime()/1024/1024;
|
||||
else
|
||||
return _('N/A');
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function lastsendaggperformance() {
|
||||
return $this->LASTSESS_SENT/$this->LASTSESS_DURATION/1024/1024;
|
||||
if ((real)$this->LASTSESS_DURATION)
|
||||
return $this->LASTSESS_SENT/$this->LASTSESS_DURATION/1024/1024;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function lastreceiveaggperformance() {
|
||||
return $this->LASTSESS_RECVD/$this->LASTSESS_DURATION/1024/1024;
|
||||
if ((real)$this->LASTSESS_DURATION)
|
||||
return $this->LASTSESS_RECVD/$this->LASTSESS_DURATION/1024/1024;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
// @todo This should return the system setting (cloptset), if the node setting is not configured.
|
||||
|
Reference in New Issue
Block a user