mirror of
				https://github.com/retspen/webvirtcloud
				synced 2025-07-31 12:41:08 +00:00 
			
		
		
		
	Merge remote-tracking branch 'retspen/master'
This commit is contained in:
		
						commit
						5f24d5d222
					
				
					 9 changed files with 40 additions and 16 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -1,5 +1,6 @@ | |||
| .vagrant | ||||
| venv | ||||
| .vscode | ||||
| .idea | ||||
| .DS_* | ||||
| *.pyc | ||||
|  |  | |||
|  | @ -1,6 +1,5 @@ | |||
| Django==1.8.11 | ||||
| websockify==0.8.0 | ||||
| gunicorn==19.3.0 | ||||
| libvirt-python==1.3.2 | ||||
| #http://github.com/retspen/retspen.github.io/raw/master/libxml2-python-2.9.1.tar.gz | ||||
| http://git.gnome.org/browse/libxml2/snapshot/libxml2-2.9.1.tar.gz#egg=libxml2-python&subdirectory=python | ||||
| libvirt-python==3.10 | ||||
| libxml2-python3==2.9.5 | ||||
|  |  | |||
|  | @ -121,6 +121,9 @@ | |||
|     function log_info(msg) { | ||||
|         log_message(msg,'info'); | ||||
|     } | ||||
|     {% if console_error %} | ||||
|         log_error('{{ console_error|escapejs }}'); | ||||
|     {% endif %} | ||||
| </script> | ||||
| 
 | ||||
| {% block foot %}{% endblock %} | ||||
|  |  | |||
|  | @ -16,6 +16,7 @@ def console(request): | |||
|     :param request: | ||||
|     :return: | ||||
|     """ | ||||
|     console_error = None | ||||
| 
 | ||||
|     if request.method == 'GET': | ||||
|         token = request.GET.get('token', '') | ||||
|  | @ -49,7 +50,8 @@ def console(request): | |||
|     elif console_type == 'spice': | ||||
|         response = render(request, 'console-spice.html', locals()) | ||||
|     else: | ||||
|         response = "Console type %s no support" % console_type | ||||
|         console_error = "Console type: %s no support" % console_type | ||||
|         response = render(request, 'console-vnc.html', locals()) | ||||
| 
 | ||||
|     response.set_cookie('token', token) | ||||
|     return response | ||||
|  |  | |||
|  | @ -375,7 +375,7 @@ __check_end_of_life_versions | |||
| # | ||||
| install_centos() { | ||||
|     if [ $DISTRO_MAJOR_VERSION -ge 6 ]; then | ||||
|         yum -y install qemu-kvm libvirt bridge-utils python-libguestfs supervisor || return 1 | ||||
|         yum -y install qemu-kvm libvirt bridge-utils python-libguestfs supervisor cyrus-sasl-md5 || return 1 | ||||
|     fi | ||||
|     return 0 | ||||
| } | ||||
|  | @ -401,6 +401,13 @@ install_centos_post() { | |||
|         echoerror "/etc/libvirt/qemu.conf not found. Exiting..." | ||||
|         exit 1 | ||||
|     fi | ||||
|     if [ -f /etc/sasl2/libvirt.conf ]; then | ||||
|         sed -i 's/: gssapi/: digest-md5/g' /etc/sasl2/libvirt.conf | ||||
|         sed -i 's/#sasldb_path/sasldb_path/g' /etc/sasl2/libvirt.conf | ||||
|     else | ||||
|         echoerror "/etc/sasl2/libvirt.conf not found. Exiting..." | ||||
|         exit 1 | ||||
|     fi | ||||
|     if [ $DISTRO_MAJOR_VERSION -lt 7 ]; then | ||||
|         if [ -f /etc/supervisord.conf ]; then | ||||
|             curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd > /usr/local/bin/gstfsd | ||||
|  |  | |||
|  | @ -66,7 +66,7 @@ | |||
|                                 <div class="form-group"> | ||||
|                                     <label class="col-sm-3 control-label">{% trans "Name" %}</label> | ||||
|                                     <div class="col-sm-6"> | ||||
|                                         <input type="text" class="form-control" name="name" placeholder="default" maxlength="20" required pattern="[a-zA-Z0-9\.\-\_]+"> | ||||
|                                         <input type="text" class="form-control" name="name" placeholder="default" maxlength="20" required pattern="[a-zA-Z0-9\.\-_]+"> | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                                 <div class="form-group"> | ||||
|  | @ -217,7 +217,7 @@ | |||
|                                 <div class="form-group"> | ||||
|                                     <label class="col-sm-3 control-label">{% trans "Path" %}</label> | ||||
|                                     <div class="col-sm-6"> | ||||
|                                         <input type="text" class="form-control" name="target" value="/var/www/webvirtmgr/images" required pattern="[a-zA-Z0-9\/\-\_]+"> | ||||
|                                         <input type="text" class="form-control" name="target" value="/var/www/webvirtmgr/images" required pattern="[a-zA-Z0-9\/\-_]+"> | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                         </div> | ||||
|  | @ -235,4 +235,4 @@ | |||
|             </div> <!-- /.modal-content --> | ||||
|         </div> <!-- /.modal-dialog --> | ||||
|     </div> <!-- /.modal --> | ||||
| {% endif %} | ||||
| {% endif %} | ||||
|  |  | |||
|  | @ -8,9 +8,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__)) | |||
| 
 | ||||
| SECRET_KEY = '' | ||||
| 
 | ||||
| DEBUG = True  | ||||
| 
 | ||||
| TEMPLATE_DEBUG = DEBUG | ||||
| DEBUG = True | ||||
| 
 | ||||
| ALLOWED_HOSTS = ['*'] | ||||
| 
 | ||||
|  | @ -45,7 +43,7 @@ MIDDLEWARE_CLASSES = ( | |||
| ) | ||||
| 
 | ||||
| AUTHENTICATION_BACKENDS = ( | ||||
|     #'django.contrib.auth.backends.RemoteUserBackend', | ||||
|     'django.contrib.auth.backends.ModelBackend', | ||||
|     #'accounts.backends.MyRemoteUserBackend', | ||||
| ) | ||||
| 
 | ||||
|  |  | |||
|  | @ -7,10 +7,7 @@ For more information on this file, see | |||
| https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ | ||||
| """ | ||||
| 
 | ||||
| execfile('/srv/webvirtcloud/venv/bin/activate_this.py', dict(__file__='/srv/webvirtcloud/venv/bin/activate_this.py')) | ||||
| 
 | ||||
| import os, sys | ||||
| sys.path.append('/srv/webvirtcloud') | ||||
| import os | ||||
| os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webvirtcloud.settings") | ||||
| 
 | ||||
| from django.core.wsgi import get_wsgi_application | ||||
|  |  | |||
							
								
								
									
										17
									
								
								webvirtcloud/wsgi_custom.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								webvirtcloud/wsgi_custom.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| """ | ||||
| WSGI config for webvirtcloud project. | ||||
| 
 | ||||
| It exposes the WSGI callable as a module-level variable named ``application``. | ||||
| 
 | ||||
| For more information on this file, see | ||||
| https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ | ||||
| """ | ||||
| 
 | ||||
| execfile('/srv/webvirtcloud/venv/bin/activate_this.py', dict(__file__='/srv/webvirtcloud/venv/bin/activate_this.py')) | ||||
| 
 | ||||
| import os, sys | ||||
| sys.path.append('/srv/webvirtcloud') | ||||
| os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webvirtcloud.settings") | ||||
| 
 | ||||
| from django.core.wsgi import get_wsgi_application | ||||
| application = get_wsgi_application() | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue