mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 15:45:23 +00:00
Fixed pep8
This commit is contained in:
parent
6a066f6e6d
commit
2aa5558df7
14 changed files with 110 additions and 89 deletions
|
@ -6,7 +6,10 @@ env:
|
|||
install:
|
||||
- pip install -r dev/requirements.txt --use-mirrors
|
||||
script:
|
||||
- pep8 --exclude=IPy.py --ignore=E501 vrtManager accounts computes console create instances interfaces networks secrets storages
|
||||
- pyflakes vrtManager accounts computes console create instances interfaces networks secrets storages
|
||||
- pep8 --exclude=IPy.py --ignore=E501 vrtManager accounts computes \
|
||||
console create instances interfaces \
|
||||
networks secrets storages
|
||||
- pyflakes vrtManager accounts computes console create instances interfaces \
|
||||
networks secrets storages
|
||||
- python manage.py migrate
|
||||
- python manage.py test --settings=webvirtcloud.settings-dev
|
||||
|
|
|
@ -5,9 +5,10 @@ from django.db import migrations
|
|||
|
||||
|
||||
def add_useradmin(apps, schema_editor):
|
||||
from django.contrib.auth.models import User
|
||||
# from django.contrib.auth.models import User
|
||||
# Broken in Django 1.8
|
||||
#User.objects.create_superuser("admin", None, "admin")
|
||||
# User.objects.create_superuser("admin", None, "admin")
|
||||
pass
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
from django.conf.urls import url
|
||||
from . import views
|
||||
|
||||
urlpatterns =[
|
||||
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'),
|
||||
urlpatterns = [
|
||||
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'),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
{% block title %}{% trans "Overview" %} - {{ compute.name }}{% endblock %}
|
||||
{% block content %}
|
||||
<!-- Page Heading -->
|
||||
|
@ -81,7 +82,7 @@
|
|||
</div>
|
||||
{% endblock %}
|
||||
{% block script %}
|
||||
<script src="{{ STATIC_URL }}js/Chart.min.js"></script>
|
||||
<script src="{% static "js/Chart.min.js" %}"></script>
|
||||
<script>
|
||||
var cpuLineData = {
|
||||
labels : [0, 0, 0, 0, 0],
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
from django.conf.urls import url
|
||||
from . import views
|
||||
|
||||
urlpatterns =[
|
||||
urlpatterns = [
|
||||
url(r'^$', views.computes, name='computes'),
|
||||
url(r'^overview/(?P<compute_id>[0-9]+)/$', views.overview, name='overview'),
|
||||
url(r'^statistics/(?P<compute_id>[0-9]+)/$', views.compute_graph, name='compute_graph'),
|
||||
url(r'^statistics/(?P<compute_id>[0-9]+)/$',
|
||||
views.compute_graph, name='compute_graph'),
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load staticfiles %}
|
||||
{% block title %}{% trans "Create new instance" %}{% endblock %}
|
||||
{% block style %}
|
||||
<link href="{% static "css/bootstrap-multiselect.css" %}" rel="stylesheet">
|
||||
|
@ -410,7 +410,7 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
<script src="{{ STATIC_URL }}/js/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="{% static "js/ace.js" %}"></script>
|
||||
<script>
|
||||
var editor = ace.edit("editor");
|
||||
editor.getSession().setMode("ace/mode/xml");
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
{% block title %}{% trans "Instances" %}{% endblock %}
|
||||
{% block style %}
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}/css/sortable-theme-bootstrap.css" />
|
||||
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}" />
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<!-- Page Heading -->
|
||||
|
@ -215,7 +216,7 @@
|
|||
</div>
|
||||
{% endblock %}
|
||||
{% block script %}
|
||||
<script src="{{ STATIC_URL }}js/sortable.min.js"></script>
|
||||
<script src="{% static "js/sortable.min.js" %}"></script>
|
||||
<script>
|
||||
function open_console(uuid) {
|
||||
window.open("{% url 'console' %}?token=" + uuid, "", "width=850,height=485");
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
from django.conf.urls import url
|
||||
from . import views
|
||||
|
||||
urlpatterns =[
|
||||
url(r'^(?P<compute_id>[0-9]+)/(?P<vname>[\w\-\.]+)/$', views.instance, name='instance'),
|
||||
url(r'^statistics/(?P<compute_id>[0-9]+)/(?P<vname>[\w\-\.]+)/$', views.inst_graph, name='inst_graph'),
|
||||
url(r'^status/(?P<compute_id>[0-9]+)/(?P<vname>[\w\-\.]+)/$', views.inst_status, name='inst_status'),
|
||||
urlpatterns = [
|
||||
url(r'^(?P<compute_id>[0-9]+)/(?P<vname>[\w\-\.]+)/$',
|
||||
views.instance, name='instance'),
|
||||
url(r'^statistics/(?P<compute_id>[0-9]+)/(?P<vname>[\w\-\.]+)/$',
|
||||
views.inst_graph, name='inst_graph'),
|
||||
url(r'^status/(?P<compute_id>[0-9]+)/(?P<vname>[\w\-\.]+)/$',
|
||||
views.inst_status, name='inst_status'),
|
||||
]
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
{% block title %}{% trans "Interfaces" %} - {{ compute.name }}{% endblock %}
|
||||
{% block content %}
|
||||
<!-- Page Heading -->
|
||||
|
@ -65,7 +66,7 @@
|
|||
</div>
|
||||
{% endblock %}
|
||||
{% block script %}
|
||||
<script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#itype').change(function (eventObject) {
|
||||
if ($(this).val() == 'bridge') {
|
||||
|
@ -89,5 +90,5 @@
|
|||
}
|
||||
}).change();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{% endblock %}
|
|
@ -2,9 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import datetime
|
||||
from django.conf import settings
|
||||
from django.utils.timezone import utc
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block script %}
|
||||
<script>
|
||||
<script>
|
||||
$.expr[':'].Contains = $.expr.createPseudo(function (arg) {
|
||||
return function (elem) {
|
||||
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
|
||||
|
@ -183,5 +183,5 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{% endblock %}
|
|
@ -1,8 +1,9 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
{% block title %}{% trans "Secrets" %} - {{ compute.name }}{% endblock %}
|
||||
{% block style %}
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}/css/sortable-theme-bootstrap.css" />
|
||||
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}" />
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<!-- Page Heading -->
|
||||
|
@ -117,5 +118,5 @@
|
|||
</div>
|
||||
{% endblock %}
|
||||
{% block script %}
|
||||
<script src="{{ STATIC_URL }}/js/sortable.min.js"></script>
|
||||
<script src="{% static "js/sortable.min.js" %}"></script>
|
||||
{% endblock %}
|
|
@ -1,8 +1,9 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
{% block title %}{% trans "Storage" %} - {{ pool }}{% endblock %}
|
||||
{% block style %}
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}css/sortable-theme-bootstrap.css" />
|
||||
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}" />
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<!-- Page Heading -->
|
||||
|
@ -186,7 +187,7 @@
|
|||
</div>
|
||||
{% endblock %}
|
||||
{% block script %}
|
||||
<script src="{{ STATIC_URL }}/js/sortable.min.js"></script>
|
||||
<script src="{% static "js/sortable.min.js" %}"></script>
|
||||
<script>
|
||||
$('.format-convert').hide();
|
||||
$(document).on('change', '.volume-convert', function () {
|
||||
|
|
|
@ -9,14 +9,22 @@ urlpatterns = patterns('',
|
|||
url(r'^accounts/', include('accounts.urls')),
|
||||
url(r'^computes/', include('computes.urls')),
|
||||
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/storages/$', 'storages.views.storages', name='storages'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/storage/(?P<pool>[\w\-\.]+)/$', 'storages.views.storage', name='storage'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/networks/$', 'networks.views.networks', name='networks'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/network/(?P<pool>[\w\-\.]+)/$', 'networks.views.network', name='network'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/interfaces/$', 'interfaces.views.interfaces', name='interfaces'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/interface/(?P<iface>[\w\-\.\:]+)/$', 'interfaces.views.interface', name='interface'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/secrets/$', 'secrets.views.secrets', name='secrets'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/create/$', 'create.views.create_instance', name='create_instance'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/storages/$',
|
||||
'storages.views.storages', name='storages'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/storage/(?P<pool>[\w\-\.]+)/$',
|
||||
'storages.views.storage', name='storage'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/networks/$',
|
||||
'networks.views.networks', name='networks'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/network/(?P<pool>[\w\-\.]+)/$',
|
||||
'networks.views.network', name='network'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/interfaces/$',
|
||||
'interfaces.views.interfaces', name='interfaces'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/interface/(?P<iface>[\w\-\.\:]+)/$',
|
||||
'interfaces.views.interface', name='interface'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/secrets/$',
|
||||
'secrets.views.secrets', name='secrets'),
|
||||
url(r'^compute/(?P<compute_id>[0-9]+)/create/$',
|
||||
'create.views.create_instance', name='create_instance'),
|
||||
|
||||
url(r'^console/$', 'console.views.console', name='console'),
|
||||
url(r'^logs/$', 'logs.views.showlogs', name='showlogs'),
|
||||
|
|
Loading…
Reference in a new issue