diff --git a/docs/en_US/release_notes_9_12.rst b/docs/en_US/release_notes_9_12.rst index 7eb505061e1..15cccb87f2b 100644 --- a/docs/en_US/release_notes_9_12.rst +++ b/docs/en_US/release_notes_9_12.rst @@ -20,12 +20,15 @@ Bundled PostgreSQL Utilities New features ************ + | `Issue #8890 `_ - Add a new button in the query tool data output toolbar to get entire range of data. + Housekeeping ************ Bug fixes ********* -| `Issue #9380 `_ - Fixed an issue where the Query History panel would auto-scroll to the top and did not preserve the scroll bar position for the selected entry. + + | `Issue #9380 `_ - Fixed an issue where the Query History panel would auto-scroll to the top and did not preserve the scroll bar position for the selected entry. diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSetToolbar.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSetToolbar.jsx index 1f831374f8f..2c49ac0b769 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSetToolbar.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSetToolbar.jsx @@ -24,6 +24,7 @@ import SkipPreviousRoundedIcon from '@mui/icons-material/SkipPreviousRounded'; import EditRoundedIcon from '@mui/icons-material/EditRounded'; import EditOffRoundedIcon from '@mui/icons-material/EditOffRounded'; import CheckRoundedIcon from '@mui/icons-material/CheckRounded'; +import AllInboxRoundedIcon from '@mui/icons-material/AllInboxRounded'; import {QUERY_TOOL_EVENTS} from '../QueryToolConstants'; import { QueryToolContext, QueryToolEventsContext } from '../QueryToolComponent'; @@ -114,11 +115,15 @@ function PaginationInputs({pagination, totalRowCount, clearSelection, serverCurs pageCount: pagination.page_count ?? 0, }); + const fetchWindow = (from, to) => { + eventBus.fireEvent(QUERY_TOOL_EVENTS.FETCH_WINDOW, from, to); + clearSelection(); + }; + const goToPage = (pageNo)=>{ const from = (pageNo-1) * pagination.page_size + 1; const to = from + pagination.page_size - 1; - eventBus.fireEvent(QUERY_TOOL_EVENTS.FETCH_WINDOW, from, to, serverCursor); - clearSelection(); + fetchWindow(from, to); }; const onInputChange = (key, value)=>{ @@ -128,7 +133,7 @@ function PaginationInputs({pagination, totalRowCount, clearSelection, serverCurs const onInputKeydown = (e)=>{ if(e.code === 'Enter' && !errorInputs.from && !errorInputs.to) { e.preventDefault(); - eventBus.fireEvent(QUERY_TOOL_EVENTS.FETCH_WINDOW, inputs.from, inputs.to); + fetchWindow(inputs.from, inputs.to); } }; @@ -204,33 +209,48 @@ function PaginationInputs({pagination, totalRowCount, clearSelection, serverCurs error={errorInputs['to']} /> : {gettext('Showing rows: %s to %s', inputs.from, inputs.to)}} - - {!serverCursor && editPageRange && eventBus.fireEvent(QUERY_TOOL_EVENTS.FETCH_WINDOW, inputs.from, inputs.to)} - disabled={errorInputs.from || errorInputs.to} icon={} - />} - {!serverCursor && setEditPageRange((prev)=>!prev)} - icon={editPageRange ? : } - />} - -
 
- {gettext('Page No:')} - onInputChange('pageNo', value)} - onKeyDown={onInputKeydownPageNo} - error={errorInputs['pageNo']} - /> - {gettext('of')} {pagination.page_count} + {!serverCursor && <> + + {editPageRange && fetchWindow(inputs.from, inputs.to)} + disabled={errorInputs.from || errorInputs.to} icon={} + />} + setEditPageRange((prev)=>!prev)} + icon={editPageRange ? : } + /> + +
+ + { + onInputChange('from', 1); + onInputChange('to', totalRowCount); + fetchWindow(1, totalRowCount); + }} + icon={} + /> + +
 
+ {gettext('Page No:')} + onInputChange('pageNo', value)} + onKeyDown={onInputKeydownPageNo} + error={errorInputs['pageNo']} + /> + {gettext('of')} {pagination.page_count} + }
 
goToPage(1)} icon={}/> diff --git a/web/pgadmin/translations/it/LC_MESSAGES/messages.po b/web/pgadmin/translations/it/LC_MESSAGES/messages.po index 7b9e53ff1de..1b0906e1709 100644 --- a/web/pgadmin/translations/it/LC_MESSAGES/messages.po +++ b/web/pgadmin/translations/it/LC_MESSAGES/messages.po @@ -778,9 +778,6 @@ msgid "" "can provide any string with or without placeholders of their choice. A blank " "title will revert to the default." msgstr "" -"I segnaposto supportati sono %FUNCTION%, %ARGS%, %SCHEMA% e %DATABASE%. Gli " -"utenti possono specificare qualsiasi stringa con o senza segnaposto a loro " -"scelta. Un titolo vuoto tornerĂ  al valore predefinito." #: pgadmin/browser/register_browser_preferences.py:456 #: pgadmin/browser/static/js/collection.js:57 pgadmin/browser/static/js/node.js:215 diff --git a/web/regression/feature_utils/pgadmin_page.py b/web/regression/feature_utils/pgadmin_page.py index a0e8aea3206..5f7555cfcac 100644 --- a/web/regression/feature_utils/pgadmin_page.py +++ b/web/regression/feature_utils/pgadmin_page.py @@ -962,9 +962,9 @@ def find_codemirror(driver): action.perform() else: self.driver.execute_script( - "arguments[0].cmView.view.setValue(arguments[1]);" - "arguments[0].cmView.view.setCursor(" - "arguments[0].cmView.view.lineCount(),-1);", + "arguments[0].cmTile.view.setValue(arguments[1]);" + "arguments[0].cmTile.view.setCursor(" + "arguments[0].cmTile.view.lineCount(),-1);", codemirror_ele, field_content) def click_tab(self, tab_name):