Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
ad85f38e
authored
Feb 12, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: filter already added interfaces
parent
bbe883da
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
circle/dashboard/templates/dashboard/vm-detail/_network-port-add.html
+0
-0
circle/dashboard/templates/dashboard/vm-detail/network.html
+4
-1
circle/dashboard/views.py
+5
-1
No files found.
circle/dashboard/templates/dashboard/vm-detail/network-port-add.html
→
circle/dashboard/templates/dashboard/vm-detail/
_
network-port-add.html
View file @
ad85f38e
File moved
circle/dashboard/templates/dashboard/vm-detail/network.html
View file @
ad85f38e
...
...
@@ -104,7 +104,7 @@
<h4>
{% trans "This VM doesn't have an IPv6 address!" %}
</h4>
{% endif %}
</div>
<!-- /ipv6 -->
{% include "dashboard/vm-detail/network-port-add.html" %}
{% include "dashboard/vm-detail/
_
network-port-add.html" %}
</div>
</div>
</div>
...
...
@@ -121,6 +121,9 @@
{% csrf_token %}
<div
class=
"input-group"
style=
"max-width: 330px;"
>
<select
name=
"new_network_vlan"
class=
"form-control"
>
{% if vlans|length == 0 %}
<option
value=
"-1"
>
No more networks!
</option>
{% endif %}
{% for v in vlans %}
<option
value=
"{{ v.pk }}"
>
{{ v.name }}
</option>
{% endfor %}
...
...
circle/dashboard/views.py
View file @
ad85f38e
...
...
@@ -154,7 +154,11 @@ class VmDetailView(CheckedDetailView):
context
[
'activity'
]
=
ia
context
[
'vlans'
]
=
Vlan
.
get_objects_with_level
(
'user'
,
self
.
request
.
user
)
.
all
()
'user'
,
self
.
request
.
user
)
.
exclude
(
pk__in
=
Interface
.
objects
.
filter
(
instance
=
self
.
get_object
())
.
values_list
(
"vlan"
,
flat
=
True
)
)
.
all
()
context
[
'acl'
]
=
get_acl_data
(
instance
)
context
[
'forms'
]
=
{
'disk_add_form'
:
DiskAddForm
(
prefix
=
"disk"
),
...
...
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