Fix all manner of inconsistencies in object properties display:

- Don't display the OID on Edit dialogues
- Use the ACL summary display in the properties panel, not the subnode editor.
- s/Oid/OID/g
- Ensure all security properties are displayed in the Security group
- Ensure all object definition values are stored in the Definition (or a more precise) group, not General.
- Fix the ordering of General properties so the comment is always show last.
pull/3/head
Dave Page 2016-03-10 17:08:27 +00:00
parent 62537429d1
commit 83a662f798
10 changed files with 76 additions and 47 deletions

View File

@ -66,11 +66,11 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
// Define the schema for cast
schema: [{
id: 'name', label: '{{ _('Name') }}', cell: 'string', group: '{{ _('Definition') }}',
id: 'name', label: '{{ _('Name') }}', cell: 'string',
editable: false, type: 'text', disabled: true, cellHeaderClasses: 'width_percent_50'
},{
id: 'oid', label:'{{ _('Oid') }}', cell: 'string', group: '{{ _('Definition') }}',
editable: false, type: 'text', disabled: true
id: 'oid', label:'{{ _('OID') }}', cell: 'string',
editable: false, type: 'text', disabled: true, mode: ['properties'],
},{
id: 'srctyp', label:'{{ _('Source type') }}', url: 'get_type',
type: 'text', group: 'Definition', disabled: function(m) {
@ -252,10 +252,15 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
}], editable: false, type: 'select2', group: 'Definition',
mode:['properties', 'edit']
},{
id: 'syscast', label:'{{ _('System Cast?') }}', mode: ['properties'],
editable: false, type: 'text'
id: 'syscast', label:'{{ _('System cast?') }}',
cell: 'switch', type: 'switch', mode: ['properties'], disabled: true,
options: {
'onText': 'Yes', 'offText': 'No',
'onColor': 'success', 'offColor': 'primary',
'size': 'small'
}
},{
id: 'description', label:'{{ _('Comment') }}',type: 'text', group: 'Definition',
id: 'description', label:'{{ _('Comment') }}',type: 'text',
type: 'multiline', cellHeaderClasses: 'width_percent_50'
}
],

View File

@ -62,12 +62,17 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
name: 'create_event_trigger_on_coll', node: 'coll-event_trigger', module: this,
applies: ['object', 'context'], callback: 'show_obj_properties',
category: 'create', priority: 4, label: '{{ _('Event Trigger...') }}',
icon: 'wcTabIcon pg-icon-event_trigger', data: {action: 'create'}
icon: 'wcTabIcon icon-event_trigger', data: {action: 'create'}
},{
name: 'create_event_trigger', node: 'event_trigger', module: this,
applies: ['object', 'context'], callback: 'show_obj_properties',
category: 'create', priority: 4, label: '{{ _('Event Trigger...') }}',
icon: 'wcTabIcon pg-icon-event_trigger', data: {action: 'create'}
icon: 'wcTabIcon icon-event_trigger', data: {action: 'create'}
},{
name: 'create_event_trigger', node: 'database', module: this,
applies: ['object', 'context'], callback: 'show_obj_properties',
category: 'create', priority: 4, label: '{{ _('Event Trigger...') }}',
icon: 'wcTabIcon icon-event_trigger', data: {action: 'create'}
}
]);
},

View File

@ -164,8 +164,8 @@ function($, _, S, pgAdmin, pgBrowser) {
})
},
{
id: 'eid', label: '{{ _('Oid')}}', cell: 'string',
type: 'text', disabled: true, mode: ['properties', 'edit', 'create']
id: 'eid', label: '{{ _('OID')}}', cell: 'string',
type: 'text', disabled: true, mode: ['properties']
},
{
id: 'owner', label:'{{ _('Owner') }}', control: 'node-list-by-name',
@ -194,9 +194,11 @@ function($, _, S, pgAdmin, pgBrowser) {
},
{
id: 'relocatable', label: '{{ _('Relocatable?')}}', cell: 'switch',
type: 'switch', mode: ['properties'], 'options': {
'onText': 'Yes', 'offText': 'No', 'onColor': 'success',
'offColor': 'default', 'size': 'small'
group: 'Definition', type: 'switch', mode: ['properties'],
options: {
'onText': 'Yes', 'offText': 'No',
'onColor': 'success', 'offColor': 'primary',
'size': 'small'
}
},
{

View File

@ -80,18 +80,25 @@ define(
id: 'name', label: '{{ _('Name') }}', cell: 'string',
type: 'text',
},{
id: 'oid', label:'{{ _('Oid') }}', cell: 'string',
id: 'oid', label:'{{ _('OID') }}', cell: 'string', mode: ['properties'],
type: 'text', disabled: true
},{
id: 'lanowner', label:'{{ _('Owner') }}', type: 'text',
control: Backform.NodeListByNameControl, node: 'role',
mode: ['edit', 'properties'], select2: { allowClear: false }
},{
id: 'acl', label: '{{ _('Privileges') }}', type: 'text',
group: '{{ _('Security') }}', mode: ['properties'], disabled: true
},{
id: 'description', label:'{{ _('Comment') }}', cell: 'string',
type: 'multiline'
},{
id: 'trusted', label:'{{ _('Trusted?') }}', type: 'switch', options: { onText: 'Yes', offText: 'No',
onColor: 'success', offColor: 'default', size: 'small'},
id: 'trusted', label:'{{ _('Trusted?') }}', type: 'switch',
options: {
'onText': 'Yes', 'offText': 'No',
'onColor': 'success', 'offColor': 'primary',
'size': 'small'
},
group: 'Definition', mode: ['edit', 'properties'],
disabled: function(m) {
return !(m.isNew());
@ -159,7 +166,7 @@ define(
},{
id: 'lanacl', label: '{{ _('Privileges') }}', type: 'collection', group: '{{ _('Security') }}',
model: pgAdmin.Browser.Node.PrivilegeRoleModel.extend({privileges: ['U']}), control: 'unique-col-collection',
mode: ['properties', 'edit'], canAdd: true, canDelete: true, uniqueCol : ['grantee']
mode: ['edit'], canAdd: true, canDelete: true, uniqueCol : ['grantee']
},{
id: 'seclabels', label: '{{ _('Security Labels') }}',
model: SecurityModel, editable: false, type: 'collection',

View File

@ -41,7 +41,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
node: 'sequence',
label: '{{ _('Sequences') }}',
type: 'coll-sequence',
columns: ['oid', 'name', 'seqowner', 'comment']
columns: ['name', 'seqowner', 'comment']
});
};
@ -151,8 +151,8 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
id: 'name', label: '{{ _('Name') }}', cell: 'string',
type: 'text', mode: ['properties', 'create', 'edit']
},{
id: 'oid', label:'{{ _('Oid') }}', cell: 'string',
type: 'text' , mode: ['properties']
id: 'oid', label:'{{ _('OID') }}', cell: 'string',
type: 'text', mode: ['properties']
},{
id: 'seqowner', label:'{{ _('Owner') }}', cell: 'string',
type: 'text', mode: ['properties', 'create', 'edit'], node: 'role',
@ -191,10 +191,15 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
mode: ['properties', 'create', 'edit'], group: '{{ _('Definition') }}'
},{
id: 'cycled', label: '{{ _('Cycled') }}', type: 'switch',
mode: ['properties', 'create', 'edit'], group: '{{ _('Definition') }}'
mode: ['properties', 'create', 'edit'], group: '{{ _('Definition') }}',
options: {
'onText': 'Yes', 'offText': 'No',
'onColor': 'success', 'offColor': 'primary',
'size': 'small'
}
},{
id: 'acl', label: '{{ _('Privileges') }}', type: 'text',
mode: ['properties'], disabled: true
group: '{{ _('Security') }}', mode: ['properties'], disabled: true
},{
id: 'relacl', label: '{{ _('Privileges') }}', model: pgAdmin.Browser.Node.PrivilegeRoleModel.extend(
{privileges: ['r', 'w', 'U']}), uniqueCol : ['grantee', 'grantor'],

View File

@ -39,7 +39,7 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) {
node: 'catalog',
label: '{{ _('Catalogs') }}',
type: 'coll-catalog',
columns: ['name', 'oid', 'description']
columns: ['name', 'namespaceowner', 'description']
});
};
// Extend the browser's node class for catalog node
@ -80,14 +80,14 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) {
id: 'name', label: '{{ _('Name') }}', cell: 'string',
type: 'text', disabled: true
},{
id: 'oid', label:'{{ _('Oid') }}', cell: 'string',
id: 'oid', label:'{{ _('OID') }}', cell: 'string', mode: ['properties'],
type: 'text', disabled: true
},{
id: 'namespaceowner', label:'{{ _('Owner') }}', cell: 'string',
type: 'text', disabled: true
},{
id: 'acl', label: '{{ _('Privileges') }}', type: 'text',
mode: ['properties'], disabled: true
group: '{{ _('Security') }}', mode: ['properties'], disabled: true
},{
id: 'description', label:'{{ _('Comment') }}', cell: 'string',
type: 'multiline'

View File

@ -41,7 +41,7 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) {
node: 'schema',
label: '{{ _('Schemas') }}',
type: 'coll-schema',
columns: ['name', 'oid', 'description']
columns: ['name', 'namespaceowner', 'description']
});
};
// Extend the browser's node class for schema node
@ -100,15 +100,12 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) {
id: 'name', label: '{{ _('Name') }}', cell: 'string',
type: 'text'
},{
id: 'oid', label:'{{ _('Oid') }}', cell: 'string',
type: 'text', disabled: true, mode: ['edit', 'properties']
id: 'oid', label:'{{ _('OID') }}', cell: 'string',
type: 'text', disabled: true, mode: ['properties']
},{
id: 'namespaceowner', label:'{{ _('Owner') }}', cell: 'string',
type: 'text', control: 'node-list-by-name', node: 'role',
select2: { allowClear: false }
},{
id: 'description', label:'{{ _('Comment') }}', cell: 'string',
type: 'multiline'
},{
id: 'is_sys_object', label:'{{ _('System schema?') }}',
cell: 'switch', type: 'switch', mode: ['properties'], disabled: true,
@ -117,21 +114,24 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) {
'onColor': 'success', 'offColor': 'primary',
'size': 'small'
}
},{
id: 'description', label:'{{ _('Comment') }}', cell: 'string',
type: 'multiline'
},{
id: 'acl', label: '{{ _('Privileges') }}', type: 'text',
mode: ['properties'], disabled: true
group: '{{ _('Security') }}', mode: ['properties'], disabled: true
},{
id: 'tblacl', label: '{{ _('Default TABLE Privileges') }}', type: 'text',
mode: ['properties'], disabled: true
group: '{{ _('Security') }}', mode: ['properties'], disabled: true
},{
id: 'seqacl', label: '{{ _('Default SEQUENCE Privileges') }}', type: 'text',
mode: ['properties'], disabled: true
group: '{{ _('Security') }}', mode: ['properties'], disabled: true
},{
id: 'funcacl', label: '{{ _('Default FUNCTION Privileges') }}',
type: 'text', mode: ['properties'], disabled: true
group: '{{ _('Security') }}', type: 'text', mode: ['properties'], disabled: true
},{
id: 'typeacl', label: '{{ _('Default TYPE Privileges') }}', type: 'text',
mode: ['properties'], disabled: true, min_version: 90200,
group: '{{ _('Security') }}', mode: ['properties'], disabled: true, min_version: 90200,
visible: function() {
return this.version_compatible;
}

View File

@ -11,7 +11,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
node: 'database',
label: '{{ _('Databases') }}',
type: 'coll-database',
columns: ['name', 'did', 'datowner', 'comments']
columns: ['name', 'datowner', 'comments']
});
};
@ -221,15 +221,15 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
id: 'name', label: '{{ _('Database') }}', cell: 'string',
editable: false, type: 'text'
},{
id: 'did', label:'{{ _('Oid') }}', cell: 'string', mode: ['properties'],
editable: false, type: 'text', visible: false
id: 'did', label:'{{ _('OID') }}', cell: 'string', mode: ['properties'],
editable: false, type: 'text'
},{
id: 'datowner', label:'{{ _('Owner') }}',
editable: false, type: 'text', node: 'role',
control: Backform.NodeListByNameControl
},{
id: 'acl', label: '{{ _('Privileges') }}', type: 'text',
mode: ['properties'], disabled: true
group: '{{ _('Security') }}', mode: ['properties'], disabled: true
},{
id: 'comments', label:'{{ _('Comment') }}',
editable: false, type: 'multiline'
@ -267,7 +267,12 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
},{
id: 'datallowconn', label: '{{ _('Allow Connections?') }}',
editable: false, type: 'switch', group: 'Definition',
mode: ['properties'], disabled: true
mode: ['properties'], disabled: true,
options: {
'onText': 'Yes', 'offText': 'No',
'onColor': 'success', 'offColor': 'primary',
'size': 'small'
}
},{
id: 'datacl', label: '{{ _('Privileges') }}', model: pgAdmin.Browser.Node.PrivilegeRoleModel.extend(
{privileges: ['C', 'T', 'c']}), uniqueCol : ['grantee', 'grantor'],

View File

@ -367,7 +367,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Backform) {
id: 'rolname', label: '{{ _('Name') }}', type: 'text',
disabled: 'readonly'
},{
id: 'oid', label:'{{ _('Role ID') }}', cell: 'string',
id: 'oid', label:'{{ _('OID') }}', cell: 'string', mode: ['properties'],
editable: false, type: 'text', visible: true, disabled: true
},{
id: 'rolpassword', label: '{{ _('Password') }}', type: 'password',

View File

@ -37,7 +37,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
node: 'tablespace',
label: '{{ _('Tablespaces') }}',
type: 'coll-tablespace',
columns: ['name', 'oid', 'description']
columns: ['name', 'spcuser', 'description']
});
};
@ -100,11 +100,11 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
id: 'name', label: '{{ _('Name') }}', cell: 'string',
type: 'text'
},{
id: 'oid', label:'{{ _('Oid') }}', cell: 'string',
type: 'text', disabled: true, mode: ['properties', 'edit']
id: 'oid', label:'{{ _('OID') }}', cell: 'string',
type: 'text', disabled: true, mode: ['properties']
},{
id: 'spclocation', label:'{{ _('Location') }}', cell: 'string',
type: 'text', mode: ['properties', 'edit','create'],
group: '{{ _('Definition') }}', type: 'text', mode: ['properties', 'edit','create'],
disabled: function(m) {
// To disabled it in edit mode,
// We'll check if model is new if yes then disabled it
@ -115,7 +115,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
type: 'text', control: 'node-list-by-name', node: 'role'
},{
id: 'acl', label: '{{ _('Privileges') }}', type: 'text',
mode: ['properties'], disabled: true
group: '{{ _('Security') }}', mode: ['properties'], disabled: true
},{
id: 'description', label:'{{ _('Comment') }}', cell: 'string',
type: 'multiline'