1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

initial comit

This commit is contained in:
Bandic007 2018-07-06 14:16:45 +03:00
parent 85aac6fa0a
commit cfa9fd6066
3 changed files with 23 additions and 5 deletions

View file

@ -1,5 +1,15 @@
## WebVirtCloud Beta
## WebVirtCloud - Bandic007 (B7) updated and fixed edition
## Credits
This version of WebVirtCloud was forked from [@catborise](https://github.com/catborise/webvirtcloud) repo, which is a forked and modified (with upgrades of UI and functionality) versio of [@retspen](https://github.com/retspen/webvirtcloud) repo.
Thanks to both of them for the amazing job they did!
The B7 version in this repo has some fixes applied on problems from the upgraded [@catborise](https://github.com/catborise/webvirtcloud) repo. They were:
* fixed not working login page
* fixed not working (loading) "Instances" page
This version will always be updated with the latest changes from both repos and I will try to apply fixes to all bugs I find, in order to make it always running from the first time you deploy it!
Also, I will escalate "Pull requests" to both those guys in order to offer them my fixes in thei repos!
## Features
@ -230,11 +240,16 @@ datasource:
### How To Update
```bash
cd /srv/webvirtcloud
git pull
virtualenv venv
source venv/bin/activate
python manage.py migrate
sudo service supervisor restart
deactivate
```
### License
WebVirtCloud is licensed under the [Apache Licence, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).

View file

@ -4,8 +4,11 @@ from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
url(r'^login/$', auth_views.LoginView.as_view(template_name='login.html'), name='login'),
url(r'^logout/$', auth_views.LogoutView.as_view(template_name='logout.html'), name='logout'),
url(r'^profile/$', views.profile, name='profile'), url(r'^$', views.accounts, name='accounts'),
url(r'^login/$', 'django.contrib.auth.views.login',
{'template_name': 'login.html'}, name='login'),
url(r'^logout/$', 'django.contrib.auth.views.logout',
{'template_name': 'logout.html'}, name='logout'),
url(r'^profile/$', views.profile, name='profile'),
url(r'^$', views.accounts, name='accounts'),
url(r'^profile/(?P<user_id>[0-9]+)/$', views.account, name='account'),
]

View file

@ -85,7 +85,7 @@ def instances(request):
comp_info["mem_size"],
comp_info["mem_perc"]][vm]['userinstances'] = get_userinstances_info(check_uuid)
except Instance.DoesNotExist:
check_uuid = Instance(compute_id=comp.id, name=vm, uuid=info['uuid'])
check_uuid = Instance(compute_id=comp["id"], name=vm, uuid=info['uuid'])
check_uuid.save()
if not request.user.is_superuser: