[pve-devel] [PATCH manager 3/3] add type column to storage content view
Dominik Csapak
d.csapak at proxmox.com
Tue Jan 10 15:17:04 CET 2017
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 at proxmox.com>
---
www/manager6/storage/ContentView.js | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/www/manager6/storage/ContentView.js b/www/manager6/storage/ContentView.js
index e4356e1..47bd199 100644
--- a/www/manager6/storage/ContentView.js
+++ b/www/manager6/storage/ContentView.js
@@ -331,6 +331,12 @@ Ext.define('PVE.storage.ContentView', {
trackOver: false,
loadMask: false
},
+ features: [
+ {
+ ftype: 'grouping',
+ groupHeaderTpl: '{name} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})'
+ }
+ ],
initComponent : function() {
var me = this;
@@ -360,10 +366,6 @@ Ext.define('PVE.storage.ContentView', {
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() {
store.load();
me.statusStore.load();
@@ -406,7 +408,6 @@ Ext.define('PVE.storage.ContentView', {
Ext.apply(me, {
store: store,
selModel: sm,
- features: [ groupingFeature ],
tbar: [
{
xtype: 'pveButton',
@@ -517,6 +518,12 @@ Ext.define('PVE.storage.ContentView', {
dataIndex: 'format'
},
{
+ header: gettext('Type'),
+ width: 100,
+ dataIndex: 'content',
+ renderer: PVE.Utils.format_content_types
+ },
+ {
header: gettext('Size'),
width: 100,
renderer: PVE.Utils.format_size,
--
2.1.4
More information about the pve-devel
mailing list