diff --git a/application/bootstrap.php b/application/bootstrap.php index d496db3..7bd97b8 100644 --- a/application/bootstrap.php +++ b/application/bootstrap.php @@ -146,7 +146,7 @@ Route::set('default/media', 'media(/)', array('file' => '.+')) * Set the routes. Each route must have a minimum of a name, a URI and a set of * defaults for the URI. */ -Route::set('default', '((/(/)))', array('id'=>'[a-zA-Z0-9_.-=]+')) +Route::set('default', '((/(/)))', array('id'=>'[a-zA-Z0-9_.\-=]+')) ->defaults(array( 'controller' => 'welcome', 'action' => 'index', diff --git a/application/classes/Model/DOMAIN.php b/application/classes/Model/DOMAIN.php index cae2674..722aaf3 100644 --- a/application/classes/Model/DOMAIN.php +++ b/application/classes/Model/DOMAIN.php @@ -154,7 +154,7 @@ class Model_DOMAIN extends ORM_TSM { /** * Return the STORAGE POOLS that NODES in this DOMAIN uses by BACKUP TYPE - * @param $type is BACKUP/ARCHIVE/SPACE MANAGED + * @param $type is Bkup/Arch/SpMg */ public function stgpools_bybtype($type) { $k = sprintf('%s-%s-%s',__METHOD__,$this->DOMAIN_NAME,$type); @@ -228,7 +228,7 @@ class Model_DOMAIN extends ORM_TSM { * Return the VOLUMES that NODES in this DOMAIN uses by BACKUP TYPE * @param $type is BACKUP/ARCHIVE/SPACE MANAGED */ - public function vols_bybtype($type) { + public function vols_byctype($type) { $k = sprintf('%s-%s-%s',__METHOD__,$this->DOMAIN_NAME,$type); $c = Kohana::$config->load('config')->cache; @@ -236,7 +236,7 @@ class Model_DOMAIN extends ORM_TSM { $x = $result = array(); foreach ($this->_nodes() as $no) - foreach ($no->vols_bybtype($type) as $vuo) + foreach ($no->vols_byctype($type) as $vuo) if (! in_array($vuo->VOLUME_NAME,$x)) { array_push($result,$vuo); array_push($x,$vuo->VOLUME_NAME); @@ -254,7 +254,7 @@ class Model_DOMAIN extends ORM_TSM { * @param $pool is STORAGE POOL NAME * @param $type is BACKUP/ARCHIVE/SPACE MANAGED */ - public function vols_bypoolbybtype($pool,$type) { + public function vols_bypoolbyctype($pool,$type) { $x = $result = array(); foreach ($this->vols_bypool($pool) as $vuo) diff --git a/application/classes/Model/FILESPACE.php b/application/classes/Model/FILESPACE.php index 6efbcc4..ba08b66 100644 --- a/application/classes/Model/FILESPACE.php +++ b/application/classes/Model/FILESPACE.php @@ -201,7 +201,7 @@ class Model_FILESPACE extends ORM_TSM { * @param $pool is STORAGE POOL NAME * @param $type is BACKUP/ARCHIVE/SPACE MANAGED */ - public function vols_bypoolbybtype($pool,$type) { + public function vols_bypoolbyctype($pool,$type) { $x = $result = array(); foreach ($this->vols_bypool($pool) as $vuo) diff --git a/application/classes/Model/NODE.php b/application/classes/Model/NODE.php index 8cc4eaf..ad29ac8 100644 --- a/application/classes/Model/NODE.php +++ b/application/classes/Model/NODE.php @@ -246,7 +246,7 @@ class Model_NODE extends ORM_TSM { // Test to see if a node has any data of type // @param $type is BACKUP/ARCHIVE/SPACE MANAGED public function hasData($type) { - return $this->vols_bybtype($type) ? TRUE : FALSE; + return $this->vols_byctype($type) ? TRUE : FALSE; } // $dtype is BACKUP or ARCHIVE @@ -366,10 +366,10 @@ class Model_NODE extends ORM_TSM { if (is_null($result = Cache::instance($c)->get($k))) { $x = $result = array(); - foreach ($this->_volumeusage() as $vuo) - if (! in_array($vuo->STGPOOL_NAME,$x)) { - array_push($result,$vuo->STGPOOL); - array_push($x,$vuo->STGPOOL_NAME); + foreach ($this->_occupancy() as $oo) + if (! in_array($oo->STGPOOL_NAME,$x)) { + array_push($result,$oo->STGPOOL); + array_push($x,$oo->STGPOOL_NAME); } // @todo Cache time should be configurble @@ -408,7 +408,7 @@ class Model_NODE extends ORM_TSM { /** * Return the STORAGE POOLS that this NODE uses by BACKUP TYPE - * @param $type is BACKUP/ARCHIVE/SPACE MANAGED + * @param $type is Bkup/Arch/SpMg */ public function stgpools_bybtype($type) { Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); @@ -419,8 +419,8 @@ class Model_NODE extends ORM_TSM { if (is_null($result = Cache::instance($c)->get($k))) { $x = $result = array(); - foreach ($this->_volumeusage() as $vuo) - if ($vuo->COPY_TYPE == $type AND ! in_array($vuo->STGPOOL_NAME,$x)) { + foreach ($this->_occupancy() as $vuo) + if ($vuo->TYPE == $type AND ! in_array($vuo->STGPOOL_NAME,$x)) { array_push($result,$vuo->STGPOOL); array_push($x,$vuo->STGPOOL_NAME); } @@ -462,7 +462,7 @@ class Model_NODE extends ORM_TSM { * Return the VOLUMES that this NODE uses by BACKUP TYPE * @param $type is BACKUP/ARCHIVE/SPACE MANAGED */ - public function vols_bybtype($type) { + public function vols_byctype($type) { Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); $k = sprintf('%s-%s-%s',__METHOD__,$this->NODE_NAME,$type); @@ -535,7 +535,7 @@ class Model_NODE extends ORM_TSM { * @param $pool is STORAGE POOL NAME * @param $type is BACKUP/ARCHIVE/SPACE MANAGED */ - public function vols_bypoolbybtype($pool,$type) { + public function vols_bypoolbyctype($pool,$type) { Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); $x = $result = array(); diff --git a/application/classes/Model/VOLUME.php b/application/classes/Model/VOLUME.php index 6b569c0..ad12aa3 100644 --- a/application/classes/Model/VOLUME.php +++ b/application/classes/Model/VOLUME.php @@ -53,7 +53,7 @@ class Model_VOLUME extends ORM_TSM { * Get FILESYSTEMS on a VOLUME * @param $type is BACKUP/ARCHIVE/SPACE MANAGED */ - public function fs_bybtype($type) { + public function fs_byctype($type) { $k = sprintf('%s-%s-%s',__METHOD__,$this->VOLUME_NAME,$type); $c = Kohana::$config->load('config')->cache; @@ -76,7 +76,7 @@ class Model_VOLUME extends ORM_TSM { * Get NODES on a VOLUME * @param $type is BACKUP/ARCHIVE/SPACE MANAGED */ - public function nodes_bybtype($type) { + public function nodes_byctype($type) { $k = sprintf('%s-%s-%s',__METHOD__,$this->VOLUME_NAME,$type); $c = Kohana::$config->load('config')->cache; diff --git a/application/views/domain/volumes.php b/application/views/domain/volumes.php index b596f10..321fcb3 100644 --- a/application/views/domain/volumes.php +++ b/application/views/domain/volumes.php @@ -7,7 +7,7 @@ - vols_bybtype($ctype)) { ?> + vols_byctype($ctype)) { ?>   @@ -23,9 +23,18 @@ FS Nodes - stgpools_bybtype($ctype) as $spo) { ?> - STGPOOL_NAME,$spo->RECLAIM,$spo->NUMSCRATCHUSED,$spo->MAXSCRATCH,$spo->DEVCLASSES->DEVTYPE); ?> - vols_bypoolbybtype($spo->STGPOOL_NAME,$ctype) as $vuo) { + stgpools_bybtype($btype) as $spo) { ?> + + + DEVCLASS == 'DISK') + printf('%s: Utilised: %s%%, Device Type: %s',$spo->STGPOOL_NAME,$spo->PCT_UTILIZED,$spo->DEVCLASS); + else + printf('%s: Reclaim: %s%%, Scratch Usage: %s/%s, Device Type: %s',$spo->STGPOOL_NAME,$spo->RECLAIM,$spo->NUMSCRATCHUSED,$spo->MAXSCRATCH,$spo->DEVCLASSES->DEVTYPE); + ?> + + + vols_bypoolbyctype($spo->STGPOOL_NAME,$ctype) as $vuo) { $vo = $vuo->VOLUME; ?> VOLUME_NAME),$vo->display('VOLUME_NAME')); ?> @@ -36,8 +45,8 @@ READ_ERRORS,$vo->WRITE_ERRORS); ?> display('PCT_UTILIZED'); ?> display('PCT_RECLAIM'); ?> - fs_bybtype($ctype)); ?> - nodes_bybtype($ctype)); ?> + fs_byctype($ctype)); ?> + nodes_byctype($ctype)); ?> diff --git a/application/views/node/filesystems.php b/application/views/node/filesystems.php index f9d5c00..19d7d2e 100644 --- a/application/views/node/filesystems.php +++ b/application/views/node/filesystems.php @@ -7,7 +7,7 @@ Information - vols_bybtype($ctype)) { ?> + vols_byctype($ctype)) { ?>   @@ -25,7 +25,7 @@ display('BACKUP_END') : ' '; ?> utilsation(),2); ?> stgpools() as $spo) { ?> - logmb_bypoolbybtype($spo->STGPOOL_NAME,$btype),2); ?> (vols_bypoolbybtype($spo->STGPOOL_NAME,$ctype)); ?>) + logmb_bypoolbybtype($spo->STGPOOL_NAME,$btype),2); ?> (vols_bypoolbyctype($spo->STGPOOL_NAME,$ctype)); ?>) diff --git a/application/views/node/volumes.php b/application/views/node/volumes.php index 2f3744c..0ef546b 100644 --- a/application/views/node/volumes.php +++ b/application/views/node/volumes.php @@ -7,7 +7,7 @@ - vols_bybtype($ctype)) { ?> + vols_byctype($ctype)) { ?>   @@ -23,9 +23,18 @@ Other FS Other Node - stgpools_bybtype($ctype) as $spo) { ?> - STGPOOL_NAME,$spo->RECLAIM,$spo->NUMSCRATCHUSED,$spo->MAXSCRATCH,$spo->DEVCLASSES->DEVTYPE); ?> - vols_bypoolbybtype($spo->STGPOOL_NAME,$ctype) as $vuo) { + stgpools_bybtype($btype) as $spo) { ?> + + + DEVCLASS == 'DISK') + printf('%s: Utilised: %s%%, Device Type: %s',$spo->STGPOOL_NAME,$spo->PCT_UTILIZED,$spo->DEVCLASS); + else + printf('%s: Reclaim: %s%%, Scratch Usage: %s/%s, Device Type: %s',$spo->STGPOOL_NAME,$spo->RECLAIM,$spo->NUMSCRATCHUSED,$spo->MAXSCRATCH,$spo->DEVCLASSES->DEVTYPE); + ?> + + + vols_bypoolbyctype($spo->STGPOOL_NAME,$ctype) as $vuo) { $vo = $vuo->VOLUME; ?> VOLUME_NAME),$vo->display('VOLUME_NAME')); ?> @@ -36,8 +45,8 @@ READ_ERRORS,$vo->WRITE_ERRORS); ?> display('PCT_UTILIZED'); ?> display('PCT_RECLAIM'); ?> - fs_bybtype($ctype))-1; ?> - nodes_bybtype($ctype))-1; ?> + fs_byctype($ctype))-1; ?> + nodes_byctype($ctype))-1; ?> diff --git a/application/views/stgpool/volumes.php b/application/views/stgpool/volumes.php index 78f4139..dac427b 100644 --- a/application/views/stgpool/volumes.php +++ b/application/views/stgpool/volumes.php @@ -31,8 +31,8 @@ display('PCT_UTILIZED'); ?> display('PCT_RECLAIM'); ?> load('config')->tsmdatatypes as $btype => $ctype) { ?> - fs_bybtype($ctype)); ?> - nodes_bybtype($ctype)); ?> + fs_byctype($ctype)); ?> + nodes_byctype($ctype)); ?>