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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
a17a061f
Commit
a17a061f
authored
Dec 21, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: also search allocation supply by node
parent
43c23b85
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/AllocationSupplyCell_asPredicate.py
...al_skins/slapos_cloud/AllocationSupplyCell_asPredicate.py
+3
-2
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Project_getSoftwareProductPredicateList.py
...s/slapos_cloud/Project_getSoftwareProductPredicateList.py
+5
-1
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Project_getSoftwareProductPredicateList.xml
.../slapos_cloud/Project_getSoftwareProductPredicateList.xml
+1
-1
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/AllocationSupplyCell_asPredicate.py
View file @
a17a061f
line
=
context
.
getParentValue
()
supply
=
line
.
getParentValue
()
if
(
supply
.
getPortalType
()
!=
'Allocation Supply'
)
or
(
supply
.
getValidationState
()
!=
'validated'
):
if
(
supply
.
getPortalType
()
!=
'Allocation Supply'
)
or
(
supply
.
getValidationState
()
!=
'validated'
)
or
(
supply
.
getAggregate
(
None
)
is
None
)
:
return
None
if
not
context
.
isAllocable
():
return
None
base_category_tuple
=
(
'resource'
,
'software_type'
,
'software_release'
,
'destination_project'
)
base_category_tuple
=
(
'resource'
,
'software_type'
,
'software_release'
,
'destination_project'
,
'aggregate'
)
if
supply
.
getDestination
():
base_category_tuple
+=
(
'destination'
,)
return
context
.
generatePredicate
(
membership_criterion_base_category_list
=
base_category_tuple
,
criterion_property_list
=
(
'start_date'
,))
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Project_getSoftwareProductPredicateList.py
View file @
a17a061f
...
...
@@ -16,7 +16,10 @@ if software_product is not None:
if
destination_value
is
None
:
destination_value
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
if
len
(
tested_base_category_list
)
==
5
:
if
node_value
is
not
None
:
tested_base_category_list
.
append
(
'aggregate'
)
if
len
(
tested_base_category_list
)
==
6
:
tested_base_category_list
=
None
if
predicate_portal_type
is
None
:
...
...
@@ -30,6 +33,7 @@ tmp_context = portal.portal_trash.newContent(
software_release_value
=
software_product_release
,
destination_value
=
destination_value
,
destination_project_value
=
project
,
aggregate_value
=
node_value
,
start_date
=
DateTime
()
)
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Project_getSoftwareProductPredicateList.xml
View file @
a17a061f
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
software_product=None, software_product_type=None, software_product_release=None, destination_value=None, predicate_portal_type=None
</string>
</value>
<value>
<string>
software_product=None, software_product_type=None, software_product_release=None, destination_value=None,
node_value=None,
predicate_portal_type=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
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