diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/templates/exclusion_constraint/js/exclusion_constraint.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/templates/exclusion_constraint/js/exclusion_constraint.js index 065b6096..917c329c 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/templates/exclusion_constraint/js/exclusion_constraint.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/templates/exclusion_constraint/js/exclusion_constraint.js @@ -560,8 +560,6 @@ define('pgadmin.node.exclusion_constraint', [ newRow.addClass("new"); $(newRow).pgMakeVisible('backform-tab'); - } else { - //delete m; } return false; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/templates/foreign_key/js/foreign_key.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/templates/foreign_key/js/foreign_key.js index 7d742632..bd88eff2 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/templates/foreign_key/js/foreign_key.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/templates/foreign_key/js/foreign_key.js @@ -493,8 +493,6 @@ define('pgadmin.node.foreign_key', [ newRow.addClass("new"); $(newRow).pgMakeVisible('backform-tab'); - } else { - //delete m; } return false; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/primary_key.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/primary_key.js index f588b8f4..bbc5c57f 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/primary_key.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/primary_key.js @@ -1,6 +1,7 @@ define('pgadmin.node.primary_key', [ - 'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'underscore.string', 'pgadmin', - 'pgadmin.browser', 'alertify', 'pgadmin.browser.collection' + 'sources/gettext', 'sources/url_for', 'jquery', 'underscore', + 'underscore.string', 'pgadmin', 'pgadmin.browser', 'alertify', + 'pgadmin.browser.collection' ], function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, alertify) { // Extend the browser's node class for index constraint node diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/unique_constraint.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/unique_constraint.js index 69a92ac1..964efed1 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/unique_constraint.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/unique_constraint.js @@ -1,6 +1,7 @@ define('pgadmin.node.unique_constraint', [ - 'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'underscore.string', 'pgadmin', - 'pgadmin.browser', 'alertify', 'pgadmin.browser.collection' + 'sources/gettext', 'sources/url_for', 'jquery', 'underscore', + 'underscore.string', 'pgadmin', 'pgadmin.browser', 'alertify', + 'pgadmin.browser.collection' ], function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, alertify) { // Extend the browser's node class for index constraint node diff --git a/web/pgadmin/browser/server_groups/servers/static/js/privilege.js b/web/pgadmin/browser/server_groups/servers/static/js/privilege.js index 41cf62d8..5c0e3323 100644 --- a/web/pgadmin/browser/server_groups/servers/static/js/privilege.js +++ b/web/pgadmin/browser/server_groups/servers/static/js/privilege.js @@ -1,4 +1,6 @@ -define(['sources/gettext', 'underscore', 'jquery', 'backbone', 'backform', 'backgrid', 'alertify', 'pgadmin.browser.node', 'pgadmin.browser.node.ui'], +define(['sources/gettext', 'underscore', 'jquery', 'backbone', 'backform', + 'backgrid', 'alertify', 'pgadmin.browser.node', 'pgadmin.browser.node.ui' + ], function(gettext, _, $, Backbone, Backform, Backgrid, Alertify, pgNode) { /** * Each Privilege, supporeted by an database object, will be represented diff --git a/web/pgadmin/browser/templates/browser/js/node.js b/web/pgadmin/browser/templates/browser/js/node.js index ce3b105f..670498da 100644 --- a/web/pgadmin/browser/templates/browser/js/node.js +++ b/web/pgadmin/browser/templates/browser/js/node.js @@ -126,23 +126,21 @@ define( } // show query tool only in context menu of supported nodes. - if (true) { - if (_.indexOf(pgAdmin.unsupported_nodes, self.type) == -1) { - pgAdmin.Browser.add_menus([{ - name: 'show_query_tool', node: self.type, module: self, - applies: ['context'], callback: 'show_query_tool', - priority: 998, label: gettext('Query Tool...'), - icon: 'fa fa-bolt', - enable: function(itemData, item, data) { - if (itemData._type == 'database' && itemData.allowConn) - return true; - else if(itemData._type != 'database') - return true; - else - return false; - } - }]); - } + if (_.indexOf(pgAdmin.unsupported_nodes, self.type) == -1) { + pgAdmin.Browser.add_menus([{ + name: 'show_query_tool', node: self.type, module: self, + applies: ['context'], callback: 'show_query_tool', + priority: 998, label: gettext('Query Tool...'), + icon: 'fa fa-bolt', + enable: function(itemData, item, data) { + if (itemData._type == 'database' && itemData.allowConn) + return true; + else if(itemData._type != 'database') + return true; + else + return false; + } + }]); } // This will add options of scripts eg:'CREATE Script' @@ -501,7 +499,6 @@ define( ); b.removeChild(el); - // delete(el); return p; }; @@ -995,8 +992,6 @@ define( if (view) { // Release the view view.remove({data: true, internal: true, silent: true}); - // Deallocate the view - // delete view; view = null; // Reset the data object j.data('obj-view', null); @@ -1179,7 +1174,6 @@ define( if (view) { // Release the view view.remove({data: true, internal: true, silent: true}); - // Deallocate the view view = null; // Reset the data object j.data('obj-view', null); diff --git a/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js b/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js index b72977dd..719ecaca 100644 --- a/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js +++ b/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js @@ -332,8 +332,8 @@ function(url_for, gettext, r, $, _, pgAdmin, Backbone, Backgrid, Flotr) { // Render the data in a grid render_grid_data: function(container) { var data = $(container).data('data'), - grid = $(container).data('grid'), - filter = $(container).data('filter'); + grid = $(container).data('grid'), + filter = $(container).data('filter'); if(_.isUndefined(data)){ return null; @@ -608,17 +608,49 @@ function(url_for, gettext, r, $, _, pgAdmin, Backbone, Backgrid, Flotr) { }]; // Render the graphs - pgAdmin.Dashboard.render_chart(div_sessions, data_sessions, dataset_sessions, sid, did, url_for('dashboard.session_stats'), options_line, false, session_stats_refresh); - pgAdmin.Dashboard.render_chart(div_tps, data_tps, dataset_tps, sid, did, url_for('dashboard.tps_stats'), options_line, true, tps_stats_refresh); - pgAdmin.Dashboard.render_chart(div_ti, data_ti, dataset_ti, sid, did, url_for('dashboard.ti_stats'), options_line, true, ti_stats_refresh); - pgAdmin.Dashboard.render_chart(div_to, data_to, dataset_to, sid, did, url_for('dashboard.to_stats'), options_line, true, to_stats_refresh); - pgAdmin.Dashboard.render_chart(div_bio, data_bio, dataset_bio, sid, did, url_for('dashboard.bio_stats'), options_line, true, bio_stats_refresh); + pgAdmin.Dashboard.render_chart( + div_sessions, data_sessions, dataset_sessions, sid, did, + url_for('dashboard.session_stats'), options_line, false, + session_stats_refresh + ); + pgAdmin.Dashboard.render_chart( + div_tps, data_tps, dataset_tps, sid, did, + url_for('dashboard.tps_stats'), options_line, true, + tps_stats_refresh + ); + pgAdmin.Dashboard.render_chart( + div_ti, data_ti, dataset_ti, sid, did, + url_for('dashboard.ti_stats'), options_line, true, + ti_stats_refresh + ); + pgAdmin.Dashboard.render_chart( + div_to, data_to, dataset_to, sid, did, + url_for('dashboard.to_stats'), options_line, true, + to_stats_refresh + ); + pgAdmin.Dashboard.render_chart( + div_bio, data_bio, dataset_bio, sid, did, + url_for('dashboard.bio_stats'), options_line, true, + bio_stats_refresh + ); // Render the tabs, but only get data for the activity tab for now - pgAdmin.Dashboard.render_grid(div_server_activity, sid, did, url_for('dashboard.activity'), server_activity_columns); - pgAdmin.Dashboard.render_grid(div_server_locks, sid, did, url_for('dashboard.locks'), server_locks_columns); - pgAdmin.Dashboard.render_grid(div_server_prepared, sid, did, url_for('dashboard.prepared'), server_prepared_columns); - pgAdmin.Dashboard.render_grid(div_server_config, sid, did, url_for('dashboard.config'), server_config_columns); + pgAdmin.Dashboard.render_grid( + div_server_activity, sid, did, + url_for('dashboard.activity'), server_activity_columns + ); + pgAdmin.Dashboard.render_grid( + div_server_locks, sid, did, url_for('dashboard.locks'), + server_locks_columns + ); + pgAdmin.Dashboard.render_grid( + div_server_prepared, sid, did, url_for('dashboard.prepared'), + server_prepared_columns + ); + pgAdmin.Dashboard.render_grid( + div_server_config, sid, did, url_for('dashboard.config'), + server_config_columns + ); pgAdmin.Dashboard.render_grid_data(div_server_activity); @@ -843,16 +875,45 @@ function(url_for, gettext, r, $, _, pgAdmin, Backbone, Backgrid, Flotr) { }]; // Render the graphs - pgAdmin.Dashboard.render_chart(div_sessions, data_sessions, dataset_sessions, sid, did, url_for('dashboard.session_stats'), options_line, false, session_stats_refresh); - pgAdmin.Dashboard.render_chart(div_tps, data_tps, dataset_tps, sid, did, url_for('dashboard.tps_stats'), options_line, true, tps_stats_refresh); - pgAdmin.Dashboard.render_chart(div_ti, data_ti, dataset_ti, sid, did, url_for('dashboard.ti_stats'), options_line, true, ti_stats_refresh); - pgAdmin.Dashboard.render_chart(div_to, data_to, dataset_to, sid, did, url_for('dashboard.to_stats'), options_line, true, to_stats_refresh); - pgAdmin.Dashboard.render_chart(div_bio, data_bio, dataset_bio, sid, did, url_for('dashboard.bio_stats'), options_line, true, bio_stats_refresh); + pgAdmin.Dashboard.render_chart( + div_sessions, data_sessions, dataset_sessions, sid, did, + url_for('dashboard.session_stats'), options_line, false, + session_stats_refresh' + ); + pgAdmin.Dashboard.render_chart( + div_tps, data_tps, dataset_tps, sid, did, + url_for('dashboard.tps_stats'), options_line, true, + tps_stats_refresh + ); + pgAdmin.Dashboard.render_chart( + div_ti, data_ti, dataset_ti, sid, did, + url_for('dashboard.ti_stats'), options_line, true, + ti_stats_refresh + ); + pgAdmin.Dashboard.render_chart( + div_to, data_to, dataset_to, sid, did, + url_for('dashboard.to_stats'), options_line, true, + to_stats_refresh + ); + pgAdmin.Dashboard.render_chart( + div_bio, data_bio, dataset_bio, sid, did, + url_for('dashboard.bio_stats'), options_line, true, + bio_stats_refresh + ); // Render the tabs, but only get data for the activity tab for now - pgAdmin.Dashboard.render_grid(div_database_activity, sid, did, url_for('dashboard.activity'), database_activity_columns); - pgAdmin.Dashboard.render_grid(div_database_locks, sid, did, url_for('dashboard.locks'), database_locks_columns); - pgAdmin.Dashboard.render_grid(div_database_prepared, sid, did, url_for('dashboard.prepared'), database_prepared_columns); + pgAdmin.Dashboard.render_grid( + div_database_activity, sid, did, url_for('dashboard.activity'), + database_activity_columns + ); + pgAdmin.Dashboard.render_grid( + div_database_locks, sid, did, url_for('dashboard.locks'), + database_locks_columns + ); + pgAdmin.Dashboard.render_grid( + div_database_prepared, sid, did, url_for('dashboard.prepared'), + database_prepared_columns + ); pgAdmin.Dashboard.render_grid_data(div_database_activity);