Updates to node display
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
class Model_Auth_UserDefault extends Model_Auth_User {
|
||||
protected $_table_names_plural = FALSE;
|
||||
protected $_disable_wild_select = TRUE;
|
||||
protected $_disable_join_table_name = TRUE;
|
||||
protected $_disable_limit = TRUE;
|
||||
|
||||
// Validation rules
|
||||
protected $_rules = array(
|
||||
|
@@ -32,9 +32,9 @@ class Model_FILESPACE extends ORMTSM {
|
||||
public function storagepools($dtype) {
|
||||
$pool = array();
|
||||
|
||||
foreach ($this->VOLUMEUSAGE
|
||||
foreach ($this->OCCUPANCY
|
||||
->select('STGPOOL_NAME')
|
||||
->where('COPY_TYPE','=',$dtype)
|
||||
->where('TYPE','=',$dtype)
|
||||
->group_by('STGPOOL_NAME')
|
||||
->order_by('STGPOOL_NAME')
|
||||
->find_all() as $vo) {
|
||||
|
@@ -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