cdgco / HestiaWebInterface

[Beta] PHP interface for HesitaCP, providing a beautiful UI, UX, features & integrations.
https://hwi.cdgtech.one
GNU General Public License v3.0
26 stars 9 forks source link

To-Do List #1

Open cdgco opened 4 years ago

cdgco commented 4 years ago

Everything from VestaCP has been converted over to HestiaCP, however there are a number of HestiaCP specific features that still need to be implimented in HWI including:

kgnfth commented 4 years ago

demo page does nt log you in

cdgco commented 4 years ago

@kgnfth Sorry, one of our servers died the other day and I thought I got everything back online, but apparently the demos needed to be fixed. You should be able to log in now. Thanks for letting me know!

DanialNikbin commented 4 years ago

Please add a file manager it's very crucial.

cdgco commented 4 years ago

@DanialNikbin While there isn't built-in integration to the file manager yet, you can install the vwi-ftp plugin to add a WebFTP client to your control panel in the mean time.

I will note though, that the plugin has not been tested with HWI yet, so while it should be compatible, it is possible there will be errors that will need to fixed in order for it to work completely with HWI.

DanialNikbin commented 4 years ago

Can I use it for Hestia? HestiaCP itself has a simple builtin file manager.

cdgco commented 4 years ago

Just glancing at the files before I actually test it, it looks like it should work perfectly.

The other temporary option if you would like to use the built in file manager would be to set the file manager link https://DOMAIN:8083/fm/ as your FTP client url in the HWI settings, then it will show up in the apps section of the menu. This however is not great as the integration is not seamless and requires second authentication.

I will test the plugin and look into building integration with the file manager, however, syncing user authentication between the front end of both control panels can be tricky so it may not be done for some time.

cdgco commented 4 years ago

@DanialNikbin Looks like the WebFTP plugin works as long as you change the line $ftpHost = VESTA_HOST_ADDRESS; to $ftpHost = HESTIA_HOST_ADDRESS; at the top of the ftp/ftp.php file in the plugin

DanialNikbin commented 4 years ago

Yeah worked with that. Would be great if you could make a file manager that also supports online file editing and adding it to the sidebar menu.

cdgco commented 4 years ago

@DanialNikbin The plugin does support online editing for a user defined list of files, which by default are "asp,ashx,asmx,aspx,asx,axd,cfm,cgi,css,html,htm,jhtml,js,php,phtml,pl,txt,xhtml,htaccess,log,crt,key,less,scss,md,sql,json", but I will work on integrating the built in file manager.

cdgco commented 4 years ago

It may not be apparent at first, the edit button is under the right click context menu for compatible files.

DanialNikbin commented 4 years ago

I see, perfect. Does it support zipping and unzipping?

cdgco commented 4 years ago

No. While it does download folders and groups of files as zips, there is no built in zip / unzip function.

DanialNikbin commented 4 years ago

I think the best option for HWI is to integrate it with HestaCP builtin file manager. It has the main features and it's design is also nice.

cdgco commented 4 years ago

@DanialNikbin I just ported over the File Manager into a plugin for HWI available here. There are some small changes I plan to make in the future, and I just finished writing this, so let me know if you run into any problems.

DanialNikbin commented 4 years ago

I just installed it but there is a problem, when I login in file manager it says Folder not writable: /private/logs/

cdgco commented 4 years ago

@DanialNikbin Sorry, I realized after I went to bed last night that I forgot to update the instructions.

In order to give the server write permissions, you need to use the following command chmod -R 755 plugins/fm/{private,repository} and possibly the command chown -R USERNAME:USERNAME /home/admin/web where USERNAME is the name of the account that owns the domain if you are hosting HWI on a HestiaCP server.

DanialNikbin commented 4 years ago

Yeah worked thanks. Can we make this file manager as a primary option and not under apps?

cdgco commented 4 years ago

I can move it to a different section in the menu, but seeing as it's an external app, I feel like it makes sense to place it under apps.

DanialNikbin commented 4 years ago

I would appreciate if you tell me how to add it as a primary menu.

cdgco commented 4 years ago

There is currently no system in place to accomplish that. You can edit the manifest.xml file in the fm directory and change section to apps, administration, or account, but there is no option to add it to the primary menu. That would require an update of HWI and the entire plugin system, not just the plugin itself.

DanialNikbin commented 4 years ago

I see. If I want to add the menu manually by code which file should I edit?

cdgco commented 4 years ago

The menu is generated in the includes/includes.php file under the function primaryMenu($l4, $l5, $a2) where $l5 is the path to the root of HWI.

DanialNikbin commented 4 years ago

I'm trying to make the fm auto login. The problem is getting the user password.

cdgco commented 4 years ago

Any connection to the HestiaCP filesystem requires active authentication. If you are the only one using the file manager, and don't care about storing your password in plain text, you could define the password in fm/configuration.php as $ftp_cred and access the file manager directly at /fm/app/, but I do not reccommend that, as the current configuration uses multiple levels of encryption and active authorization which would be bypassed.

DanialNikbin commented 4 years ago

Thanks I may implement something else for that, will let you know. The file manager editor has a weird issue, when I edit a file it opens it by appending 4 new lines.

cdgco commented 4 years ago

I'll take a look, but I wasn't experiencing that yesterday, and I used the exact same package and version that HestiaCP uses for their file manager.

cdgco commented 4 years ago

I noticed that my system is prepending files with 2 lines. I updated the package and tried editing the configuration but coundn't find any solution. I believe it may have something to do with the file server and client using different connection methods, but I have contacted the package maintainer to see if they have a solution.

DanialNikbin commented 4 years ago

I found a bug on chrome. I'm unable to login to HWI using google chrome, when I press login button it returns to login page again. It maybe a session problem.

cdgco commented 4 years ago

Try changing session_set_cookie_params(['samesite' => 'none']); to ini_set('session.cookie_samesite', 'None'); at the top of login.php and seeing if that works. If that doesn't work, try removing the samesite tag altogether.

Chrome changed the default cookie values this year and I believe there's a PHP bug with the way it handles setting cookie paramaters. I had seen this issue once before but hadn't taken the time to dive into it yet.

DanialNikbin commented 4 years ago

Removing that tag solved the issue.

cdgco commented 4 years ago

Hopefully that tag only needs to be changed on the login page, but I'll add that to the next update. Are you using PHP 7.3+ by the way? From what I can see this bug is only present in those versions.

DanialNikbin commented 4 years ago

Yeah I'm using php 7.4

cdgco commented 4 years ago

@DanialNikbin I just released a new version of the file manager plugin which fixes the new line error.

I have also updated HWI to fix the errors with PHP-FPM and PHP 7.3+ although I have not published a release package yet.

DanialNikbin commented 4 years ago

@cdgco Does Let's Encrypt auto SSL work?