From 3bd2dec663edce077b240f1e76e289baa19c7bef Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Tue, 28 Nov 2023 12:32:16 +0530 Subject: [PATCH] Fixed an issue where the Vacuum option INDEX_CLEANUP have an incorrect value ('AUTO') for database versions < 14. #6984 --- docs/en_US/release_notes_8_1.rst | 1 + .../maintenance/static/js/maintenance.ui.js | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/en_US/release_notes_8_1.rst b/docs/en_US/release_notes_8_1.rst index 157781e59..0d9995027 100644 --- a/docs/en_US/release_notes_8_1.rst +++ b/docs/en_US/release_notes_8_1.rst @@ -33,4 +33,5 @@ Bug fixes | `Issue #6921 `_ - Fixed an issue where on entering full screen, the option label is not changed to 'Exit Full Screen' in desktop mode. | `Issue #6950 `_ - Ensure that the Authentication Source in the drop-down of the UserManagement dialog aligns with the entries specified for AUTHENTICATION_SOURCES in the configuration file. | `Issue #6958 `_ - Reverse engineer serial columns when generating ERD for database/table. + | `Issue #6984 `_ - Fixed an issue where the Vacuum option INDEX_CLEANUP have an incorrect value ('AUTO') for database versions < 14. | `Issue #6989 `_ - Fixed an issue where the pgAdmin page went blank when clicking the delete button in the User Management dialog. diff --git a/web/pgadmin/tools/maintenance/static/js/maintenance.ui.js b/web/pgadmin/tools/maintenance/static/js/maintenance.ui.js index 04750c63b..34ffa9e93 100644 --- a/web/pgadmin/tools/maintenance/static/js/maintenance.ui.js +++ b/web/pgadmin/tools/maintenance/static/js/maintenance.ui.js @@ -204,20 +204,25 @@ export class VacuumSchema extends BaseUISchema { type: 'select', label: gettext('INDEX CLEANUP'), controlProps: { allowClear: false, width: '100%' }, - options: [ - { - label: gettext('AUTO'), - value: 'AUTO', - }, - { + options: function () { + let optArray = [{ label: gettext('ON'), value: 'ON', }, { label: gettext('OFF'), value: 'OFF', + }]; + + if (obj?.top?.nodeInfo?.server?.version >= 140000) { + optArray.push({ + label: gettext('AUTO'), + value: 'AUTO', + }); } - ], + + return optArray; + }, disabled: function(state) { if (!obj.isApplicableForVacuum(state) || state.vacuum_full) { state.vacuum_index_cleanup = undefined;