From 528a83a4fd6345f0f495ed97d1d38d0bd53fb5e6 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 6 Dec 2012 14:50:06 +1100 Subject: [PATCH] Some more performance improvements and caching --- application/bootstrap.php | 4 +- .../Controller/TemplateDefault/View.php | 6 + application/classes/Database.php | 7 + application/classes/Model/ACTLOG.php | 2 +- application/classes/Model/ASSOCIATION.php | 2 +- application/classes/Model/CLIENTOPT.php | 2 +- application/classes/Model/COPYGROUP/AR.php | 2 +- application/classes/Model/COPYGROUP/BU.php | 6 +- application/classes/Model/DB.php | 6 +- application/classes/Model/DBSPACE.php | 2 +- application/classes/Model/DEVCLASSES.php | 2 +- application/classes/Model/DOMAIN.php | 2 +- application/classes/Model/DRIVE.php | 2 +- application/classes/Model/EVENT.php | 8 +- application/classes/Model/FILESPACE.php | 193 +++++++++++++++--- application/classes/Model/LIBRARY.php | 4 +- application/classes/Model/LIBVOLUME.php | 2 +- application/classes/Model/MEDIA.php | 2 +- application/classes/Model/MGMTCLASS.php | 2 +- application/classes/Model/NODE.php | 65 ++++-- application/classes/Model/OCC.php | 2 +- application/classes/Model/PATH.php | 2 +- application/classes/Model/SCHEDULE/CLIENT.php | 4 +- application/classes/Model/STGPOOL.php | 2 +- application/classes/Model/SUMMARY.php | 6 +- application/classes/Model/VOLHISTORY.php | 4 +- application/classes/Model/VOLUME.php | 6 +- application/classes/Model/VOLUMEUSAGE.php | 2 +- .../classes/{TSM/ORM.php => ORM/TSM.php} | 25 ++- .../lnApp/Controller/TemplateDefault.php | 4 +- application/config/config.php | 1 + application/media/css/login.css | 5 +- application/views/domain/policy.php | 4 +- application/views/domain/volumes.php | 2 +- application/views/node/filesystems.php | 10 +- application/views/node/volumes.php | 2 +- application/views/stgpool/volumes.php | 2 +- application/views/volume/info.php | 2 +- 38 files changed, 303 insertions(+), 103 deletions(-) rename application/classes/{TSM/ORM.php => ORM/TSM.php} (79%) diff --git a/application/bootstrap.php b/application/bootstrap.php index 3b8a666..d496db3 100644 --- a/application/bootstrap.php +++ b/application/bootstrap.php @@ -98,7 +98,7 @@ Kohana::init(array( /** * Attach the file write to logging. Multiple writers are supported. */ -Kohana::$log->attach(new Log_File(APPPATH.'logs')); +Kohana::$log->attach(new Log_File(APPPATH.'logs'),LOG::INFO); /** * Attach a file reader to config. Multiple readers are supported. @@ -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/Controller/TemplateDefault/View.php b/application/classes/Controller/TemplateDefault/View.php index 25823b4..d89c31c 100644 --- a/application/classes/Controller/TemplateDefault/View.php +++ b/application/classes/Controller/TemplateDefault/View.php @@ -56,6 +56,12 @@ abstract class Controller_TemplateDefault_View extends Controller_TemplateDefaul HTTP::redirect(strtolower($this->request->controller())); } + // For some tables, are ID is base_64 encoded. + switch ($this->orm) { + case 'VOLUME': $object_name = base64_decode($object_name); + break; + } + $o = ORM::factory($this->orm,$object_name); if (! $o->loaded()) { diff --git a/application/classes/Database.php b/application/classes/Database.php index 75a78f4..10855bb 100644 --- a/application/classes/Database.php +++ b/application/classes/Database.php @@ -14,5 +14,12 @@ abstract class Database extends Kohana_Database { // Enable TSM SHOW commands const SHOW = 5; const SET = 6; + + // We need to set our default database so that any internal calls to Database::instance() use the right database. + public static function instance($name = NULL, array $config = NULL) { + Database::$default = Kohana::$config->load('config')->client_type; + + return parent::instance($name,$config); + } } ?> diff --git a/application/classes/Model/ACTLOG.php b/application/classes/Model/ACTLOG.php index 0e3721a..a1843c2 100644 --- a/application/classes/Model/ACTLOG.php +++ b/application/classes/Model/ACTLOG.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_ACTLOG extends TSM_ORM { +class Model_ACTLOG extends ORM_TSM { protected $_table_name = 'ACTLOG'; protected $_primary_key = 'DATE_TIME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( diff --git a/application/classes/Model/ASSOCIATION.php b/application/classes/Model/ASSOCIATION.php index 9377f56..1d7a8d2 100644 --- a/application/classes/Model/ASSOCIATION.php +++ b/application/classes/Model/ASSOCIATION.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_ASSOCIATION extends TSM_ORM { +class Model_ASSOCIATION extends ORM_TSM { protected $_table_name = 'ASSOCIATIONS'; protected $_primary_key = 'DOMAIN_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( diff --git a/application/classes/Model/CLIENTOPT.php b/application/classes/Model/CLIENTOPT.php index 49a34a8..e4bbdf4 100644 --- a/application/classes/Model/CLIENTOPT.php +++ b/application/classes/Model/CLIENTOPT.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_CLIENTOPT extends TSM_ORM { +class Model_CLIENTOPT extends ORM_TSM { protected $_table_name = 'CLIENTOPTS'; protected $_primary_key = 'OPTIONSET_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( diff --git a/application/classes/Model/COPYGROUP/AR.php b/application/classes/Model/COPYGROUP/AR.php index 1ca2b3f..b941a0c 100644 --- a/application/classes/Model/COPYGROUP/AR.php +++ b/application/classes/Model/COPYGROUP/AR.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_COPYGROUP_AR extends TSM_ORM { +class Model_COPYGROUP_AR extends ORM_TSM { protected $_table_name = 'AR_COPYGROUPS'; protected $_primary_key = 'DOMAIN_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( diff --git a/application/classes/Model/COPYGROUP/BU.php b/application/classes/Model/COPYGROUP/BU.php index a0a0ad5..4a0ae8c 100644 --- a/application/classes/Model/COPYGROUP/BU.php +++ b/application/classes/Model/COPYGROUP/BU.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_COPYGROUP_BU extends TSM_ORM { +class Model_COPYGROUP_BU extends ORM_TSM { protected $_table_name = 'BU_COPYGROUPS'; protected $_primary_key = 'DOMAIN_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( @@ -17,5 +17,9 @@ class Model_COPYGROUP_BU extends TSM_ORM { 'SET_NAME'=>'ASC', 'CLASS_NAME'=>'ASC', ); + + protected $_has_one = array( + 'STGPOOL'=>array('foreign_key'=>'STGPOOL_NAME','far_key'=>'DESTINATION'), + ); } ?> diff --git a/application/classes/Model/DB.php b/application/classes/Model/DB.php index 0e5a412..7bd0a04 100644 --- a/application/classes/Model/DB.php +++ b/application/classes/Model/DB.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_DB extends TSM_ORM { +class Model_DB extends ORM_TSM { protected $_table_name = 'DB'; protected $_primary_key = 'DATABASE_NAME'; protected $_sorting = array( @@ -24,10 +24,10 @@ class Model_DB extends TSM_ORM { array('number_format',array(':value',0)), ), 'LAST_REORG'=>array( - array('TSM_ORM::date',array(':value','d-M H:i')), + array('ORM_TSM::date',array(':value','d-M H:i')), ), 'LAST_BACKUP_DATE'=>array( - array('TSM_ORM::date',array(':value','d-M H:i')), + array('ORM_TSM::date',array(':value','d-M H:i')), ), 'TOTAL_BUFF_REQ'=>array( array('number_format',array(':value',0)), diff --git a/application/classes/Model/DBSPACE.php b/application/classes/Model/DBSPACE.php index e2ae772..7fc4b0e 100644 --- a/application/classes/Model/DBSPACE.php +++ b/application/classes/Model/DBSPACE.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_DBSPACE extends TSM_ORM { +class Model_DBSPACE extends ORM_TSM { protected $_table_name = 'DBSPACE'; protected $_primary_key = 'LOCATION'; protected $_sorting = array( diff --git a/application/classes/Model/DEVCLASSES.php b/application/classes/Model/DEVCLASSES.php index 609ac25..5c6eda7 100644 --- a/application/classes/Model/DEVCLASSES.php +++ b/application/classes/Model/DEVCLASSES.php @@ -10,7 +10,7 @@ * @license http://phptsmadmin.sf.net/license.html * @note This is model is using the plural name, as storage pools have an attribute with the singular name */ -class Model_DEVCLASSES extends TSM_ORM { +class Model_DEVCLASSES extends ORM_TSM { protected $_table_name = 'DEVCLASSES'; protected $_primary_key = 'DEVCLASS_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( diff --git a/application/classes/Model/DOMAIN.php b/application/classes/Model/DOMAIN.php index 0c8f7fd..cae2674 100644 --- a/application/classes/Model/DOMAIN.php +++ b/application/classes/Model/DOMAIN.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_DOMAIN extends TSM_ORM { +class Model_DOMAIN extends ORM_TSM { protected $_table_name = 'DOMAINS'; protected $_primary_key = 'DOMAIN_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( diff --git a/application/classes/Model/DRIVE.php b/application/classes/Model/DRIVE.php index 94dc93a..8cfd8ea 100644 --- a/application/classes/Model/DRIVE.php +++ b/application/classes/Model/DRIVE.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_DRIVE extends TSM_ORM { +class Model_DRIVE extends ORM_TSM { protected $_table_name = 'DRIVES'; protected $_primary_key = 'DRIVE_NAME'; protected $_sorting = array( diff --git a/application/classes/Model/EVENT.php b/application/classes/Model/EVENT.php index a4d1fb2..7430e31 100644 --- a/application/classes/Model/EVENT.php +++ b/application/classes/Model/EVENT.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_EVENT extends TSM_ORM { +class Model_EVENT extends ORM_TSM { protected $_table_name = 'EVENTS'; protected $_primary_key = 'NODE_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( @@ -19,13 +19,13 @@ class Model_EVENT extends TSM_ORM { protected $_display_filters = array( 'SCHEDULED_START'=>array( - array('TSM_ORM::date',array(':value','d-M H:i')), + array('ORM_TSM::date',array(':value','d-M H:i')), ), 'ACTUAL_START'=>array( - array('TSM_ORM::date',array(':value','d-M H:i')), + array('ORM_TSM::date',array(':value','d-M H:i')), ), 'COMPLETED'=>array( - array('TSM_ORM::date',array(':value','d-M H:i')), + array('ORM_TSM::date',array(':value','d-M H:i')), ), ); } diff --git a/application/classes/Model/FILESPACE.php b/application/classes/Model/FILESPACE.php index 2979265..6efbcc4 100644 --- a/application/classes/Model/FILESPACE.php +++ b/application/classes/Model/FILESPACE.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_FILESPACE extends TSM_ORM { +class Model_FILESPACE extends ORM_TSM { protected $_table_name = 'FILESPACES'; protected $_primary_key = 'FILESPACE_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( @@ -41,45 +41,176 @@ class Model_FILESPACE extends TSM_ORM { protected $_display_filters = array( 'BACKUP_END'=>array( - array('TSM_ORM::date',array(':value','d-M-Y')), + array('ORM_TSM::date',array(':value','d-M-Y')), ), ); + /** + * Get all the OCCUPANCY for this FILESYSTEM on this NODE + */ + private function _occupancy() { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + + $k = sprintf('%s-%s-%s',__METHOD__,$this->NODE_NAME,$this->FILESPACE_NAME); + $c = Kohana::$config->load('config')->cache; + + if (is_null($result = Cache::instance($c)->get($k))) { + $result = array(); + + foreach ($this->NODE->occupancy() as $oo) + if ($oo->FILESPACE_NAME == $this->FILESPACE_NAME) + array_push($result,$oo); + + // @todo Cache time should be configurble + Cache::instance($c)->set($k,$result,300); + } + + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); + return $result; + } + + /** + * Get all the VOLUEMUSAGE for this FILESYSTEM on this NODE + */ + private function _volumeusage() { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + + $k = sprintf('%s-%s-%s',__METHOD__,$this->NODE_NAME,$this->FILESPACE_NAME); + $c = Kohana::$config->load('config')->cache; + + if (is_null($result = Cache::instance($c)->get($k))) { + $result = array(); + + foreach ($this->NODE->volumeusage() as $vuo) + if ($vuo->FILESPACE_NAME == $this->FILESPACE_NAME) + array_push($result,$vuo); + + // @todo Cache time should be configurble + Cache::instance($c)->set($k,$result,300); + } + + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); + return $result; + } + + /** + * Return the data that this FILESYSTEM has in a STORAGE POOL + * @param $pool is STORAGE POOL NAME + * @param $metric is metric of the storpage pool, eg: NUM_FILES + */ + private function data_bypool($pool,$metric) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + + $k = sprintf('%s-%s-%s-%s-%s',__METHOD__,$this->NODE_NAME,$this->FILESPACE_NAME,$pool,$metric); + $c = Kohana::$config->load('config')->cache; + + if (is_null($result = Cache::instance($c)->get($k))) { + $result = 0; + + foreach ($this->_occupancy() as $oo) + if ($oo->STGPOOL_NAME == $pool) + $result += $oo->{$metric}; + + // @todo Cache time should be configurble + Cache::instance($c)->set($k,$result,300); + } + + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); + return $result; + } + + /** + * Return the data that this FILESYSTEM has in a STORAGE POOL + * @param $pool is STORAGE POOL NAME + * @param $metric is metric of the storpage pool, eg: NUM_FILES + * @param $type is Bkup/Arch/SpMg + */ + private function data_bypoolbybtype($pool,$metric,$type) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + + $k = sprintf('%s-%s-%s-%s-%s-%s',__METHOD__,$this->NODE_NAME,$this->FILESPACE_NAME,$pool,$metric,$type); + $c = Kohana::$config->load('config')->cache; + + if (is_null($result = Cache::instance($c)->get($k))) { + $result = 0; + + foreach ($this->_occupancy() as $oo) + if ($oo->STGPOOL_NAME == $pool AND $oo->TYPE == $type) + $result += $oo->{$metric}; + + // @todo Cache time should be configurble + Cache::instance($c)->set($k,$result,300); + } + + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); + return $result; + } + + /** + * Return the LOGICAL_MB that this FILESYSTEM has in a STORAGE POOL + * @param $pool is STORAGE POOL NAME + */ + public function logmb_bypool($pool) { + Log::instance()->add(LOG::DEBUG,'FLYBY :method',array(':method'=>__METHOD__)); + return $this->data_bypool($pool,'LOGICAL_MB'); + } + + /** + * Return the LOGICAL_MB that this FILESYSTEM has in a STORAGE POOL + * @param $pool is STORAGE POOL NAME + * @param $type is Bkup/Arch/SpMg + */ + public function logmb_bypoolbybtype($pool,$type) { + Log::instance()->add(LOG::DEBUG,'FLYBY :method',array(':method'=>__METHOD__)); + return $this->data_bypoolbybtype($pool,'LOGICAL_MB',$type); + } + public function utilsation() { return $this->CAPACITY*($this->PCT_UTIL/100); - } - - // $dtype must be Bkup or Arch - public function storagepools($dtype) { - $pool = array(); - - foreach ($this->NODE->OCC - ->select('STGPOOL_NAME') - ->where('TYPE','=',$dtype) - ->and_where('FILESPACE_NAME','=',$this->FILESPACE_NAME) - ->group_by('STGPOOL_NAME') - ->order_by('STGPOOL_NAME') - ->find_all() as $oo) - - array_push($pool,$oo->STGPOOL); - - return $pool; } - public function pool_logical_util($pool,$btype) { - return $this->NODE->OCC - ->where('STGPOOL_NAME','=',$pool) - ->and_where('TYPE','=',$btype) - ->and_where('FILESPACE_NAME','=',$this->FILESPACE_NAME) - ->find()->LOGICAL_MB; + /** + * Return the VOLUMES that this FILESYSTEM uses for this NODE + * @param $pool is STORAGE POOL NAME + */ + public function vols_bypool($pool) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + + $k = sprintf('%s-%s-%s-%s',__METHOD__,$this->NODE_NAME,$this->FILESPACE_NAME,$pool); + $c = Kohana::$config->load('config')->cache; + + if (is_null($result = Cache::instance($c)->get($k))) { + $x = $result = array(); + + foreach ($this->_volumeusage() as $vuo) + if ($vuo->STGPOOL_NAME == $pool AND ! in_array($vuo->VOLUME_NAME,$x)) { + array_push($result,$vuo); + array_push($x,$vuo->VOLUME_NAME); + } + + // @todo Cache time should be configurble + Cache::instance($c)->set($k,$result,300); + } + + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); + return $result; } - public function pool_numvols($pool,$ctype) { - return $this->NODE->VOLUMEUSAGE - ->where('STGPOOL_NAME','=',$pool) - ->and_where('COPY_TYPE','=',$ctype) - ->and_where('FILESPACE_NAME','=',$this->FILESPACE_NAME) - ->find_all()->count(); + /** + * Return the VOLUMES that this FILESYSTEM uses for this NODE by POOL and BACKUP TYPE + * @param $pool is STORAGE POOL NAME + * @param $type is BACKUP/ARCHIVE/SPACE MANAGED + */ + public function vols_bypoolbybtype($pool,$type) { + $x = $result = array(); + + foreach ($this->vols_bypool($pool) as $vuo) + if ($vuo->COPY_TYPE == $type AND ! in_array($vuo->VOLUME_NAME,$x)) { + array_push($result,$vuo); + array_push($x,$vuo->VOLUME_NAME); + } + + return $result; } } ?> diff --git a/application/classes/Model/LIBRARY.php b/application/classes/Model/LIBRARY.php index 68ada0c..714ae83 100644 --- a/application/classes/Model/LIBRARY.php +++ b/application/classes/Model/LIBRARY.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_LIBRARY extends TSM_ORM { +class Model_LIBRARY extends ORM_TSM { protected $_table_name = 'LIBRARIES'; protected $_primary_key = 'LIBRARY_NAME'; protected $_sorting = array( @@ -28,7 +28,7 @@ class Model_LIBRARY extends TSM_ORM { #zz public function slots() { - return $this->slots ? $this->slots : $this->slots = DB::query(Database::SHOW,'SHOW SLOTS '.$this)->execute(Kohana::$config->load('config')->client_type); + return $this->slots ? $this->slots : $this->slots = DB::query(Database::SHOW,'SHOW SLOTS '.$this)->execute(); } // Return a list of scratch volumes diff --git a/application/classes/Model/LIBVOLUME.php b/application/classes/Model/LIBVOLUME.php index 2664a83..c9f869a 100644 --- a/application/classes/Model/LIBVOLUME.php +++ b/application/classes/Model/LIBVOLUME.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_LIBVOLUME extends TSM_ORM { +class Model_LIBVOLUME extends ORM_TSM { protected $_table_name = 'LIBVOLUMES'; protected $_primary_key = 'HOME_ELEMENT'; protected $_sorting = array( diff --git a/application/classes/Model/MEDIA.php b/application/classes/Model/MEDIA.php index 1c96707..1b19f83 100644 --- a/application/classes/Model/MEDIA.php +++ b/application/classes/Model/MEDIA.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_MEDIA extends TSM_ORM { +class Model_MEDIA extends ORM_TSM { protected $_table_name = 'MEDIA'; protected $_primary_key = 'VOLUME_NAME'; protected $_sorting = array( diff --git a/application/classes/Model/MGMTCLASS.php b/application/classes/Model/MGMTCLASS.php index ddfe6f0..7765996 100644 --- a/application/classes/Model/MGMTCLASS.php +++ b/application/classes/Model/MGMTCLASS.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_MGMTCLASS extends TSM_ORM { +class Model_MGMTCLASS extends ORM_TSM { protected $_table_name = 'MGMTCLASSES'; protected $_primary_key = 'DOMAIN_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( diff --git a/application/classes/Model/NODE.php b/application/classes/Model/NODE.php index 58e7ad5..8cc4eaf 100644 --- a/application/classes/Model/NODE.php +++ b/application/classes/Model/NODE.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_NODE extends TSM_ORM { +class Model_NODE extends ORM_TSM { protected $_table_name = 'NODES'; protected $_primary_key = 'NODE_NAME'; protected $_sorting = array( @@ -86,13 +86,13 @@ class Model_NODE extends TSM_ORM { protected $_display_filters = array( 'REG_TIME'=>array( - array('TSM_ORM::date',array(':value','d-M-Y')), + array('ORM_TSM::date',array(':value','d-M-Y')), ), 'PWSET_TIME'=>array( - array('TSM_ORM::date',array(':value','d-M-Y')), + array('ORM_TSM::date',array(':value','d-M-Y')), ), 'LASTACC_TIME'=>array( - array('TSM_ORM::date',array(':value','d-M-Y')), + array('ORM_TSM::date',array(':value','d-M-Y')), ), 'LASTSESS_SENT'=>array( array('number_format',array(':value',0)), @@ -275,11 +275,13 @@ class Model_NODE extends TSM_ORM { } /** - * Return the data that this NODE has in a STORAGE POOL + * Return the data that this NODE has in a STORAGE POOL * @param $pool is STORAGE POOL NAME * @param $metric is metric of the storpage pool, eg: NUM_FILES */ private function data_bypool($pool,$metric) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $k = sprintf('%s-%s-%s-%s',__METHOD__,$this->NODE_NAME,$pool,$metric); $c = Kohana::$config->load('config')->cache; @@ -294,14 +296,16 @@ class Model_NODE extends TSM_ORM { Cache::instance($c)->set($k,$result,300); } + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } /** - * Return the FILES that this NODE has in a STORAGE POOL + * Return the FILES that this NODE has in a STORAGE POOL * @param $pool is STORAGE POOL NAME */ public function file_bypool($pool) { + Log::instance()->add(LOG::DEBUG,'FLYBY :method',array(':method'=>__METHOD__)); return $this->data_bypool($pool,'NUM_FILES'); } @@ -310,19 +314,23 @@ class Model_NODE extends TSM_ORM { * @param $type is ACTIVEDATA/PRIMARY/COPY */ public function file_byptype($type) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $result = 0; foreach ($this->stgpools_byptype($type) as $spo) $result += $this->file_bypool($spo); + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } /** - * Return the LOGICAL_MB that this NODE has in a STORAGE POOL + * Return the LOGICAL_MB that this NODE has in a STORAGE POOL * @param $pool is STORAGE POOL NAME */ public function logmb_bypool($pool) { + Log::instance()->add(LOG::DEBUG,'FLYBY :method',array(':method'=>__METHOD__)); return $this->data_bypool($pool,'LOGICAL_MB'); } @@ -331,18 +339,27 @@ class Model_NODE extends TSM_ORM { * @param $type is ACTIVEDATA/PRIMARY/COPY */ public function logmb_byptype($type) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $result = 0; foreach ($this->stgpools_byptype($type) as $spo) $result += $this->logmb_bypool($spo); + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } + public function occupancy() { + return $this->_occupancy(); + } + /** * Return the STORAGE POOLS this NODE has data in */ public function stgpools() { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $k = sprintf('%s-%s',__METHOD__,$this->NODE_NAME); $c = Kohana::$config->load('config')->cache; @@ -355,11 +372,11 @@ class Model_NODE extends TSM_ORM { array_push($x,$vuo->STGPOOL_NAME); } - Sort::MASort($result,'STGPOOL_NAME'); // @todo Cache time should be configurble Cache::instance($c)->set($k,$result,300); } + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } @@ -369,6 +386,8 @@ class Model_NODE extends TSM_ORM { * @todo This should be sorted by PRIMARY/ACTIVE/COPY */ public function stgpooltypes() { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $k = sprintf('%s-%s',__METHOD__,$this->NODE_NAME); $c = Kohana::$config->load('config')->cache; @@ -383,6 +402,7 @@ class Model_NODE extends TSM_ORM { Cache::instance($c)->set($k,$result,300); } + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } @@ -391,6 +411,8 @@ class Model_NODE extends TSM_ORM { * @param $type is BACKUP/ARCHIVE/SPACE MANAGED */ public function stgpools_bybtype($type) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $k = sprintf('%s-%s-%s',__METHOD__,$this->NODE_NAME,$type); $c = Kohana::$config->load('config')->cache; @@ -403,11 +425,11 @@ class Model_NODE extends TSM_ORM { array_push($x,$vuo->STGPOOL_NAME); } - Sort::MASort($result,'STGPOOL_NAME'); // @todo Cache time should be configurble Cache::instance($c)->set($k,$result,300); } + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } @@ -416,6 +438,8 @@ class Model_NODE extends TSM_ORM { * @param $type is ACTIVEDATA/PRIMARY/COPY */ public function stgpools_byptype($type) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $k = sprintf('%s-%s-%s',__METHOD__,$this->NODE_NAME,$type); $c = Kohana::$config->load('config')->cache; @@ -430,6 +454,7 @@ class Model_NODE extends TSM_ORM { Cache::instance($c)->set($k,$result,300); } + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } @@ -438,6 +463,8 @@ class Model_NODE extends TSM_ORM { * @param $type is BACKUP/ARCHIVE/SPACE MANAGED */ public function vols_bybtype($type) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $k = sprintf('%s-%s-%s',__METHOD__,$this->NODE_NAME,$type); $c = Kohana::$config->load('config')->cache; @@ -455,6 +482,7 @@ class Model_NODE extends TSM_ORM { Cache::instance($c)->set($k,$result,300); } + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } @@ -463,14 +491,16 @@ class Model_NODE extends TSM_ORM { * @param $pool is STORAGE POOL NAME */ public function vols_bypool($pool) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $k = sprintf('%s-%s-%s',__METHOD__,$this->NODE_NAME,$pool); $c = Kohana::$config->load('config')->cache; if (is_null($result = Cache::instance($c)->get($k))) { $x = $result = array(); - foreach ($this->_volumeusage() as $vuo) { - if ($vuo->STGPOOL_NAME == $pool AND ! in_array($vuo->VOLUME_NAME,$x)) + foreach ($this->_volumeusage() as $vuo) + if ($vuo->STGPOOL_NAME == $pool AND ! in_array($vuo->VOLUME_NAME,$x)) { array_push($result,$vuo); array_push($x,$vuo->VOLUME_NAME); } @@ -480,6 +510,7 @@ class Model_NODE extends TSM_ORM { Cache::instance($c)->set($k,$result,300); } + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } @@ -488,20 +519,25 @@ class Model_NODE extends TSM_ORM { * @param $type is ACTIVEDATA/PRIMARY/COPY */ public function vols_byptype($type) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $result = array(); foreach ($this->stgpools_byptype($type) as $spo) $result = array_merge($result,$this->vols_bypool($spo)); + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } /** - * Return the VOLUMES that this NODE uses by pool and BACKUP TYPE + * Return the VOLUMES that this NODE uses by POOL and BACKUP TYPE * @param $pool is STORAGE POOL NAME * @param $type is BACKUP/ARCHIVE/SPACE MANAGED */ public function vols_bypoolbybtype($pool,$type) { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + $x = $result = array(); foreach ($this->vols_bypool($pool) as $vuo) @@ -510,7 +546,12 @@ class Model_NODE extends TSM_ORM { array_push($x,$vuo->VOLUME_NAME); } + Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } + + public function volumeusage() { + return $this->_volumeusage(); + } } ?> diff --git a/application/classes/Model/OCC.php b/application/classes/Model/OCC.php index 1fa311c..e76c7a2 100644 --- a/application/classes/Model/OCC.php +++ b/application/classes/Model/OCC.php @@ -10,7 +10,7 @@ * @license http://phptsmadmin.sf.net/license.html * @node This has been renamed to OCC from OCCUPANCY, as DB2/FILESPACES has an OCCUPANCY column */ -class Model_OCC extends TSM_ORM { +class Model_OCC extends ORM_TSM { protected $_table_name = 'OCCUPANCY'; protected $_primary_key = 'NODE_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( diff --git a/application/classes/Model/PATH.php b/application/classes/Model/PATH.php index b3a8827..ff9fd62 100644 --- a/application/classes/Model/PATH.php +++ b/application/classes/Model/PATH.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_PATH extends TSM_ORM { +class Model_PATH extends ORM_TSM { protected $_table_name = 'PATHS'; protected $_primary_key = 'DEVICE'; protected $_sorting = array( diff --git a/application/classes/Model/SCHEDULE/CLIENT.php b/application/classes/Model/SCHEDULE/CLIENT.php index 3184a72..003c374 100644 --- a/application/classes/Model/SCHEDULE/CLIENT.php +++ b/application/classes/Model/SCHEDULE/CLIENT.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_SCHEDULE_CLIENT extends TSM_ORM { +class Model_SCHEDULE_CLIENT extends ORM_TSM { protected $_table_name = 'CLIENT_SCHEDULES'; protected $_primary_key = 'SCHEDULE_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( @@ -22,7 +22,7 @@ class Model_SCHEDULE_CLIENT extends TSM_ORM { protected $_display_filters = array( 'STARTTIME'=>array( - array('TSM_ORM::date',array(':value','h:m')), + array('ORM_TSM::date',array(':value','h:m')), ), ); diff --git a/application/classes/Model/STGPOOL.php b/application/classes/Model/STGPOOL.php index 0119807..ef1d900 100644 --- a/application/classes/Model/STGPOOL.php +++ b/application/classes/Model/STGPOOL.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_STGPOOL extends TSM_ORM { +class Model_STGPOOL extends ORM_TSM { protected $_table_name = 'STGPOOLS'; protected $_primary_key = 'STGPOOL_NAME'; protected $_sorting = array( diff --git a/application/classes/Model/SUMMARY.php b/application/classes/Model/SUMMARY.php index 9568aa1..9afe397 100644 --- a/application/classes/Model/SUMMARY.php +++ b/application/classes/Model/SUMMARY.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_SUMMARY extends TSM_ORM { +class Model_SUMMARY extends ORM_TSM { protected $_table_name = 'SUMMARY'; protected $_primary_key = 'ACTIVITY'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( @@ -20,10 +20,10 @@ class Model_SUMMARY extends TSM_ORM { protected $_display_filters = array( 'START_TIME'=>array( - array('TSM_ORM::date',array(':value','d-M H:i')), + array('ORM_TSM::date',array(':value','d-M H:i')), ), 'END_TIME'=>array( - array('TSM_ORM::date',array(':value','d-M H:i')), + array('ORM_TSM::date',array(':value','d-M H:i')), ), ); } diff --git a/application/classes/Model/VOLHISTORY.php b/application/classes/Model/VOLHISTORY.php index ea0ccc5..a8b3b30 100644 --- a/application/classes/Model/VOLHISTORY.php +++ b/application/classes/Model/VOLHISTORY.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_VOLHISTORY extends TSM_ORM { +class Model_VOLHISTORY extends ORM_TSM { protected $_table_name = 'VOLHISTORY'; protected $_primary_key = 'VOLUME_NAME'; protected $_sorting = array( @@ -23,7 +23,7 @@ class Model_VOLHISTORY extends TSM_ORM { protected $_display_filters = array( 'DATE_TIME'=>array( - array('TSM_ORM::date',array(':value','d-M-Y')), + array('ORM_TSM::date',array(':value','d-M-Y')), ), ); diff --git a/application/classes/Model/VOLUME.php b/application/classes/Model/VOLUME.php index 086910d..6b569c0 100644 --- a/application/classes/Model/VOLUME.php +++ b/application/classes/Model/VOLUME.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_VOLUME extends TSM_ORM { +class Model_VOLUME extends ORM_TSM { protected $_table_name = 'VOLUMES'; protected $_primary_key = 'VOLUME_NAME'; protected $_sorting = array( @@ -27,10 +27,10 @@ class Model_VOLUME extends TSM_ORM { protected $_display_filters = array( 'LAST_READ_DATE'=>array( - array('TSM_ORM::date',array(':value','d-M-Y')), + array('ORM_TSM::date',array(':value','d-M-Y')), ), 'LAST_WRITE_DATE'=>array( - array('TSM_ORM::date',array(':value','d-M-Y')), + array('ORM_TSM::date',array(':value','d-M-Y')), ), ); diff --git a/application/classes/Model/VOLUMEUSAGE.php b/application/classes/Model/VOLUMEUSAGE.php index 0cc1cfc..e9fe34e 100644 --- a/application/classes/Model/VOLUMEUSAGE.php +++ b/application/classes/Model/VOLUMEUSAGE.php @@ -9,7 +9,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://phptsmadmin.sf.net/license.html */ -class Model_VOLUMEUSAGE extends TSM_ORM { +class Model_VOLUMEUSAGE extends ORM_TSM { protected $_table_name = 'VOLUMEUSAGE'; protected $_primary_key = 'NODE_NAME'; // We need a primary key to detect that the object is loaded. protected $_sorting = array( diff --git a/application/classes/TSM/ORM.php b/application/classes/ORM/TSM.php similarity index 79% rename from application/classes/TSM/ORM.php rename to application/classes/ORM/TSM.php index 1a2d014..9edb192 100644 --- a/application/classes/TSM/ORM.php +++ b/application/classes/ORM/TSM.php @@ -10,7 +10,7 @@ * @copyright (c) 2010 phpTSMadmin Development Team * @license http://dev.osbill.net/license.html */ -abstract class TSM_ORM extends ORM { +abstract class ORM_TSM extends ORM { // Suppress ORMs inclusion of .* protected $_disable_wild_select = TRUE; // Suppress ORMs inclusion of . to column joins @@ -58,11 +58,16 @@ abstract class TSM_ORM extends ORM { } public function find() { + Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); + + Log::instance()->add(LOG::DEBUG,'METHOD :method: isCacheable: :cable, table: :table',array(':method'=>__METHOD__,':cable'=>($x=$this->isCacheable()) ? $x : 'N',':table'=>$this->_table_name)); // Check if we can preload our data and havent already done it - if ($time = $this->isCacheable() AND is_null(Cache::instance(Kohana::$config->load('config')->cache)->get($cache_key = 'PRELOAD:'.$this->_table_name))) { + // Kohana uses Kohana::cache here, instead of Cache() + if ($time = $this->isCacheable() AND is_null(Kohana::cache($cache_key = 'PRELOAD:'.$this->_table_name))) { + Log::instance()->add(LOG::DEBUG,'PRELOADING :method: table: :table',array(':method'=>__METHOD__,':table'=>$this->_table_name)); // Firstly set our cache, so that we dont get in a loop - Cache::instance()->set($cache_key,TRUE,$time-1); + Kohana::cache($cache_key,TRUE,$time-1); // Find all records of this type $c = get_class($this); @@ -75,7 +80,7 @@ abstract class TSM_ORM extends ORM { // Code, as extracted from ORM to complete building the SQL $y->_build(Database::SELECT); - $y->_db_builder->from($y->_table_name); + $y->_db_builder->from(array($y->_table_name,$y->_object_name)); if (! isset($y->_db_applied['order_by']) AND ! empty($y->_sorting)) foreach ($y->_sorting as $column => $direction) { if (strpos($column, '.') === FALSE) @@ -91,20 +96,22 @@ abstract class TSM_ORM extends ORM { // Cache the record, our subsequent find should get a cache hit now. Kohana::cache($cache_key, array($record->as_array()), $time); + Log::instance()->add(LOG::DEBUG,'Cache SET for TIME: :time, KEY: :cache_key',array(':cache_key'=>$cache_key,':time'=>$time)); } unset($x); } + Log::instance()->add(LOG::DEBUG,'LEAVE :method',array(':method'=>__METHOD__)); + // Contiue as normal return parent::find(); } private function isCacheable() { - $preload = array('NODES','VOLUMES'); - - $config = Kohana::$config->load('database')->{Database::$default}; + $config = Kohana::$config->load('database')->{Kohana::$config->load('config')->client_type}; +//echo Debug::vars(array('m'=>__METHOD__,'cpl'=>$config['cachepreload'],'tn'=>$this->_table_name,'db'=>count($this->_db_pending),'pend'=>$this->_db_pending,'pk'=>$this->_primary_key)); if ($config['caching'] AND isset($config['cachepreload'][$this->_table_name]) AND count($this->_db_pending) == 1 AND $this->_db_pending[0]['name'] == 'where' AND $this->_db_pending[0]['args'][0] == $this->_primary_key AND $this->_db_pending[0]['args'][1] == '=') return $config['cachepreload'][$this->_table_name]; else @@ -127,12 +134,12 @@ abstract class TSM_ORM extends ORM { * @return array * @todo This cache time needs to be better integrated with other caching times. */ - public function list_columns() { + public function list_columns() { // We'll cache our query results if ($this->_db->caching('SCHEMA')) { // Set the cache key based on the database instance name and SQL $cache_key = 'Database::query(LC:'.$this->_table_name.')'; - + if (! is_null($result = Cache::instance()->get($cache_key))) // Return a cached result return $result; diff --git a/application/classes/lnApp/Controller/TemplateDefault.php b/application/classes/lnApp/Controller/TemplateDefault.php index e70d51e..57a63a1 100644 --- a/application/classes/lnApp/Controller/TemplateDefault.php +++ b/application/classes/lnApp/Controller/TemplateDefault.php @@ -157,7 +157,7 @@ abstract class lnApp_Controller_TemplateDefault extends Controller_Template { if ($this->auto_render) { // Application Title - $this->meta->title = 'Application Title'; + $this->meta->title = Kohana::$config->load('config')->appname; $this->template->title = ''; // Style Sheets Properties @@ -218,7 +218,7 @@ abstract class lnApp_Controller_TemplateDefault extends Controller_Template { * Default Method to call from the tree menu */ public function action_menu() { - $this->template->content = 'See menu on tree'; + $this->template->content = _('Please choose from the menu on the left - you may need to expand the items by pressing on the plus.'); } protected function _headimages() { diff --git a/application/config/config.php b/application/config/config.php index 6a82ec0..9802528 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -11,6 +11,7 @@ */ return array( + 'appname' => 'phpTSMadmin', 'cache_type' => 'file', 'cache' => 'apc', 'cache_time' => 86400, diff --git a/application/media/css/login.css b/application/media/css/login.css index baabd9e..cecbce6 100644 --- a/application/media/css/login.css +++ b/application/media/css/login.css @@ -1,10 +1,11 @@ /** Login Style Sheet **/ table.login { + width: 5%; margin-left: auto; margin-right: auto; - background-color: #F9F9FA; - border: 1px solid #AAAACC; + background-color: #FBFBFB; + border: 1px solid #A0A0A0; padding: 10px; } diff --git a/application/views/domain/policy.php b/application/views/domain/policy.php index 48b6d9b..ea8183d 100644 --- a/application/views/domain/policy.php +++ b/application/views/domain/policy.php @@ -13,6 +13,7 @@ MGMT Class HSM Pool 1st Backup Pool + Next Backup Pool Ver Exist Ver Del Frequency @@ -21,7 +22,8 @@ display('CLASS_NAME'); ?>DEFAULTMC=='Yes' ? ' *' : ''; ?> display('MIGDESTINATION'); ?> - COPYGROUP_BU->display('DESTINATION'); ?> + COPYGROUP_BU->DESTINATION,$mco->COPYGROUP_BU->display('DESTINATION')); ?> + COPYGROUP_BU->STGPOOL->NEXTSTGPOOL,$mco->COPYGROUP_BU->STGPOOL->display('NEXTSTGPOOL')); ?> COPYGROUP_BU->display('VEREXISTS'),$mco->COPYGROUP_BU->display('RETEXTRA')); ?> COPYGROUP_BU->display('VERDELETED'),$mco->COPYGROUP_BU->display('RETONLY')); ?> COPYGROUP_BU->display('FREQUENCY'); ?> diff --git a/application/views/domain/volumes.php b/application/views/domain/volumes.php index 441996a..b596f10 100644 --- a/application/views/domain/volumes.php +++ b/application/views/domain/volumes.php @@ -28,7 +28,7 @@ vols_bypoolbybtype($spo->STGPOOL_NAME,$ctype) as $vuo) { $vo = $vuo->VOLUME; ?> - VOLUME_NAME,$vo->display('VOLUME_NAME')); ?> + VOLUME_NAME),$vo->display('VOLUME_NAME')); ?> display('LAST_READ_DATE'); ?> display('LAST_WRITE_DATE'); ?> display('ACCESS'); ?> diff --git a/application/views/node/filesystems.php b/application/views/node/filesystems.php index 9770073..f9d5c00 100644 --- a/application/views/node/filesystems.php +++ b/application/views/node/filesystems.php @@ -19,16 +19,16 @@ display('STGPOOL_NAME'); ?> display('POOLTYPE'); ?> - fs() as $fso) { ?> + fs() as $fso) { ?> display('FILESPACE_NAME'); ?> display('BACKUP_END') : ' '; ?> utilsation(),2); ?> - stgpools() as $spo) { ?> - pool_logical_util($spo->STGPOOL_NAME,$btype),2); ?> (pool_numvols($spo->STGPOOL_NAME,$ctype); ?>) - + stgpools() as $spo) { ?> + logmb_bypoolbybtype($spo->STGPOOL_NAME,$btype),2); ?> (vols_bypoolbybtype($spo->STGPOOL_NAME,$ctype)); ?>) + - + There is no Data for this Node. diff --git a/application/views/node/volumes.php b/application/views/node/volumes.php index 4ec9034..2f3744c 100644 --- a/application/views/node/volumes.php +++ b/application/views/node/volumes.php @@ -28,7 +28,7 @@ vols_bypoolbybtype($spo->STGPOOL_NAME,$ctype) as $vuo) { $vo = $vuo->VOLUME; ?> - VOLUME_NAME,$vo->display('VOLUME_NAME')); ?> + VOLUME_NAME),$vo->display('VOLUME_NAME')); ?> display('LAST_READ_DATE'); ?> display('LAST_WRITE_DATE'); ?> display('ACCESS'); ?> diff --git a/application/views/stgpool/volumes.php b/application/views/stgpool/volumes.php index 7be2c12..78f4139 100644 --- a/application/views/stgpool/volumes.php +++ b/application/views/stgpool/volumes.php @@ -22,7 +22,7 @@ VOLUME->find_all() as $vo) { ?> - VOLUME_NAME,$vo->display('VOLUME_NAME')); ?> + VOLUME_NAME),$vo->display('VOLUME_NAME')); ?> display('LAST_READ_DATE'); ?> display('LAST_WRITE_DATE'); ?> display('ACCESS'); ?> diff --git a/application/views/volume/info.php b/application/views/volume/info.php index 1de1a02..ae8b9c9 100644 --- a/application/views/volume/info.php +++ b/application/views/volume/info.php @@ -12,7 +12,7 @@ Storage Pool - STGPOOL_NAME,$o->display('STGPOOL_NAME')); ?> + STGPOOL_NAME,$o->display('STGPOOL_NAME')); ?> Estimated Capacity