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
caf8f033
authored
May 07, 2015
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature-django18
Conflicts: requirements/base.txt
parents
a43c9ead
0ac5aa0b
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
165 additions
and
81 deletions
+165
-81
circle/circle/settings/base.py
+1
-0
circle/circle/settings/local.py
+2
-2
circle/dashboard/compilers.py
+23
-0
circle/dashboard/static/dashboard/activity.js
+2
-0
circle/dashboard/static/dashboard/dashboard.js
+4
-3
circle/dashboard/static/dashboard/dashboard.less
+28
-1
circle/dashboard/static/dashboard/vm-details.js
+3
-2
circle/dashboard/static/template.less
+7
-0
circle/dashboard/templates/base.html
+9
-4
circle/dashboard/templates/dashboard/_display-name.html
+5
-0
circle/dashboard/templates/dashboard/_manage_access.html
+2
-2
circle/dashboard/templates/dashboard/base.html
+5
-6
circle/dashboard/templates/dashboard/group-detail.html
+1
-1
circle/dashboard/templates/dashboard/index-groups.html
+1
-1
circle/dashboard/templates/dashboard/index-nodes.html
+8
-4
circle/dashboard/templates/dashboard/index-templates.html
+2
-2
circle/dashboard/templates/dashboard/index-users.html
+1
-1
circle/dashboard/templates/dashboard/index-vm.html
+4
-2
circle/dashboard/templates/dashboard/profile.html
+0
-1
circle/dashboard/templates/dashboard/store/index-files.html
+1
-1
circle/dashboard/templates/dashboard/vm-detail.html
+2
-2
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
+3
-3
circle/dashboard/templates/dashboard/vm-detail/console.html
+31
-10
circle/dashboard/templates/dashboard/vm-detail/home.html
+7
-4
circle/dashboard/templates/dashboard/vm-detail/network.html
+4
-3
circle/dashboard/templates/dashboard/vm-detail/resources.html
+3
-3
circle/dashboard/views/graph.py
+1
-1
circle/templates/registration/base.html
+0
-7
circle/templates/registration/login.html
+4
-12
requirements/base.txt
+1
-3
No files found.
circle/circle/settings/base.py
View file @
caf8f033
...
...
@@ -156,6 +156,7 @@ STATIC_URL = get_env_variable('DJANGO_STATIC_URL', default='/static/')
STATICFILES_FINDERS
=
(
'django.contrib.staticfiles.finders.FileSystemFinder'
,
'django.contrib.staticfiles.finders.AppDirectoriesFinder'
,
'pipeline.finders.PipelineFinder'
,
)
########## END STATIC FILE CONFIGURATION
STATICFILES_DIRS
=
[
normpath
(
join
(
SITE_ROOT
,
'bower_components'
))]
...
...
circle/circle/settings/local.py
View file @
caf8f033
...
...
@@ -110,8 +110,8 @@ if DEBUG:
from
django.dispatch
import
Signal
Signal
.
send_robust
=
Signal
.
send
PIPELINE_
DISABLED_
COMPILERS
=
(
'
pipeline.compilers.less.
LessCompiler'
,
PIPELINE_COMPILERS
=
(
'
dashboard.compilers.Dummy
LessCompiler'
,
)
ADMIN_ENABLED
=
True
circle/dashboard/compilers.py
0 → 100644
View file @
caf8f033
# Copyright 2014 Budapest University of Technology and Economics (BME IK)
#
# This file is part of CIRCLE Cloud.
#
# CIRCLE is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# CIRCLE is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
from
pipeline.compilers.less
import
LessCompiler
class
DummyLessCompiler
(
LessCompiler
):
def
compile_file
(
self
,
*
args
,
**
kwargs
):
pass
circle/dashboard/static/dashboard/activity.js
View file @
caf8f033
...
...
@@ -145,11 +145,13 @@ $(function() {
$
(
"#dashboard-vm-details-connect-button"
).
removeClass
(
'disabled'
);
}
$
(
"[data-target=#_console]"
).
attr
(
"data-toggle"
,
"pill"
).
attr
(
"href"
,
"#console"
).
parent
(
"li"
).
removeClass
(
"disabled"
);
$
(
"#getScreenshotButton"
).
prop
(
"disabled"
,
false
);
}
else
{
if
(
data
.
connect_uri
)
{
$
(
"#dashboard-vm-details-connect-button"
).
addClass
(
'disabled'
);
}
$
(
"[data-target=#_console]"
).
attr
(
"data-toggle"
,
"_pill"
).
attr
(
"href"
,
"#"
).
parent
(
"li"
).
addClass
(
"disabled"
);
$
(
"#getScreenshotButton"
).
prop
(
"disabled"
,
true
);
}
if
(
data
.
status
==
"STOPPED"
||
data
.
status
==
"PENDING"
)
{
...
...
circle/dashboard/static/dashboard/dashboard.js
View file @
caf8f033
...
...
@@ -10,10 +10,11 @@ $(function () {
$
(
".not-tab-pane"
).
removeClass
(
"not-tab-pane"
).
addClass
(
"tab-pane"
);
$
(
'.vm-create'
).
click
(
function
(
e
)
{
var
template
=
$
(
this
).
data
(
"template"
);
var
url
=
$
(
this
).
data
(
"href"
);
if
(
!
url
)
url
=
$
(
this
).
prop
(
"href"
);
$
.
ajax
({
type
:
'GET'
,
url
:
$
(
this
).
attr
(
'href'
)
,
url
:
url
,
success
:
function
(
data
)
{
$
(
'body'
).
append
(
data
);
vmCreateLoaded
();
...
...
@@ -140,7 +141,7 @@ $(function () {
// success
},
error
:
function
(
xhr
,
textStatus
,
error
)
{
console
.
log
(
"oh babám"
);
addMessage
(
gettext
(
"An error occurred. ("
)
+
xhr
.
status
+
")"
,
'danger'
);
}
});
$
(
star
).
tooltip
(
'destroy'
).
tooltip
({
'placement'
:
'right'
});
...
...
circle/dashboard/static/dashboard/dashboard.less
View file @
caf8f033
...
...
@@ -10,6 +10,21 @@ html {
min-height: 100%;
}
.navbar-nav img {
width: 46px;
height: 46px;
margin-top: -4px;
}
.profile-avatar {
width: 24px;
height: 24px;
}
.navbar-fixed-top {
border: 0px;
}
/* Set widths on the navbar form inputs since otherwise they're 100% wide */
.navbar-form input[type="text"],
.navbar-form input[type="password"] {
...
...
@@ -32,7 +47,7 @@ html {
#dashboard-menu {
margin-right:
15
px;
margin-right:
0
px;
}
/* we need this for mobile view */
...
...
@@ -56,6 +71,9 @@ html {
padding-bottom: 12.5px;
}
#dashboard-menu > li:last-child > a {
padding: 4px 0 0 0;
}
}
.no-margin {
...
...
@@ -110,6 +128,11 @@ html {
background-color: black!important;
}
.timeline img{
border-radius: 50%;
margin-bottom: 2px;
}
.timeline a {
color: black;
}
...
...
@@ -1321,3 +1344,7 @@ textarea[name="new_members"] {
padding-top: 5px;
padding-bottom: 5px;
}
.acl-table td:first-child {
text-align: center;
}
circle/dashboard/static/dashboard/vm-details.js
View file @
caf8f033
...
...
@@ -185,12 +185,13 @@ $(function() {
$
(
"i"
,
this
).
addClass
(
"fa-spinner fa-spin"
);
$
(
this
).
prop
(
"disabled"
,
true
);
ct
.
slideDown
();
var
img
=
$
(
"img"
,
ct
).
prop
(
"src"
,
'/dashboard/vm/'
+
vm
+
'/screenshot/
'
);
var
img
=
$
(
"img"
,
ct
).
prop
(
"src"
,
'/dashboard/vm/'
+
vm
+
'/screenshot/
?rnd='
+
Math
.
random
()
);
});
// if the image is loaded remove the spinning stuff
// note: this should not work if the image is cached, but it's not
// see: http://stackoverflow.com/a/3877079/1112653
// note #2: it actually gets cached, so a random number is appended
$
(
"#vm-console-screenshot img"
).
load
(
function
(
e
)
{
$
(
"#getScreenshotButton"
).
prop
(
"disabled"
,
false
)
.
find
(
"i"
).
removeClass
(
"fa-spinner fa-spin"
);
...
...
@@ -200,7 +201,7 @@ $(function() {
// screenshot close
$
(
"#vm-console-screenshot button"
).
click
(
function
()
{
$
(
this
).
paren
t
(
"div"
).
slideUp
();
$
(
this
).
closes
t
(
"div"
).
slideUp
();
});
// select connection string
...
...
circle/dashboard/static/template.less
View file @
caf8f033
...
...
@@ -55,6 +55,9 @@ html {
.bigbig {
font-size: 3em;
}
.big-tag {
font-size: 1.2em;
}
/* small buttons for tags, copied from Bootstraps input-sm, bnt-sm */
.btn-tags, .btn-traits {
padding: 3px 6px;
...
...
@@ -148,3 +151,7 @@ footer a, footer a:hover, footer a:visited {
.btn-toolbar {
margin-bottom: 5px;
}
.vm-details-home-edit-description {
font-size: 85%; /* ~ small tag */
}
circle/dashboard/templates/base.html
View file @
caf8f033
{% load i18n %}
{% load staticfiles %}
{% load cache %}
{% load
compressed
%}
{% load
pipeline
%}
<!DOCTYPE html>
<html
lang=
"{{lang}}"
>
<head>
...
...
@@ -14,7 +14,7 @@
<title>
{% block title %}{% block title-page %}{% endblock %} | {% block title-site %}CIRCLE{% endblock %}{% endblock %}
</title>
{%
compressed_css
'all' %}
{%
stylesheet
'all' %}
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
...
...
@@ -28,7 +28,12 @@
<body>
<div
class=
"navbar navbar-inverse navbar-fixed-top"
>
<div
class=
"navbar-header"
>
{% block navbar-brand %}{% endblock %}
{% block navbar-brand %}
<a
class=
"navbar-brand"
href=
"{% url "
dashboard
.
index
"
%}"
style=
"padding: 10px 15px;"
>
{% include "branding.html" %}
</a>
{% endblock %}
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
...
...
@@ -84,7 +89,7 @@
<script
src=
"{% static "
jquery
/
dist
/
jquery
.
min
.
js
"
%}"
></script>
<script
src=
"{{ STATIC_URL }}jsi18n/{{ LANGUAGE_CODE }}/djangojs.js"
></script>
{%
compressed_js
'all' %}
{%
javascript
'all' %}
{% block extra_script %}
{% endblock %}
...
...
circle/dashboard/templates/dashboard/_display-name.html
View file @
caf8f033
{% load i18n %}
{% if user and user.pk %}
{% if show_pic %}
<img
class=
"profile-avatar"
src=
"{{ user.profile.get_avatar_url }}"
/>
{% endif%}
{% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user.username }}{% endif %}{% if new_line %}
<br
/>
{% endif %}
{% if show_org %}
...
...
@@ -10,4 +14,5 @@
({% trans "username" %}: {{ user.username }})
{% endif %}
{% endif %}
{% endif %}
circle/dashboard/templates/dashboard/_manage_access.html
View file @
caf8f033
{% load i18n %}
<form
action=
"{{ acl.url }}"
method=
"post"
>
{% csrf_token %}
<table
class=
"table table-striped table-with-form-fields"
id=
"{{table_id}}"
>
<table
class=
"table table-striped table-with-form-fields
acl-table
"
id=
"{{table_id}}"
>
<thead>
<tr>
<th></th>
...
...
@@ -13,7 +13,7 @@
{% for i in acl.users %}
<tr>
<td>
<i
class=
"fa fa-user"
></i
>
<img
class=
"profile-avatar"
src=
"{{ i.user.profile.get_avatar_url }}"
/
>
</td>
<td>
<a
href=
"{% url "
dashboard
.
views
.
profile
"
username=
i.user.username
%}"
...
...
circle/dashboard/templates/dashboard/base.html
View file @
caf8f033
...
...
@@ -10,12 +10,6 @@
{% endblock %}
{% block navbar-brand %}
<a
class=
"navbar-brand"
href=
"{% url "
dashboard
.
index
"
%}"
style=
"padding: 10px 15px;"
>
{% include "branding.html" %}
</a>
{% endblock %}
{% block navbar %}
{% if user.is_authenticated and user.pk and not request.token_user %}
<ul
class=
"nav navbar-nav navbar-right"
id=
"dashboard-menu"
>
...
...
@@ -93,6 +87,11 @@
<li>
{% trans "Loading..." %}
</li>
</ul>
</li>
<li
class=
"hidden-xs"
>
<a
href=
"{% url "
dashboard
.
views
.
profile-preferences
"
%}"
>
<img
class=
"profile-avatar"
src=
"{{ user.profile.get_avatar_url }}"
/>
</a>
</li>
</ul>
{% else %}
...
...
circle/dashboard/templates/dashboard/group-detail.html
View file @
caf8f033
...
...
@@ -90,7 +90,7 @@
{% for i in users %}
<tr>
<td>
<i
class=
"fa fa-user"
></i
>
<i
mg
class=
"profile-avatar"
src=
"{{ i.profile.get_avatar_url}}"
/
>
</td>
<td>
<a
href=
"{% url "
dashboard
.
views
.
profile
"
username=
i.username
%}"
title=
"{{ i.username }}"
...
...
circle/dashboard/templates/dashboard/index-groups.html
View file @
caf8f033
...
...
@@ -20,7 +20,7 @@
<div
class=
"col-xs-6"
>
<form
action=
"{% url "
dashboard
.
views
.
group-list
"
%}"
method=
"GET"
id=
"dashboard-group-search-form"
>
<div
class=
"input-group input-group-sm"
>
<input
id=
"dashboard-group-search-input"
name=
"s"
type=
"text"
class=
"form-control"
placeholder=
"{% trans "
Search
..."
%}"
/>
<input
name=
"s"
type=
"text"
class=
"form-control"
placeholder=
"{% trans "
Search
..."
%}"
/>
<div
class=
"input-group-btn"
>
<button
type=
"submit"
class=
"btn btn-primary"
><i
class=
"fa fa-search"
></i></button>
</div>
...
...
circle/dashboard/templates/dashboard/index-nodes.html
View file @
caf8f033
...
...
@@ -72,11 +72,15 @@
value=
"{% widthratio node_num.running sum_node_num 100 %}"
>
</p>
<p>
{% blocktrans with running=node_num.running missing=node_num.missing disabled=node_num.disabled offline=node_num.offline %}
<span
class=
"big"
>
<big>
{{ node_num.running }}
</big>
running
</span>
+
<big>
{{ node_num.missing }}
</big>
missing +
<br><big>
{{ node_num.disabled }}
</big>
disabled +
<big>
{{ node_num.offline }}
</big>
offline
<span
class=
"big-tag"
>
{{ running }}
</span>
running
</span>
+
<span
class=
"big-tag"
>
{{ missing }}
</span>
missing +
<br>
<span
class=
"big-tag"
>
{{ disabled }}
</span>
disabled +
<span
class=
"big-tag"
>
{{ offline }}
</span>
offline
{% endblocktrans %}
</p>
<ul
class=
"list-inline"
id=
"dashboard-node-taglist"
>
{% for i in nodes %}
...
...
circle/dashboard/templates/dashboard/index-templates.html
View file @
caf8f033
...
...
@@ -16,7 +16,7 @@
<i
class=
"fa fa-{{ t.os_type }}"
></i>
{{ t.name }}
</span>
<small
class=
"text-muted index-template-list-system"
>
{{ t.system }}
</small>
<div
href=
"{% url "
dashboard
.
views
.
vm-create
"
%}?
template=
{{
t
.
pk
}}"
class=
"pull-right vm-create"
>
<div
data-
href=
"{% url "
dashboard
.
views
.
vm-create
"
%}?
template=
{{
t
.
pk
}}"
class=
"pull-right vm-create"
>
<i
data-container=
"body"
title=
"{% trans "
Start
VM
instance
"
%}"
class=
"fa fa-play"
></i>
</div>
...
...
@@ -37,7 +37,7 @@
<div
class=
"col-xs-5 col-sm-6"
>
<form
action=
"{% url "
dashboard
.
views
.
template-list
"
%}"
method=
"GET"
id=
"dashboard-template-search-form"
>
<div
class=
"input-group input-group-sm"
>
<input
id=
"dashboard-group-search-input"
name=
"s"
type=
"text"
class=
"form-control"
placeholder=
"{% trans "
Search
..."
%}"
/>
<input
name=
"s"
type=
"text"
class=
"form-control"
placeholder=
"{% trans "
Search
..."
%}"
/>
<div
class=
"input-group-btn"
>
<button
type=
"submit"
class=
"btn btn-primary"
><i
class=
"fa fa-search"
></i></button>
</div>
...
...
circle/dashboard/templates/dashboard/index-users.html
View file @
caf8f033
...
...
@@ -25,7 +25,7 @@
<div
class=
"col-xs-5 col-sm-6"
>
<form
action=
"{% url "
dashboard
.
views
.
user-list
"
%}"
method=
"GET"
id=
"dashboard-user-search-form"
>
<div
class=
"input-group input-group-sm"
>
<input
id=
"dashboard-group-search-input"
name=
"s"
type=
"text"
class=
"form-control"
placeholder=
"{% trans "
Search
..."
%}"
/>
<input
name=
"s"
type=
"text"
class=
"form-control"
placeholder=
"{% trans "
Search
..."
%}"
/>
<div
class=
"input-group-btn"
>
<button
type=
"submit"
class=
"btn btn-primary"
><i
class=
"fa fa-search"
></i></button>
</div>
...
...
circle/dashboard/templates/dashboard/index-vm.html
View file @
caf8f033
...
...
@@ -90,7 +90,7 @@
<p
class=
"pull-right"
>
<input
class=
"knob"
data-fgColor=
"chartreuse"
data-thickness=
".4"
data-max=
"{{ request.user.profile.instance_limit }}"
data-width=
"100"
data-height=
"100"
data-readOnly=
"true"
value=
"{{ instances|length|add:more_instances }}"
>
</p>
<span
class=
"bigbig"
>
{% blocktrans with count=running_vm_num %}
<
big>
{{ count }}
</big
>
running{% endblocktrans %}
</span>
<span
class=
"bigbig"
>
{% blocktrans with count=running_vm_num %}
<
span
class=
"big-tag"
>
{{ count }}
</span
>
running{% endblocktrans %}
</span>
<ul
class=
"list-inline"
style=
"max-height: 95px; overflow: hidden;"
>
{% for vm in running_vms %}
<li
style=
"display: inline-block; padding: 2px;"
>
...
...
@@ -111,7 +111,9 @@
<strong>
{{ counter }}
</strong>
machines total
{% endblocktrans %}
</a>
<p
class=
"big text-warning"
>
{% blocktrans with count=stopped_vm_num %}
<big>
{{ count }}
</big>
stopped{% endblocktrans %}
</p>
<p
class=
"big text-warning"
>
{% blocktrans with count=stopped_vm_num %}{{ count }} stopped{% endblocktrans %}
</p>
</div>
</div>
</div>
circle/dashboard/templates/dashboard/profile.html
View file @
caf8f033
...
...
@@ -24,7 +24,6 @@
{% trans "Back" %}
</a>
</div>
<h3
class=
"no-margin"
>
<i
class=
"fa fa-user"
></i>
{% include "dashboard/_display-name.html" with user=profile show_org=True %}
</h3>
</div>
...
...
circle/dashboard/templates/dashboard/store/index-files.html
View file @
caf8f033
...
...
@@ -58,7 +58,7 @@
<div
class=
"text-right"
>
<form
class=
"pull-left"
method=
"POST"
action=
"{% url "
dashboard
.
views
.
store-refresh-toplist
"
%}"
>
{% csrf_token %}
<button
class=
"btn btn-success btn-xs"
type=
"submit"
title=
"{% trans "
Refresh
"
%}"
/
>
<button
class=
"btn btn-success btn-xs"
type=
"submit"
title=
"{% trans "
Refresh
"
%}"
>
<i
class=
"fa fa-refresh"
></i>
</button>
</form>
...
...
circle/dashboard/templates/dashboard/vm-detail.html
View file @
caf8f033
{% extends "dashboard/base.html" %}
{% load staticfiles %}
{% load i18n %}
{% load
compressed
%}
{% load
pipeline
%}
{% block title-page %}{{ instance.name }} | vm{% endblock %}
...
...
@@ -242,5 +242,5 @@
{% endblock %}
{% block extra_js %}
{%
compressed_js
'vm-detail' %}
{%
javascript
'vm-detail' %}
{% endblock %}
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
View file @
caf8f033
...
...
@@ -19,9 +19,9 @@
- {{ a.percentage }}%
{% endif %}
</strong>
{% endspaceless %}{% if a.times
<
2
%}
<
span
title=
"{{ a.started }}"
>
{{ a.started|arrowfilter:LANGUAGE_CODE }}
</span>
{% endif %}{% if a.user %},
{% endspaceless %}{% if a.times
<
2
%}
&
nbsp
;
<
span
title=
"{{ a.started }}"
>
{{ a.started|arrowfilter:LANGUAGE_CODE }}
</span>
{% endif %}{% if a.user %},
<a
class=
"no-style-link"
href=
"{% url "
dashboard
.
views
.
profile
"
username=
a.user.username
%}"
>
{% include "dashboard/_display-name.html" with user=a.user show_org=True %}
{% include "dashboard/_display-name.html" with user=a.user show_org=True
show_pic=True
%}
</a>
{% endif %}
{% if a.is_abortable_for_user %}
...
...
@@ -45,7 +45,7 @@
{{ s.finished|arrowfilter:LANGUAGE_CODE }}
</span>
{% else %}
<i
class=
"fa fa-refresh fa-spin"
class=
"sub-activity-loading-icon"
></i>
<i
class=
"fa fa-refresh fa-spin"
></i>
{% endif %}
{% if s.has_failed %}
<div
class=
"label label-danger"
>
{% trans "failed" %}
</div>
...
...
circle/dashboard/templates/dashboard/vm-detail/console.html
View file @
caf8f033
{% load i18n %}
{% load staticfiles %}
<div
class=
"btn-toolbar"
>
{% if perms.vm.access_console %}
<button
id=
"sendCtrlAltDelButton"
class=
"btn btn-danger btn-sm"
>
{% trans "Send Ctrl+Alt+Del" %}
</button>
<button
id=
"sendPasswordButton"
class=
"btn btn-default btn-sm"
>
{% trans "Type password" %}
</button>
{% if not perms.vm.vm_access_console %}
<div
class=
"alert alert-warning"
>
{% trans "You are not authorized to access the VNC console." %}
</div>
{% endif %}
<button
id=
"getScreenshotButton"
class=
"btn btn-info btn-sm pull-right"
data-vm-pk=
"{{ instance.pk }}"
><i
class=
"fa fa-picture"
></i>
{% trans "Screenshot" %}
</button>
<div
class=
"row"
>
<div
class=
"col-xs-7"
>
<div
class=
"btn-toolbar"
>
{% if perms.vm.access_console %}
<button
id=
"sendCtrlAltDelButton"
class=
"btn btn-danger btn-sm"
>
{% trans "Send Ctrl+Alt+Del" %}
</button>
<button
id=
"sendPasswordButton"
class=
"btn btn-default btn-sm"
>
{% trans "Type password" %}
</button>
{% endif %}
</div>
</div>
<div
class=
"col-xs-5 text-right"
>
<button
id=
"getScreenshotButton"
class=
"btn btn-info btn-sm"
data-vm-pk=
"{{ instance.pk }}"
>
<i
class=
"fa fa-photo"
></i>
{% trans "Screenshot" %}
</button>
</div>
</div>
{% if perms.vm.access_console %}
<div
class=
"alert alert-info"
id=
"noVNC_status"
>
</div>
<div
class=
"alert alert-info"
id=
"noVNC_status"
></div>
{% endif %}
<div
id=
"vm-console-screenshot"
>
<h3>
<button
class=
"btn btn-danger btn-sm pull-right"
>
{% trans "Close" %}
</button>
<h3>
{% trans "Screenshot" %}
</h3>
<img
/>
{% trans "Screenshot" %}
</h3>
<img
alt=
"{% trans "
Screenshot
"
%}"
/>
<hr
/>
</div>
{% if perms.vm.access_console %}
<canvas
id=
"noVNC_canvas"
width=
"640
px"
height=
"20px
"
>
Canvas not supported.
<canvas
id=
"noVNC_canvas"
width=
"640
"
height=
"20
"
>
Canvas not supported.
</canvas>
<script>
...
...
circle/dashboard/templates/dashboard/vm-detail/home.html
View file @
caf8f033
...
...
@@ -39,7 +39,7 @@
<dd>
{% csrf_token %}
<div
class=
"vm-details-home-edit-description-click"
>
<
small
class=
"vm-details-home-edit-description"
>
{{ instance.description|linebreaks }}
</small
>
<
div
class=
"vm-details-home-edit-description"
>
{{ instance.description|linebreaks }}
</div
>
</div>
<div
id=
"vm-details-home-description"
class=
"js-hidden"
>
<form
method=
"POST"
>
...
...
@@ -174,9 +174,12 @@
{% include "dashboard/_graph-time-buttons.html" %}
</div>
<div
class=
"graph-images text-center"
>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
cpu
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
memory
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
network
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
cpu
"
graph_time
%}"
alt=
"{% trans "
CPU
usage
"
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
memory
"
graph_time
%}"
alt=
"{% trans "
Memory
usage
"
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
network
"
graph_time
%}"
alt=
"{% trans "
Network
usage
"
%}"
/>
</div>
{% endif %}
</div>
...
...
circle/dashboard/templates/dashboard/vm-detail/network.html
View file @
caf8f033
{% load i18n %}
{% load network_tags %}
<h2>
<div
id=
"vm-details-add-interface"
>
<div
id=
"vm-details-add-interface"
>
{% with op=op.add_interface %}{% if op %}
<a
href=
"{{op.get_url}}"
class=
"btn btn-{{op.effect}} operation pull-right"
{%
if
op
.
disabled
%}
disabled
{%
endif
%}
>
<i
class=
"fa fa-{{op.icon}}"
></i>
{% trans "add interface" %}
</a>
{% endif %}{% endwith %}
</div>
</div>
<h2>
{% trans "Interfaces" %}
</h2>
...
...
circle/dashboard/templates/dashboard/vm-detail/resources.html
View file @
caf8f033
...
...
@@ -45,12 +45,12 @@
<div
id=
"vm-details-resources-disk"
>
<h3>
{% trans "Disks" %}
<div
class=
"pull-right"
>
<div
id=
"disk-ops"
>
{% include "dashboard/vm-detail/_disk-operations.html" %}
</div>
</div>
{% trans "Disks" %}
</h3>
<div
class=
"clearfix"
></div>
...
...
@@ -69,7 +69,7 @@
{% if user.is_superuser %}
<hr/>
<div
class=
"row"
id=
""
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<h3>
{% trans "Required traits" %}
...
...
@@ -81,7 +81,7 @@
<hr/>
<div
class=
"row"
id=
""
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<h3>
{% trans "Raw data" %}
...
...
circle/dashboard/views/graph.py
View file @
caf8f033
...
...
@@ -212,7 +212,7 @@ class VmNetwork(object):
'alias(scaleToSeconds(nonNegativeDerivative('
'
%
s.network.bytes_sent-
%
s), 10), "in -
%
s (bits/s)")'
%
(
params
))
return
'group(
%
s)'
%
','
.
join
(
metrics
)
return
'group(
%
s)'
%
','
.
join
(
metrics
)
if
metrics
else
None
register_graph
(
VmNetwork
,
'network'
,
VmGraphView
)
...
...
circle/templates/registration/base.html
View file @
caf8f033
...
...
@@ -74,13 +74,6 @@
{% endblock %}
{% block navbar-brand %}
<a
class=
"navbar-brand"
href=
"{% url "
dashboard
.
index
"
%}"
style=
"padding: 10px 15px;"
>
<img
src=
"{% static "
dashboard
/
img
/
logo
.
png
"
%}"
style=
"height: 25px;"
/>
</a>
{% endblock %}
{% block content %}
<div
class=
"content"
>
{% block content_box %}{% endblock %}
...
...
circle/templates/registration/login.html
View file @
caf8f033
...
...
@@ -10,12 +10,6 @@
{% include "open-graph.html" %}
{% endblock %}
{% block navbar-brand %}
<a
class=
"navbar-brand"
href=
"{% url "
dashboard
.
index
"
%}"
style=
"padding: 10px 15px;"
>
<img
src=
"{% static "
dashboard
/
img
/
logo
.
png
"
%}"
style=
"height: 25px;"
/>
</a>
{% endblock %}
{% block content_box %}
<div
class=
"row"
>
{% if form.password.errors or form.username.errors %}
...
...
@@ -25,10 +19,7 @@
{% endif %}
<div
class=
"col-xs-{% if saml2 %}6{% else %}12{% endif %}"
>
<div
class=
"login-form"
>
<form
action=
""
method=
"POST"
>
{% csrf_token %}
{% crispy form %}
</form>
</div>
</div>
{% if saml2 %}
...
...
@@ -37,11 +28,12 @@
<a
href=
"{% url "
saml2_login
"
%}"
>
{% trans "Click here!" %}
</a>
</div>
{% endif %}
</div>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<a
class=
"pull-right"
href=
"{% url "
accounts
.
password-reset
"
%}"
>
{% trans "Forgot your password?" %}
</a>
<a
class=
"pull-right"
href=
"{% url "
accounts
.
password-reset
"
%}"
style=
"margin-right: 15px;"
>
{% trans "Forgot your password?" %}
</a>
</div>
</div>
</div>
</div>
{% endblock %}
requirements/base.txt
View file @
caf8f033
...
...
@@ -39,6 +39,4 @@ six==1.9.0
slimit==0.8.1
sqlparse==0.1.15
pika==0.9.14
Fabric==1.10.1
lxml==3.4.4
git+https://github.com/BME-IK/django-pipeline.git
django-pipeline==1.4.7
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