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
Léo-Paul Géneau
slapos.core
Commits
cf730f8b
Commit
cf730f8b
authored
Oct 27, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Reimplement allOf
parent
6530d531
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.js
...age_module/rjs_gadget_erp5_page_slap_parameter_form_js.js
+17
-5
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
...ge_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
+2
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.js
View file @
cf730f8b
...
...
@@ -272,12 +272,25 @@
}
}
// Expand by force the allOf recomposing the properties and required.
for
(
key
in
json_field
.
allOf
)
{
if
(
json_field
.
allOf
.
hasOwnProperty
(
key
))
{
render_subform
(
json_field
.
allOf
[
key
],
default_dict
,
root
,
path
);
if
(
json_field
.
properties
===
undefined
)
{
json_field
.
properties
=
json_field
.
allOf
[
key
].
properties
;
}
else
if
(
json_field
.
allOf
[
key
].
properties
!==
undefined
)
{
json_field
.
properties
=
Object
.
assign
({},
json_field
.
properties
,
json_field
.
allOf
[
key
].
properties
);
}
if
(
json_field
.
required
===
undefined
)
{
json_field
.
required
=
json_field
.
allOf
[
key
].
required
;
}
else
if
(
json_field
.
allOf
[
key
].
required
!==
undefined
)
{
json_field
.
required
.
push
.
apply
(
json_field
.
required
,
json_field
.
allOf
[
key
].
required
);
}
}
}
...
...
@@ -286,7 +299,6 @@
div
=
document
.
createElement
(
"
div
"
);
div
.
setAttribute
(
"
class
"
,
"
subfield
"
);
div
.
title
=
json_field
.
properties
[
key
].
description
;
/* console.log(key); */
label
=
document
.
createElement
(
"
label
"
);
label
.
textContent
=
json_field
.
properties
[
key
].
title
;
div
.
appendChild
(
label
);
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
View file @
cf730f8b
...
...
@@ -280,7 +280,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1003.60
564.512.29713
</string>
</value>
<value>
<string>
1003.60
830.54174.62190
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -298,7 +298,7 @@
</tuple>
<state>
<tuple>
<float>
1666
896829.8
5
</float>
<float>
1666
905733.9
5
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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