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
868c2ca6
authored
Sep 12, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into issue_458
parents
749d0686
a8272957
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
circle/dashboard/static/dashboard/dashboard.less
+2
-3
circle/dashboard/tests/test_mockedviews.py
+4
-2
circle/dashboard/views/vm.py
+3
-0
No files found.
circle/dashboard/static/dashboard/dashboard.less
View file @
868c2ca6
...
...
@@ -104,7 +104,6 @@ html {
.timeline > div {
margin: 0;
padding: 0;
margin-left: -34px;
margin-bottom: .5em;
line-height: 24px;
}
...
...
@@ -113,7 +112,7 @@ html {
}
.timeline .timeline-icon {
margin
: 0
;
margin
-left: -34px
;
padding: 0;
width: 24px;
height: 24px;
...
...
@@ -153,7 +152,7 @@ html {
}
.sub-activity {
margin-left:
30
px;
margin-left:
-4
px;
padding-left: 10px;
border-left: 3px solid green;
}
...
...
circle/dashboard/tests/test_mockedviews.py
View file @
868c2ca6
...
...
@@ -52,7 +52,8 @@ class ViewUserTestCase(unittest.TestCase):
def
test_not_superuser
(
self
):
request
=
FakeRequestFactory
(
superuser
=
False
)
with
patch
.
object
(
InstanceActivityDetail
,
'get_object'
)
as
go
:
go
.
return_value
=
MagicMock
(
spec
=
InstanceActivity
)
go
.
return_value
=
MagicMock
(
spec
=
InstanceActivity
,
activity_code
=
'test.test'
)
go
.
return_value
.
_meta
.
object_name
=
"InstanceActivity"
view
=
InstanceActivityDetail
.
as_view
()
self
.
assertEquals
(
view
(
request
,
pk
=
1234
)
.
status_code
,
200
)
...
...
@@ -61,7 +62,8 @@ class ViewUserTestCase(unittest.TestCase):
request
=
FakeRequestFactory
(
superuser
=
True
)
with
patch
.
object
(
InstanceActivityDetail
,
'get_object'
)
as
go
:
act
=
MagicMock
(
spec
=
InstanceActivity
)
act
=
MagicMock
(
spec
=
InstanceActivity
,
activity_code
=
'test.test'
)
act
.
_meta
.
object_name
=
"InstanceActivity"
act
.
user
.
pk
=
1
go
.
return_value
=
act
...
...
circle/dashboard/views/vm.py
View file @
868c2ca6
...
...
@@ -46,6 +46,7 @@ from braces.views import SuperuserRequiredMixin, LoginRequiredMixin
from
common.models
import
(
create_readable
,
HumanReadableException
,
fetch_human_exception
,
split_activity_code
,
)
from
firewall.models
import
Vlan
,
Host
,
Rule
from
manager.scheduler
import
SchedulerError
...
...
@@ -798,6 +799,8 @@ def _get_activity_icon(act):
op
=
act
.
get_operation
()
if
op
and
op
.
id
in
vm_ops
:
return
vm_ops
[
op
.
id
]
.
icon
elif
split_activity_code
(
act
.
activity_code
)[
-
1
]
==
u'console-accessed'
:
return
"terminal"
else
:
return
"cog"
...
...
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