mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
update
This commit is contained in:
parent
ce8e44d396
commit
a2d9d8d149
2 changed files with 7 additions and 0 deletions
|
@ -12,6 +12,7 @@ use Filament\Forms\Get;
|
|||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Support\Number;
|
||||
use JaOcero\RadioDeck\Forms\Components\RadioDeck;
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
@ -79,6 +80,11 @@ class BackupResource extends Resource
|
|||
->state(function (Backup $backup) {
|
||||
return $backup->completed_at ? $backup->completed_at : 'N/A';
|
||||
}),
|
||||
|
||||
Tables\Columns\TextColumn::make('size')
|
||||
->state(function (Backup $backup) {
|
||||
return $backup->size ? Number::fileSize($backup->size) : 'N/A';
|
||||
}),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
|
|
|
@ -64,6 +64,7 @@ class Backup extends Model
|
|||
if ($this->status == 'running') {
|
||||
$backupDoneFile = $this->path.'/backup.done';
|
||||
if (file_exists($backupDoneFile)) {
|
||||
$this->size = filesize($this->filepath);
|
||||
$this->status = 'completed';
|
||||
$this->completed = true;
|
||||
$this->completed_at = now();
|
||||
|
|
Loading…
Reference in a new issue