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

Clean header

This commit is contained in:
Retspen 2015-02-27 14:44:44 +02:00
parent 7dee5b94ac
commit 2ed6ca6518
18 changed files with 33 additions and 37 deletions

View file

@ -1,7 +1,7 @@
import re import re
from django import forms from django import forms
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from definst.models import Flavor from create.models import Flavor
class FlavorAddForm(forms.Form): class FlavorAddForm(forms.Form):

View file

@ -3,15 +3,15 @@ from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from computes.models import Compute from computes.models import Compute
from definst.models import Flavor from create.models import Flavor
from definst.forms import FlavorAddForm, NewVMForm from create.forms import FlavorAddForm, NewVMForm
from instances.models import Instance from instances.models import Instance
from vrtManager.create import wvmCreate from vrtManager.create import wvmCreate
from vrtManager import util from vrtManager import util
from libvirt import libvirtError from libvirt import libvirtError
def create(request, host_id): def create_instance(request, host_id):
""" """
:param request: :param request:
:return: :return:
@ -133,4 +133,4 @@ def create(request, host_id):
error_messages.append(lib_err) error_messages.append(lib_err)
conn.close() conn.close()
return render('definst.html', locals()) return render('create.html', locals())

View file

@ -16,5 +16,6 @@
{% block content %}{% endblock %} {% block content %}{% endblock %}
<script src="{% static "js/jquery.min.js" %}"></script> <script src="{% static "js/jquery.min.js" %}"></script>
<script src="{% static "js/bootstrap.min.js" %}"></script> <script src="{% static "js/bootstrap.min.js" %}"></script>
{% block javascript %}{% endblock %}
</body> </body>
</html> </html>

View file

@ -105,3 +105,10 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% block javascript %}
<script type="application/javascript">
function open_console(uuid) {
window.open("/{% url 'console' %}/?token=" + uuid, "", "width=850,height=485");
}
</script>
{% endblock %}

View file

@ -1,16 +1,10 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
import libvirt import libvirt
import threading import threading
import socket import socket
from vrtManager import util from vrtManager import util
from libvirt import libvirtError
from rwlock import ReadWriteLock from rwlock import ReadWriteLock
from django.conf import settings from django.conf import settings
from libvirt import libvirtError
CONN_SOCKET = 4 CONN_SOCKET = 4

View file

@ -1,11 +1,7 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
import string import string
from vrtManager import util from vrtManager import util
from vrtManager.connection import wvmConnect from vrtManager.connection import wvmConnect
from webvirtcloud.settings import QEMU_CONSOLE_DEFAULT_TYPE
from webvirtmgr.settings import QEMU_CONSOLE_DEFAULT_TYPE
def get_rbd_storage_data(stg): def get_rbd_storage_data(stg):

View file

@ -1,6 +1,3 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
import time import time
from vrtManager.connection import wvmConnect from vrtManager.connection import wvmConnect
from vrtManager.util import get_xml_path from vrtManager.util import get_xml_path

View file

@ -1,6 +1,3 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
import time import time
import os.path import os.path
try: try:
@ -11,8 +8,7 @@ from vrtManager import util
from xml.etree import ElementTree from xml.etree import ElementTree
from datetime import datetime from datetime import datetime
from vrtManager.connection import wvmConnect from vrtManager.connection import wvmConnect
from webvirtcloud.settings import QEMU_CONSOLE_TYPES
from webvirtmgr.settings import QEMU_CONSOLE_TYPES
class wvmInstances(wvmConnect): class wvmInstances(wvmConnect):

View file

@ -1,6 +1,3 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
from vrtManager import util from vrtManager import util
from vrtManager.IPy import IP from vrtManager.IPy import IP
from vrtManager.connection import wvmConnect from vrtManager.connection import wvmConnect

View file

@ -1,6 +1,3 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
from vrtManager import util from vrtManager import util
from vrtManager.connection import wvmConnect from vrtManager.connection import wvmConnect

View file

@ -1,6 +1,3 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
import re import re
import random import random
import libxml2 import libxml2

View file

@ -68,7 +68,21 @@ TEMPLATE_DIRS = (
) )
# WebVirtCloud settings # WebVirtCloud settings
# Wobsock port
WS_PORT = 6080 WS_PORT = 6080
# Websock host
WS_HOST = '0.0.0.0' WS_HOST = '0.0.0.0'
# Websock public port
WS_PUBLIC_HOST = None WS_PUBLIC_HOST = None
# Websock SSL connection
WS_CERT = None WS_CERT = None
# list of console types
QEMU_CONSOLE_TYPES = ['vnc', 'spice']
# default console type
QEMU_CONSOLE_DEFAULT_TYPE = 'vnc'

View file

@ -29,7 +29,7 @@ urlpatterns = patterns('',
# url(r'^accounts/$', 'accounts.views.accounts', name='accounts'), # url(r'^accounts/$', 'accounts.views.accounts', name='accounts'),
# url(r'^account/(\d+)/$', 'accounts.views.account', name='account'), # url(r'^account/(\d+)/$', 'accounts.views.account', name='account'),
# #
# url(r'^console/$', 'console.views.console', name='console'), url(r'^console/$', 'console.views.console', name='console'),
# url(r'^create/(\d+)/$', 'create.views.create', name='create'), url(r'^create/(\d+)/$', 'create.views.create_instance', name='create_instance'),
(r'^admin/', include(admin.site.urls)), (r'^admin/', include(admin.site.urls)),
) )