mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Free space will show shared drives and show drive label
This commit is contained in:
@@ -5,8 +5,9 @@ define([
|
||||
'backgrid',
|
||||
'System/Info/DiskSpace/DiskSpaceCollection',
|
||||
'Shared/LoadingView',
|
||||
'System/Info/DiskSpace/DiskSpacePathCell',
|
||||
'Cells/FileSizeCell'
|
||||
], function (vent,Marionette,Backgrid,DiskSpaceCollection,LoadingView,FileSizeCell) {
|
||||
], function (vent,Marionette,Backgrid,DiskSpaceCollection,LoadingView, DiskSpacePathCell, FileSizeCell) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'System/Info/DiskSpace/DiskSpaceLayoutTemplate',
|
||||
|
||||
@@ -16,21 +17,19 @@ define([
|
||||
columns:
|
||||
[
|
||||
{
|
||||
name: 'driveLetter',
|
||||
label: 'Drive',
|
||||
cell: 'string'
|
||||
name: 'path',
|
||||
label: 'Location',
|
||||
cell: DiskSpacePathCell
|
||||
},
|
||||
{
|
||||
name: 'freeSpace',
|
||||
label: 'Free Space',
|
||||
cell: FileSizeCell,
|
||||
sortable:true
|
||||
cell: FileSizeCell
|
||||
},
|
||||
{
|
||||
name: 'totalSpace',
|
||||
label: 'Total Space',
|
||||
cell: FileSizeCell,
|
||||
sortable:true
|
||||
cell: FileSizeCell
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
define(
|
||||
[
|
||||
'backgrid'
|
||||
], function (Backgrid) {
|
||||
return Backgrid.Cell.extend({
|
||||
|
||||
className: 'disk-space-path-cell',
|
||||
|
||||
render: function () {
|
||||
this.$el.empty();
|
||||
|
||||
var path = this.model.get('path');
|
||||
var label = this.model.get('label');
|
||||
|
||||
var contents = path;
|
||||
|
||||
if (label) {
|
||||
contents += ' ({0})'.format(label);
|
||||
}
|
||||
|
||||
this.$el.html(contents);
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user