mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Port the file/storage manager to React. Fixes #7313
2) Allow users to delete files/folders from the storage manager. Fixes #4607 3) Allow users to search within the file/storage manager. Fixes #7389 4) Fixed an issue where new folders cannot be created in the save dialog. Fixes #7524
This commit is contained in:
committed by
Akshay Joshi
parent
4585597388
commit
4808df5e95
@@ -19,6 +19,7 @@ import OrigCodeMirror from 'bundled_codemirror';
|
||||
import Notifier from '../../../../../../static/js/helpers/Notifier';
|
||||
import { isMac } from '../../../../../../static/js/keyboard_shortcuts';
|
||||
import { checkTrojanSource } from '../../../../../../static/js/utils';
|
||||
import { parseApiError } from '../../../../../../static/js/api_instance';
|
||||
|
||||
const useStyles = makeStyles(()=>({
|
||||
sql: {
|
||||
@@ -294,7 +295,7 @@ export default function Query() {
|
||||
eventBus.registerListener(QUERY_TOOL_EVENTS.LOAD_FILE, (fileName)=>{
|
||||
queryToolCtx.api.post(url_for('sqleditor.load_file'), {
|
||||
'file_name': decodeURI(fileName),
|
||||
}).then((res)=>{
|
||||
}, {transformResponse: [(data) => { return data; }]}).then((res)=>{
|
||||
editor.current.setValue(res.data);
|
||||
//Check the file content for Trojan Source
|
||||
checkTrojanSource(res.data);
|
||||
@@ -302,7 +303,7 @@ export default function Query() {
|
||||
eventBus.fireEvent(QUERY_TOOL_EVENTS.LOAD_FILE_DONE, fileName, true);
|
||||
}).catch((err)=>{
|
||||
eventBus.fireEvent(QUERY_TOOL_EVENTS.LOAD_FILE_DONE, null, false);
|
||||
eventBus.fireEvent(QUERY_TOOL_EVENTS.HANDLE_API_ERROR, err);
|
||||
Notifier.error(parseApiError(err));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user