chuushi / CoreProtect-Lookup-Web-Interface

A flexible lookup web interface for CoreProtect 2
MIT License
50 stars 14 forks source link

Multiserver Support (and v0.9.0 Bug Catching Spree) #2

Closed ntimo closed 8 years ago

ntimo commented 8 years ago

Hi there,

it would be really awesome if I could add Multiple Server with one panel. So I can specify 2 database connections in the config and name the servers and then select the server to search trough that would be so so amazing.

Thx Timo

chuushi commented 8 years ago

I was thinking about that, but I haven't acted upon it yet so far. It shouldn't be too hard to do. I would recommend having some degree of per-server configuration system.

I'm currently rewriting parts of the code right now to make it more understandable by writing in more comments, using more standard functions, updating some packages used in the project, etc. which should be up within the next 4 days. If you want to give it a shot at adding it, you can try it after I commit the update.

ntimo commented 8 years ago

Hi, I would try to code it myself if I could :) I hope you will add support for this soon ;)

Thx Timo

chuushi commented 8 years ago

Ah, gotcha. I'll be on it soon!

ntimo commented 8 years ago

Nice, thank you so much. For your amazing panel

chuushi commented 8 years ago

Anytime :)

Thank you for taking your time to make an issue! :D

ntimo commented 8 years ago

Sure, I will make another one :D

ntimo commented 8 years ago

@SimonOrJ do you have any news about your v0.9.0 milestone ;)

chuushi commented 8 years ago

I've been busy with life chaos... Sorry about the delay! ._.

I'll make sure to get it done before Saturday. I'm so sorry about that.

chuushi commented 8 years ago

As for the update, I've been replacing the variables in conn.php so far. I plan on fixing the index.php URL updating and an option to do an in-browser (re)configuration before I release v0.9.0. :)

chuushi commented 8 years ago

I've vastly underestimated the time I can take working on this project and the amount of work to do to create a new configuration system. It's getting pretty close to becoming done, though.

ntimo commented 8 years ago

@SimonOrJ what exactly do you mean with its getting pretty close? Can't wait to test it out. This would be an really awesome feature!

chuushi commented 8 years ago

Sorry, I lied by saying "pretty close". I'm sorry to keep you waiting by pushing the Milestone deadline three times! The version v0.9.0 is definitely going to be done by Wednesday for sure.

This will use a different configuration scheme, and the best part is that this can be configured by editing the files or through the web interface!

ntimo commented 8 years ago

@SimonOrJ Oh okay, that sounds like a nice new config system. But will it be able to handle more then one server with one interface? I am looking forward to Wednesday.

ntimo commented 8 years ago

@SimonOrJ Hi, I just tried out the new version from the pre branch. And I always get an error when trying to add an server. And there is no option to select the server on the search page. And maybe the setup page should only be accessible after logging in.

But I also wanted to thank you, for your awesome support.

chuushi commented 8 years ago

The server addition error was reported because the server adding part wasn't fully operational. The software didn't use the new configuration scheme at that time, but it does now!

The login is disabled system wide for now, though. 6764fb0359a053e7c827fe2936459ec35ef48dcf

Edit: Figured out the whole login thing. I made it mine now, and it works well. Mwahaha!

chuushi commented 8 years ago

The multi-server read/cache support is basically complete! :D

Now all that needs to be done is deleting cache by server button and upgrading the JS support. The dynmap support is busted as it stands now...

ntimo commented 8 years ago

@SimonOrJ when I try to login and then open the setup.php I get: Warning:

require(/res/php/webtemplate.php): failed to open stream: No such file or directory in /var/www/vhosts/xxxxxxxx/xxxxxxxxx/setup.php on line 253

Fatal error: require(): Failed opening required '/res/php/webtemplate.php' (include_path='.:/opt/plesk/php/7.0/share/pear') in /var/www/vhosts/xxxxxxxx/xxxxxxxxx/setup.php on line 253

And what is this BanManger? :O Thats in the top Menu bar.

ntimo commented 8 years ago

@SimonOrJ after manually adding the server config files. I get an error when trying to search for something in the database

E Unexpected Error 7: The lookup script was unable to send a proper response.

chuushi commented 8 years ago

Oh, that's a test navigation. Banmanager's a separate Minecraft plugin.

I'll look into the database error.

ntimo commented 8 years ago

@SimonOrJ Hi, now the setup.php works nice thank you :) I hope that the lookup will work soon too :)

Also nice work ;)

chuushi commented 8 years ago

I think I found the problem to the error. Does it work now?

Also, thank you for supporting the project! :D

ntimo commented 8 years ago

@SimonOrJ now I get this on the setup.php when trying to add a new server:

Fatal error: Uncaught Error: Class 'ChromePhp' not found in /var/www/vhosts/xxxxxx/xxxxxxx/setup.php:95 Stack trace: #0 {main} thrown in /var/www/vhosts/xxxxxx/xxxxxxx/setup.php on line 95

ntimo commented 8 years ago

@SimonOrJ okay when using the load more button I get:

E Unexpected Error 5: Server variable does not exist.

ntimo commented 8 years ago

@SimonOrJ also the username and blocks prediction does not work :(

ntimo commented 8 years ago

@SimonOrJ also when searching for a block like minecraft:dirt I get the error:

E Unexpected Error 7: The lookup script was unable to send a proper response.

chuushi commented 8 years ago

The "Load More" doesn't work yet; it's still being worked on.

The username and block predictions will only work for the blocks that were searched before. EDIT: Actually, this code needed some updating.

I've just fixed the first two problems. I'll commit it now. :)

ntimo commented 8 years ago

Now when I try to search (blocks and username) it says: Server is not defined.

The setup page works now but does not redirects you after adding a server.

chuushi commented 8 years ago

Hmm, yeah, more work needs to be done. I'm working on the JavaScript to fix the server undefined issue right now.

The setup page is in the lower priority since it can be configured directly from the source files.

ntimo commented 8 years ago

Hi, do you have any news for the JavaScript fix?

ntimo commented 8 years ago

@SimonOrJ Now I get please submit a lookup when trying to look something up :( And this error ate the end of the page

Fatal error: Uncaught Error: Call to undefined method Login::username() in /var/www/vhosts/xxxxxx/xxxxxxx/index.php:271 Stack trace: #0 {main} thrown in /var/www/vhosts/xxxxxx/xxxxxxx/index.php on line 271

chuushi commented 8 years ago

I finally got some sort of a fix complete and committed.

ntimo commented 8 years ago

Hi, I still get the error: E Unexpected Error 7: The lookup script was unable to send a proper response. When I try to look something up.

chuushi commented 8 years ago

Huh, that's weird. What do you get when you go into web/conn.php from the browser? It should be in this format:

[
    {"status": "An Object about server status"},
    ["An array containing results in Object format"]
]

If there's an error, the array of results doesn't get returned, or the top of the document will have <br/> and some PHP error report.

You can redact the "array containing results" if it works successfully.

ntimo commented 8 years ago

I get this: [{"status":5,"reason":"Server variable does not exist.","duration":0.00054001808166504}]

chuushi commented 8 years ago

Hmm... Try putting ?server=(whatever your server name is) at the end of the URL.

ntimo commented 8 years ago

Can I send you the login information and you can try it out?

ntimo commented 8 years ago

I send you a e-mail to the adress that was in your github profile with the url and login information.

chuushi commented 8 years ago

Ah, you have to redo the configuration. There were some changes in the configuration in this commit: b3241c5d9b95238b4b037d7840e4742d69124594

For an easy solution, change the word "form" to "flag".

ntimo commented 8 years ago

Okay, where exactly do I have to change this?

ntimo commented 8 years ago

Okay, I found it and now it works 👍

ntimo commented 8 years ago

It seems like I can't search for already Rolled back data

chuushi commented 8 years ago

It should be fixed now. It was an overlooked bug.

ntimo commented 8 years ago

Now I get the: E Unexpected Error 7: The lookup script was unable to send a proper response. Error

ntimo commented 8 years ago

okay, now the lookup works but the search for rolled back blocks does not work :(

ntimo commented 8 years ago

The load more button also does not work and just give out an E

chuushi commented 8 years ago

Yeah, it's a caveat.

I'll look into the rollback issue. I wasn't around my computer since 10 hours ago, so I couldn't get to anything yet.

By the way, I like to keep my developmental changelog on commit messages, so it'll be good to check out https://github.com/SimonOrJ/CoreProtect-Lookup-Web-Interface/commits/0.9.0-preview whwnever you download or git pull the updated files.

chuushi commented 8 years ago

Okay, the mentioned errors sans the Load More caveat should be fixed now!

ntimo commented 8 years ago

Hi there,

the load more button this does not work :( It just displays an E

chuushi commented 8 years ago

I've made multiple fixes to the form. Everything should work pretty well now!

Now I'm going to focus on making JS for the setup.php forms.

ntimo commented 8 years ago

Now everything works thank you :)