mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-08 00:04:14 +00:00
add type column to storage content view
and move the grouping feature in the class definition while changing the text to a generic one this allows us to group by all columns and still have meaningful grouping headers Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
7c3a011345
commit
93cdb62689
@ -331,6 +331,12 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
trackOver: false,
|
trackOver: false,
|
||||||
loadMask: false
|
loadMask: false
|
||||||
},
|
},
|
||||||
|
features: [
|
||||||
|
{
|
||||||
|
ftype: 'grouping',
|
||||||
|
groupHeaderTpl: '{name} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})'
|
||||||
|
}
|
||||||
|
],
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
@ -360,10 +366,6 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
|
|
||||||
var sm = Ext.create('Ext.selection.RowModel', {});
|
var sm = Ext.create('Ext.selection.RowModel', {});
|
||||||
|
|
||||||
var groupingFeature = Ext.create('Ext.grid.feature.Grouping',{
|
|
||||||
groupHeaderTpl: '{[ PVE.Utils.format_content_types(values.name) ]} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})'
|
|
||||||
});
|
|
||||||
|
|
||||||
var reload = function() {
|
var reload = function() {
|
||||||
store.load();
|
store.load();
|
||||||
me.statusStore.load();
|
me.statusStore.load();
|
||||||
@ -406,7 +408,6 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
selModel: sm,
|
selModel: sm,
|
||||||
features: [ groupingFeature ],
|
|
||||||
tbar: [
|
tbar: [
|
||||||
{
|
{
|
||||||
xtype: 'pveButton',
|
xtype: 'pveButton',
|
||||||
@ -516,6 +517,12 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'format'
|
dataIndex: 'format'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
header: gettext('Type'),
|
||||||
|
width: 100,
|
||||||
|
dataIndex: 'content',
|
||||||
|
renderer: PVE.Utils.format_content_types
|
||||||
|
},
|
||||||
{
|
{
|
||||||
header: gettext('Size'),
|
header: gettext('Size'),
|
||||||
width: 100,
|
width: 100,
|
||||||
|
Loading…
Reference in New Issue
Block a user