From 93adf6884f031ff0e02c60736d9d4588732fdd07 Mon Sep 17 00:00:00 2001 From: Nikhil Mohite Date: Thu, 13 Aug 2020 12:04:00 +0530 Subject: [PATCH] Upgrade font awesome from v4 to v5. Fixes #5731 --- docs/en_US/release_notes_4_25.rst | 1 + web/package.json | 4 ++-- .../databases/schemas/views/static/js/mview.js | 4 ++-- .../servers/databases/static/js/database.js | 2 +- .../server_groups/servers/static/js/server.js | 4 ++-- .../tablespaces/static/js/tablespace.js | 2 +- web/pgadmin/browser/static/js/browser.js | 2 +- web/pgadmin/browser/static/js/collection.js | 4 ++-- web/pgadmin/browser/static/js/node.js | 10 +++++----- web/pgadmin/browser/static/js/node.ui.js | 2 +- web/pgadmin/browser/static/js/wizard.js | 2 +- .../dashboard/database_dashboard.html | 2 +- .../templates/dashboard/server_dashboard.html | 2 +- web/pgadmin/help/__init__.py | 4 ++-- .../misc/bgprocess/static/js/bgprocess.js | 4 ++-- .../misc/file_manager/static/js/utility.js | 12 ++++++------ .../templates/file_manager/index.html | 6 +++--- web/pgadmin/misc/static/explain/js/explain.js | 4 ++-- web/pgadmin/static/css/style.css | 2 +- web/pgadmin/static/js/backform.pgadmin.js | 6 +++--- web/pgadmin/static/js/backgrid.pgadmin.js | 6 +++--- .../js/sqleditor/history/query_sources.js | 2 +- web/pgadmin/static/js/sqleditor_utils.js | 2 +- .../static/scss/_aci_tree.overrides.scss | 4 ++++ .../static/scss/_alertify.overrides.scss | 2 ++ .../static/scss/_backform.overrides.scss | 1 + .../static/scss/_bootstrap.overrides.scss | 2 ++ .../static/scss/_codemirror.overrides.scss | 2 ++ web/pgadmin/static/scss/_pgadmin.style.scss | 18 ++++++++++++++++++ web/pgadmin/static/scss/_webcabin.pgadmin.scss | 1 + .../scss/resources/_default.variables.scss | 2 +- web/pgadmin/tools/backup/static/js/backup.js | 12 ++++++------ .../datagrid/static/js/datagrid_panel_title.js | 2 +- .../datagrid/templates/datagrid/index.html | 12 ++++++------ .../grant_wizard/static/js/grant_wizard.js | 4 ++-- .../static/js/schema_diff.backform.js | 2 +- .../schema_diff/static/scss/_schema_diff.scss | 3 +++ .../tools/sqleditor/static/js/sqleditor.js | 2 +- .../sqleditor/static/scss/_sqleditor.scss | 2 ++ web/regression/feature_utils/locators.py | 4 ++-- web/yarn.lock | 16 ++++++++-------- 41 files changed, 108 insertions(+), 72 deletions(-) diff --git a/docs/en_US/release_notes_4_25.rst b/docs/en_US/release_notes_4_25.rst index 860aeb866..90db208bb 100644 --- a/docs/en_US/release_notes_4_25.rst +++ b/docs/en_US/release_notes_4_25.rst @@ -20,6 +20,7 @@ Housekeeping | `Issue #5327 `_ - Improve code coverage and API test cases for Schemas. | `Issue #5336 `_ - Improve code coverage and API test cases for Types. | `Issue #5700 `_ - Remove old Python 2 compatibility code. +| `Issue #5731 `_ - Upgrade font awesome from v4 to v5. Bug fixes ********* diff --git a/web/package.json b/web/package.json index 844d994e1..2602d07c5 100644 --- a/web/package.json +++ b/web/package.json @@ -57,6 +57,7 @@ "dependencies": { "@babel/plugin-proposal-class-properties": "^7.10.4", "@babel/preset-react": "^7.10.4", + "@fortawesome/fontawesome-free": "^5.14.0", "@simonwep/pickr": "^1.5.1", "acitree": "git+https://github.com/imsurinder90/jquery-aciTree.git#rc.7", "alertifyjs": "git+https://github.com/EnterpriseDB/AlertifyJS/#72c1d794f5b6d4ec13a68d123c08f19021afe263", @@ -80,7 +81,6 @@ "cssnano": "^4.1.10", "dropzone": "^5.5.1", "exports-loader": "~0.7.0", - "font-awesome": "^4.7.0", "immutability-helper": "^3.0.0", "imports-loader": "^0.8.0", "ip-address": "^5.8.9", @@ -107,7 +107,7 @@ "tempusdominus-core": "^5.0.3", "underscore": "^1.9.1", "watchify": "~3.11.1", - "webcabin-docker": "git+https://github.com/EnterpriseDB/wcDocker/#be9ca6e812dfd8f44eea7ef4835ec3c8dd2bcaf3", + "webcabin-docker": "git+https://github.com/EnterpriseDB/wcDocker/#8298a57d875dce51a4d3707c68a1a2b82f2e6c03", "wkx": "^0.4.6" }, "scripts": { diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/static/js/mview.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/static/js/mview.js index 0b39813d0..3204d2258 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/static/js/mview.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/static/js/mview.js @@ -105,7 +105,7 @@ define('pgadmin.node.mview', [ category: 'refresh_mview', applies: ['object', 'context'], label: gettext('With no data'), data: { concurrent: false, with_data: false, - }, icon: 'fa fa-refresh', + }, icon: 'fa fa-sync-alt', },{ name: 'refresh_mview_concurrent', node: 'mview', module: this, category: 'refresh_mview', enable: 'is_version_supported', @@ -118,7 +118,7 @@ define('pgadmin.node.mview', [ data: {concurrent: true, with_data: false}, priority: 4, applies: ['object', 'context'], callback: 'refresh_mview', label: gettext('With no data (concurrently)'), - icon: 'fa fa-refresh', + icon: 'fa fa-sync-alt', }]); }, diff --git a/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js b/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js index 88cd8caf3..f70221632 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js +++ b/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js @@ -81,7 +81,7 @@ define('pgadmin.node.database', [ name: 'disconnect_database', node: 'database', module: this, applies: ['object', 'context'], callback: 'disconnect_database', category: 'drop', priority: 5, label: gettext('Disconnect Database...'), - icon: 'fa fa-chain-broken', enable : 'is_connected', + icon: 'fa fa-unlink', enable : 'is_connected', }]); _.bindAll(this, 'connection_lost'); diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.js b/web/pgadmin/browser/server_groups/servers/static/js/server.js index 95e2a5d59..7c1b58be8 100644 --- a/web/pgadmin/browser/server_groups/servers/static/js/server.js +++ b/web/pgadmin/browser/server_groups/servers/static/js/server.js @@ -90,12 +90,12 @@ define('pgadmin.node.server', [ name: 'disconnect_server', node: 'server', module: this, applies: ['object', 'context'], callback: 'disconnect_server', category: 'drop', priority: 5, label: gettext('Disconnect Server'), - icon: 'fa fa-chain-broken', enable : 'is_connected', + icon: 'fa fa-unlink', enable : 'is_connected', },{ name: 'reload_configuration', node: 'server', module: this, applies: ['tools', 'context'], callback: 'reload_configuration', category: 'reload', priority: 6, label: gettext('Reload Configuration'), - icon: 'fa fa-repeat', enable : 'enable_reload_config', + icon: 'fa fa-redo-alt', enable : 'enable_reload_config', },{ name: 'restore_point', node: 'server', module: this, applies: ['tools', 'context'], callback: 'restore_point', diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/static/js/tablespace.js b/web/pgadmin/browser/server_groups/servers/tablespaces/static/js/tablespace.js index 8e4db7ef0..eb50a88b8 100644 --- a/web/pgadmin/browser/server_groups/servers/tablespaces/static/js/tablespace.js +++ b/web/pgadmin/browser/server_groups/servers/tablespaces/static/js/tablespace.js @@ -73,7 +73,7 @@ define('pgadmin.node.tablespace', [ applies: ['object', 'context'], callback: 'move_objects', category: 'move_tablespace', priority: 5, label: gettext('Move objects to...'), - icon: 'fa fa-exchange', data: {action: 'create'}, + icon: 'fa fa-exchange-alt', data: {action: 'create'}, enable: 'can_move_objects', }, ]); diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js index e8a85f95c..f5ab09399 100644 --- a/web/pgadmin/browser/static/js/browser.js +++ b/web/pgadmin/browser/static/js/browser.js @@ -621,7 +621,7 @@ define('pgadmin.browser', [ }), }, },{ - text: gettext('Reset Master Password'), className: 'btn btn-secondary fa fa-trash-o pg-alertify-button pull-left', + text: gettext('Reset Master Password'), className: 'btn btn-secondary fa fa-trash-alt pg-alertify-button pull-left', },{ text: gettext('Cancel'), className: 'btn btn-secondary fa fa-times pg-alertify-button', key: 27, diff --git a/web/pgadmin/browser/static/js/collection.js b/web/pgadmin/browser/static/js/collection.js index 124817a71..35b7abaf2 100644 --- a/web/pgadmin/browser/static/js/collection.js +++ b/web/pgadmin/browser/static/js/collection.js @@ -44,7 +44,7 @@ define([ name: 'refresh', node: this.type, module: this, applies: ['object', 'context'], callback: 'refresh', priority: 1, label: gettext('Refresh...'), - icon: 'fa fa-refresh', + icon: 'fa fa-sync-alt', }]); // show query tool only in context menu of supported nodes. @@ -247,7 +247,7 @@ define([ type: 'delete', tooltip: gettext('Delete/Drop'), extraClasses: ['btn-primary-icon m-1', 'delete_multiple'], - icon: 'fa fa-lg fa-trash-o', + icon: 'fa fa-lg fa-trash-alt', disabled: (_.isFunction(that.canDrop)) ? !(that.canDrop.apply(self, [data, item])) : (!that.canDrop), register: function(btn) { btn.on('click',() => { diff --git a/web/pgadmin/browser/static/js/node.js b/web/pgadmin/browser/static/js/node.js index 93285fbb3..f26c596b4 100644 --- a/web/pgadmin/browser/static/js/node.js +++ b/web/pgadmin/browser/static/js/node.js @@ -116,7 +116,7 @@ define('pgadmin.browser.node', [ callback: 'refresh', priority: 1, label: gettext('Refresh...'), - icon: 'fa fa-refresh', + icon: 'fa fa-sync-alt', }]); if (self.canEdit) { @@ -131,7 +131,7 @@ define('pgadmin.browser.node', [ data: { 'action': 'edit', }, - icon: 'fa fa-pencil-square-o', + icon: 'fa fa-edit', }]); } @@ -229,7 +229,7 @@ define('pgadmin.browser.node', [ data: { 'script': stype, }, - icon: 'fa fa-pencil', + icon: 'fa fa-pencil-alt', enable: self.check_user_permission, }]); }); @@ -1232,7 +1232,7 @@ define('pgadmin.browser.node', [ type: 'edit', tooltip: gettext('Edit'), extraClasses: ['btn', 'btn-primary', 'pull-right', 'm-1'], - icon: 'fa fa-sm fa-pencil', + icon: 'fa fa-sm fa-pencil-alt', disabled: !that.canEdit, register: function(btn) { btn.on('click',() => { @@ -1523,7 +1523,7 @@ define('pgadmin.browser.node', [ type: 'cancel', tooltip: gettext('Cancel changes to this object.'), extraClasses: ['btn-secondary', 'mx-1'], - icon: 'fa fa-close pg-alertify-button', + icon: 'fa fa-times pg-alertify-button', disabled: false, register: function(btn) { btn.on('click',() => { diff --git a/web/pgadmin/browser/static/js/node.ui.js b/web/pgadmin/browser/static/js/node.ui.js index d81d8548b..007ce101e 100644 --- a/web/pgadmin/browser/static/js/node.ui.js +++ b/web/pgadmin/browser/static/js/node.ui.js @@ -32,7 +32,7 @@ define([ let $selectAll = $([ '', diff --git a/web/pgadmin/browser/static/js/wizard.js b/web/pgadmin/browser/static/js/wizard.js index af4cd1601..19c5fce8d 100644 --- a/web/pgadmin/browser/static/js/wizard.js +++ b/web/pgadmin/browser/static/js/wizard.js @@ -134,7 +134,7 @@ define([ ' ' + '
' + ' ' + + '  ' + gettext('Cancel') + '' + ' ' + '
diff --git a/web/pgadmin/dashboard/templates/dashboard/server_dashboard.html b/web/pgadmin/dashboard/templates/dashboard/server_dashboard.html index 6c7de6114..874a1e206 100644 --- a/web/pgadmin/dashboard/templates/dashboard/server_dashboard.html +++ b/web/pgadmin/dashboard/templates/dashboard/server_dashboard.html @@ -36,7 +36,7 @@ diff --git a/web/pgadmin/help/__init__.py b/web/pgadmin/help/__init__.py index 9520ef3fa..e843684c7 100644 --- a/web/pgadmin/help/__init__.py +++ b/web/pgadmin/help/__init__.py @@ -34,14 +34,14 @@ class HelpModule(PgAdminModule): label=gettext('pgAdmin Website'), priority=200, target='pgadmin_website', - icon='fa fa-external-link', + icon='fa fa-external-link-alt', url='https://www.pgadmin.org/'), MenuItem(name='mnu_postgresql_website', label=gettext('PostgreSQL Website'), priority=300, target='postgres_website', - icon='fa fa-external-link', + icon='fa fa-external-link-alt', url='https://www.postgresql.org/')]} def register_preferences(self): diff --git a/web/pgadmin/misc/bgprocess/static/js/bgprocess.js b/web/pgadmin/misc/bgprocess/static/js/bgprocess.js index c2b81e778..dc8c38cca 100644 --- a/web/pgadmin/misc/bgprocess/static/js/bgprocess.js +++ b/web/pgadmin/misc/bgprocess/static/js/bgprocess.js @@ -43,7 +43,7 @@ define('misc.bgprocess', [ failed_status_tpl: _.template(`
- +
<%-status_text%>
`), @@ -301,7 +301,7 @@ define('misc.bgprocess', [
${self.type_desc}
- +
diff --git a/web/pgadmin/misc/file_manager/static/js/utility.js b/web/pgadmin/misc/file_manager/static/js/utility.js index c9f32fcde..6bccbedef 100644 --- a/web/pgadmin/misc/file_manager/static/js/utility.js +++ b/web/pgadmin/misc/file_manager/static/js/utility.js @@ -467,9 +467,9 @@ define([ if (item_data.file_type == 'dir') { icon_type = 'fa fa-folder-open fm_folder_grid'; } else if (item_data.file_type == 'drive') { - icon_type = 'fa fa-hdd-o fm_drive'; + icon_type = 'fa fa-hdd fm_drive'; } else { - icon_type = 'fa fa-file-text-o fm_file_grid'; + icon_type = 'fa fa-file-alt fm_file_grid'; } /* For the html ele */ @@ -567,10 +567,10 @@ define([ icon_type = 'fa fa-folder-open fm_folder_list'; } else if (item_data.file_type == 'drive') { class_type = 'tbl_drive'; - icon_type = 'fa fa-hdd-o'; + icon_type = 'fa fa-hdd'; } else { class_type = 'tbl_file'; - icon_type = 'fa fa-file-text-o'; + icon_type = 'fa fa-file-alt'; } /* For the html ele */ @@ -746,10 +746,10 @@ define([ // if file/folder is protected do nothing if ($(this).find('.fa-lock').length) return; - if ($(this).find('.fa-file-text-o').length) + if ($(this).find('.fa-file-alt').length) $(this).click(); // If folder then first select and then double click to open folder/drive - else if ($(this).find('.fa-folder-open').length || $(this).find('.fa-hdd-o').length) { + else if ($(this).find('.fa-folder-open').length || $(this).find('.fa-hdd').length) { $(this).click(); setTimeout(() => { $(self).trigger('dblclick'); }, 10); } diff --git a/web/pgadmin/misc/file_manager/templates/file_manager/index.html b/web/pgadmin/misc/file_manager/templates/file_manager/index.html index b3766b216..9c9ee4bb2 100644 --- a/web/pgadmin/misc/file_manager/templates/file_manager/index.html +++ b/web/pgadmin/misc/file_manager/templates/file_manager/index.html @@ -14,7 +14,7 @@
@@ -26,7 +26,7 @@
@@ -152,7 +152,7 @@