IMPR: Show available space on server test

This commit is contained in:
Tony Air 2022-03-09 10:25:40 +02:00
parent 146231c127
commit e6f658f8d0
2 changed files with 9 additions and 3 deletions

View File

@ -140,7 +140,7 @@ class SaveAllButton implements GridField_HTMLProvider, GridField_ActionProvider
$list->each(function ($item) {
if ($item->hasExtension('Versioned')) {
$item->writeToStage('Stage');
$item->publish('Stage', 'Live');
$item->copyVersionToStage('Stage', 'Live');
}
});
}

View File

@ -42,7 +42,10 @@ class TestServer extends BuildTask
if (is_writable(TEMP_FOLDER)) {
echo self::success('TMP (cache) dir <b>'.TEMP_FOLDER.'</b> dir is writable.');
echo self::success(
'TMP (cache) dir <b>'.TEMP_FOLDER.'</b> dir is writable.'
.'Available space: '.self::formatBytes(disk_free_space(TEMP_FOLDER))
);
} else {
echo self::error('TMP (cache) dir <b>'.TEMP_FOLDER.'</b> dir is no writable!');
}
@ -75,7 +78,10 @@ class TestServer extends BuildTask
}
if (is_writable(ASSETS_DIR)) {
echo self::success('Assets dir <b>'.ASSETS_DIR.'</b> dir is writable.');
echo self::success(
'Assets dir <b>'.ASSETS_DIR.'</b> dir is writable.'
.'Available space: '.self::formatBytes(disk_free_space(ASSETS_DIR))
);
} else {
echo self::error('Assets dir <b>'.ASSETS_DIR.'</b> dir is no writable!');
}