From dcd6a54cb9b787b9f763fc46e57303a4910b31f8 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 27 May 2011 21:08:44 +1000 Subject: [PATCH] Minor cosmetic updates --- application/classes/model/volume.php | 8 +- application/classes/orm.php | 2 +- application/media/css/default.css | 2 + application/views/nodes/detail.php | 74 +++++++++---------- application/views/nodes/detail_filesystem.php | 28 +++---- application/views/nodes/detail_schedule.php | 34 ++++----- application/views/nodes/detail_volumes.php | 30 ++++---- 7 files changed, 94 insertions(+), 84 deletions(-) diff --git a/application/classes/model/volume.php b/application/classes/model/volume.php index 71a688b..727cd9f 100644 --- a/application/classes/model/volume.php +++ b/application/classes/model/volume.php @@ -30,10 +30,16 @@ class Model_VOLUME extends ORMTSM { ), ); + // Show the number of filespaces on a volume + // $dtype is BACKUP or ARCHIVE + public function getFSOnVol($dtype) { + return $this->VOLUMEUSAGE->where('COPY_TYPE','=',$dtype)->find_all()->count(); + } + // Show the number of nodes on a volume // $dtype is BACKUP or ARCHIVE public function getNodesOnVol($dtype) { - return $this->VOLUMEUSAGE->where('COPY_TYPE','=',$dtype)->find_all()->count(); + return $this->VOLUMEUSAGE->select('NODE_NAME')->distinct(TRUE)->where('COPY_TYPE','=',$dtype)->find_all()->count(); } } ?> diff --git a/application/classes/orm.php b/application/classes/orm.php index 0af7843..86c9f13 100644 --- a/application/classes/orm.php +++ b/application/classes/orm.php @@ -63,7 +63,7 @@ class ORM extends Kohana_ORM { if (isset($this->_object_formated[$column])) return $this->_object_formated[$column]; else - return $value ? $value : ' '; + return strlen((string)$value) ? $value : ' '; } } ?> diff --git a/application/media/css/default.css b/application/media/css/default.css index 0da1520..e5fb37a 100644 --- a/application/media/css/default.css +++ b/application/media/css/default.css @@ -8,6 +8,8 @@ tr.subhead { background-color: #BBBBDD; } td.head { font-weight: bold; } td.bold { font-weight: bold; } td.bold-right { font-weight: bold; text-align: right; } +td.data { font-weight: bold; } +td.data-right { font-weight: bold; text-align: right; } td.right { text-align: right; } tr.odd { background-color: #FCFCFE; } tr.even { background-color: #F6F6F8; } diff --git a/application/views/nodes/detail.php b/application/views/nodes/detail.php index e7eba86..9bece46 100644 --- a/application/views/nodes/detail.php +++ b/application/views/nodes/detail.php @@ -10,37 +10,37 @@ Node Name - display('NODE_NAME'); ?> (display('TCP_ADDRESS'); ?>) + display('NODE_NAME'); ?> (display('TCP_ADDRESS'); ?>) Operating Sytem - display('PLATFORM_NAME'),$node->display('CLIENT_OS_LEVEL')); ?> + display('PLATFORM_NAME'),$node->display('CLIENT_OS_LEVEL')); ?> TSM Client Version - tsmclientversion(); ?> + tsmclientversion(); ?>   Date Registered - display('REG_TIME'); ?> (by display('REG_ADMIN'); ?>) + display('REG_TIME'); ?> (by display('REG_ADMIN'); ?>) Date Last Password Change - display('PWSET_TIME'); ?> + display('PWSET_TIME'); ?>   Password Expiry - passexp(); ?> + passexp(); ?> Invalid Password Count - display('INVALID_PW_COUNT'); ?> (LOCKED == 'NO' ? _('Not Locked') : _('Locked'); ?>) + display('INVALID_PW_COUNT'); ?> (LOCKED == 'NO' ? _('Not Locked') : _('Locked'); ?>) @@ -54,43 +54,43 @@ Last Access - display('LASTACC_TIME'); ?> + display('LASTACC_TIME'); ?> Last Sent - LASTSESS_SENT/1024/1024,2); ?> MB + LASTSESS_SENT/1024/1024,2); ?> MB Last Receive - LASTSESS_RECVD/1024/1024,2); ?> MB + LASTSESS_RECVD/1024/1024,2); ?> MB Last Duration - LASTSESS_DURATION/60,2); ?> min + LASTSESS_DURATION/60,2); ?> min Last Session Idle Wait Percent - display('LASTSESS_IDLEWAIT'); ?>% (LASTSESS_DURATION*($node->LASTSESS_IDLEWAIT/100),2); ?>s) + display('LASTSESS_IDLEWAIT'); ?>% (LASTSESS_DURATION*($node->LASTSESS_IDLEWAIT/100),2); ?>s) Last Session Comm Wait Percent - display('LASTSESS_COMMWAIT'); ?>% (LASTSESS_DURATION*($node->LASTSESS_COMMWAIT/100),2); ?>s) + display('LASTSESS_COMMWAIT'); ?>% (LASTSESS_DURATION*($node->LASTSESS_COMMWAIT/100),2); ?>s) Last Session Media Wait Percent - display('LASTSESS_MEDIAWAIT'); ?>% (LASTSESS_DURATION*($node->LASTSESS_MEDIAWAIT/100),2); ?>s) + display('LASTSESS_MEDIAWAIT'); ?>% (LASTSESS_DURATION*($node->LASTSESS_MEDIAWAIT/100),2); ?>s) Last Session Transfer Percent - lasttransferpercent(),2); ?>% (lasttransfertime(),2); ?>s) + lasttransferpercent(),2); ?>% (lasttransfertime(),2); ?>s) Last Session Send Performance - lastsendperformance(),2); ?> MB/s (lastsendaggperformance(),2); ?> MB/s Aggregate) + lastsendperformance(),2); ?> MB/s (lastsendaggperformance(),2); ?> MB/s Aggregate) Last Session Receive Performance - lastreceiveperformance(),2); ?> MB/s (lastreceiveaggperformance(),2); ?> MB/s Aggregate) + lastreceiveperformance(),2); ?> MB/s (lastreceiveaggperformance(),2); ?> MB/s Aggregate) @@ -106,31 +106,31 @@ Client Option Set - display('OPTION_SET'); ?> + display('OPTION_SET'); ?> Collocation Group - COLLOCGROUP_NAME ? $node->display('COLLOCGROUP_NAME') : 'Not Set'; ?> + COLLOCGROUP_NAME ? $node->display('COLLOCGROUP_NAME') : 'Not Set'; ?> Client Compression - display('COMPRESSION'); ?> + display('COMPRESSION'); ?> TXN Group Max - txngroupmax(); ?> + txngroupmax(); ?> Delete Archives - display('ARCHDELETE'); ?> + display('ARCHDELETE'); ?> Delete Backups - display('BACKDELETE'); ?> + display('BACKDELETE'); ?> Keep Mount Points - display('KEEP_MP'); ?> (display('MAX_MP_ALLOWED'); ?>) + display('KEEP_MP'); ?> (display('MAX_MP_ALLOWED'); ?>) @@ -160,12 +160,12 @@ MGMTCLASS->where('SET_NAME','=','ACTIVE')->find_all() as $mco) { ?> - display('CLASS_NAME'); ?>DEFAULTMC=='Yes' ? ' *' : ''; ?> - display('MIGDESTINATION'); ?> - COPYGROUP_BU->display('DESTINATION'); ?> - COPYGROUP_BU->display('VEREXISTS'),$mco->COPYGROUP_BU->display('RETEXTRA')); ?> - COPYGROUP_BU->display('VERDELETED'),$mco->COPYGROUP_BU->display('RETONLY')); ?> - COPYGROUP_BU->display('FREQUENCY'); ?> + display('CLASS_NAME'); ?>DEFAULTMC=='Yes' ? ' *' : ''; ?> + display('MIGDESTINATION'); ?> + COPYGROUP_BU->display('DESTINATION'); ?> + COPYGROUP_BU->display('VEREXISTS'),$mco->COPYGROUP_BU->display('RETEXTRA')); ?> + COPYGROUP_BU->display('VERDELETED'),$mco->COPYGROUP_BU->display('RETONLY')); ?> + COPYGROUP_BU->display('FREQUENCY'); ?> @@ -181,9 +181,9 @@ MGMTCLASS->where('SET_NAME','=','ACTIVE')->find_all() as $mco) { ?> - display('CLASS_NAME'); ?>DEFAULTMC=='Yes' ? ' *' : ''; ?> - COPYGROUP_AR->display('DESTINATION'); ?> - COPYGROUP_AR->display('RETVER'); ?> + display('CLASS_NAME'); ?>DEFAULTMC=='Yes' ? ' *' : ''; ?> + COPYGROUP_AR->display('DESTINATION'); ?> + COPYGROUP_AR->display('RETVER'); ?> @@ -205,10 +205,10 @@ OPTION_SET) { ?> CLIENTOPT->find_all() as $coo) { ?> - display('OPTION_NAME'); ?> - display('SEQNUMBER'); ?> - display('OPTION_VALUE'); ?> - display('FORCE'); ?> + display('OPTION_NAME'); ?> + display('SEQNUMBER'); ?> + display('OPTION_VALUE'); ?> + display('FORCE'); ?> diff --git a/application/views/nodes/detail_filesystem.php b/application/views/nodes/detail_filesystem.php index d3378ce..7214754 100644 --- a/application/views/nodes/detail_filesystem.php +++ b/application/views/nodes/detail_filesystem.php @@ -12,22 +12,22 @@ File Space Last Date - Utilisation + Utilisation getStoragePoolsType('Bkup',$type))) foreach ($pools as $pool_name) { ?> - + FILESPACE->find_all() as $fso) { ?> - display('FILESPACE_NAME'); ?> - display('BACKUP_END'); ?> - utilsation(),2); ?> + display('FILESPACE_NAME'); ?> + display('BACKUP_END'); ?> + utilsation(),2); ?> getStoragePoolsType('Bkup',$type))) foreach ($pools as $pool_name) { ?> - pool_logical_util($pool_name,'Bkup'),2); ?> (pool_numvols($pool_name,'BACKUP'); ?>) + pool_logical_util($pool_name,'Bkup'),2); ?> (pool_numvols($pool_name,'BACKUP'); ?>) @@ -46,14 +46,14 @@ Storage Type - Files - MB + Files + MB - - getStorageTypeFiles($type); ?> - getStorageTypeData($type); ?> + + getStorageTypeFiles($type); ?> + getStorageTypeData($type); ?> @@ -74,16 +74,16 @@ getStoragePoolsType('Arch',$type))) foreach ($pools as $pool_name) { ?> - + FILESPACE->find_all() as $fso) { ?> - display('FILESPACE_NAME'); ?> + display('FILESPACE_NAME'); ?> getStoragePoolsType('Arch',$type))) foreach ($pools as $pool_name) { ?> - pool_logical_util($pool_name,'Arch'),2); ?> (pool_numvols($pool_name,'ARCHIVE'); ?>) + pool_logical_util($pool_name,'Arch'),2); ?> (pool_numvols($pool_name,'ARCHIVE'); ?>) diff --git a/application/views/nodes/detail_schedule.php b/application/views/nodes/detail_schedule.php index 33bcb43..c244a82 100644 --- a/application/views/nodes/detail_schedule.php +++ b/application/views/nodes/detail_schedule.php @@ -19,12 +19,12 @@ ASSOCIATION->find_all() as $ao) { ?> - display('SCHEDULE_NAME'); ?> - SCHEDULE_CLIENT->display('STARTTIME'); ?> - SCHEDULE_CLIENT->DURATION,$ao->SCHEDULE_CLIENT->DURUNITS); ?> - SCHEDULE_CLIENT->PERIOD,$ao->SCHEDULE_CLIENT->PERUNITS); ?> - SCHEDULE_CLIENT->display('DAYOFWEEK'); ?> - SCHEDULE_CLIENT->display('PRIORITY'); ?> + display('SCHEDULE_NAME'); ?> + SCHEDULE_CLIENT->display('STARTTIME'); ?> + SCHEDULE_CLIENT->DURATION,$ao->SCHEDULE_CLIENT->DURUNITS); ?> + SCHEDULE_CLIENT->PERIOD,$ao->SCHEDULE_CLIENT->PERUNITS); ?> + SCHEDULE_CLIENT->display('DAYOFWEEK'); ?> + SCHEDULE_CLIENT->display('PRIORITY'); ?> @@ -49,11 +49,11 @@ SUMMARY->find_all() as $so) { ?> - display('START_TIME'); ?> - display('END_TIME'); ?> - display('ACTIVITY'); ?> - display('SCHEDULE_NAME'); ?> - display('BYTES')/1024/1024,2)); ?> + display('START_TIME'); ?> + display('END_TIME'); ?> + display('ACTIVITY'); ?> + display('SCHEDULE_NAME'); ?> + display('BYTES')/1024/1024,2)); ?> @@ -78,12 +78,12 @@ EVENT->find_all() as $eo) { ?> - display('SCHEDULED_START'); ?> - ACTUAL_START ? $eo->display('ACTUAL_START') : ' '; ?> - display('SCHEDULE_NAME'); ?> - display('STATUS'); ?> - COMPLETED ? $eo->display('COMPLETED') : ' '; ?> - RESULT,$eo->display('REASON')); ?> + display('SCHEDULED_START'); ?> + ACTUAL_START ? $eo->display('ACTUAL_START') : ' '; ?> + display('SCHEDULE_NAME'); ?> + display('STATUS'); ?> + COMPLETED ? $eo->display('COMPLETED') : ' '; ?> + RESULT,$eo->display('REASON')); ?> diff --git a/application/views/nodes/detail_volumes.php b/application/views/nodes/detail_volumes.php index ddff308..7b27ec1 100644 --- a/application/views/nodes/detail_volumes.php +++ b/application/views/nodes/detail_volumes.php @@ -16,25 +16,27 @@ Last Write Date Access Status - Errors R/W - Utilisation - Reclaim - Nodes on Vol + Errors R/W + Util % + Reclaim + Other FS + Other Node volumes($dtype) as $stgpool => $vols) { $spo = ORM::factory('STGPOOL',$stgpool); ?> - STGPOOL_NAME,$spo->RECLAIM,$spo->NUMSCRATCHUSED,$spo->MAXSCRATCH,$spo->DEVCLASSES->DEVTYPE); ?> + STGPOOL_NAME,$spo->RECLAIM,$spo->NUMSCRATCHUSED,$spo->MAXSCRATCH,$spo->DEVCLASSES->DEVTYPE); ?> - VOLUME_NAME; ?> - display('LAST_READ_DATE'); ?> - display('LAST_WRITE_DATE'); ?> - display('ACCESS'); ?> - display('STATUS'); ?> - READ_ERRORS,$vol->WRITE_ERRORS); ?> - display('EST_CAPACITY_MB'); ?> - display('PCT_RECLAIM'); ?> - getNodesOnVol($dtype); ?> + VOLUME_NAME; ?> + display('LAST_READ_DATE'); ?> + display('LAST_WRITE_DATE'); ?> + display('ACCESS'); ?> + display('STATUS'); ?> + READ_ERRORS,$vol->WRITE_ERRORS); ?> + display('EST_CAPACITY_MB'); ?> + display('PCT_RECLAIM'); ?> + getFSOnVol($dtype); ?> + getNodesOnVol($dtype); ?>