mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Use the new functionality to add 'Drop' node in server node, and set
minimum, maximum value for the port.
This commit is contained in:
committed by
Ashesh Vashi
parent
6062343bf5
commit
30a316ad09
@@ -7,6 +7,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
parent_type: 'server-group',
|
parent_type: 'server-group',
|
||||||
type: 'server',
|
type: 'server',
|
||||||
label: '{{ _('Server') }}',
|
label: '{{ _('Server') }}',
|
||||||
|
canDrop: true,
|
||||||
Init: function() {
|
Init: function() {
|
||||||
|
|
||||||
/* Avoid multiple registration of same menus */
|
/* Avoid multiple registration of same menus */
|
||||||
@@ -25,11 +26,6 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
applies: ['object', 'context'], callback: 'show_obj_properties',
|
applies: ['object', 'context'], callback: 'show_obj_properties',
|
||||||
category: 'create', priority: 3, label: '{{ _('Server...') }}',
|
category: 'create', priority: 3, label: '{{ _('Server...') }}',
|
||||||
data: {action: 'create'}, icon: 'wcTabIcon icon-server'
|
data: {action: 'create'}, icon: 'wcTabIcon icon-server'
|
||||||
},{
|
|
||||||
name: 'drop_server', node: 'server', module: this,
|
|
||||||
applies: ['object', 'context'], callback: 'delete_obj',
|
|
||||||
category: 'drop', priority: 3, label: '{{ _('Drop Server...') }}',
|
|
||||||
icon: 'fa fa-trash', enable: 'is_not_connected'
|
|
||||||
},{
|
},{
|
||||||
name: 'connect_server', node: 'server', module: this,
|
name: 'connect_server', node: 'server', module: this,
|
||||||
applies: ['object', 'context'], callback: 'connect_server',
|
applies: ['object', 'context'], callback: 'connect_server',
|
||||||
@@ -166,7 +162,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
mode: ['properties', 'edit', 'create'], disabled: 'isConnected'
|
mode: ['properties', 'edit', 'create'], disabled: 'isConnected'
|
||||||
},{
|
},{
|
||||||
id: 'port', label:'{{ _('Port') }}', type: 'int', group: "Connection",
|
id: 'port', label:'{{ _('Port') }}', type: 'int', group: "Connection",
|
||||||
mode: ['properties', 'edit', 'create'], disabled: 'isConnected'
|
mode: ['properties', 'edit', 'create'], disabled: 'isConnected', min: 1024, max: 65534
|
||||||
},{
|
},{
|
||||||
id: 'db', label:'{{ _('Maintenance Database') }}', type: 'text', group: "Connection",
|
id: 'db', label:'{{ _('Maintenance Database') }}', type: 'text', group: "Connection",
|
||||||
mode: ['properties', 'edit', 'create'], disabled: 'isConnected'
|
mode: ['properties', 'edit', 'create'], disabled: 'isConnected'
|
||||||
|
|||||||
Reference in New Issue
Block a user