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
3fb609ec
Commit
3fb609ec
authored
Mar 27, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Fix parameter form for selecting right schema for the software type.
parent
dda7b27e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
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
+10
-7
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 @
3fb609ec
...
...
@@ -654,7 +654,8 @@
.
push
(
function
(
json
)
{
var
option_index
,
option
,
option_selected
=
options
.
value
.
parameter
.
softwaretypeindex
,
option_selected
=
options
.
value
.
parameter
.
softwaretype
,
option_selected_index
=
options
.
value
.
parameter
.
softwaretypeindex
,
restricted_softwaretype
=
options
.
value
.
parameter
.
restricted_softwaretype
,
input
=
gadget
.
element
.
querySelector
(
'
select.slapos-software-type
'
),
parameter_shared
=
gadget
.
element
.
querySelector
(
'
input.parameter_shared
'
),
...
...
@@ -682,7 +683,8 @@
}
if
(
option_selected
===
undefined
)
{
option_selected
=
option_index
;
option_selected
=
option
.
value
;
option_selected_index
=
option_index
;
if
(
json
[
'
software-type
'
][
option_index
].
shared
===
true
)
{
parameter_shared
.
value
=
true
;
}
else
{
...
...
@@ -703,6 +705,7 @@
if
((
option
.
value
===
option_selected
)
&&
(
options
.
value
.
parameter
.
shared
==
json
[
'
software-type
'
][
option_index
].
shared
))
{
option
.
selected
=
"
selected
"
;
option_selected_index
=
option_index
;
if
(
json
[
'
software-type
'
][
option_index
].
shared
===
true
)
{
parameter_shared
.
value
=
true
;
}
else
{
...
...
@@ -732,19 +735,19 @@
}
throw
new
Error
(
"
The software type is not part of the json (
"
+
softwaretype
+
"
)
"
);
}
if
(
json
[
'
software-type
'
][
softwaretype
]
===
undefined
)
{
if
(
json
[
'
software-type
'
][
option_selected_index
]
===
undefined
)
{
throw
new
Error
(
"
The sotware type is not part of the json (
"
+
softwaretype
+
"
)
"
);
}
if
(
json
[
'
software-type
'
][
softwaretype
].
serialisation
!==
undefined
)
{
s_input
.
value
=
json
[
'
software-type
'
][
softwaretype
].
serialisation
;
options
.
serialisation
=
json
[
'
software-type
'
][
softwaretype
].
serialisation
;
if
(
json
[
'
software-type
'
][
option_selected_index
].
serialisation
!==
undefined
)
{
s_input
.
value
=
json
[
'
software-type
'
][
option_selected_index
].
serialisation
;
options
.
serialisation
=
json
[
'
software-type
'
][
option_selected_index
].
serialisation
;
}
else
{
s_input
.
value
=
json
.
serialisation
;
options
.
serialisation
=
json
.
serialisation
;
}
return
json
[
'
software-type
'
][
softwaretype
].
request
;
return
json
[
'
software-type
'
][
option_selected_index
].
request
;
})
.
push
(
function
(
parameter_json_schema_url
)
{
var
parameter_dict
=
{},
json_url_uri
,
prefix
,
parameter_entry
;
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
View file @
3fb609ec
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.2
4439.33534.42308
</string>
</value>
<value>
<string>
966.2
9810.18989.64802
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
152
1824575.6
</float>
<float>
152
2149313.98
</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