[pve-devel] [PATCH manager] Fix #1831: Add search bar to CT template/appliances download window

Christian Ebner c.ebner at proxmox.com
Mon Jan 28 13:02:53 CET 2019


This add a search bar to filter by package name to the CT template/appliances
download window.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 www/manager6/storage/ContentView.js | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/www/manager6/storage/ContentView.js b/www/manager6/storage/ContentView.js
index 6b73f437..c6f49bae 100644
--- a/www/manager6/storage/ContentView.js
+++ b/www/manager6/storage/ContentView.js
@@ -40,6 +40,29 @@ Ext.define('PVE.grid.TemplateSelector', {
 	Ext.apply(me, {
 	    store: store,
 	    selModel: sm,
+	    tbar: [
+		'->',
+		gettext('Search: '),
+		{
+		    xtype: 'textfield',
+		    width: 200,
+		    enableKeyEvents: true,
+		    listeners: {
+			buffer: 500,
+			keyup: function(field) {
+			    store.clearFilter(true);
+			    store.filter([
+				{
+				    property: 'package',
+				    value: field.getValue(),
+				    anyMatch: true,
+				    caseSensitive: false
+				}
+			    ]);
+			}
+		    }
+		}
+	    ],
 	    features: [ groupingFeature ],
 	    columns: [
 		{
-- 
2.11.0




More information about the pve-devel mailing list