From d4644428e6adcf643c48e8108abc4ab2e203409d Mon Sep 17 00:00:00 2001 From: Surinder Kumar Date: Wed, 25 May 2016 00:02:32 +0530 Subject: [PATCH] Fixes #1217 - Added support for the context menu - 'View Data' for the Materialized View. --- .../tools/datagrid/templates/datagrid/js/datagrid.js | 2 +- web/pgadmin/tools/sqleditor/command.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/web/pgadmin/tools/datagrid/templates/datagrid/js/datagrid.js b/web/pgadmin/tools/datagrid/templates/datagrid/js/datagrid.js index c7d464236..8c161327e 100644 --- a/web/pgadmin/tools/datagrid/templates/datagrid/js/datagrid.js +++ b/web/pgadmin/tools/datagrid/templates/datagrid/js/datagrid.js @@ -20,7 +20,7 @@ define( // Define list of nodes on which view data option appears var supported_nodes = [ - 'table', 'view', + 'table', 'view', 'mview', 'foreign-table', 'catalog_object' ], diff --git a/web/pgadmin/tools/sqleditor/command.py b/web/pgadmin/tools/sqleditor/command.py index 6cfd078e1..68e0f43c0 100644 --- a/web/pgadmin/tools/sqleditor/command.py +++ b/web/pgadmin/tools/sqleditor/command.py @@ -512,6 +512,16 @@ class ViewCommand(GridCommand): return True +class MViewCommand(ViewCommand): + """ + class MViewCommand(ViewCommand) + + It is a derived class for View type has + same functionality of View + """ + object_type = 'mview' + + class ForeignTableCommand(GridCommand): """ class ForeignTableCommand(GridCommand)