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
1e26bc6e
authored
Oct 28, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: trivial fixes
parent
cafadff8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
9 deletions
+12
-9
circle/dashboard/models.py
+3
-1
circle/dashboard/templates/dashboard/operate.html
+1
-1
circle/dashboard/views/graph.py
+1
-1
circle/dashboard/views/user.py
+3
-0
circle/dashboard/views/vm.py
+1
-1
circle/network/views.py
+1
-2
circle/vm/models/instance.py
+2
-3
No files found.
circle/dashboard/models.py
View file @
1e26bc6e
...
...
@@ -54,7 +54,9 @@ from .validators import connect_command_template_validator
logger
=
getLogger
(
__name__
)
pwgen
=
User
.
objects
.
make_random_password
def
pwgen
():
return
User
.
objects
.
make_random_password
()
class
Favourite
(
Model
):
...
...
circle/dashboard/templates/dashboard/operate.html
View file @
1e26bc6e
...
...
@@ -20,7 +20,7 @@ Do you want to perform the following operation on
<a
class=
"btn btn-default"
href=
"{{object.get_absolute_url}}"
data-dismiss=
"modal"
>
{% trans "Cancel" %}
</a>
<button
class=
"btn btn-{{ opview.effect }} btn-op-form-send"
type=
"submit"
id=
"op-form-send"
>
{% if opview.icon %}
<i
class=
"fa fa-fw fa-{{opview.icon}}"
></i>
{% endif %}{{ op|capfirst }}
{% if opview.icon %}
<i
class=
"fa fa-fw fa-{{opview.icon}}"
></i>
{% endif %}{{ op
.name
|capfirst }}
</button>
</div>
</form>
circle/dashboard/views/graph.py
View file @
1e26bc6e
...
...
@@ -62,7 +62,7 @@ class GraphViewBase(LoginRequiredMixin, View):
metric
=
self
.
create_class
(
metric
)(
instance
)
return
HttpResponse
(
metric
.
get_graph
(
graphite_url
,
time
),
mime
type
=
"image/png"
)
content_
type
=
"image/png"
)
def
get_object
(
self
,
request
,
pk
):
instance
=
self
.
model
.
objects
.
get
(
id
=
pk
)
...
...
circle/dashboard/views/user.py
View file @
1e26bc6e
...
...
@@ -267,6 +267,9 @@ class UserCreationView(LoginRequiredMixin, PermissionRequiredMixin,
template_name
=
'dashboard/user-create.html'
permission_required
=
"auth.add_user"
def
get_success_url
(
self
):
reverse
(
'dashboard.views.group-detail'
,
args
=
[
self
.
group
.
pk
])
def
get_group
(
self
,
group_pk
):
self
.
group
=
get_object_or_404
(
Group
,
pk
=
group_pk
)
if
not
self
.
group
.
profile
.
has_level
(
self
.
request
.
user
,
'owner'
):
...
...
circle/dashboard/views/vm.py
View file @
1e26bc6e
...
...
@@ -1135,7 +1135,7 @@ def get_vm_screenshot(request, pk):
# TODO handle this better
raise
Http404
()
return
HttpResponse
(
image
,
mime
type
=
"image/png"
)
return
HttpResponse
(
image
,
content_
type
=
"image/png"
)
class
InstanceActivityDetail
(
CheckedDetailView
):
...
...
circle/network/views.py
View file @
1e26bc6e
...
...
@@ -46,11 +46,10 @@ from itertools import chain
from
dashboard.views
import
AclUpdateView
from
dashboard.forms
import
AclUserOrGroupAddForm
from
django.utils
import
simplejson
try
:
from
django.http
import
JsonResponse
except
ImportError
:
from
django.utils
import
simplejson
class
JsonResponse
(
HttpResponse
):
"""JSON response for Django < 1.7
https://gist.github.com/philippeowagner/3179eb475fe1795d6515
...
...
circle/vm/models/instance.py
View file @
1e26bc6e
...
...
@@ -110,9 +110,8 @@ class VirtualMachineDescModel(BaseResourceConfigModel):
"for hosting the VM."
),
verbose_name
=
_
(
"required traits"
))
system
=
TextField
(
verbose_name
=
_
(
'operating system'
),
help_text
=
(
_
(
'Name of operating system in '
'format like "
%
s".'
)
%
'Ubuntu 12.04 LTS Desktop amd64'
))
help_text
=
(
_
(
'Name of operating system in format like '
'"Ubuntu 12.04 LTS Desktop amd64".'
)))
tags
=
TaggableManager
(
blank
=
True
,
verbose_name
=
_
(
"tags"
))
has_agent
=
BooleanField
(
verbose_name
=
_
(
'has agent'
),
default
=
True
,
help_text
=
_
(
...
...
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