mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
Resoved problem with app template
This commit is contained in:
parent
35da9ad193
commit
b4e8da8671
42 changed files with 37 additions and 32 deletions
|
@ -5,7 +5,7 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include 'accounts/create_user_inst_block.html' %}
|
{% include 'create_user_inst_block.html' %}
|
||||||
<h1 class="page-header">{{ user }}</h1>
|
<h1 class="page-header">{{ user }}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include 'accounts/create_user_block.html' %}
|
{% include 'create_user_block.html' %}
|
||||||
<h1 class="page-header">{% trans "Users" %}</h1>
|
<h1 class="page-header">{% trans "Users" %}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "accounts/base_auth.html" %}
|
{% extends "base_auth.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "WebVirtCloud - Sign In" %}{% endblock %}
|
{% block title %}{% trans "WebVirtCloud - Sign In" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "accounts/base_auth.html" %}
|
{% extends "base_auth.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "WebVirtCloud - Sign Out" %}{% endblock %}
|
{% block title %}{% trans "WebVirtCloud - Sign Out" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
|
@ -2,8 +2,8 @@ from django.conf.urls import url
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
urlpatterns =[
|
urlpatterns =[
|
||||||
url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'accounts/login.html'}, name='login'),
|
url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}, name='login'),
|
||||||
url(r'^logout/$', 'django.contrib.auth.views.logout', {'template_name': 'accounts/logout.html'}, name='logout'),
|
url(r'^logout/$', 'django.contrib.auth.views.logout', {'template_name': 'logout.html'}, name='logout'),
|
||||||
url(r'^profile/$', views.profile, name='profile'),
|
url(r'^profile/$', views.profile, name='profile'),
|
||||||
url(r'^$', views.accounts, name='accounts'),
|
url(r'^$', views.accounts, name='accounts'),
|
||||||
url(r'^profile/(?P<user_id>[0-9]+)/$', views.account, name='account'),
|
url(r'^profile/(?P<user_id>[0-9]+)/$', views.account, name='account'),
|
||||||
|
|
|
@ -42,7 +42,7 @@ def profile(request):
|
||||||
user.save()
|
user.save()
|
||||||
return HttpResponseRedirect(request.get_full_path())
|
return HttpResponseRedirect(request.get_full_path())
|
||||||
|
|
||||||
return render(request, 'accounts/profile.html', locals())
|
return render(request, 'profile.html', locals())
|
||||||
|
|
||||||
|
|
||||||
def accounts(request):
|
def accounts(request):
|
||||||
|
@ -101,7 +101,7 @@ def accounts(request):
|
||||||
user_delete.delete()
|
user_delete.delete()
|
||||||
return HttpResponseRedirect(request.get_full_path())
|
return HttpResponseRedirect(request.get_full_path())
|
||||||
|
|
||||||
return render(request, 'accounts/accounts.html', locals())
|
return render(request, 'accounts.html', locals())
|
||||||
|
|
||||||
|
|
||||||
def account(request, user_id):
|
def account(request, user_id):
|
||||||
|
@ -150,4 +150,4 @@ def account(request, user_id):
|
||||||
add_user_inst.save()
|
add_user_inst.save()
|
||||||
return HttpResponseRedirect(request.get_full_path())
|
return HttpResponseRedirect(request.get_full_path())
|
||||||
|
|
||||||
return render(request, 'accounts/account.html', locals())
|
return render(request, 'account.html', locals())
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include 'computes/create_comp_block.html' %}
|
{% include 'create_comp_block.html' %}
|
||||||
<h1 class="page-header">{% trans "Computes" %}</h1>
|
<h1 class="page-header">{% trans "Computes" %}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -127,7 +127,7 @@ def computes(request):
|
||||||
else:
|
else:
|
||||||
for msg_err in form.errors.values():
|
for msg_err in form.errors.values():
|
||||||
error_messages.append(msg_err.as_text())
|
error_messages.append(msg_err.as_text())
|
||||||
return render(request, 'computes/computes.html', locals())
|
return render(request, 'computes.html', locals())
|
||||||
|
|
||||||
|
|
||||||
def overview(request, compute_id):
|
def overview(request, compute_id):
|
||||||
|
@ -157,7 +157,7 @@ def overview(request, compute_id):
|
||||||
except libvirtError as lib_err:
|
except libvirtError as lib_err:
|
||||||
error_messages.append(lib_err)
|
error_messages.append(lib_err)
|
||||||
|
|
||||||
return render(request, 'computes/overview.html', locals())
|
return render(request, 'overview.html', locals())
|
||||||
|
|
||||||
|
|
||||||
def compute_graph(request, compute_id):
|
def compute_graph(request, compute_id):
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include 'create/create_flav_block.html' %}
|
{% include 'create_flav_block.html' %}
|
||||||
<h1 class="page-header">{% trans "New instance on" %} {{ compute.name }}</h1>
|
<h1 class="page-header">{% trans "New instance on" %} {{ compute.name }}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -137,4 +137,4 @@ def create_instance(request, compute_id):
|
||||||
error_messages.append(lib_err)
|
error_messages.append(lib_err)
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
return render(request, 'create/create_instance.html', locals())
|
return render(request, 'create_instance.html', locals())
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include 'instances/create_inst_block.html' %}
|
{% include 'create_inst_block.html' %}
|
||||||
<div class="pull-right search">
|
<div class="pull-right search">
|
||||||
<input id="filter" class="form-control" type="text" placeholder="Search">
|
<input id="filter" class="form-control" type="text" placeholder="Search">
|
||||||
</div>
|
</div>
|
||||||
|
@ -238,7 +238,7 @@
|
||||||
<script>
|
<script>
|
||||||
function goto_compute() {
|
function goto_compute() {
|
||||||
var compute = $("#compute_select").val();
|
var compute = $("#compute_select").val();
|
||||||
window.location = "/create/" + compute + "/";
|
window.location = "/compute/" + compute + "/create/";
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
|
@ -120,7 +120,7 @@ def instances(request):
|
||||||
error_messages.append(lib_err)
|
error_messages.append(lib_err)
|
||||||
addlogmsg(request.user.id, instance.id, lib_err.message)
|
addlogmsg(request.user.id, instance.id, lib_err.message)
|
||||||
|
|
||||||
return render(request, 'instances/instances.html', locals())
|
return render(request, 'instances.html', locals())
|
||||||
|
|
||||||
|
|
||||||
def instance(request, compute_id, vname):
|
def instance(request, compute_id, vname):
|
||||||
|
@ -422,7 +422,7 @@ def instance(request, compute_id, vname):
|
||||||
error_messages.append(lib_err.message)
|
error_messages.append(lib_err.message)
|
||||||
addlogmsg(request.user.id, instance.id, lib_err.message)
|
addlogmsg(request.user.id, instance.id, lib_err.message)
|
||||||
|
|
||||||
return render(request, 'instances/instance.html', locals())
|
return render(request, 'instance.html', locals())
|
||||||
|
|
||||||
|
|
||||||
def inst_status(request, compute_id, vname):
|
def inst_status(request, compute_id, vname):
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include 'interfaces/create_iface_block.html' %}
|
{% include 'create_iface_block.html' %}
|
||||||
<h1 class="page-header">{{ compute.name }}</h1>
|
<h1 class="page-header">{{ compute.name }}</h1>
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="active">
|
<li class="active">
|
|
@ -54,7 +54,7 @@ def interfaces(request, compute_id):
|
||||||
except libvirtError as lib_err:
|
except libvirtError as lib_err:
|
||||||
error_messages.append(lib_err)
|
error_messages.append(lib_err)
|
||||||
|
|
||||||
return render(request, 'interfaces/interfaces.html', locals())
|
return render(request, 'interfaces.html', locals())
|
||||||
|
|
||||||
|
|
||||||
def interface(request, compute_id, iface):
|
def interface(request, compute_id, iface):
|
||||||
|
@ -103,4 +103,4 @@ def interface(request, compute_id, iface):
|
||||||
except libvirtError as lib_err:
|
except libvirtError as lib_err:
|
||||||
error_messages.append(lib_err)
|
error_messages.append(lib_err)
|
||||||
|
|
||||||
return render(request, 'interfaces/interface.html', locals())
|
return render(request, 'interface.html', locals())
|
||||||
|
|
|
@ -27,4 +27,4 @@ def showlogs(request):
|
||||||
|
|
||||||
logs = Logs.objects.all()
|
logs = Logs.objects.all()
|
||||||
|
|
||||||
return render(request, 'logs/showlogs.html', locals())
|
return render(request, 'showlogs.html', locals())
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include 'networks/create_net_block.html' %}
|
{% include 'create_net_block.html' %}
|
||||||
<h1 class="page-header">{{ compute.name }}</h1>
|
<h1 class="page-header">{{ compute.name }}</h1>
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="active">
|
<li class="active">
|
|
@ -57,7 +57,7 @@ def networks(request, compute_id):
|
||||||
except libvirtError as lib_err:
|
except libvirtError as lib_err:
|
||||||
error_messages.append(lib_err)
|
error_messages.append(lib_err)
|
||||||
|
|
||||||
return render(request, 'networks/networks.html', locals())
|
return render(request, 'networks.html', locals())
|
||||||
|
|
||||||
|
|
||||||
def network(request, compute_id, pool):
|
def network(request, compute_id, pool):
|
||||||
|
@ -127,4 +127,4 @@ def network(request, compute_id, pool):
|
||||||
|
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
return render(request, 'networks/network.html', locals())
|
return render(request, 'network.html', locals())
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include 'secrets/create_secret_block.html' %}
|
{% include 'create_secret_block.html' %}
|
||||||
<h1 class="page-header">{% trans "Secrets" %}</h1>
|
<h1 class="page-header">{% trans "Secrets" %}</h1>
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="active">
|
<li class="active">
|
|
@ -62,4 +62,4 @@ def secrets(request, compute_id):
|
||||||
except libvirtError as err:
|
except libvirtError as err:
|
||||||
error_messages.append(err)
|
error_messages.append(err)
|
||||||
|
|
||||||
return render(request, 'secrets/secrets.html', locals())
|
return render(request, 'secrets.html', locals())
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include 'storages/create_stg_vol_block.html' %}
|
{% include 'create_stg_vol_block.html' %}
|
||||||
<h1 class="page-header">{% trans "Storage:" %} {{ pool }}</h1>
|
<h1 class="page-header">{% trans "Storage:" %} {{ pool }}</h1>
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="active">
|
<li class="active">
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include 'storages/create_stg_block.html' %}
|
{% include 'create_stg_block.html' %}
|
||||||
<h1 class="page-header">{{ compute.name }}</h1>
|
<h1 class="page-header">{{ compute.name }}</h1>
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="active">
|
<li class="active">
|
|
@ -65,7 +65,7 @@ def storages(request, compute_id):
|
||||||
except libvirtError as lib_err:
|
except libvirtError as lib_err:
|
||||||
error_messages.append(lib_err)
|
error_messages.append(lib_err)
|
||||||
|
|
||||||
return render(request, 'storages/storages.html', locals())
|
return render(request, 'storages.html', locals())
|
||||||
|
|
||||||
|
|
||||||
def storage(request, compute_id, pool):
|
def storage(request, compute_id, pool):
|
||||||
|
@ -202,4 +202,4 @@ def storage(request, compute_id, pool):
|
||||||
error_messages.append(msg_err.as_text())
|
error_messages.append(msg_err.as_text())
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
return render(request, 'storages/storage.html', locals())
|
return render(request, 'storage.html', locals())
|
||||||
|
|
|
@ -22,10 +22,15 @@ INSTALLED_APPS = (
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'computes',
|
'computes',
|
||||||
|
'console',
|
||||||
|
'networks',
|
||||||
|
'storages',
|
||||||
|
'interfaces',
|
||||||
'instances',
|
'instances',
|
||||||
|
'secrets',
|
||||||
|
'logs',
|
||||||
'accounts',
|
'accounts',
|
||||||
'create',
|
'create',
|
||||||
'logs',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = (
|
MIDDLEWARE_CLASSES = (
|
||||||
|
|
Loading…
Reference in a new issue