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

Fixed consoled app

This commit is contained in:
Retspen 2015-03-27 11:22:38 +02:00
parent 6604aa9d11
commit f5ce432c56
3 changed files with 14 additions and 14 deletions

View file

@ -2,36 +2,36 @@
import os import os
import sys import sys
import django
DIR_PATH = os.path.dirname(os.path.abspath(__file__)) DIR_PATH = os.path.dirname(os.path.abspath(__file__))
ROOT_PATH = os.path.abspath(os.path.join(DIR_PATH, '..', '')) ROOT_PATH = os.path.abspath(os.path.join(DIR_PATH, '..', ''))
# VENV_PATH = ROOT_PATH + '/venv/lib/python2.7/site-packages'
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webvirtcloud.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webvirtcloud.settings")
CERT = DIR_PATH + '/cert.pem' CERT = DIR_PATH + '/cert.pem'
if ROOT_PATH not in sys.path: if ROOT_PATH not in sys.path:
sys.path.append(ROOT_PATH) sys.path.append(ROOT_PATH)
# if VENV_PATH not in sys.path:
# sys.path.append(VENV_PATH)
django.setup()
# VENV_PATH = ROOT_PATH + '/venv/lib/python2.7/site-packages'
# if VENV_PATH not in sys.path:
# sys.path.append(VENV_PATH)
import re
import Cookie import Cookie
import socket import socket
from webvirtcloud.settings import WS_PORT from webvirtcloud.settings import WS_PORT
from webvirtcloud.settings import WS_HOST from webvirtcloud.settings import WS_HOST
from webvirtcloud.settings import WS_CERT from webvirtcloud.settings import WS_CERT
from vrtManager.connection import CONN_SSH, CONN_SOCKET
from tunnel import Tunnel
if WS_CERT: if WS_CERT:
CERT = WS_CERT CERT = WS_CERT
from vrtManager.connection import CONN_SSH, CONN_SOCKET
import re
from tunnel import Tunnel
try: try:
from websockify import WebSocketProxy from websockify import WebSocketProxy
try: try:
from websockify import ProxyRequestHandler from websockify import ProxyRequestHandler
except ImportError: except ImportError:
@ -50,7 +50,7 @@ except ImportError:
def get_connection_infos(token): def get_connection_infos(token):
from instance.models import Instance from instances.models import Instance
from vrtManager.instance import wvmInstance from vrtManager.instance import wvmInstance
try: try:

View file

@ -215,7 +215,7 @@
</div> </div>
{% endblock %} {% endblock %}
{% block script %} {% block script %}
<script src="{{ STATIC_URL }}/js/sortable.min.js"></script> <script src="{{ STATIC_URL }}js/sortable.min.js"></script>
<script> <script>
function open_console(uuid) { function open_console(uuid) {
window.open("{% url 'console' %}?token=" + uuid, "", "width=850,height=485"); window.open("{% url 'console' %}?token=" + uuid, "", "width=850,height=485");

View file

@ -69,7 +69,7 @@ TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'templates'),
) )
# WebVirtCloud settings ## WebVirtCloud settings
# Wobsock port # Wobsock port
WS_PORT = 6080 WS_PORT = 6080