mirror of https://github.com/lidarr/Lidarr
parent
c58f66a0ec
commit
c690f1ad39
|
@ -8,6 +8,7 @@ import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellCo
|
||||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||||
import TableRow from 'Components/Table/TableRow';
|
import TableRow from 'Components/Table/TableRow';
|
||||||
import { icons, kinds } from 'Helpers/Props';
|
import { icons, kinds } from 'Helpers/Props';
|
||||||
|
import formatBytes from 'Utilities/Number/formatBytes';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import RestoreBackupModalConnector from './RestoreBackupModalConnector';
|
import RestoreBackupModalConnector from './RestoreBackupModalConnector';
|
||||||
import styles from './BackupRow.css';
|
import styles from './BackupRow.css';
|
||||||
|
@ -65,6 +66,7 @@ class BackupRow extends Component {
|
||||||
type,
|
type,
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
|
size,
|
||||||
time
|
time
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
@ -104,6 +106,10 @@ class BackupRow extends Component {
|
||||||
</Link>
|
</Link>
|
||||||
</TableRowCell>
|
</TableRowCell>
|
||||||
|
|
||||||
|
<TableRowCell>
|
||||||
|
{formatBytes(size)}
|
||||||
|
</TableRowCell>
|
||||||
|
|
||||||
<RelativeDateCellConnector
|
<RelativeDateCellConnector
|
||||||
date={time}
|
date={time}
|
||||||
/>
|
/>
|
||||||
|
@ -147,6 +153,7 @@ BackupRow.propTypes = {
|
||||||
type: PropTypes.string.isRequired,
|
type: PropTypes.string.isRequired,
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
path: PropTypes.string.isRequired,
|
path: PropTypes.string.isRequired,
|
||||||
|
size: PropTypes.number.isRequired,
|
||||||
time: PropTypes.string.isRequired,
|
time: PropTypes.string.isRequired,
|
||||||
onDeleteBackupPress: PropTypes.func.isRequired
|
onDeleteBackupPress: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,6 +23,11 @@ const columns = [
|
||||||
label: 'Name',
|
label: 'Name',
|
||||||
isVisible: true
|
isVisible: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'size',
|
||||||
|
label: 'Size',
|
||||||
|
isVisible: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'time',
|
name: 'time',
|
||||||
label: 'Time',
|
label: 'Time',
|
||||||
|
@ -127,6 +132,7 @@ class Backups extends Component {
|
||||||
type,
|
type,
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
|
size,
|
||||||
time
|
time
|
||||||
} = item;
|
} = item;
|
||||||
|
|
||||||
|
@ -137,6 +143,7 @@ class Backups extends Component {
|
||||||
type={type}
|
type={type}
|
||||||
name={name}
|
name={name}
|
||||||
path={path}
|
path={path}
|
||||||
|
size={size}
|
||||||
time={time}
|
time={time}
|
||||||
onDeleteBackupPress={onDeleteBackupPress}
|
onDeleteBackupPress={onDeleteBackupPress}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -42,6 +42,7 @@ namespace Lidarr.Api.V1.System.Backup
|
||||||
Name = b.Name,
|
Name = b.Name,
|
||||||
Path = $"/backup/{b.Type.ToString().ToLower()}/{b.Name}",
|
Path = $"/backup/{b.Type.ToString().ToLower()}/{b.Name}",
|
||||||
Type = b.Type,
|
Type = b.Type,
|
||||||
|
Size = b.Size,
|
||||||
Time = b.Time
|
Time = b.Time
|
||||||
})
|
})
|
||||||
.OrderByDescending(b => b.Time)
|
.OrderByDescending(b => b.Time)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using Lidarr.Http.REST;
|
using Lidarr.Http.REST;
|
||||||
using NzbDrone.Core.Backup;
|
using NzbDrone.Core.Backup;
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ namespace Lidarr.Api.V1.System.Backup
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
public BackupType Type { get; set; }
|
public BackupType Type { get; set; }
|
||||||
|
public long Size { get; set; }
|
||||||
public DateTime Time { get; set; }
|
public DateTime Time { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ namespace NzbDrone.Core.Backup
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public BackupType Type { get; set; }
|
public BackupType Type { get; set; }
|
||||||
|
public long Size { get; set; }
|
||||||
public DateTime Time { get; set; }
|
public DateTime Time { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,7 @@ namespace NzbDrone.Core.Backup
|
||||||
{
|
{
|
||||||
Name = Path.GetFileName(b),
|
Name = Path.GetFileName(b),
|
||||||
Type = backupType,
|
Type = backupType,
|
||||||
|
Size = _diskProvider.GetFileSize(b),
|
||||||
Time = _diskProvider.FileGetLastWrite(b)
|
Time = _diskProvider.FileGetLastWrite(b)
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue