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
Labels
Merge Requests
19
Merge Requests
19
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
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 @@
...
@@ -51,6 +51,7 @@
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
redirect
({
"
command
"
:
"
change
"
,
return
gadget
.
redirect
({
"
command
"
:
"
change
"
,
"
options
"
:
{
"
url_string
"
:
doc
.
url_string
,
"
options
"
:
{
"
url_string
"
:
doc
.
url_string
,
"
software_type
"
:
doc
.
software_type
,
"
parameter_output
"
:
doc
.
text_content
}});
"
parameter_output
"
:
doc
.
text_content
}});
});
});
},
function
(
error
)
{
},
function
(
error
)
{
...
@@ -73,16 +74,10 @@
...
@@ -73,16 +74,10 @@
if
(
options
.
url_string
===
undefined
)
{
if
(
options
.
url_string
===
undefined
)
{
options
.
url_string
=
""
;
options
.
url_string
=
""
;
}
}
if
(
options
.
editable
===
undefined
)
{
options
.
editable
=
true
;
}
if
(
options
.
restricted_softwaretype
===
undefined
)
{
options
.
restricted_softwaretype
=
false
;
}
return
this
.
changeState
({
return
this
.
changeState
({
"
url_string
"
:
options
.
url_string
,
"
url_string
"
:
options
.
url_string
,
"
parameter_output
"
:
options
.
parameter_output
,
"
parameter_output
"
:
options
.
parameter_output
,
"
restricted_softwaretype
"
:
options
.
restricted_software
type
"
software_type_list
"
:
options
.
software_
type
});
});
})
})
...
@@ -113,14 +108,16 @@
...
@@ -113,14 +108,16 @@
parameter_dict
=
{
parameter_dict
=
{
'
parameter
'
:
{
'
parameter
'
:
{
'
json_url
'
:
gadget
.
state
.
url_string
.
split
(
'
?
'
)[
0
]
+
"
.json
"
,
'
json_url
'
:
gadget
.
state
.
url_string
.
split
(
'
?
'
)[
0
]
+
"
.json
"
,
'
parameter_hash
'
:
parameter_hash
,
'
parameter_hash
'
:
parameter_hash
'
restricted_softwaretype
'
:
false
}
}
};
};
if
(
gadget
.
state
.
software_type_list
)
{
parameter_dict
.
parameter
.
software_type_list
=
gadget
.
state
.
software_type_list
.
split
(
'
,
'
);
}
return
result
[
0
].
render
({
return
result
[
0
].
render
({
erp5_document
:
{
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my
_url_string
"
:
{
"
your
_url_string
"
:
{
"
description
"
:
"
Software Release Url
"
,
"
description
"
:
"
Software Release Url
"
,
"
title
"
:
"
Software Release URL
"
,
"
title
"
:
"
Software Release URL
"
,
"
default
"
:
default_url
,
"
default
"
:
default_url
,
...
@@ -144,6 +141,18 @@
...
@@ -144,6 +141,18 @@
"
hidden
"
:
gadget
.
state
.
url_string
===
""
,
"
hidden
"
:
gadget
.
state
.
url_string
===
""
,
"
type
"
:
"
GadgetField
"
"
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
"
:
{
"
your_parameter_output
"
:
{
"
description
"
:
""
,
"
description
"
:
""
,
"
title
"
:
"
Parameters Output
"
,
"
title
"
:
"
Parameters Output
"
,
...
@@ -167,8 +176,7 @@
...
@@ -167,8 +176,7 @@
"
key
"
:
"
parameter_hash
"
,
"
key
"
:
"
parameter_hash
"
,
"
hidden
"
:
gadget
.
state
.
parameter_output
===
undefined
,
"
hidden
"
:
gadget
.
state
.
parameter_output
===
undefined
,
"
type
"
:
"
StringField
"
"
type
"
:
"
StringField
"
},
}
}},
}},
"
_links
"
:
{
"
_links
"
:
{
"
type
"
:
{
"
type
"
:
{
...
@@ -180,13 +188,14 @@
...
@@ -180,13 +188,14 @@
form_definition
:
{
form_definition
:
{
group_list
:
[[
group_list
:
[[
"
center
"
,
"
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
()
{
.
push
(
function
()
{
return
gadget
.
getUrlFor
({
"
command
"
:
"
change
"
,
return
gadget
.
getUrlFor
({
"
command
"
:
"
change
"
,
"
options
"
:
{
"
url_string
"
:
undefined
,
"
options
"
:
{
"
url_string
"
:
undefined
,
"
software_type
"
:
undefined
,
"
parameter_output
"
:
undefined
}});
"
parameter_output
"
:
undefined
}});
})
})
.
push
(
function
(
selection_url
)
{
.
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 @@
...
@@ -277,7 +277,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1004.
31514.19921.44151
</string>
</value>
<value>
<string>
1004.
41258.43166.28757
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -295,7 +295,7 @@
...
@@ -295,7 +295,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1669
083537.85
</float>
<float>
1669
664533.48
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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