ui: add node options under 'Configuration -> Options'
for now only http-proxy lives there, but we will add more options later, such as * email from * default gui language Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
		
				
					committed by
					
						 Thomas Lamprecht
						Thomas Lamprecht
					
				
			
			
				
	
			
			
			
						parent
						
							5aaa81ab89
						
					
				
				
					commit
					82ed13c7d7
				
			| @ -54,6 +54,7 @@ JSSRC=							\ | ||||
| 	config/VerifyView.js				\ | ||||
| 	config/WebauthnView.js				\ | ||||
| 	config/CertificateView.js			\ | ||||
| 	config/NodeOptionView.js			\ | ||||
| 	window/ACLEdit.js				\ | ||||
| 	window/AddTfaRecovery.js			\ | ||||
| 	window/AddTotp.js				\ | ||||
|  | ||||
| @ -65,6 +65,11 @@ Ext.define('PBS.SystemConfiguration', { | ||||
| 		}, | ||||
| 	    ], | ||||
| 	}, | ||||
| 	{ | ||||
| 	    title: gettext('Options'), | ||||
| 	    itemId: 'options', | ||||
| 	    xtype: 'pbsNodeOptionView', | ||||
| 	}, | ||||
|     ], | ||||
|  | ||||
|     initComponent: function() { | ||||
|  | ||||
							
								
								
									
										42
									
								
								www/config/NodeOptionView.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								www/config/NodeOptionView.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,42 @@ | ||||
| Ext.define('PBS.NodeOptionView', { | ||||
|     extend: 'Proxmox.grid.ObjectGrid', | ||||
|     alias: 'widget.pbsNodeOptionView', | ||||
|  | ||||
|     monStoreErrors: true, | ||||
|  | ||||
|     url: `/api2/json/nodes/${Proxmox.NodeName}/config`, | ||||
|     editorConfig: { | ||||
| 	url: `/api2/extjs/nodes/${Proxmox.NodeName}/config`, | ||||
|     }, | ||||
|     interval: 5000, | ||||
|     cwidth1: 200, | ||||
|  | ||||
|     listeners: { | ||||
| 	itemdblclick: function() { this.run_editor() }, | ||||
|     }, | ||||
|  | ||||
|     tbar: [ | ||||
| 	{ | ||||
| 	    text: gettext('Edit'), | ||||
| 	    xtype: 'proxmoxButton', | ||||
| 	    disabled: true, | ||||
| 	    handler: function() { this.up('grid').run_editor(); }, | ||||
| 	} | ||||
|     ], | ||||
|  | ||||
|     initComponent: function() { | ||||
| 	let me = this; | ||||
|  | ||||
| 	me.add_text_row('http-proxy', gettext('HTTP proxy'), { | ||||
| 	    defaultValue: Proxmox.Utils.noneText, | ||||
| 	    vtype: 'HttpProxy', | ||||
| 	    deleteEmpty: true, | ||||
| 	}); | ||||
|  | ||||
| 	me.callParent(); | ||||
|  | ||||
| 	me.on('activate', me.rstore.startUpdate); | ||||
| 	me.on('destroy', me.rstore.stopUpdate); | ||||
| 	me.on('deactivate', me.rstore.stopUpdate); | ||||
|     }, | ||||
| }); | ||||
		Reference in New Issue
	
	Block a user