Fix View Data option and column config for Foreign Tables. Fixes #2691
parent
8bededa859
commit
bdc08d94c4
|
@ -334,7 +334,7 @@ define('pgadmin.node.foreign_table', [
|
||||||
// Fetch Columns from server
|
// Fetch Columns from server
|
||||||
var fnd_columns = columns.where({inheritedid: parseInt(i)});
|
var fnd_columns = columns.where({inheritedid: parseInt(i)});
|
||||||
if (fnd_columns && fnd_columns.length <= 0) {
|
if (fnd_columns && fnd_columns.length <= 0) {
|
||||||
inhted_columns = self.fetchColumns(i);
|
var inhted_columns = self.fetchColumns(i);
|
||||||
columns.add(inhted_columns);
|
columns.add(inhted_columns);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -601,7 +601,7 @@ define('pgadmin.node.foreign_table', [
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
id: 'columns', label: gettext('Columns'), cell: 'string',
|
id: 'columns', label: gettext('Columns'), cell: 'string',
|
||||||
type: 'collection', group: gettext('Columns'), visible: false, mode: ['edit', 'create'],
|
type: 'collection', group: gettext('Columns'), mode: ['edit', 'create'],
|
||||||
model: ColumnsModel, canAdd: true, canDelete: true, canEdit: true,
|
model: ColumnsModel, canAdd: true, canDelete: true, canEdit: true,
|
||||||
columns: ['attname', 'datatype', 'inheritedfrom'],
|
columns: ['attname', 'datatype', 'inheritedfrom'],
|
||||||
canDeleteRow: function(m) {
|
canDeleteRow: function(m) {
|
||||||
|
@ -615,7 +615,7 @@ define('pgadmin.node.foreign_table', [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'constraints', label: gettext('Constraints'), cell: 'string',
|
id: 'constraints', label: gettext('Constraints'), cell: 'string',
|
||||||
type: 'collection', group: gettext('Constraints'), visible: false, mode: ['edit', 'create'],
|
type: 'collection', group: gettext('Constraints'), mode: ['edit', 'create'],
|
||||||
model: ConstraintModel, canAdd: true, canDelete: true, columns: ['conname','consrc', 'connoinherit', 'convalidated'],
|
model: ConstraintModel, canAdd: true, canDelete: true, columns: ['conname','consrc', 'connoinherit', 'convalidated'],
|
||||||
canEdit: function(o) {
|
canEdit: function(o) {
|
||||||
if (o instanceof Backbone.Model) {
|
if (o instanceof Backbone.Model) {
|
||||||
|
@ -695,7 +695,7 @@ define('pgadmin.node.foreign_table', [
|
||||||
if (_.indexOf(['schema'], d._type) > -1)
|
if (_.indexOf(['schema'], d._type) > -1)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ('coll-foreign-table' == d._type) {
|
if ('coll-foreign_table' == d._type) {
|
||||||
//Check if we are not child of catalog
|
//Check if we are not child of catalog
|
||||||
var prev_i = t.hasParent(i) ? t.parent(i) : null,
|
var prev_i = t.hasParent(i) ? t.parent(i) : null,
|
||||||
prev_d = prev_i ? t.itemData(prev_i) : null;
|
prev_d = prev_i ? t.itemData(prev_i) : null;
|
||||||
|
|
|
@ -28,7 +28,7 @@ define('pgadmin.datagrid', [
|
||||||
// Define list of nodes on which view data option appears
|
// Define list of nodes on which view data option appears
|
||||||
var supported_nodes = [
|
var supported_nodes = [
|
||||||
'table', 'view', 'mview',
|
'table', 'view', 'mview',
|
||||||
'foreign-table', 'catalog_object', 'partition'
|
'foreign_table', 'catalog_object', 'partition'
|
||||||
],
|
],
|
||||||
|
|
||||||
/* Enable/disable View data menu in tools based
|
/* Enable/disable View data menu in tools based
|
||||||
|
|
|
@ -660,7 +660,7 @@ class ForeignTableCommand(GridCommand):
|
||||||
|
|
||||||
It is a derived class for ForeignTable type.
|
It is a derived class for ForeignTable type.
|
||||||
"""
|
"""
|
||||||
object_type = 'foreign-table'
|
object_type = 'foreign_table'
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue