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
91f6d6df
authored
Feb 25, 2013
by
Dányi Bence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: dont count deleted vms (fixes
#68
)
parent
ab21b946
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
one/views.py
+3
-1
No files found.
one/views.py
View file @
91f6d6df
...
...
@@ -33,11 +33,13 @@ def _list_instances(request):
instances
=
Instance
.
objects
.
exclude
(
state
=
'DONE'
)
.
filter
(
owner
=
request
.
user
)
for
i
in
instances
:
i
.
update_state
()
instances
=
instances
.
exclude
(
state
=
'DONE'
)
return
instances
@require_GET
@login_required
def
home
(
request
):
instances
=
_list_instances
(
request
)
shares
=
[
s
for
s
in
request
.
user
.
person_set
.
all
()[
0
]
.
get_shares
()]
for
i
,
s
in
enumerate
(
shares
):
s
.
running_shared
=
s
.
instance_set
.
all
()
.
exclude
(
state
=
"DONE"
)
.
filter
(
owner
=
request
.
user
)
.
count
()
...
...
@@ -52,10 +54,10 @@ def home(request):
except
:
generated_public_key
=
-
1
return
render_to_response
(
"home.html"
,
RequestContext
(
request
,
{
'instances'
:
instances
,
'shares'
:
shares
,
'templates'
:
Template
.
objects
.
filter
(
state
=
'READY'
),
'mytemplates'
:
Template
.
objects
.
filter
(
owner
=
request
.
user
),
'instances'
:
_list_instances
(
request
),
'groups'
:
request
.
user
.
person_set
.
all
()[
0
]
.
owned_groups
.
all
(),
'semesters'
:
Semester
.
objects
.
all
(),
'userdetails'
:
details
,
...
...
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