[GH-ISSUE #162] instances list suggestion #110

Closed
opened 2026-02-27 15:57:22 +03:00 by kerem · 21 comments
Owner

Originally created by @catborise on GitHub (Jul 18, 2018).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/162

I change the view of intances list. what do you think about it. Should we change like this?
or what do you suggest?

thanks

image

Originally created by @catborise on GitHub (Jul 18, 2018). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/162 I change the view of intances list. what do you think about it. Should we change like this? or what do you suggest? thanks ![image](https://user-images.githubusercontent.com/1725643/42865280-d92cede4-8a71-11e8-88ef-453f809496b0.png)
kerem closed this issue 2026-02-27 15:57:22 +03:00
Author
Owner

@lord-kyron commented on GitHub (Jul 18, 2018):

Looks great with those percents! Very slick!
like it!
are the changes applied on your repo?

<!-- gh-comment-id:405865999 --> @lord-kyron commented on GitHub (Jul 18, 2018): Looks great with those percents! Very slick! like it! are the changes applied on your repo?
Author
Owner

@lord-kyron commented on GitHub (Jul 18, 2018):

BTW @retspen and @catborise - I've found and fixed a problem, which occurs when you try to mark the "Is Template" option in the Instances settings.
The problem was on line 1013 in the instances/templates/instance.html file.
The line is:
<input type="checkbox" name="is_template" value="true" id="is_template" {% if instance.is_template %}checked{% endif %} {% if not request.user.is_superuser %}disabled{% endif %}>
but should be:
<input type="checkbox" name="is_template" value="True" id="is_template" {% if instance.is_template %}checked{% endif %} {% if not request.user.is_superuser %}disabled{% endif %}>

The problem here is the "value" which cannot be "true" - should be "True" with capital "T".
I've implemented the change in my clone of the original repo, along with the changes that @catborise did in his fork. You can find it there!

<!-- gh-comment-id:405892739 --> @lord-kyron commented on GitHub (Jul 18, 2018): BTW @retspen and @catborise - I've found and fixed a problem, which occurs when you try to mark the "Is Template" option in the Instances settings. The problem was on line **1013** in the **instances/templates/instance.html** file. The line is: `<input type="checkbox" name="is_template" value="true" id="is_template" {% if instance.is_template %}checked{% endif %} {% if not request.user.is_superuser %}disabled{% endif %}>` but should be: `<input type="checkbox" name="is_template" value="True" id="is_template" {% if instance.is_template %}checked{% endif %} {% if not request.user.is_superuser %}disabled{% endif %}>` The problem here is the "value" which cannot be "true" - should be "True" with capital "T". I've implemented the change in my clone of the original repo, along with the changes that @catborise did in his fork. You can find it there!
Author
Owner

@catborise commented on GitHub (Jul 18, 2018):

@Bandic007 i send pull request to retspen. if he accepts ui change will be made.

when i check the instances/templates/instance.html there are many same value like value="true". may be the others also incorrect. I do not know i should do inspect more detail.

<!-- gh-comment-id:405915066 --> @catborise commented on GitHub (Jul 18, 2018): @Bandic007 i send pull request to retspen. if he accepts ui change will be made. when i check the instances/templates/instance.html there are many same value like value="true". may be the others also incorrect. I do not know i should do inspect more detail.
Author
Owner

@lord-kyron commented on GitHub (Jul 18, 2018):

@catborise - another thing to ask about the User functionality.
Isn't it supposed that a user, which is "staff" should create its own VMs and modify them?
I've created a test staff user and it cannot create own VMs - only work with VMs I've added him as owner to, which means every time it needs VM I have to create it for him.
Also - I added him as owner of a template VM and he cannot change almost anything on it. He has the right to clone it, but when I try to clone it, it gives me the error that mac address format is not full.
I was able to reproduce this error from the admin user - the same error and the same thing happens from the admin user when I go template vm - settings - clone and press the Guess button on the MAC address.
I guess this happens for the staff user as it does hot have the ability to change the mac address of the template VM, and somehow the system is "pressing" guess when I try to clone it from the staff user.
I have very basic knowledge of Python so I am asking you as you are the only more-active contributor here for some help on the matter!
Thanks!

P.S. - another problem debugged and fixed:
in vrtManager/network.py on line 173:
mac = net.xpathEval('@mac')[0]
is not working like this.
It should be:
mac = net.xpath('@mac')[0]
withouth the Eval part.
Tested on my setup and working. Pushed the change in My repo alongside with your changes @catborise
May I request pull with your repo to merge?

<!-- gh-comment-id:405948363 --> @lord-kyron commented on GitHub (Jul 18, 2018): @catborise - another thing to ask about the User functionality. Isn't it supposed that a user, which is "staff" should create its own VMs and modify them? I've created a test staff user and it cannot create own VMs - only work with VMs I've added him as owner to, which means every time it needs VM I have to create it for him. Also - I added him as owner of a template VM and he cannot change almost anything on it. He has the right to clone it, but when I try to clone it, it gives me the error that mac address format is not full. I was able to reproduce this error from the admin user - the same error and the same thing happens from the admin user when I go template vm - settings - clone and press the Guess button on the MAC address. I guess this happens for the staff user as it does hot have the ability to change the mac address of the template VM, and somehow the system is "pressing" guess when I try to clone it from the staff user. I have very basic knowledge of Python so I am asking you as you are the only more-active contributor here for some help on the matter! Thanks! P.S. - another problem debugged and fixed: in **vrtManager/network.py** on line **173**: `mac = net.xpathEval('@mac')[0]` is not working like this. It should be: `mac = net.xpath('@mac')[0]` withouth the Eval part. Tested on my setup and working. Pushed the change in My repo alongside with your changes @catborise May I request pull with your repo to merge?
Author
Owner

@catborise commented on GitHub (Jul 19, 2018):

@Bandic007 yes. i am thinking about staff like you. we should make some changes about staff.

vrtManager/network.py fix is right. xpathEval previous version of libxml artifact. all xpatheval statements must be xpath.

I am trying to help the project but @honza801 has more knowledge about project. Have you check his branch? He also makes some important changes about core functionality.

I made a request for pull yestarday. Yes you may request.

thanks

<!-- gh-comment-id:406165667 --> @catborise commented on GitHub (Jul 19, 2018): @Bandic007 yes. i am thinking about staff like you. we should make some changes about staff. vrtManager/network.py fix is right. xpathEval previous version of libxml artifact. all xpatheval statements must be xpath. I am trying to help the project but @honza801 has more knowledge about project. Have you check his branch? He also makes some important changes about core functionality. I made a request for pull yestarday. Yes you may request. thanks
Author
Owner

@lord-kyron commented on GitHub (Jul 19, 2018):

@catborise - no I haven't checked his repo but I will definitely do it. Did you implement some of his changes in your repo? Basically in my modified repo I try to gather all good changes and practices in one place.

Regarding the staff users - I am open to help with what I can to make the functionality more usable. I im suggesting to start with fixing the cloning of a shared to the staff user template, when the used has the right to clone. I've explained the problem with the mac address in my previous post. If we can fix this, then we can proceed with changing the functionalities after that. What do you think?

<!-- gh-comment-id:406170113 --> @lord-kyron commented on GitHub (Jul 19, 2018): @catborise - no I haven't checked his repo but I will definitely do it. Did you implement some of his changes in your repo? Basically in my modified repo I try to gather all good changes and practices in one place. Regarding the staff users - I am open to help with what I can to make the functionality more usable. I im suggesting to start with fixing the cloning of a shared to the staff user template, when the used has the right to clone. I've explained the problem with the mac address in my previous post. If we can fix this, then we can proceed with changing the functionalities after that. What do you think?
Author
Owner

@honza801 commented on GitHub (Jul 19, 2018):

hi @catborise

the new instances list (screenshot above) is for admin or normal users?

i think name="is_template" value="true" is ok. what is the problem? can you support more informations (debug messages...)

"... Isn't it supposed that a user, which is "staff" should create its own VMs and modify them?"
which way is staff creating the instance (clone/+/...) ?

"Also - I added him as owner of a template VM and he cannot change almost anything on it."
imho, user is not supposed to modify the tamplate. it is the task for admin.

mac = net.xpathEval('@mac')[0]
this wasnt problem for me. can you support more debug?

this thread is bloody mixed up. please split it into multiple issues.

thanks
jan

<!-- gh-comment-id:406170290 --> @honza801 commented on GitHub (Jul 19, 2018): hi @catborise the new instances list (screenshot above) is for admin or normal users? i think <code>name="is_template" value="true"</code> is ok. what is the problem? can you support more informations (debug messages...) "... Isn't it supposed that a user, which is "staff" should create its own VMs and modify them?" which way is staff creating the instance (clone/+/...) ? "Also - I added him as owner of a template VM and he cannot change almost anything on it." imho, user is not supposed to modify the tamplate. it is the task for admin. <code>mac = net.xpathEval('@mac')[0]</code> this wasnt problem for me. can you support more debug? this thread is bloody mixed up. please split it into multiple issues. thanks jan
Author
Owner

@lord-kyron commented on GitHub (Jul 19, 2018):

@honza801 - will split.
about name="is_template" value="true" - it was complaining the value must be True or False, not true. I guess it needs capital letters.

"... Isn't it supposed that a user, which is "staff" should create its own VMs and modify them?"
I was thinking about + to be also available as clone.

mac = net.xpathEval('@mac')[0]
about this - it was complaining that there is no "Eval" when you are using lxml instead of libxml2

<!-- gh-comment-id:406180237 --> @lord-kyron commented on GitHub (Jul 19, 2018): @honza801 - will split. about name="is_template" value="true" - it was complaining the value must be True or False, not true. I guess it needs capital letters. "... Isn't it supposed that a user, which is "staff" should create its own VMs and modify them?" I was thinking about + to be also available as clone. mac = net.xpathEval('@mac')[0] about this - it was complaining that there is no "Eval" when you are using lxml instead of libxml2
Author
Owner

@catborise commented on GitHub (Jul 19, 2018):

@honza801 hi honza we update libxml2 to lxml because of package problem and developer switch it to lxml. restspen master accept the pull. because of that some libxml2 change happened. bandic007 mention about that.

name="is_template" value="true" i will check "True - true" situation. After upgrade of django(1.8->1.11) may be it was changed.

screenshot is for admin/supervisor users. for normal users it same as before.

<!-- gh-comment-id:406210352 --> @catborise commented on GitHub (Jul 19, 2018): @honza801 hi honza we update libxml2 to lxml because of package problem and developer switch it to lxml. restspen master accept the pull. because of that some libxml2 change happened. bandic007 mention about that. name="is_template" value="true" i will check "True - true" situation. After upgrade of django(1.8->1.11) may be it was changed. screenshot is for admin/supervisor users. for normal users it same as before.
Author
Owner

@lord-kyron commented on GitHub (Jul 21, 2018):

@catborise in your latest commit I still have the problem with the "True" in the instances/tempalte/instance.html line 1013

Also - when I have a user, which is a staff one and "can clone VMs" and I hsare a template with him, when I try to clone the template from inside the user, I am getting this error:
Error: Instance mac '52:54:00:' invalid format!
I haven't change anything. I guess this issue (as I explained in another issue thread) is related to the "guess" mac function in the network card options. I am getting the same result when from the super admin user I use the guess option in the network settings and it gives me only '52:54:00:' mac every time. Also in options tab I don't have the possibility to change the network configs of course, because this is template shared by super admin, so I cannot do anything from that user practically.

Could you please try to fix this? I will try to help you with what I can!

Here is a proof of this behavior from inside the test user:
ss

<!-- gh-comment-id:406809588 --> @lord-kyron commented on GitHub (Jul 21, 2018): @catborise in your latest commit I still have the problem with the "True" in the **instances/tempalte/instance.html** line **1013** Also - when I have a user, which is a staff one and "can clone VMs" and I hsare a template with him, when I try to clone the template from inside the user, I am getting this error: **Error: Instance mac '52:54:00:' invalid format!** I haven't change anything. I guess this issue (as I explained in another issue thread) is related to the "guess" mac function in the network card options. I am getting the same result when from the super admin user I use the guess option in the network settings and it gives me only '52:54:00:' mac every time. Also in options tab I don't have the possibility to change the network configs of course, because this is template shared by super admin, so I cannot do anything from that user practically. Could you please try to fix this? I will try to help you with what I can! Here is a proof of this behavior from inside the test user: ![ss](https://user-images.githubusercontent.com/39150122/43038365-5b2e19c0-8d20-11e8-8c0e-d2b5a843242d.png)
Author
Owner

@catborise commented on GitHub (Jul 23, 2018):

@Bandic007 it is related with dhcpd.conf file. is there dhcpd.conf file ->"/srv/webvirtcloud/dhcpd.conf"
if there is not any conf file. code breaks and does not generate random mac address. for me it is a bug.
if there is not that file it should continue.

<!-- gh-comment-id:406958724 --> @catborise commented on GitHub (Jul 23, 2018): @Bandic007 it is related with dhcpd.conf file. is there dhcpd.conf file ->"/srv/webvirtcloud/dhcpd.conf" if there is not any conf file. code breaks and does not generate random mac address. for me it is a bug. if there is not that file it should continue.
Author
Owner

@lord-kyron commented on GitHub (Jul 24, 2018):

@catborise - so I can create a dhcpd.conf in /srv/webvirtcloud/ with the proper settings and it should work?

<!-- gh-comment-id:407383800 --> @lord-kyron commented on GitHub (Jul 24, 2018): @catborise - so I can create a dhcpd.conf in /srv/webvirtcloud/ with the proper settings and it should work?
Author
Owner

@honza801 commented on GitHub (Jul 25, 2018):

oops, this is definitely a bug. i'll fix it.

but anyway. please split this mixed up thread into multiple ones. this is no more "instances list suggestion" issue

thanks
jan

<!-- gh-comment-id:407683287 --> @honza801 commented on GitHub (Jul 25, 2018): oops, this is definitely a bug. i'll fix it. but anyway. please split this mixed up thread into multiple ones. this is no more "instances list suggestion" issue thanks jan
Author
Owner

@honza801 commented on GitHub (Jul 26, 2018):

hi,

the new instance list is not sortable correctly (clicking on the table header) by name and memory.

this was fixed in 40049540ee but is broken again

please fix this.

thanks
jan

<!-- gh-comment-id:408077714 --> @honza801 commented on GitHub (Jul 26, 2018): hi, the new instance list is not sortable correctly (clicking on the table header) by name and memory. this was fixed in 40049540ee621e4a10d922866c5d45eef20d6f0c but is broken again please fix this. thanks jan
Author
Owner

@catborise commented on GitHub (Jul 27, 2018):

hi,

for admin page there is a grouping because of that sorting is problem for now i disabled sorting. i find a solution but it is a dirty hack, so i did not implement for now.

but other than supervisor user, it is same as before and works...

<!-- gh-comment-id:408417016 --> @catborise commented on GitHub (Jul 27, 2018): hi, for admin page there is a grouping because of that sorting is problem for now i disabled sorting. i find a solution but it is a dirty hack, so i did not implement for now. but other than supervisor user, it is same as before and works...
Author
Owner

@honza801 commented on GitHub (Jul 30, 2018):

hi,

this is a problem. we are using sorting a lot. please make the new instance list an option (fe. controllable via settings parameter). could be similar to VIEW_ACCOUNTS_STYLE grid/list option.

thanks
jan

<!-- gh-comment-id:408763213 --> @honza801 commented on GitHub (Jul 30, 2018): hi, this is a problem. we are using sorting a lot. please make the new instance list an option (fe. controllable via settings parameter). could be similar to VIEW_ACCOUNTS_STYLE grid/list option. thanks jan
Author
Owner

@catborise commented on GitHub (Jul 30, 2018):

@honza801 it is done.

-# available: default (grouped), nongrouped
VIEW_INSTANCES_LIST_STYLE = 'grouped'

i will send pull request...

<!-- gh-comment-id:408820641 --> @catborise commented on GitHub (Jul 30, 2018): @honza801 it is done. -# available: default (grouped), nongrouped VIEW_INSTANCES_LIST_STYLE = 'grouped' i will send pull request...
Author
Owner

@catborise commented on GitHub (Aug 2, 2018):

i think that style is better? what do you think?
image

<!-- gh-comment-id:409831126 --> @catborise commented on GitHub (Aug 2, 2018): i think that style is better? what do you think? ![image](https://user-images.githubusercontent.com/1725643/43568527-7f499228-963d-11e8-90c7-eda6dcd512eb.png)
Author
Owner

@lord-kyron commented on GitHub (Aug 2, 2018):

@catborise - way better!

<!-- gh-comment-id:409934981 --> @lord-kyron commented on GitHub (Aug 2, 2018): @catborise - way better!
Author
Owner

@honza801 commented on GitHub (Aug 3, 2018):

could you please specify commit or branch of VIEW_INSTANCES_LIST_STYLE feature? i can see a lot of commits in you repository which do not correspond to this.

thanks
jan

<!-- gh-comment-id:410171900 --> @honza801 commented on GitHub (Aug 3, 2018): could you please specify commit or branch of VIEW_INSTANCES_LIST_STYLE feature? i can see a lot of commits in you repository which do not correspond to this. thanks jan
Author
Owner

@lord-kyron commented on GitHub (Aug 3, 2018):

@honza801 github.com/catborise/webvirtcloud@6a57903fd6

<!-- gh-comment-id:410186613 --> @lord-kyron commented on GitHub (Aug 3, 2018): @honza801 https://github.com/catborise/webvirtcloud/commit/6a57903fd6b64471be6481b7641694f102557d78
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#110
No description provided.