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
7ac070dd
Commit
7ac070dd
authored
Nov 28, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Extend test parameter sample to filter software type
parent
db2ba1e4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
16 deletions
+25
-16
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js.js
...odule/rjs_gadget_erp5_page_slap_test_parameter_form_js.js
+23
-14
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js.xml
...dule/rjs_gadget_erp5_page_slap_test_parameter_form_js.xml
+2
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js.js
View file @
7ac070dd
...
...
@@ -51,6 +51,7 @@
.
push
(
function
()
{
return
gadget
.
redirect
({
"
command
"
:
"
change
"
,
"
options
"
:
{
"
url_string
"
:
doc
.
url_string
,
"
software_type
"
:
doc
.
software_type
,
"
parameter_output
"
:
doc
.
text_content
}});
});
},
function
(
error
)
{
...
...
@@ -73,16 +74,10 @@
if
(
options
.
url_string
===
undefined
)
{
options
.
url_string
=
""
;
}
if
(
options
.
editable
===
undefined
)
{
options
.
editable
=
true
;
}
if
(
options
.
restricted_softwaretype
===
undefined
)
{
options
.
restricted_softwaretype
=
false
;
}
return
this
.
changeState
({
"
url_string
"
:
options
.
url_string
,
"
parameter_output
"
:
options
.
parameter_output
,
"
restricted_softwaretype
"
:
options
.
restricted_software
type
"
software_type_list
"
:
options
.
software_
type
});
})
...
...
@@ -113,14 +108,16 @@
parameter_dict
=
{
'
parameter
'
:
{
'
json_url
'
:
gadget
.
state
.
url_string
.
split
(
'
?
'
)[
0
]
+
"
.json
"
,
'
parameter_hash
'
:
parameter_hash
,
'
restricted_softwaretype
'
:
false
'
parameter_hash
'
:
parameter_hash
}
};
if
(
gadget
.
state
.
software_type_list
)
{
parameter_dict
.
parameter
.
software_type_list
=
gadget
.
state
.
software_type_list
.
split
(
'
,
'
);
}
return
result
[
0
].
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my
_url_string
"
:
{
"
your
_url_string
"
:
{
"
description
"
:
"
Software Release Url
"
,
"
title
"
:
"
Software Release URL
"
,
"
default
"
:
default_url
,
...
...
@@ -144,6 +141,18 @@
"
hidden
"
:
gadget
.
state
.
url_string
===
""
,
"
type
"
:
"
GadgetField
"
},
"
your_software_type
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Software type
"
,
"
default
"
:
gadget
.
state
.
software_type_list
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
,
"
sandbox
"
:
""
,
"
key
"
:
"
software_type
"
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
},
"
your_parameter_output
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Parameters Output
"
,
...
...
@@ -167,8 +176,7 @@
"
key
"
:
"
parameter_hash
"
,
"
hidden
"
:
gadget
.
state
.
parameter_output
===
undefined
,
"
type
"
:
"
StringField
"
},
}
}},
"
_links
"
:
{
"
type
"
:
{
...
...
@@ -180,13 +188,14 @@
form_definition
:
{
group_list
:
[[
"
center
"
,
[[
"
my_url_string
"
],
[
"
your_parameter_output
"
],
[
"
your_parameter_hash
"
],
[
"
your_text_content
"
]]
[[
"
your_url_string
"
],
[
"
your_parameter_output
"
],
[
"
your_software_type
"
],
[
"
your_parameter_hash
"
],
[
"
your_text_content
"
]]
]]
}
})
.
push
(
function
()
{
return
gadget
.
getUrlFor
({
"
command
"
:
"
change
"
,
"
options
"
:
{
"
url_string
"
:
undefined
,
"
software_type
"
:
undefined
,
"
parameter_output
"
:
undefined
}});
})
.
push
(
function
(
selection_url
)
{
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js.xml
View file @
7ac070dd
...
...
@@ -277,7 +277,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1004.
31514.19921.44151
</string>
</value>
<value>
<string>
1004.
41258.43166.28757
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -295,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>
1669
083537.85
</float>
<float>
1669
664533.48
</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