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
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
Xiaowu Zhang
slapos.core
Commits
65d20860
Commit
65d20860
authored
Jul 18, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Fixup to not display Closed Forever Computers
Do not List Closed Forever Computer on Computer Network view
parent
c272087e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
10 deletions
+80
-10
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_computer_network_view_js.js
...ule/rjs_gadget_erp5_page_slap_computer_network_view_js.js
+8
-6
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_computer_network_view_js.xml
...le/rjs_gadget_erp5_page_slap_computer_network_view_js.xml
+2
-2
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_getComputeNodeList.py
...apos_hal_json_style/ComputerNetwork_getComputeNodeList.py
+7
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_getComputeNodeList.xml
...pos_hal_json_style/ComputerNetwork_getComputeNodeList.xml
+62
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_hasComputeNode.py
...s/slapos_hal_json_style/ComputerNetwork_hasComputeNode.py
+1
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_computer_network_view_js.js
View file @
65d20860
...
...
@@ -10,6 +10,7 @@
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
updatePanel
"
,
"
updatePanel
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
updateDocument
"
,
"
updateDocument
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
...
...
@@ -107,7 +108,8 @@
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_view
'
),
gadget
.
getTranslationList
(
translation_list
)
gadget
.
getTranslationList
(
translation_list
),
gadget
.
getSetting
(
"
hateoas_url
"
)
]);
})
.
push
(
function
(
result
)
{
...
...
@@ -190,11 +192,11 @@
"
editable_column_list
"
:
[],
"
key
"
:
"
slap_project_compute_node_listbox
"
,
"
lines
"
:
10
,
"
list_method
"
:
"
portal_catalog
"
,
// XXX TODO Filter by default_strict_allocation_scope_uid="!=%s" % context.getPortalObject().portal_categories.allocation_scope.close.forever.getUid(),
"
query
"
:
"
urn:jio:allDocs?query=portal_type%3A%22
"
+
"
Compute Node
"
+
"
%22%20AND%20
"
+
"
subordination_reference%3A
"
+
gadget
.
state
.
doc
.
reference
,
"
list_method
"
:
"
ComputerNetwork_getComputeNodeList
"
,
"
list_method_template
"
:
result
[
2
]
+
"
ERP5Document_getHateoas?mode=search&
"
+
"
list_method=ComputerNetwork_getComputeNodeList&relative_url=
"
+
gadget
.
state
.
jio_key
+
"
&default_param_json=eyJpZ25vcmVfdW5rbm93bl9jb2x1bW5zIjogdHJ1ZX0={&query,select_list*,limit*,sort_on*,local_roles*}
"
,
"
query
"
:
"
urn:jio:allDocs?query=
"
,
"
portal_type
"
:
[],
"
search_column_list
"
:
column_list
,
"
sort_column_list
"
:
column_list
,
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_computer_network_view_js.xml
View file @
65d20860
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1001.
20432.33862.6946
</string>
</value>
<value>
<string>
1001.
44818.54264.13038
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
165
6703816.43
</float>
<float>
165
8167069.0
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_getComputeNodeList.py
0 → 100644
View file @
65d20860
portal
=
context
.
getPortalObject
()
return
portal
.
portal_catalog
(
portal_type
=
"Compute Node"
,
validation_state
=
"validated"
,
subordination__uid
=
context
.
getUid
(),
default_strict_allocation_scope_uid
=
"!=%s"
%
portal
.
portal_categories
.
allocation_scope
.
close
.
forever
.
getUid
()
)
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_getComputeNodeList.xml
0 → 100644
View file @
65d20860
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ComputerNetwork_getComputeNodeList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_hasComputeNode.py
View file @
65d20860
import
json
return
json
.
dumps
(
len
(
context
.
getSubordinationRelatedList
(
portal_type
=
"Compute Node"
)))
return
json
.
dumps
(
len
(
context
.
ComputerNetwork_getComputeNodeList
()))
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