Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
55430047
authored
Feb 26, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix login page html
parent
af853c19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
61 additions
and
30 deletions
+61
-30
.idea/workspace.xml
+0
-0
circle/circle/db.sqlite3
+0
-0
circle/common/views.py
+1
-0
circle/dashboard/templates/auth/login.html
+38
-22
circle/network/forms.py
+1
-2
circle/network/migrations/0004_remove_vxlan_owner.py
+19
-0
circle/network/models.py
+0
-2
circle/network/templates/network/editor.html
+1
-1
circle/network/views.py
+1
-3
No files found.
.idea/workspace.xml
View file @
55430047
This diff is collapsed.
Click to expand it.
circle/circle/db.sqlite3
View file @
55430047
No preview for this file type
circle/common/views.py
View file @
55430047
...
...
@@ -64,6 +64,7 @@ def handler403(request):
return
resp
#TODO: something like this for quotas?
class
CreateLimitedResourceMixin
(
object
):
resource_name
=
None
model
=
None
...
...
circle/dashboard/templates/auth/login.html
View file @
55430047
{% extends "dashboard/base.html" %}
{% load staticfiles %}
{% extends "registration/base.html" %}
{% load i18n %}
{% block title-page %}{% trans "
Virtual machines
" %}{% endblock %}
{% block title-page %}{% trans "
Login
" %}{% endblock %}
{% block content %}
{% block extra_link %}
{% include "open-graph.html" %}
{% endblock %}
<form
method=
"POST"
>
{% csrf_token %}
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
<i
class=
"fa fa-user"
></i>
</span>
<input
type=
"text"
name=
"username"
class=
"form-control"
>
{% block content_box %}
<div
class=
"row"
>
{% if form.password.errors or form.username.errors %}
<div
class=
"login-form-errors"
>
{% include "display-form-errors.html" %}
</div>
{% endif %}
<div
class=
"col-xs-{% if saml2 %}6{% else %}12{% endif %}"
>
<div
class=
"login-form"
>
<form
method=
"POST"
>
{% csrf_token %}
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
<i
class=
"fa fa-user"
></i>
</span>
<input
type=
"text"
name=
"username"
class=
"form-control"
>
</div>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
<i
class=
"fa fa-lock"
></i>
</span>
<input
type=
"password"
name=
"password"
class=
"form-control"
>
</div>
<button
type=
"submit"
class=
"btn btn-success"
>
Sign in
</button>
</form>
</div>
</div>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
<i
class=
"fa fa-lock"
></i>
</span>
<input
type=
"password"
name=
"password"
class=
"form-control"
>
{% if saml2 %}
<div
class=
"col-xs-6"
>
<h4
style=
"padding-top: 0; margin-top: 20px;"
>
{% trans "Login with SSO" %}
</h4>
<a
href=
"{% url "
saml2_login
"
%}"
>
{% trans "Click here!" %}
</a>
</div>
<button
type=
"submit"
class=
"btn btn-success"
>
Sign in
</button>
</form>
{% endblock %}
\ No newline at end of file
{% endif %}
</div>
{% endblock %}
circle/network/forms.py
View file @
55430047
...
...
@@ -362,7 +362,6 @@ class VxlanSuperUserForm(ModelForm):
'vlan'
,
'description'
,
'comment'
,
'owner'
,
)
),
FormActions
(
...
...
@@ -374,7 +373,7 @@ class VxlanSuperUserForm(ModelForm):
class
Meta
:
model
=
Vxlan
fields
=
(
'name'
,
'vni'
,
'vlan'
,
'description'
,
'comment'
,
'owner'
,
)
fields
=
(
'name'
,
'vni'
,
'vlan'
,
'description'
,
'comment'
,
)
class
VxlanForm
(
ModelForm
):
...
...
circle/network/migrations/0004_remove_vxlan_owner.py
0 → 100644
View file @
55430047
# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-02-26 12:31
from
__future__
import
unicode_literals
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'network'
,
'0003_editorelement'
),
]
operations
=
[
migrations
.
RemoveField
(
model_name
=
'vxlan'
,
name
=
'owner'
,
),
]
circle/network/models.py
View file @
55430047
...
...
@@ -95,8 +95,6 @@ class Vxlan(models.Model):
'Notes, comments about the network'
))
created_at
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
_
(
'created at'
))
owner
=
models
.
ForeignKey
(
User
,
blank
=
True
,
null
=
True
,
verbose_name
=
_
(
'owner'
))
modified_at
=
models
.
DateTimeField
(
auto_now
=
True
,
verbose_name
=
_
(
'modified at'
))
editor_elements
=
GenericRelation
(
EditorElement
)
...
...
circle/network/templates/network/editor.html
View file @
55430047
...
...
@@ -19,7 +19,7 @@
<div
class=
"col-md-9 text-left"
>
<h3
class=
"no-margin"
><i
class=
"fa fa-sitemap"
></i>
{% trans 'Editor' %}
</h3>
</div>
<div
class=
"col-md-3 text-
lef
t"
>
<div
class=
"col-md-3 text-
righ
t"
>
<button
class=
"btn btn-success btn-xs"
id=
"saveButton"
><i
class=
"fa fa-floppy-o"
></i></button>
</div>
</div>
...
...
circle/network/views.py
View file @
55430047
...
...
@@ -995,8 +995,7 @@ class VxlanDetail(LoginRequiredMixin, SuccessMessageMixin, UpdateView): #TODO: c
return
super
(
VxlanDetail
,
self
)
.
post
(
*
args
,
**
kwargs
)
class
VxlanCreate
(
LoginRequiredMixin
,
CreateLimitedResourceMixin
,
SuccessMessageMixin
,
InitialOwnerMixin
,
CreateView
):
class
VxlanCreate
(
LoginRequiredMixin
,
SuccessMessageMixin
,
InitialOwnerMixin
,
CreateView
):
model
=
Vxlan
profile_attribute
=
'network_limit'
resource_name
=
_
(
'Virtual network'
)
...
...
@@ -1032,7 +1031,6 @@ class VxlanCreate(LoginRequiredMixin, CreateLimitedResourceMixin,
def
form_valid
(
self
,
form
):
obj
=
form
.
save
(
commit
=
False
)
obj
.
owner
=
self
.
request
.
user
obj
.
vlan
=
self
.
get_default_vlan
()
try
:
obj
.
full_clean
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment