mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-08 01:28:20 +00:00
GUI: add quick search fields to storage content and backup views
Signed-off-by: Stanislav German-Evtushenko <ginermail@gmail.com>
This commit is contained in:
parent
8323abe54a
commit
a0654dd8ca
@ -75,6 +75,27 @@ Ext.define('PVE.grid.BackupView', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var storagefilter = Ext.create('Ext.form.field.Text', {
|
||||||
|
fieldLabel: gettext('Search'),
|
||||||
|
labelWidth: 50,
|
||||||
|
labelAlign: 'right',
|
||||||
|
enableKeyEvents: true,
|
||||||
|
listeners: {
|
||||||
|
buffer: 500,
|
||||||
|
keyup: function(field) {
|
||||||
|
me.store.clearFilter(true);
|
||||||
|
me.store.filter([
|
||||||
|
{
|
||||||
|
property: 'volid',
|
||||||
|
value: field.getValue(),
|
||||||
|
anyMatch: true,
|
||||||
|
caseSensitive: false
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var sm = Ext.create('Ext.selection.RowModel', {});
|
var sm = Ext.create('Ext.selection.RowModel', {});
|
||||||
|
|
||||||
var backup_btn = Ext.create('Ext.button.Button', {
|
var backup_btn = Ext.create('Ext.button.Button', {
|
||||||
@ -151,7 +172,7 @@ Ext.define('PVE.grid.BackupView', {
|
|||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
stateful: false,
|
stateful: false,
|
||||||
selModel: sm,
|
selModel: sm,
|
||||||
tbar: [ backup_btn, restore_btn, delete_btn, '->', storagesel ],
|
tbar: [ backup_btn, restore_btn, delete_btn, '->', storagesel, storagefilter ],
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
header: gettext('Name'),
|
header: gettext('Name'),
|
||||||
|
@ -443,6 +443,27 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
win.show();
|
win.show();
|
||||||
win.on('destroy', reload);
|
win.on('destroy', reload);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'->',
|
||||||
|
gettext('Search') + ':', ' ',
|
||||||
|
{
|
||||||
|
xtype: 'textfield',
|
||||||
|
width: 200,
|
||||||
|
enableKeyEvents: true,
|
||||||
|
listeners: {
|
||||||
|
buffer: 500,
|
||||||
|
keyup: function(field) {
|
||||||
|
store.clearFilter(true);
|
||||||
|
store.filter([
|
||||||
|
{
|
||||||
|
property: 'text',
|
||||||
|
value: field.getValue(),
|
||||||
|
anyMatch: true,
|
||||||
|
caseSensitive: false
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
columns: [
|
columns: [
|
||||||
|
Loading…
Reference in New Issue
Block a user