e7ddae292a
else it's a lot of wasted space for the ordinary case, that hasn't permanent maintenance modes activated, and even if, their admins should be used to it, so not the best space/usability ROI there either. Just use the icon as visual clue and add a tooltip for the maintenance mode info. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
42 lines
887 B
JavaScript
42 lines
887 B
JavaScript
Ext.define('PBS.form.DataStoreSelector', {
|
|
extend: 'Proxmox.form.ComboGrid',
|
|
alias: 'widget.pbsDataStoreSelector',
|
|
|
|
allowBlank: false,
|
|
autoSelect: false,
|
|
valueField: 'store',
|
|
displayField: 'store',
|
|
|
|
store: {
|
|
model: 'pbs-datastore-list',
|
|
autoLoad: true,
|
|
sorters: 'store',
|
|
},
|
|
|
|
listConfig: {
|
|
columns: [
|
|
{
|
|
header: gettext('Datastore'),
|
|
sortable: true,
|
|
dataIndex: 'store',
|
|
renderer: (v, metaData, rec) => {
|
|
let icon = '';
|
|
if (rec.data?.maintenance) {
|
|
let tip = Ext.String.htmlEncode(PBS.Utils.renderMaintenance(rec.data?.maintenance));
|
|
icon = ` <i data-qtip="${tip}" class="fa fa-wrench"></i>`;
|
|
}
|
|
return Ext.String.htmlEncode(v) + icon;
|
|
},
|
|
flex: 1,
|
|
},
|
|
{
|
|
header: gettext('Comment'),
|
|
sortable: true,
|
|
dataIndex: 'comment',
|
|
renderer: Ext.String.htmlEncode,
|
|
flex: 1,
|
|
},
|
|
],
|
|
},
|
|
});
|