mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-05-29 18:43:34 +00:00
41 lines
719 B
JavaScript
41 lines
719 B
JavaScript
Ext.define('PMG.MailStatGrid', {
|
|
extend: 'Ext.grid.GridPanel',
|
|
xtype: 'pmgMailStatGrid',
|
|
|
|
disableSelection: true,
|
|
hideHeaders: true,
|
|
|
|
store: {
|
|
fields: ['name', 'value', 'percentage'],
|
|
},
|
|
|
|
columns: [
|
|
{
|
|
flex: 1,
|
|
dataIndex: 'name',
|
|
},
|
|
{
|
|
width: 150,
|
|
dataIndex: 'value',
|
|
},
|
|
{
|
|
width: 300,
|
|
|
|
xtype: 'widgetcolumn',
|
|
dataIndex: 'percentage',
|
|
widget: {
|
|
xtype: 'progressbarwidget',
|
|
textTpl: ['{percent:number("0")}%'],
|
|
},
|
|
|
|
onWidgetAttach: function(column, widget, rec) {
|
|
if (rec.data.percentage === undefined) {
|
|
widget.setStyle("visibility: hidden");
|
|
} else {
|
|
widget.setStyle("visibility: visible");
|
|
}
|
|
},
|
|
},
|
|
],
|
|
});
|