ui: add port support for remotes
by adding a field to RemoteEdit and showing it in the grid Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
ba20987ae7
commit
9c33683c25
@ -1,6 +1,15 @@
|
||||
Ext.define('pmx-remotes', {
|
||||
extend: 'Ext.data.Model',
|
||||
fields: ['name', 'host', 'userid', 'fingerprint', 'comment'],
|
||||
fields: ['name', 'host', 'port', 'userid', 'fingerprint', 'comment',
|
||||
{
|
||||
name: 'server',
|
||||
calculate: function(data) {
|
||||
let host = data.host || "localhost";
|
||||
let port = data.port || "8007";
|
||||
return `${host}:${port}`;
|
||||
}
|
||||
}
|
||||
],
|
||||
idProperty: 'name',
|
||||
proxy: {
|
||||
type: 'proxmox',
|
||||
@ -109,7 +118,7 @@ Ext.define('PBS.config.RemoteView', {
|
||||
header: gettext('Host'),
|
||||
width: 200,
|
||||
sortable: true,
|
||||
dataIndex: 'host',
|
||||
dataIndex: 'server',
|
||||
},
|
||||
{
|
||||
header: gettext('User name'),
|
||||
|
@ -48,6 +48,16 @@ Ext.define('PBS.window.RemoteEdit', {
|
||||
name: 'host',
|
||||
fieldLabel: gettext('Host'),
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxintegerfield',
|
||||
allowBlank: true,
|
||||
minValue: 1,
|
||||
maxValue: 2**16,
|
||||
name: 'port',
|
||||
emptyText: 8007,
|
||||
deleteEmpty: true,
|
||||
fieldLabel: gettext('Port'),
|
||||
},
|
||||
],
|
||||
|
||||
column2: [
|
||||
|
Loading…
Reference in New Issue
Block a user