mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-04-25 15:35:57 +03:00
[GH-ISSUE #162] instances list suggestion #110
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/webvirtcloud#110
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
@lord-kyron commented on GitHub (Jul 18, 2018):
Looks great with those percents! Very slick!
like it!
are the changes applied on your repo?
@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!
@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.
@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?
@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
@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?
@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
@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
@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.
@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:

@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.
@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?
@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
@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
40049540eebut is broken againplease fix this.
thanks
jan
@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...
@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
@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...
@catborise commented on GitHub (Aug 2, 2018):
i think that style is better? what do you think?

@lord-kyron commented on GitHub (Aug 2, 2018):
@catborise - way better!
@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
@lord-kyron commented on GitHub (Aug 3, 2018):
@honza801
github.com/catborise/webvirtcloud@6a57903fd6