Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
b27d537e
Commit
b27d537e
authored
May 13, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
slapos_jio: use portal_catalog to be complaint with listbox pagination
See merge request
!528
parents
74ce8553
0df7e6f4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
15 deletions
+18
-15
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Organisation_getComputeNodeTrackingList.py
...hal_json_style/Organisation_getComputeNodeTrackingList.py
+9
-8
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Project_getComputeNodeTrackingList.py
...apos_hal_json_style/Project_getComputeNodeTrackingList.py
+9
-7
No files found.
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Organisation_getComputeNodeTrackingList.py
View file @
b27d537e
# This script might not be efficient to a large quantities of
# This script might not be efficient to a large quantities of
# Compute Nodes
# Compute Nodes
portal
=
context
.
getPortalObject
()
from
DateTime
import
DateTime
kw
=
{
"node_uid"
:
context
.
getUid
(),
"at_date"
:
DateTime
()}
def
filter_per_portal_type
(
document
):
def
filter_per_portal_type
(
document
):
if
document
.
getPortalType
()
==
"Compute Node"
\
if
document
.
getPortalType
()
==
"Compute Node"
\
...
@@ -17,6 +13,11 @@ def filter_per_portal_type(document):
...
@@ -17,6 +13,11 @@ def filter_per_portal_type(document):
and
document
.
getValidationState
()
==
"validated"
:
and
document
.
getValidationState
()
==
"validated"
:
return
document
return
document
return
[
i
.
getObject
()
uid_list
=
[
i
.
uid
for
i
in
context
.
portal_simulation
.
getCurrentTrackingList
(
for
i
in
context
.
portal_simulation
.
getCurrentTrackingList
(
**
kw
)
node_uid
=
context
.
getUid
(),
at_date
=
DateTime
()
)
if
filter_per_portal_type
(
i
.
getObject
())]
if
filter_per_portal_type
(
i
.
getObject
())]
if
not
uid_list
:
return
[]
return
portal
.
portal_catalog
(
uid
=
uid_list
,
**
kw
)
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Project_getComputeNodeTrackingList.py
View file @
b27d537e
# This script might not be efficient to a large quantities of
# This script might not be efficient to a large quantities of
# Compute Nodes
# Compute Nodes
from
DateTime
import
DateTime
portal
=
context
.
getPortalObject
()
kw
=
{
"project_uid"
:
context
.
getUid
(),
"at_date"
:
DateTime
()}
def
filter_per_portal_type
(
document
):
def
filter_per_portal_type
(
document
):
if
document
.
getPortalType
()
==
"Compute Node"
\
if
document
.
getPortalType
()
==
"Compute Node"
\
...
@@ -16,6 +13,11 @@ def filter_per_portal_type(document):
...
@@ -16,6 +13,11 @@ def filter_per_portal_type(document):
and
document
.
getValidationState
()
==
"validated"
:
and
document
.
getValidationState
()
==
"validated"
:
return
document
return
document
return
[
i
.
getObject
()
uid_list
=
[
i
.
uid
for
i
in
context
.
portal_simulation
.
getCurrentTrackingList
(
for
i
in
context
.
portal_simulation
.
getCurrentTrackingList
(
**
kw
)
project_uid
=
context
.
getUid
(),
at_date
=
DateTime
()
)
if
filter_per_portal_type
(
i
.
getObject
())]
if
filter_per_portal_type
(
i
.
getObject
())]
if
not
uid_list
:
return
[]
return
portal
.
portal_catalog
(
uid
=
uid_list
,
**
kw
)
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