sasanrose / phpredmin

Yet another web interface for Redis
BSD 3-Clause "New" or "Revised" License
404 stars 96 forks source link

Add support for adding new database #41

Closed blitzmann closed 10 years ago

blitzmann commented 10 years ago

When navigated to a new database, it shows up with a + next to it in the navigation, showing you that it's still new. If the user does not add data to the database and then navigates to another database, the new database information is lost and the "+ Add DB" option is present again

Pictures: (because everyone loves pictures) 1 2 3

sasanrose commented 10 years ago

Thanks. However, I am against the idea of the layout file getting bigger and bigger. Therefore, we have to divide it to smaller files. A good example in this case is that you could put the modal div into another view. Or we can move some js scripts into individual js files. Moreover, what happens when the maximum number of databases is set to a large number. I believe we will have a very awkward and useless drop-down of dbs. May be we can change it to a simple text area. What's your idea?

eugef commented 10 years ago

I think that we can use drop-down with autocomplete.

blitzmann commented 10 years ago

I agree that the layout file should be split. TBH, that was one of my gripes I was mentioning with the layout and general structure of the project. I think there are many improvements that can be made over time with the templating system, where JS should go, streamlining, etc. I'm not too familiar with the templating system PHPRedmin uses, so I didn't want to poke around too much - I just decided to put the modal where the confirmation modal already is as both can be accessed from any page and it seemed to be the logical choice.

I will continue to look into navigation and layout of templates and try to find improvements and reduce redundancy.

As for the list of databases being too big - I never thought of that. I originally put a text input, but thought showing which databases were available via <select> would be a more interesting way to display it. As @eugef says, we could add an autocomplete. Or if max_databases is above a certain threshold, switch to text input. Not sure what you would want to do. =)