mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Rearrange tools menu on the basis of usability and form groups of similar sub-menus.
This commit is contained in:
parent
8cfdfd898d
commit
92a997b16a
Binary file not shown.
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 98 KiB |
@ -96,40 +96,40 @@ Use the *Tools* menu to access the following options (in alphabetical order):
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Option | Action |
|
||||
+===========================+===========================================================================================================================================+
|
||||
| *Add named restore point* | Click to open the :ref:`Add named restore point... <add_restore_point_dialog>` dialog to take a point-in-time snapshot of the current |
|
||||
| | server state. |
|
||||
| *ERD Tool* | Click to open the :ref:`ERD Tool <erd_tool>` and start designing your database. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Backup...* | Click to open the :ref:`Backup... <backup_dialog>` dialog to backup database objects. |
|
||||
| *Grant Wizard...* | Click to access the :ref:`Grant Wizard <grant_wizard>` tool. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *PSQL Tool* | Click to open the :ref:`PSQL Tool <psql_tool>` and start PSQL in the current database context. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Query tool* | Click to open the :ref:`Query tool <query_tool>` for the currently selected object. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Schema Diff* | Click to open the :ref:`Schema Diff <schema_diff_feature>` and start comparing two database or two schema. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Backup Globals...* | Click to open the :ref:`Backup Globals... <backup_globals_dialog>` dialog to backup cluster objects. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Backup Server...* | Click to open the :ref:`Backup Server... <backup_server_dialog>` dialog to backup a server. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Grant Wizard...* | Click to access the :ref:`Grant Wizard <grant_wizard>` tool. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Import/Export...* | Click to open the :ref:`Import/Export data... <import_export_data>` dialog to import or export data from a table. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Maintenance...* | Click to open the :ref:`Maintenance... <maintenance_dialog>` dialog to VACUUM, ANALYZE, REINDEX, or CLUSTER. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Pause replay of WAL* | Click to pause the replay of the WAL log. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Query tool* | Click to open the :ref:`Query tool <query_tool>` for the currently selected object. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Reload Configuration...* | Click to update configuration files without restarting the server. |
|
||||
| *Backup...* | Click to open the :ref:`Backup... <backup_dialog>` dialog to backup database objects. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Restore...* | Click to access the :ref:`Restore <restore_dialog>` dialog to restore database files from a backup. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Resume replay of WAL* | Click to resume the replay of the WAL log. |
|
||||
| *Import/Export Data...* | Click to open the :ref:`Import/Export data... <import_export_data>` dialog to import or export data from a table. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Storage Manager* | Click to open the :ref:`Storage Manager <storage_manager>` to upload, delete, or download the backup files. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *New ERD Project* | Click to open the :ref:`ERD Tool <erd_tool>` and start designing your database. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Schema Diff* | Click to open the :ref:`Schema Diff <schema_diff_feature>` and start comparing two database or two schema. |
|
||||
| *Maintenance...* | Click to open the :ref:`Maintenance... <maintenance_dialog>` dialog to VACUUM, ANALYZE, REINDEX, or CLUSTER. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Search Objects...* | Click to open the :ref:`Search Objects... <search_objects>` and start searching any kind of objects in a database. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *PSQL Tool* | Click to open the :ref:`PSQL Tool <psql_tool>` and start PSQL in the current database context. |
|
||||
| *Add named restore point* | Click to open the :ref:`Add named restore point... <add_restore_point_dialog>` dialog to take a point-in-time snapshot of the current |
|
||||
| | server state. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Pause replay of WAL* | Click to pause the replay of the WAL log. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Resume replay of WAL* | Click to resume the replay of the WAL log. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Reload Configuration...* | Click to update configuration files without restarting the server. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Storage Manager* | Click to open the :ref:`Storage Manager <storage_manager>` to upload, delete, or download the backup files. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
The Help Menu
|
||||
|
@ -105,14 +105,14 @@ define('pgadmin.node.server', [
|
||||
{
|
||||
name: 'reload_configuration', node: 'server', module: this,
|
||||
applies: ['tools', 'context'], callback: 'reload_configuration',
|
||||
category: 'reload', priority: 6, label: gettext('Reload Configuration'),
|
||||
category: 'reload', priority: 10, label: gettext('Reload Configuration'),
|
||||
icon: 'fa fa-redo-alt', enable : 'enable_reload_config',data: {
|
||||
data_disabled: gettext('Please select a server from the browser tree to reload the configuration files.'),
|
||||
},
|
||||
},{
|
||||
name: 'restore_point', node: 'server', module: this,
|
||||
applies: ['tools', 'context'], callback: 'restore_point',
|
||||
category: 'restore', priority: 9, label: gettext('Add Named Restore Point...'),
|
||||
category: 'restore', priority: 7, label: gettext('Add Named Restore Point...'),
|
||||
icon: 'fa fa-anchor', enable : 'is_applicable',data: {
|
||||
data_disabled: gettext('Please select any server from the browser tree to Add Named Restore Point.'),
|
||||
},
|
||||
@ -126,14 +126,14 @@ define('pgadmin.node.server', [
|
||||
},{
|
||||
name: 'wal_replay_pause', node: 'server', module: this,
|
||||
applies: ['tools', 'context'], callback: 'pause_wal_replay',
|
||||
category: 'wal_replay_pause', priority: 7, label: gettext('Pause Replay of WAL'),
|
||||
category: 'wal_replay_pause', priority: 8, label: gettext('Pause Replay of WAL'),
|
||||
icon: 'fa fa-pause-circle', enable : 'wal_pause_enabled',data: {
|
||||
data_disabled: gettext('Please select a connected database as a Super user and run in Recovery mode to Pause Replay of WAL.'),
|
||||
},
|
||||
},{
|
||||
name: 'wal_replay_resume', node: 'server', module: this,
|
||||
applies: ['tools', 'context'], callback: 'resume_wal_replay',
|
||||
category: 'wal_replay_resume', priority: 8, label: gettext('Resume Replay of WAL'),
|
||||
category: 'wal_replay_resume', priority: 9, label: gettext('Resume Replay of WAL'),
|
||||
icon: 'fa fa-play-circle', enable : 'wal_resume_enabled',data: {
|
||||
data_disabled: gettext('Please select a connected database as a Super user and run in Recovery mode to Resume Replay of WAL.'),
|
||||
},
|
||||
|
@ -498,7 +498,7 @@ define('pgadmin.browser.node', [
|
||||
|
||||
return null;
|
||||
},
|
||||
addUtilityPanel: function() {
|
||||
addUtilityPanel: function(width, height) {
|
||||
var body = window.document.body,
|
||||
el = document.createElement('div');
|
||||
|
||||
@ -506,10 +506,10 @@ define('pgadmin.browser.node', [
|
||||
|
||||
var new_panel = pgBrowser.docker.addPanel(
|
||||
'utility_props', window.wcDocker.DOCK.FLOAT, undefined, {
|
||||
w: (screen.width < 700 ?
|
||||
screen.width * 0.95 : screen.width * 0.5),
|
||||
h: (screen.height < 500 ?
|
||||
screen.height * 0.95 : screen.height * 0.5),
|
||||
w: (!_.isUndefined(width) && !_.isNull(width)) ? width :
|
||||
(screen.width < 700 ? screen.width * 0.95 : screen.width * 0.5),
|
||||
h: (!_.isUndefined(height) && !_.isNull(height)) ? height :
|
||||
(screen.height < 500 ? screen.height * 0.95 : screen.height * 0.5),
|
||||
x: (screen.width < 700 ? '2%' : '25%'),
|
||||
y: (screen.height < 500 ? '2%' : '25%'),
|
||||
}
|
||||
|
@ -14,14 +14,11 @@ import Notify from '../../../../static/js/helpers/Notifier';
|
||||
|
||||
// Backup dialog
|
||||
define([
|
||||
'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'sources/pgadmin',
|
||||
'backbone', 'pgadmin.backgrid',
|
||||
'pgadmin.backform', 'pgadmin.browser', 'sources/utils',
|
||||
'sources/gettext', 'sources/url_for', 'underscore', 'pgadmin.browser',
|
||||
'tools/backup/static/js/menu_utils',
|
||||
'sources/nodes/supported_database_node',
|
||||
], function(
|
||||
gettext, url_for, $, _, pgAdmin, Backbone, Backgrid, Backform, pgBrowser,
|
||||
commonUtils, menuUtils, supportedNodes
|
||||
gettext, url_for, _, pgBrowser, menuUtils, supportedNodes
|
||||
) {
|
||||
|
||||
// if module is already initialized, refer to that.
|
||||
@ -61,7 +58,7 @@ define([
|
||||
module: this,
|
||||
applies: ['tools'],
|
||||
callback: 'startBackupGlobal',
|
||||
priority: 12,
|
||||
priority: 2,
|
||||
label: gettext('Backup Globals...'),
|
||||
icon: 'fa fa-save',
|
||||
enable: menuUtils.menuEnabledServer,
|
||||
@ -73,7 +70,7 @@ define([
|
||||
module: this,
|
||||
applies: ['tools'],
|
||||
callback: 'startBackupServer',
|
||||
priority: 12,
|
||||
priority: 2,
|
||||
label: gettext('Backup Server...'),
|
||||
icon: 'fa fa-save',
|
||||
enable: menuUtils.menuEnabledServer,
|
||||
@ -86,7 +83,7 @@ define([
|
||||
node: 'server',
|
||||
applies: ['context'],
|
||||
callback: 'startBackupGlobal',
|
||||
priority: 12,
|
||||
priority: 2,
|
||||
label: gettext('Backup Globals...'),
|
||||
icon: 'fa fa-save',
|
||||
enable: menuUtils.menuEnabledServer,
|
||||
@ -99,7 +96,7 @@ define([
|
||||
node: 'server',
|
||||
applies: ['context'],
|
||||
callback: 'startBackupServer',
|
||||
priority: 12,
|
||||
priority: 2,
|
||||
label: gettext('Backup Server...'),
|
||||
icon: 'fa fa-save',
|
||||
enable: menuUtils.menuEnabledServer,
|
||||
@ -111,7 +108,7 @@ define([
|
||||
module: this,
|
||||
applies: ['tools'],
|
||||
callback: 'backupObjects',
|
||||
priority: 11,
|
||||
priority: 2,
|
||||
label: gettext('Backup...'),
|
||||
icon: 'fa fa-save',
|
||||
enable: supportedNodes.enabled.bind(
|
||||
@ -129,7 +126,7 @@ define([
|
||||
module: this,
|
||||
applies: ['context'],
|
||||
callback: 'backupObjects',
|
||||
priority: 11,
|
||||
priority: 2,
|
||||
label: gettext('Backup...'),
|
||||
icon: 'fa fa-save',
|
||||
enable: supportedNodes.enabled.bind(
|
||||
|
@ -1,3 +1,11 @@
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
// pgAdmin 4 - PostgreSQL Tools
|
||||
//
|
||||
// Copyright (C) 2013 - 2021, The pgAdmin Development Team
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
import gettext from 'sources/gettext';
|
||||
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
|
||||
import { isEmptyString } from 'sources/validators';
|
||||
|
@ -1,3 +1,11 @@
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
// pgAdmin 4 - PostgreSQL Tools
|
||||
//
|
||||
// Copyright (C) 2013 - 2021, The pgAdmin Development Team
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
import gettext from 'sources/gettext';
|
||||
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
|
||||
import { isEmptyString } from 'sources/validators';
|
||||
|
@ -37,7 +37,7 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, pgBrowser
|
||||
applies: ['tools'],
|
||||
callback: 'showErdTool',
|
||||
priority: 1,
|
||||
label: gettext('New ERD Project'),
|
||||
label: gettext('ERD Tool'),
|
||||
enable: this.erdToolEnabled,
|
||||
data: {
|
||||
data_disabled: gettext('The selected tree node does not support this option.'),
|
||||
|
@ -13,19 +13,19 @@ import url_for from 'sources/url_for';
|
||||
import React from 'react';
|
||||
import { Box } from '@material-ui/core';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import Wizard from '../helpers/wizard/Wizard';
|
||||
import WizardStep from '../helpers/wizard/WizardStep';
|
||||
import Wizard from '../../../../static/js/helpers/wizard/Wizard';
|
||||
import WizardStep from '../../../../static/js/helpers/wizard/WizardStep';
|
||||
import PgTable from 'sources/components/PgTable';
|
||||
import { getNodePrivilegeRoleSchema } from '../../../browser/server_groups/servers/static/js/privilege.ui.js';
|
||||
import { InputSQL, InputText, FormFooterMessage, MESSAGE_TYPE } from './FormComponents';
|
||||
import getApiInstance from '../api_instance';
|
||||
import SchemaView from '../SchemaView';
|
||||
import { getNodePrivilegeRoleSchema } from '../../../../../pgadmin/browser/server_groups/servers/static/js/privilege.ui.js';
|
||||
import { InputSQL, InputText, FormFooterMessage, MESSAGE_TYPE } from '../../../../static/js/components/FormComponents';
|
||||
import getApiInstance from '../../../../static/js/api_instance';
|
||||
import SchemaView from '../../../../static/js/SchemaView';
|
||||
import clsx from 'clsx';
|
||||
import Loader from 'sources/components/Loader';
|
||||
import Alertify from 'pgadmin.alertifyjs';
|
||||
import PropTypes from 'prop-types';
|
||||
import PrivilegeSchema from '../../../tools/grant_wizard/static/js/privilege_schema.ui';
|
||||
import Notify from '../../../static/js/helpers/Notifier';
|
||||
import PrivilegeSchema from './privilege_schema.ui';
|
||||
import Notify from '../../../../static/js/helpers/Notifier';
|
||||
|
||||
const useStyles = makeStyles(() =>
|
||||
({
|
@ -9,23 +9,20 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import Theme from 'sources/Theme';
|
||||
import GrantWizard from 'sources/components/GrantWizard';
|
||||
import GrantWizard from './GrantWizard';
|
||||
|
||||
|
||||
// Grant Wizard
|
||||
define([
|
||||
'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'backbone',
|
||||
'pgadmin.alertifyjs', 'pgadmin.backgrid', 'pgadmin.backform',
|
||||
'pgadmin.browser', 'pgadmin.browser.node',
|
||||
'sources/gettext', 'jquery', 'underscore',
|
||||
'pgadmin.alertifyjs', 'pgadmin.browser',
|
||||
'tools/grant_wizard/static/js/menu_utils',
|
||||
'sources/utils',
|
||||
'sources/nodes/supported_database_node',
|
||||
'backgrid.select.all',
|
||||
'backgrid.filter', 'pgadmin.browser.server.privilege',
|
||||
'pgadmin.browser.wizard',
|
||||
], function(
|
||||
gettext, url_for, $, _, Backbone, Alertify, Backgrid, Backform, pgBrowser,
|
||||
pgNode, menuUtils, commonUtils, supportedNodes
|
||||
gettext, $, _, Alertify, pgBrowser, menuUtils, supportedNodes
|
||||
) {
|
||||
|
||||
// if module is already initialized, refer to that.
|
||||
@ -48,7 +45,7 @@ define([
|
||||
module: this,
|
||||
applies: ['tools'],
|
||||
callback: 'start_grant_wizard',
|
||||
priority: 14,
|
||||
priority: 1,
|
||||
label: gettext('Grant Wizard...'),
|
||||
icon: 'fa fa-unlock',
|
||||
enable: supportedNodes.enabled.bind(
|
||||
|
@ -408,8 +408,8 @@ define([
|
||||
applies: ['tools', 'context'],
|
||||
callback: 'callback_import_export',
|
||||
category: 'import',
|
||||
priority: 10,
|
||||
label: gettext('Import/Export...'),
|
||||
priority: 3,
|
||||
label: gettext('Import/Export Data...'),
|
||||
icon: 'fa fa-shopping-cart',
|
||||
enable: supportedNodes.enabled.bind(
|
||||
null, pgBrowser.tree, ['table']
|
||||
|
@ -165,7 +165,7 @@ define([
|
||||
module: this,
|
||||
applies: ['tools'],
|
||||
callback: 'callback_maintenance',
|
||||
priority: 10,
|
||||
priority: 3,
|
||||
label: gettext('Maintenance...'),
|
||||
icon: 'fa fa-wrench',
|
||||
enable: supportedNodes.enabled.bind(
|
||||
|
@ -392,9 +392,10 @@ define('tools.restore', [
|
||||
module: this,
|
||||
applies: ['tools'],
|
||||
callback: 'restore_objects',
|
||||
priority: 13,
|
||||
priority: 2,
|
||||
label: gettext('Restore...'),
|
||||
icon: 'fa fa-upload',
|
||||
below: true,
|
||||
enable: supportedNodes.enabled.bind(
|
||||
null, pgBrowser.tree, menuUtils.restoreSupportedNodes
|
||||
),
|
||||
|
@ -39,6 +39,7 @@ define('pgadmin.schemadiff', [
|
||||
priority: 1,
|
||||
label: gettext('Schema Diff'),
|
||||
enable: true,
|
||||
below: true,
|
||||
}];
|
||||
|
||||
pgBrowser.add_menus(menus);
|
||||
|
@ -34,8 +34,9 @@ define([
|
||||
applies: ['tools'],
|
||||
callback: 'show_search_objects',
|
||||
enable: this.search_objects_enabled,
|
||||
priority: 1,
|
||||
priority: 3,
|
||||
label: gettext('Search Objects...'),
|
||||
below: true,
|
||||
data: {
|
||||
data_disabled: gettext('Please select a database from the browser tree to search the database objects.'),
|
||||
},
|
||||
|
@ -49,7 +49,7 @@ define([
|
||||
module: this,
|
||||
applies: ['tools'],
|
||||
callback: 'callback_storage_manager',
|
||||
priority: 2,
|
||||
priority: 11,
|
||||
label: gettext('Storage Manager...'),
|
||||
enable: true,
|
||||
}];
|
||||
|
Loading…
Reference in New Issue
Block a user