Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filebrowser in Chrome v42+ #164

Closed
Goeny opened this issue May 3, 2015 · 58 comments
Closed

Filebrowser in Chrome v42+ #164

Goeny opened this issue May 3, 2015 · 58 comments

Comments

@Goeny
Copy link

Goeny commented May 3, 2015

As of Chrome v42 java is disabled and will be removed from future use in Google Chrome Browser.
At this point it is possible to walkaround this problem using the NPAPI.
However,.. This option will be removed by Google Chrome aswell around september 2015 (maybe sooner) which will result in a non-functioning file-browser in Google Chrome.

Will there be a solution created in this theme? Or should this be adressed to the Webmin/Virtualmin developers?

@iliajie
Copy link
Collaborator

iliajie commented May 3, 2015

I was thinking of this already as I don't use that Java File-browser...Urff..

I will see. Maybe, I will integrate it sometime later. I just release version 12 of the theme and need to do some other things.

If people get more involved and the theme becomes default, I will surely try me best to implement it, along with other things.

@iliajie iliajie closed this as completed May 3, 2015
@Real-Gecko
Copy link

Ive developed file manager for Webmin/Virtualmin, its written purely in perl.
https://github.com/Real-Gecko/filemin

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

Can you please post screenshots in your repo?

@Goeny
Copy link
Author

Goeny commented May 4, 2015

And perhaps instructions how to install them in webmin? Would love to try this out and do some testing.

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

That's right!

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

..but I think you just have to copy it to /usr/libexec/webmin.. I'll try..

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

I tried it. Not bad, really!! But it requires a lot of work to be done. For myself, I find faster to use console. Besides for console, there is mc (Midnight Commander), - and that guy is TOTAL kick ass for anything, I have ever used.

Nevertheless, I believe that your work will be appreciated by many people, including me, as running file manager without Java would be a good idea, even just with basic functions!

Few things, 1. images should no contain css and js files. Rename folder for images, let's say pictures to avoid problems with Authentic Theme. Nice work, keep improving it!

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

Besides, I can add sorting for table headers and it will make sorting work!

Other things you should do, from my point of view:

  1. NO DEPENDENCIES! Every time you call use make sure to make locally available those modules. Make sure that your script will check if user already have them installed and in that case use those that user system already have. In case there is no need module, load one from local folder.
  2. As Authentic Theme supports icons now, you could make your top icons print using icons_table and generate_icon. You can see of how it's done in different modules. Then a user will be able to choose which style of icons user wants and I will be able to make those icons look very beautiful.
  3. Make plain checkbox click act as normal, not as right now.
  4. Make those alerts a Bootstrap confirmation like. Authentic has all of this. When all of this done and working, I will talk with *min team and as them what to do next.

Upload at the moment results in Perl execution error.

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

It's a very cool thing!! I'm starting to like you file-manager more and more!

Try running in the console to following (not for the top frame but for page(index.cgi)): :D

$.fn.dataTableExt.sErrMode = 'throw';
$('#list_form > table').dataTable({
    "order": [],
    "aaSorting": [],
    "bDestroy": true,
    "bPaginate": false,
    "bInfo": false,
    "destroy": true,
    "oLanguage": {
        "sSearch": " "
    }
});

The above will initialize dataTables for you. (filesize will not work correctly at the moment but can be fixed later.)

Besides, I could make all of those file listing you got, being searchable with left search (autocomplete) field.

@Real-Gecko
Copy link

Well I prefer mc myself, but the basic idea behind filemin module was to provide users quick access to their home folders, so for example they can quickly download archived public_html for backup purposes or quickly add new images for their theme etc.

Images folder contains js and css cause I had an interesting issue under CentOS 7 - when you install module from wbm.gz Webmin says that "module css" and "module js" have no "module.info" file and so filemin is not installed. That was really wierd for me, so I moved theese two folders under images. However testing under Ubuntu does not give such an error. So Id be happy if people help me to test. So now I think Ill move my "images" folder to "icons" folder, this will make filemin compatible with your theme :)

@Real-Gecko
Copy link

About dependencies: each system (CentOS, Ubuntu, Debian) has it`s own modules installed by default. Is it possible to check for required perl modules during installation?

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

  1. Try putting css and js under unauthenticated folder.
  2. Yes, it's possible. Edit module.info and put there the following (something line that):

depends=File::MimeInfo File::Basename 1.730

3 . Icons folder should be fine!

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

This is how your top icons should look/be controlled like, using mentioned functions. See the screen shots here:

webmin/webmin#183 (comment)

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

Few more:

  1. Make files/dirs be renamed inline, without pop-up.
  2. Put ~ / in a button like and make it editable and submimttalbe, so people could write the path they want by hand. Autosugestions on the path, while typing, would also be nice but it's a bit harder.

@Goeny
Copy link
Author

Goeny commented May 4, 2015

Well, this made me very curious. But cloning the filemanager in the webmin folder (On Debian it is: /usr/share/webmin) does not give me a new filemanager and/or a link to the filemanager.

Am is supposed to copy it to the "file" directory?
What is the way to implement it?

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

@Goeny You have to activate it by going to Webmin Users (or clicking on the icon next to logout) and enabling it in Available Webmin modules

@Goeny
Copy link
Author

Goeny commented May 4, 2015

Ah.. found it!.
It does load now, but for some reason none of the images will load correctly.

When i click the upper "./" the filemanager reloads and i see the images appear. But in a split second all images will be gone.

1 sec after Filemin reloads:
filemin2

1 second later:
filemin1

According to Chrome inspector i get a 404 error on the images.

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

@Goeny no worries, it's what Authentic Theme does. Author knows it. When he moves icons under icons folder or make icons work using generate_icon - it will be fine.

@Real-Gecko
Copy link

What error do you get when try to upload a file?

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

500 Error - Perl execution failed
Can't open /root/ for writing - Is a directory at /usr/libexec/webmin/filemin/upload.cgi line 26.

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

+1 One more when doing cut:

500 Error - Perl execution failed
unable to create tmpdir No such file or directory at /usr/libexec/webmin/filemin/cut.cgi line 11.

..and same on copy.

@Real-Gecko
Copy link

Ah yes I think I understand.
File uploading is not really intuitive - first you need to select files for upload by clicking "Browse for Upload", and then click "Upload files" to actually upload them. I think I will add javascript alert if nothing selected for upload.

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

No, it's not the cause! I selected some files, clicked Upload and same error here.

Please don't use alerts. Use Bootstrap modals - http://bootboxjs.com/ - scrolldown to see Prompt example.

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

... and why I can't go higher than my root directory?

@Real-Gecko
Copy link

Hmmm, well, I tried to avoid using extra libraries as jQuery or Bootstrap as mentioned here:
http://doxfer.webmin.com/Webmin/Module_Development
' Keep use of Javascript and DHTML to a minimum where possible. This ensures that your module will work on a wide variety of browsers, even those on mobile devices that only support plain old HTML.'
That`s why javascript in my module is so dumb :)
Maybe putting data inside notifications area near quickbuttons is a decision?

@Real-Gecko
Copy link

Locking user inside his "home" was a security measure, to prevent one from poking around whole filesystem. I was thinking about it and planning to add module configuration to make "root" path configurable as it is done in original File module.

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

Well, this tutorial is a bit outdated. My theme has both jQuery and Bootstrap. It will work anyway. There are no browsers that support plain old HTML - that is ridiculous try to support it (old and nasty browsers like IE6).

I would strongly recommend using it. Otherwise it will not be user friendly. And the lest popups (alert) - the better. Try using AJAX calls to update page's content.

..and about security mesures, just before switching to another directory, check if it (directory or file) can be read. User can always use Command Shell to issue cat or ls on any directory/file.

@Real-Gecko
Copy link

Agreed, supporting crap like IE6 is stupid. So if jQuery will become standart in Webmin ui it will be really cool.

@Real-Gecko
Copy link

I close acces to command shell for my users, so filemin is a good option for them :D

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

If/When my theme becomes default (it's already in webmin package), it will be there anyway. Besides no one says you can't use jQuery yourself right now.

.. I see but root user shouldn't have difficulties going anywhere he/she wants.

@Real-Gecko
Copy link

Well, thanks for all your support! I am glad to see my project interested someone :)
What about we continue discussion in filemin issue queue?
Can you, please, create issues with your ideas and critics there?

@iliajie
Copy link
Collaborator

iliajie commented May 4, 2015

Alrglight, I will. Please update to the next version and I will do a bit after that point.

@Real-Gecko
Copy link

generate_icon() gives "image not found".
I tried everything
/filemin/unauthenticated/icons/quick/select-all.png
filemin/unauthenticated/icons/quick/select-all.png
/unauthenticated/icons/quick/select-all.png
unauthenticated/icons/quick/select-all.png
generate_icon('unauthenticated/icons/quick/select-all.png') works fine under for example "MSC.Linux theme" and simple print of <img src="unauthenticated/icons/quick/select-all.png"> works fine too.

@iliajie
Copy link
Collaborator

iliajie commented May 5, 2015

The page Webmin->Webmin Configuration, here is the example of how the icons are printed using &icons_table

my (@wlinks, @wtitles, @wicons);
@wlinks = ( "edit_access.cgi", "edit_bind.cgi", "edit_log.cgi",
        "edit_proxy.cgi", "edit_ui.cgi", "edit_mods.cgi",
        "edit_os.cgi", "edit_lang.cgi", "edit_startpage.cgi",
        "edit_upgrade.cgi", "edit_session.cgi", "edit_twofactor.cgi",
        "edit_assignment.cgi",
        "edit_categories.cgi", "edit_descs.cgi", "edit_themes.cgi",
        "edit_referers.cgi", "edit_anon.cgi", "edit_lock.cgi",
        "edit_mobile.cgi", "edit_blocked.cgi", "edit_status.cgi",
        "edit_advanced.cgi", "edit_debug.cgi", "edit_web.cgi",
        "edit_webmincron.cgi", );
@wtitles = ( $text{'access_title'}, $text{'bind_title'},
         $text{'log_title'}, $text{'proxy_title'},
         $text{'ui_title'}, $text{'mods_title'},
         $text{'os_title'}, $text{'lang_title'},
         $text{'startpage_title'}, $text{'upgrade_title'},
         $text{'session_title'}, $text{'twofactor_title'},
         $text{'assignment_title'},
         $text{'categories_title'}, $text{'descs_title'},
         $text{'themes_title'}, $text{'referers_title'},
         $text{'anon_title'}, $text{'lock_title'},
         $text{'mobile_title'}, $text{'blocked_title'},
         $text{'status_title'}, $text{'advanced_title'},
         $text{'debug_title'}, $text{'web_title'},
         $text{'webmincron_title'}, );
@wicons = ( "images/access.gif", "images/bind.gif", "images/log.gif",
        "images/proxy.gif", "images/ui.gif", "images/mods.gif",
        "images/os.gif", "images/lang.gif", "images/startpage.gif",
        "images/upgrade.gif", "images/session.gif", "images/twofactor.gif",
        "images/assignment.gif", "images/categories.gif",
        "images/descs.gif", "images/themes.gif", "images/referers.gif",
        "images/anon.gif", "images/lock.gif", "images/mobile.gif",
        "images/blocked.gif", "images/status.gif",
        "images/advanced.gif", "images/debug.gif", "images/web.gif",
        "images/webmincron.gif", );

push(@wlinks, "edit_ssl.cgi", "edit_ca.cgi");
push(@wtitles, $text{'ssl_title'}, $text{'ca_title'});
push(@wicons, "images/ssl.gif", "images/ca.gif");

&icons_table(\@wlinks, \@wtitles, \@wicons);

@Real-Gecko
Copy link

No images any way. They all are replaced with /images/not_found.svg

@iliajie
Copy link
Collaborator

iliajie commented May 5, 2015

Ahh. ok! Then you're doing everything right! Put icons please to authentic-theme/images/modules/filemin or don't use images for your folder name, try icons.

@Real-Gecko
Copy link

Icons are now in my modules unauthenticated/icons and unauthenticated/icons/quick neither do work :(

@iliajie
Copy link
Collaborator

iliajie commented May 5, 2015

Remove unauthenticated and leave just icons, with or without slash.

@iliajie
Copy link
Collaborator

iliajie commented May 5, 2015

Any luck!?

@Real-Gecko
Copy link

Sorry I'm on another computer and cannot check things right now, I think I will continue tomorrow.
By the way, I've noticed that when some long operations like modules update or new virtual server creation occurs, there is no output within your theme. Actually output is there but it is overlayed with throbbler.

@iliajie
Copy link
Collaborator

iliajie commented May 5, 2015

With output? Could you explain!

@Real-Gecko
Copy link

Here, we create the new virtual server
123 - process started
124 - and as it goes new messages appear
Now let's try deleting
125 - process started
126 - new messages appear as stages of deletion complete and when the whole process finished there is a "Go back" link at the bottom.

@iliajie
Copy link
Collaborator

iliajie commented May 5, 2015

You mean that you don't see it printing but only final result?

@Real-Gecko
Copy link

yes

@iliajie
Copy link
Collaborator

iliajie commented May 5, 2015

Will try fixing it

@Real-Gecko
Copy link

I have an interesting issue:
Almost all links in my module's interface have "javascript:void(0)" in "href", so clickin them triggers javascript functions. Clicking links in top-right toolbar(№1 on screenshot 1) works fine, while clicking any link inside file list table(№2 on screenshot 1) triggers bound javascript function and also initiates throbbler that never ends(screenshot 2)
1
2
Is there any way to avoid this?

@iliajie
Copy link
Collaborator

iliajie commented May 6, 2015

You can disable spinner using settings. Or just double click it when it appears. I will fix it when you have more or the less stable version.

@Real-Gecko
Copy link

OK, here it is
https://github.com/Real-Gecko/filemin/blob/master/install/filemin.wbm.gz?raw=true
Version 0.8.2 is ready to rumble :D
Icons are still generated by simply printing html, rename does not work under Authentic cause of spinner, however there's a button in top-bar that can rename "openlayers" file or folder to anything you want as a proof of concept. Fixed issues with "copy/cut/paste". Inline editing not implemented yet, I think bugfixes for now are more important.
BEWARE: there is no overwrite confirmations during pack/unpack/paste, exsiting files may be overwritten during theese procedures, proceed with caution.

@Real-Gecko
Copy link

By the way, about icons: in Authentic almos all icons are greyed, can it be switched off? Color of the icons is good for quick orientation on the page, with all of them greyed I feel lost.

@iliajie
Copy link
Collaborator

iliajie commented May 6, 2015

Yes. You can turn it off in settings using settings_right_grayscaled_table_icons. I'm working on settings now so users could use Webmin interface to do it.

Looking at your filemanager in a bit.

@Goeny
Copy link
Author

Goeny commented May 6, 2015

I've installed the newer version. A lot improved since the first one and i really think it is a huge improvement compared to the java filemanager.
Issues i have experienced while playing around with it:

  • only 10 items in the table is to few. I'd rather scroll through all files instead of switching pages after each 10 items.
  • The 10 items viewed can be set to 25-50-100. but this setting is not remembered as soon as you open another folder. Perhaps default set to 50, or as i mentioned earlier, get rid of the pages and use a scrollbar?
  • When uploading files, they end up in the users home folder instead of the active folder.
  • Looking at some icons, it's not clear as what they are supposed to do. Perhaps put the tooltip-text under/above or over the icon so it is clear before hover? Or choose other icons altogether?

I will make some time this afternoon to check it out some more and place these, and possible other, issues in the issue section on your filemin repo.

Thanks for all the hard work you guys are doing!

@Real-Gecko
Copy link

Rolled out some changes:
https://github.com/Real-Gecko/filemin/blob/master/install/filemin.wbm.gz?raw=true
Default page size is 50 now, added tooltips for icons.
Can you, please, provide scenario to reproduce upload bug?

@Goeny
Copy link
Author

Goeny commented May 6, 2015

i.e: When logged in as root.
browse to: /home/johndoe/Documents/
Upload file: example.jpg

example.jpg will be uploaded to home directory of root.

@Real-Gecko
Copy link

Can not reproduce, maybe fixed already. Can you, please, retest with v0.8.3?

@Goeny
Copy link
Author

Goeny commented May 6, 2015

tested again.. seems ok now.

@Real-Gecko
Copy link

Hi, nice bugfixes in the latest release :)
Renaming files now works fine, however clicking filename that leads to file download still initiates spinner. I've switched it off in theme settings, that's great, however I've noticed that theme settings reseted after theme update from 13.0 to 13.01

@iliajie
Copy link
Collaborator

iliajie commented May 25, 2015

Ahh.. Ok. New features, new conflicts. I have updated the code and re-uploaded it. Just reinstall the theme and it will work. Clear cache to be sure. You can re-enable the spinner.

We have conflicting colors on rows select. I use class hl-aw with color: #ffffe9.

I couldn't reproduce loss of current settings. Everything is stored on my side.

@Real-Gecko
Copy link

OK, thanks.
I'll update my css to avoid color conflicts in next release.
Well it is strange, but I changed theme setting not to animate icons and not to greycale 'em.
And after quick fix 13.01 released this settings reseted.
I think we'll know exactly was it local glitch or something else on next theme update :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants