Re: [pgAdmin4][Patch]: File Manager & Backform FileControl

Поиск
Список
Период
Сортировка
От Neel Patel
Тема Re: [pgAdmin4][Patch]: File Manager & Backform FileControl
Дата
Msg-id CACCA4P3s_TAbNP+piWawJA7dg1eS194MC0RGoHh461e1=cUAWw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [pgAdmin4][Patch]: File Manager & Backform FileControl  (Neel Patel <neel.patel@enterprisedb.com>)
Ответы Re: [pgAdmin4][Patch]: File Manager & Backform FileControl  (Surinder Kumar <surinder.kumar@enterprisedb.com>)
Список pgadmin-hackers
Hi Surinder,

Please find additional comments as below.

1.  In Windows OS, when we try to open the dialog with default preference value then it gives error as below.

2016-04-28 13:07:44,716: ERROR  pgadmin:        Exception on /file_manager/filemanager/2530270/ [POST]
Traceback (most recent call last):
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask\app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask\app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask\app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask\app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask\app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask_login.py", line 758, in decorated_view
    return func(*args, **kwargs)
  File "C:\Projects\pgadmin4\web\pgadmin\misc\file_manager\__init__.py", line 629, in file_manager
    return getattr(myFilemanager, mode)(**kwargs)
  File "C:\Projects\pgadmin4\web\pgadmin\misc\file_manager\__init__.py", line 421, in getfolder
    filelist = self.list_filesystem(dir, path, trans_data, file_type)
  File "C:\Projects\pgadmin4\web\pgadmin\misc\file_manager\__init__.py", line 331, in list_filesystem
    for f in sorted(os.listdir(orig_path)):
WindowsError: [Error 161] The specified path is invalid: '//*.*'


2. Folder having write only permission should not allow to read the directory. Same way read only permission folder should not allow to create the folder.     Currently it gives below error.

   PermissionError: [Errno 13] Permission denied: '/home/neel/Projects/pgadmin4_file_manager/write_only_premission/'

3. In Windows OS, when we open the file manager dialog, no directories listed though we have directories in the folder. Due to that we are not able to 
    test all the functionality in windows. Once we fix this issue then we test all the functionality in windows OS.
   
   We debug the issue and found that issue is with the json response which includes the HTML tags.

4. In Windows OS, file manager dialog have issue with layout. We are getting some margin at top before buttons.

5. When we give any special characters to folder name that it gives error saying "Folder does not exist".
    Same is applicable when we give dialog_type to create_file
   
6. In create_file mode, after giving the filename it should display the name of the file to text control.

7. In create_file mode, when user gives the filename and click on the any blank area of dialog then name is getting cleared.

8. When we upload the new file through file manager then it is not showing in the list though we have selected "All files" options.

9. When we rename the folder in "Table mode" then font-family gets changed. It is not happened in "Grid" mode.

10. When we try to download the file then it goes into loop and opens up 20-30 dialogs at the same time.

11. "Rename" button is enabled even though we have not selected the files/folder to rename and when we click on the "Rename" button it gives below 
     error.

    TypeError: orig_value is undefined
12. "Delete" button is enabled even though we have not selected the files/folder to delete and when we click on the "Delete" button it gives below error.
     TypeError: path is undefined

Do let us know if you have queries.

Thanks,
Neel Patel

On Wed, Apr 27, 2016 at 9:15 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi Surinder,

I have applied the patch file and below are some observations.
  • When we create the new folder and hit the enter then we are getting the below error.
                  TypeError: argument of type 'NoneType' is not iterable
  • I have just added the new control in "Import" dialog and observed that new control is getting added in new tab called "General". I think it should not create the new "General" tab.
  • "Select" and "Cancel" buttons font is different then other dialogs.

Thanks,
Neel Patel

On Wed, Apr 27, 2016 at 6:18 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
Hi,

The patch is for File Manager and Backform FileControl.

File Manager: It allows user to store their files at one place. The user can set path to this directory in preferences which file manger will use.

It will be used by various modules of pgAdmin4 such as
import data from file, query tool, backup & recovery tool so on.. It allows user to perform various operations such as: 
  • File deletion
  • File upload
  • Create new directory
  • File rename
  • File download and 
  • List files & folders in list and grid view.
FileControlThis control is used with File Manager. It can be used for:
  • File Selection            
  • Folder Selection      
  • File Creation             
  • Storage Manager Dialog.( it supports all operations listed above).

Usage:

schema:[{
  id: 'select_file', label: '{{ _('Select File')}}', 
  type: 'text', controlBackform.FileControl,
  dialog_type: 'select_file'supp_types: ['*', 'pdf', 'text', 'patch', 'py']
}

Where:
  • control - It should be Backform.FileControl
  • dialog_type - the type of dialog to use.
  • options can be:  select_file, select_folder, create_file & storage_dialog.
  • supp_types(not mandatory) - the types of files allowed to show and upload.
Please review the patch and let me know for the review comments.


Thanks
Surinder Kumar


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Khushboo Vashi
Дата:
Сообщение: Re: [PATCH] Tables node (pgAdmin4)
Следующее
От: Surinder Kumar
Дата:
Сообщение: [pgAdmin4][Patch]: Remove default extraclass from the SqlFieldControl