Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
5
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
ee0f699e
authored
Oct 24, 2023
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cache for nodesum
parent
66b3e551
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
circle/dashboard/views/node.py
+4
-0
No files found.
circle/dashboard/views/node.py
View file @
ee0f699e
...
@@ -41,6 +41,9 @@ from rest_framework.permissions import IsAdminUser
...
@@ -41,6 +41,9 @@ from rest_framework.permissions import IsAdminUser
from
braces.views
import
LoginRequiredMixin
,
SuperuserRequiredMixin
from
braces.views
import
LoginRequiredMixin
,
SuperuserRequiredMixin
from
django_tables2
import
SingleTableView
from
django_tables2
import
SingleTableView
from
django.utils.decorators
import
method_decorator
from
django.views.decorators.cache
import
cache_page
from
firewall.models
import
Host
from
firewall.models
import
Host
from
vm.models
import
Node
,
NodeActivity
,
Trait
from
vm.models
import
Node
,
NodeActivity
,
Trait
from
vm.tasks.vm_tasks
import
check_queue
from
vm.tasks.vm_tasks
import
check_queue
...
@@ -85,6 +88,7 @@ class GetNodeREST(APIView):
...
@@ -85,6 +88,7 @@ class GetNodeREST(APIView):
class
GetNodeRESTSum
(
APIView
):
class
GetNodeRESTSum
(
APIView
):
permission_classes
=
[]
permission_classes
=
[]
@method_decorator
(
cache_page
(
60
*
60
*
2
))
def
get
(
self
,
request
,
format
=
None
):
def
get
(
self
,
request
,
format
=
None
):
nodes
=
Node
.
objects
.
filter
(
enabled
=
True
,
schedule_enabled
=
True
)
nodes
=
Node
.
objects
.
filter
(
enabled
=
True
,
schedule_enabled
=
True
)
cpu_core
=
0
cpu_core
=
0
...
...
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