From ecf8003aefe81253bfe15e5fd79335cdbc3b677d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 28 Apr 2018 12:32:21 -0400 Subject: [PATCH 1/2] remove extra spaces --- web/includes/Storage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/includes/Storage.php b/web/includes/Storage.php index 38ba83bf9..5dc7016be 100644 --- a/web/includes/Storage.php +++ b/web/includes/Storage.php @@ -124,7 +124,7 @@ public static function find_all( $parameters = null, $options = null ) { return $usage; } public function disk_total_space() { - if ( ! array_key_exists( 'disk_total_space', $this ) ) { + if ( ! array_key_exists('disk_total_space', $this ) ) { $this->{'disk_total_space'} = disk_total_space( $this->Path() ); } return $this->{'disk_total_space'}; @@ -142,7 +142,7 @@ public static function find_all( $parameters = null, $options = null ) { } } else { $path = $this->Path(); - $used = disk_total_space( $path ) - disk_free_space( $path );; + $used = disk_total_space($path) - disk_free_space($path); } $this->{'DiskSpace'} = $used; } From abd52ebfb12d78f4a415fd661fa95f25668aec12 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 28 Apr 2018 12:38:10 -0400 Subject: [PATCH 2/2] Add DiskSpace column to storage listing --- web/skins/classic/views/options.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index 697abd6e5..ef01003c5 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -265,21 +265,22 @@ foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI + - +'lower(Name)') ) as $Storage ) { ?> - - - - - + Id(), 'zmStorage', 'storage', validHtmlStr($Storage->Id()), $canEdit ) ?> + Id(), 'zmStorage', 'storage', validHtmlStr($Storage->Name()), $canEdit ) ?> + Id(), 'zmStorage', 'storage', validHtmlStr($Storage->Path()), $canEdit ) ?> + Id(), 'zmStorage', 'storage', validHtmlStr($Storage->Type()), $canEdit ) ?> + Id(), 'zmStorage', 'storage', validHtmlStr($Storage->Scheme()), $canEdit ) ?> Name()), $canEdit ) ?> - disabled="disabled"/> + echo makePopupLink( '?view=storage&id='.$Storage->Id(), 'zmStorage', 'storage', validHtmlStr($Storage->Name()), $canEdit ) ?> + disk_used_space()) . ' of ' . human_filesize($Storage->disk_total_space()) ?> + disabled="disabled"/>