Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
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
5880ee1e
authored
Jul 10, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: refactor ops ajax functionality to AjaxOperationMixin
parent
e9439649
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
circle/dashboard/views.py
+9
-6
No files found.
circle/dashboard/views.py
View file @
5880ee1e
...
...
@@ -608,14 +608,11 @@ class OperationView(RedirectToLoginMixin, DetailView):
return
me
class
VmOperationView
(
OperationView
):
model
=
Instance
context_object_name
=
'instance'
# much simpler to mock object
class
AjaxOperationMixin
(
object
):
def
post
(
self
,
request
,
extra
=
None
,
*
args
,
**
kwargs
):
resp
=
super
(
VmOperationView
,
self
)
.
post
(
request
,
extra
,
*
args
,
**
kwargs
)
resp
=
super
(
AjaxOperationMixin
,
self
)
.
post
(
request
,
extra
,
*
args
,
**
kwargs
)
if
request
.
is_ajax
():
store
=
messages
.
get_messages
(
request
)
store
.
used
=
True
...
...
@@ -628,6 +625,12 @@ class VmOperationView(OperationView):
return
resp
class
VmOperationView
(
AjaxOperationMixin
,
OperationView
):
model
=
Instance
context_object_name
=
'instance'
# much simpler to mock object
class
FormOperationMixin
(
object
):
form_class
=
None
...
...
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