Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3d1ceb98
authored
Sep 19, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: vm list
parent
ab32ba2c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
4 deletions
+60
-4
circle/dashboard/templates/dashboard/index-vm.html
+1
-1
circle/dashboard/templates/dashboard/vm-list.html
+47
-0
circle/dashboard/urls.py
+6
-3
circle/dashboard/views.py
+6
-0
No files found.
circle/dashboard/templates/dashboard/index-vm.html
View file @
3d1ceb98
...
...
@@ -39,7 +39,7 @@
</div>
</div>
<div
class=
"col-sm-6 text-right"
>
<a
class=
"btn btn-primary btn-xs"
><i
class=
"icon-chevron-sign-right"
></i>
<strong>
13
</strong>
more
</a>
<a
class=
"btn btn-primary btn-xs"
href=
"{% url "
dashboard
.
views
.
vm-list
"
%}"
><i
class=
"icon-chevron-sign-right"
></i>
<strong>
13
</strong>
more
</a>
<a
class=
"btn btn-success btn-xs"
><i
class=
"icon-plus-sign"
></i>
new
</a>
</div>
</div>
...
...
circle/dashboard/templates/dashboard/vm-list.html
0 → 100644
View file @
3d1ceb98
{% extends "dashboard/base.html" %}
{% load i18n %}
{% block content %}
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"no-margin"
><i
class=
"icon-desktop"
></i>
Your virtual machines
</h3>
</div>
<div
class=
"panel-body"
>
<table
class=
"table table-striped table-bordered"
>
<thead>
<tr>
<td
style=
"width: 10px;"
><input
type=
"checkbox"
/></td>
<td>
Name
</td>
<td>
State
</td>
<td>
Suspend in
</td>
<td>
Delete in
</td>
<td
style=
"width: 10px;"
>
Actions
</td>
</tr>
</thead>
<tbody>
<tr>
<td><input
type=
"checkbox"
/></td>
<td><a
href=
""
>
network-devenv
</a></td>
<td>
running
</td>
<td>
10 days
</td>
<td>
1 month
</td>
<td>
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-xs btn-info dropdown-toggle"
data-toggle=
"dropdown"
>
Action
<i
class=
"icon-caret-down"
></i></button>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li><a
href=
"#"
><i
class=
"icon-refresh"
></i>
Reboot
</a></li>
<li><a
href=
"#"
><i
class=
"icon-off"
></i>
Shutdown
</a></li>
<li><a
href=
"#"
><i
class=
"icon-remove"
></i>
Discard
</a></li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endblock %}
circle/dashboard/urls.py
View file @
3d1ceb98
from
django.conf.urls
import
patterns
,
url
from
.views
import
IndexView
,
VmDetailView
from
.views
import
IndexView
,
VmDetailView
,
VmList
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
url
(
r'^$'
,
IndexView
.
as_view
()),
url
(
r'^vm/(?P<pk>\d+)/$'
,
VmDetailView
.
as_view
(),
name
=
'dashboard.views.detail'
),)
name
=
'dashboard.views.detail'
),
url
(
r'^vm/list/$'
,
VmList
.
as_view
(),
name
=
'dashboard.views.vm-list'
),
)
circle/dashboard/views.py
View file @
3d1ceb98
from
django.views.generic
import
TemplateView
,
DetailView
# from django_tables2 import SingleTableView
from
vm.models
import
Instance
from
django.core
import
signing
...
...
@@ -35,3 +37,7 @@ class VmDetailView(DetailView):
'vnc_url'
:
'
%
s'
%
value
})
return
context
class
VmList
(
TemplateView
):
template_name
=
"dashboard/vm-list.html"
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