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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
ede013ee
authored
May 29, 2015
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: prevent vm operations when node is missing
closes
#410
parent
d6ea079f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
circle/dashboard/templates/dashboard/vm-detail.html
+11
-0
circle/vm/operations.py
+4
-0
No files found.
circle/dashboard/templates/dashboard/vm-detail.html
View file @
ede013ee
...
...
@@ -82,6 +82,17 @@
</h1>
<div
style=
"clear: both;"
></div>
</div>
{% if instance.node and not instance.node.online %}
<div
class=
"alert alert-warning"
>
{% if user.is_superuser %}
{% blocktrans with name=instance.node.name %}
The node
<strong>
{{ name }}
</strong>
is missing.
{% endblocktrans %}
{% else %}
{% trans "Currently you cannot execute any operations because the virtual machine's node is missing." %}
{% endif %}
</div>
{% endif %}
<div
class=
"row"
>
<div
class=
"col-md-4"
id=
"vm-info-pane"
>
<div
class=
"big"
>
...
...
circle/vm/operations.py
View file @
ede013ee
...
...
@@ -133,6 +133,10 @@ class InstanceOperation(Operation):
super
(
InstanceOperation
,
self
)
.
check_auth
(
user
=
user
)
if
(
self
.
instance
.
node
and
not
self
.
instance
.
node
.
online
and
not
user
.
is_superuser
):
raise
self
.
instance
.
WrongStateError
(
self
.
instance
)
def
create_activity
(
self
,
parent
,
user
,
kwargs
):
name
=
self
.
get_activity_name
(
kwargs
)
if
parent
:
...
...
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