Ensure that the view/edit data panel should not be opened for unsupported nodes using the keyboard shortcut. Fixes #6206

This commit is contained in:
Akshay Joshi
2021-03-19 15:38:40 +05:30
parent 24dc7f4a91
commit 3f63f65674
3 changed files with 10 additions and 14 deletions

View File

@@ -43,6 +43,12 @@ export function showDataGrid(
return;
}
let applicable_nodes = ['table', 'view', 'mview', 'foreign_table'];
if (applicable_nodes.indexOf(node.getData()._type) === -1) {
alertify.error(gettext('This feature is not applicable to the selected object.'));
return;
}
const gridUrl = generateUrl(transId, connectionData, node.getData(), parentData);
const queryToolTitle = generateDatagridTitle(pgBrowser, aciTreeIdentifier);
if(filter) {