Moved disk space and about to new info tab

New: Disk space visible in the UI under System Info
This commit is contained in:
Mark McDowall
2013-10-11 16:18:04 -07:00
parent 6c414929c3
commit 43a70f4479
13 changed files with 73 additions and 52 deletions

View File

@@ -0,0 +1,57 @@
'use strict';
define([
'vent',
'marionette',
'backgrid',
'System/Info/DiskSpace/DiskSpaceCollection',
'Shared/LoadingView',
'Cells/FileSizeCell'
], function (vent,Marionette,Backgrid,DiskSpaceCollection,LoadingView,FileSizeCell) {
return Marionette.Layout.extend({
template: 'System/Info/DiskSpace/DiskSpaceLayoutTemplate',
regions: {
grid: '#x-grid'
},
columns:
[
{
name: 'driveLetter',
label: 'Drive',
cell: 'string'
},
{
name: 'freeSpace',
label: 'Free Space',
cell: FileSizeCell,
sortable:true
},
{
name: 'totalSpace',
label: 'Total Space',
cell: FileSizeCell,
sortable:true
}
],
initialize: function () {
this.collection = new DiskSpaceCollection();
this.listenTo(this.collection, 'sync', this._showTable);
},
onRender : function() {
this.grid.show(new LoadingView());
},
onShow: function() {
this.collection.fetch();
},
_showTable: function() {
this.grid.show(new Backgrid.Grid({
row: Backgrid.Row,
columns: this.columns,
collection: this.collection,
className:'table table-hover'
}));
}
});
});