diff --git a/docs/en_US/release_notes_6_11.rst b/docs/en_US/release_notes_6_11.rst index 0afc1eede..4c5d48ea6 100644 --- a/docs/en_US/release_notes_6_11.rst +++ b/docs/en_US/release_notes_6_11.rst @@ -20,6 +20,7 @@ Bug fixes ********* | `Issue #7411 `_ - Fixed an issue where the Database restriction is not working. + | `Issue #7423 `_ - Fixed an issue where there is no setting to turn off notifications in the Query Tool. | `Issue #7441 `_ - Ensure that the Query Editor should be focused when switching between query tool tabs. | `Issue #7443 `_ - Fixed and issue where 'Use spaces' not working in the query tool. | `Issue #7468 `_ - Skip the history records if the JSON info can't be parsed instead of showing 'No history'. diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx index 446ad8729..141cfdf77 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx @@ -139,6 +139,10 @@ export class ResultSetUtils { this.eventBus = eventBus; } + setQtPref(pref) { + this.qtPref = pref; + } + setStartData(data) { this.startData = data; } @@ -314,7 +318,9 @@ export class ResultSetUtils { this.eventBus.fireEvent(QUERY_TOOL_EVENTS.SET_MESSAGE, httpMessage.data.data.result || 'Execution Cancelled!', true); this.eventBus.fireEvent(QUERY_TOOL_EVENTS.EXECUTION_END); } - Notifier.success(msg); + if(this.qtPref?.query_success_notification) { + Notifier.success(msg); + } if(!ResultSetUtils.isQueryStillRunning(httpMessage)) { this.eventBus.fireEvent(QUERY_TOOL_EVENTS.PUSH_HISTORY, { status: true, @@ -750,6 +756,7 @@ export function ResultSet() { const [rowsResetKey, setRowsResetKey] = useState(0); rsu.current.setEventBus(eventBus); + rsu.current.setQtPref(queryToolCtx.preferences?.sqleditor); const isDataChanged = ()=>{ return Boolean(_.size(dataChangeStore.updated) || _.size(dataChangeStore.added) || _.size(dataChangeStore.deleted)); diff --git a/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py b/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py index ace48392f..da7ffc346 100644 --- a/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py +++ b/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py @@ -323,6 +323,15 @@ def register_query_tool_preferences(self): ) ) + self.query_success_notification = self.preference.register( + 'display', 'query_success_notification', + gettext("Show query success notification?"), 'boolean', True, + category_label=PREF_LABEL_DISPLAY, + help_str=gettext('If set to True, the Query Tool ' + 'will show notifications on successful query ' + 'execution.') + ) + self.preference.register( 'keyboard_shortcuts', 'execute_query',