retspen / webvirtcloud

WebVirtCloud is virtualization web interface for admins and users
1.69k stars 370 forks source link

Ways to improve WVC #323

Open Real-Gecko opened 4 years ago

Real-Gecko commented 4 years ago

Hey there! I think we need to discuss some things about development of WVC to avoid confusion with further development. Things to discuss are:

Feel free to suggest some other things to discuss in terms of development.

Real-Gecko commented 4 years ago

wouldnt be nice implementation like this, if we could...

Of course it's better, but how does act during sorting and filtering? Can you try and implement it?

Real-Gecko commented 4 years ago

I made grouped instances index look like before 2be76c07e401d4a2875af35403ca55d550972460, but it definitely needs a rework. Screenshot_20200623_105735

catborise commented 4 years ago

did you make any changes with console app? i am going to work on some bugs and featues,

Real-Gecko commented 4 years ago

Nope.

Real-Gecko commented 4 years ago

i cannot run your branch. gives error always i get that error

Try latest commit c2e001290587344c62025e5c08689b134797935c and see if error still exists.

catborise commented 4 years ago

still some errors happens not working yet because of some other errors: image

Real-Gecko commented 4 years ago

Ah yes, storages/views.py, will commit that.

Real-Gecko commented 4 years ago

b8db11f66f1dcc997c741854cdd2b9488bac9551 grab this one. I finally started to add instances tests and with only three of them increased overall coverage from 36 to 41 percent which is goooood :D

catborise commented 4 years ago

yea it runs but view not good. it should not show in the table

image

catborise commented 4 years ago

I made grouped instances index look like before 2be76c0, but it definitely needs a rework. Screenshot_20200623_105735

we could use this datatable which has ability to group. sorting finding etc superrior than us. have you use it? https://www.datatables.net/extensions/rowgroup/examples/initialisation/startAndEndRender.html

Real-Gecko commented 4 years ago

https://github.com/wenzhixin/bootstrap-table is better IMO There's also https://django-tables2.readthedocs.io/en/latest/ which makes templates even simpler.

Real-Gecko commented 4 years ago

but view not good. it should not show in the table

71d75327f21fbef126a57a378b36a5ef5584a76a I made templates look like they did before

catborise commented 4 years ago

we need "group view" or "detail view" or "tree view" like solution https://examples.bootstrap-table.com/#extensions/treegrid.html is a suibtable one.

i do not see detail view or like that at django-tables2 .

Real-Gecko commented 4 years ago

i do not see detail view or like that at django-tables2

We can override built in templates https://django-tables2.readthedocs.io/en/latest/pages/custom-rendering.html#custom-template We can even try and mix bs-table with django-tables2, first working on client side second on server side. I think we need to think through new layout of every view, cause now it's a bit chaotic. Currently design like this is quite popular: Screenshot_20200625_122711 Most links are on left side menu, which is collapsible, top bar is small and does not have a lot of links. I see such layout quite often in enterprise grade products.

catborise commented 4 years ago

yea i like the dashboards like this. webvirtmgr has left side . webvirtcloud uses top navigation. retspen wanted to start new project webvirtcloud v2(django rest framework + react + material ui) but for some reasons, he choose to wait... with v2 he also switched to the dasboard style view... nearly all dashboard templates like you specified as above... image ... material-ui image

i want to add a dasboard page to webvirtcloud but there was some hiccups before your reorg. may be it is more appropriate and easy adding a dashboard now before then...

Real-Gecko commented 4 years ago

i want to add a dasboard page to webvirtcloud but there was some hiccups before your reorg. may be it is more appropriate and easy adding a dashboard now before then...

I'm working on instances tests, after they're done and branch is tested and merged I think we can start doing this. Instances currently has most messy layout, after splitting views I think it'll be easier to rewrite templates.

catborise commented 4 years ago

stock bootstrap very limited for a dashboard style app. all templates getting help other css/js extensions. to solve that problem patternfly extends bootstrap3 to get all necessary components. https://www.patternfly.org/v4/documentation/core/demos/drawer redhat uses this framework... may be with layout change it is considered to change css framework also...

Real-Gecko commented 4 years ago

Was guestfsd updated for Python 3?

catborise commented 4 years ago

i made some changes but i am not sure if it is working or not. i never used it.

Real-Gecko commented 4 years ago

I'm currently trying it out and looks like it's a bit broken, will fix it.

Real-Gecko commented 4 years ago

ffa85d01c1f66dfc0ca26573d2f190e0411c6e16 fixed gstfsd, but it requires root privileges to run, so I'm leaving change password and add public key functionality without testing.

catborise commented 4 years ago

editing instance problems (retspen/master):

  1. two message image
  2. change instance console type causes error image
Real-Gecko commented 4 years ago
2\. change instance console type causes error
console_types = appsettings.get(key="QEMU_CONSOLE_DEFAULT_TYPE").choices_as_list

Is the cause must be

console_types = appsettings.get(key="QEMU_CONSOLE_DEFAULT_TYPE").choices_as_list()
Real-Gecko commented 4 years ago
1. two message

Instances branch is almost there.

Real-Gecko commented 4 years ago

There is a great app https://django-guardian.readthedocs.io/en/stable/ that allows to grant users per object permissions. I've never tried it, but it looks interesting, this will grant us more granular control over instances permissions eliminating the need for UserInstance model. But this improvement is for the future, not something we must implement right now.

catborise commented 4 years ago

adding more features pushes to more granular permission. it will be nice more user roles then now. it should be considered after stabilizing current...

have you tried async django? we need async capabilities for cloning instance/disk, migrate, backup... but i do not have an experience with it. qemu provides async actions with "qemu_qpm" but not libvirt... may be django async does something?

Real-Gecko commented 4 years ago

have you tried async django?

Async in Django is not fully there yet: https://code.djangoproject.com/wiki/AsyncProject https://speakerdeck.com/andrewgodwin/just-add-await-retrofitting-async-into-django?slide=42 So I think it's better to not bother at all for now, at least until Django 4.0.

In the mean time we'd better clean our source code a little and make it more consistent.

I finished views split for instances ae31225b0b531185f4cb39182c63a89c3fe7ef23 and looks like cleaned up all errors, anyone willing to test the branch is free to do so. In the mean time I'll continue writing auto tests for instances, we're already at 50% coverage. I'll create a PR to retspen/master as soon as no bugs remain. But there're still many places that can be improved in terms of code quality, especially in templates: it's a mess out there :D

Real-Gecko commented 4 years ago

https://github.com/Real-Gecko/webvirtcloud/tree/instances link for instances testing

Real-Gecko commented 4 years ago

Added some more tests for instances, coverage is 55% now.

catborise commented 4 years ago

https://github.com/Real-Gecko/webvirtcloud/tree/instances link for instances testing

i am working on reverse proxy fixing and console minor fixes. i will test it...