mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the user should not be to change the connection when a long query is running. Fixes #6082
This commit is contained in:
parent
c88a63edf8
commit
14dcb70b95
@ -20,6 +20,7 @@ Bug fixes
|
|||||||
|
|
||||||
| `Issue #5519 <https://redmine.postgresql.org/issues/5519>`_ - Ensure that the query tool tab should be closed after server disconnection when auto-commit/auto-rollback is set to false.
|
| `Issue #5519 <https://redmine.postgresql.org/issues/5519>`_ - Ensure that the query tool tab should be closed after server disconnection when auto-commit/auto-rollback is set to false.
|
||||||
| `Issue #6076 <https://redmine.postgresql.org/issues/6076>`_ - Fixed an issue where correct error not thrown while importing servers and JSON file has incorrect/insufficient keys.
|
| `Issue #6076 <https://redmine.postgresql.org/issues/6076>`_ - Fixed an issue where correct error not thrown while importing servers and JSON file has incorrect/insufficient keys.
|
||||||
|
| `Issue #6082 <https://redmine.postgresql.org/issues/6082>`_ - Ensure that the user should not be to change the connection when a long query is running.
|
||||||
| `Issue #6220 <https://redmine.postgresql.org/issues/6220>`_ - Corrected the syntax for 'CREATE TRIGGER', use 'EXECUTE FUNCTION' instead of 'EXECUTE PROCEDURE' from v11 onwards.
|
| `Issue #6220 <https://redmine.postgresql.org/issues/6220>`_ - Corrected the syntax for 'CREATE TRIGGER', use 'EXECUTE FUNCTION' instead of 'EXECUTE PROCEDURE' from v11 onwards.
|
||||||
| `Issue #6293 <https://redmine.postgresql.org/issues/6293>`_ - Fixed an issue where the procedure creation is failed when providing the Volatility option.
|
| `Issue #6293 <https://redmine.postgresql.org/issues/6293>`_ - Fixed an issue where the procedure creation is failed when providing the Volatility option.
|
||||||
| `Issue #6325 <https://redmine.postgresql.org/issues/6325>`_ - Ensure that the file format for the storage manager should be 'All files' and for other dialogs, it should remember the last selected format.
|
| `Issue #6325 <https://redmine.postgresql.org/issues/6325>`_ - Ensure that the file format for the storage manager should be 'All files' and for other dialogs, it should remember the last selected format.
|
||||||
|
@ -13,6 +13,7 @@ import url_for from '../url_for';
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import * as httpErrorHandler from './query_tool_http_error_handler';
|
import * as httpErrorHandler from './query_tool_http_error_handler';
|
||||||
import * as queryTxnStatus from 'sources/sqleditor/query_txn_status_constants';
|
import * as queryTxnStatus from 'sources/sqleditor/query_txn_status_constants';
|
||||||
|
import * as SqlEditorUtils from 'sources/sqleditor_utils';
|
||||||
|
|
||||||
class LoadingScreen {
|
class LoadingScreen {
|
||||||
constructor(sqlEditor) {
|
constructor(sqlEditor) {
|
||||||
@ -76,6 +77,9 @@ class ExecuteQuery {
|
|||||||
if (ExecuteQuery.isSqlCorrect(httpMessageData)) {
|
if (ExecuteQuery.isSqlCorrect(httpMessageData)) {
|
||||||
self.loadingScreen.setMessage('Waiting for the query to complete...');
|
self.loadingScreen.setMessage('Waiting for the query to complete...');
|
||||||
|
|
||||||
|
// Disable drop down arrow to change connections
|
||||||
|
SqlEditorUtils.disable_connection_dropdown(true);
|
||||||
|
|
||||||
self.updateSqlEditorStateWithInformationFromServer(httpMessageData.data);
|
self.updateSqlEditorStateWithInformationFromServer(httpMessageData.data);
|
||||||
|
|
||||||
// If status is True then poll the result.
|
// If status is True then poll the result.
|
||||||
@ -161,6 +165,10 @@ class ExecuteQuery {
|
|||||||
self.loadingScreen.hide();
|
self.loadingScreen.hide();
|
||||||
self.sqlServerObject.update_msg_history(false, 'Execution Cancelled!', true);
|
self.sqlServerObject.update_msg_history(false, 'Execution Cancelled!', true);
|
||||||
}
|
}
|
||||||
|
// Enable connection list drop down again for query tool only
|
||||||
|
if(self.sqlServerObject.is_query_tool && !ExecuteQuery.isQueryStillRunning(httpMessage)){
|
||||||
|
SqlEditorUtils.disable_connection_dropdown(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
).catch(
|
).catch(
|
||||||
error => {
|
error => {
|
||||||
@ -171,6 +179,7 @@ class ExecuteQuery {
|
|||||||
self.sqlServerObject.setIsQueryRunning(false);
|
self.sqlServerObject.setIsQueryRunning(false);
|
||||||
if (self.sqlServerObject.is_query_tool) {
|
if (self.sqlServerObject.is_query_tool) {
|
||||||
self.enableSQLEditorButtons();
|
self.enableSQLEditorButtons();
|
||||||
|
SqlEditorUtils.disable_connection_dropdown(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(error.response) {
|
if(error.response) {
|
||||||
|
@ -57,6 +57,17 @@ define(['jquery', 'underscore', 'sources/gettext', 'sources/url_for'],
|
|||||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Disables arrow to change connection
|
||||||
|
disable_connection_dropdown: function (status) {
|
||||||
|
if (status){
|
||||||
|
$('.conn-info-dd').prop('disabled',true);
|
||||||
|
$('.connection-data').css({pointerEvents: 'none', cursor: 'arrow'});
|
||||||
|
}else{
|
||||||
|
$('.conn-info-dd').prop('disabled',false);
|
||||||
|
$('.connection-data').css({pointerEvents: 'auto', cursor: 'pointer'});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Status flag
|
// Status flag
|
||||||
previousStatus: null,
|
previousStatus: null,
|
||||||
|
|
||||||
|
@ -52,8 +52,6 @@
|
|||||||
|
|
||||||
#editor-panel {
|
#editor-panel {
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
position: absolute;
|
|
||||||
top: $sql-editor-panel-top;
|
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user