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
9fc658c2
Commit
9fc658c2
authored
Oct 24, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Use changeState on test parameter gadget
Also include header link to return
parent
790d3b22
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
13 deletions
+26
-13
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
+24
-11
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 @
9fc658c2
...
...
@@ -69,10 +69,17 @@
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
if
(
options
.
url_string
===
undefined
)
{
options
.
url_string
=
""
;
}
return
this
.
changeState
({
"
url_string
"
:
options
.
url_string
,
"
parameter_output
"
:
options
.
parameter_output
})
})
.
onStateChange
(
function
onStateChange
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
...
...
@@ -85,19 +92,19 @@
parameter_dict
,
default_url
;
if
(
options
.
url_string
===
""
)
{
if
(
gadget
.
state
.
url_string
===
""
)
{
default_url
=
result
[
1
]
+
"
sample-software-schema/simpledemo/software.cfg
"
;
}
else
{
default_url
=
options
.
url_string
;
default_url
=
gadget
.
state
.
url_string
;
}
if
(
options
.
parameter_output
===
undefined
)
{
if
(
gadget
.
state
.
parameter_output
===
undefined
)
{
parameter_hash
=
btoa
(
'
<?xml version="1.0" encoding="utf-8" ?><instance></instance>
'
);
}
else
{
parameter_hash
=
btoa
(
options
.
parameter_output
);
parameter_hash
=
btoa
(
gadget
.
state
.
parameter_output
);
}
parameter_dict
=
{
'
parameter
'
:
{
'
json_url
'
:
options
.
url_string
.
split
(
'
?
'
)[
0
]
+
"
.json
"
,
'
json_url
'
:
gadget
.
state
.
url_string
.
split
(
'
?
'
)[
0
]
+
"
.json
"
,
'
parameter_hash
'
:
parameter_hash
,
'
restricted_softwaretype
'
:
false
}
...
...
@@ -111,7 +118,7 @@
"
default
"
:
default_url
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
options
.
url_string
===
""
,
"
editable
"
:
gadget
.
state
.
url_string
===
""
,
"
key
"
:
"
url_string
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
...
...
@@ -122,23 +129,23 @@
"
default
"
:
parameter_dict
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
options
.
url_string
!==
""
,
"
editable
"
:
gadget
.
state
.
url_string
!==
""
,
"
url
"
:
"
gadget_erp5_page_slap_parameter_form.html
"
,
"
sandbox
"
:
""
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
options
.
url_string
===
""
,
"
hidden
"
:
gadget
.
state
.
url_string
===
""
,
"
type
"
:
"
GadgetField
"
},
"
your_parameter_output
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Parameters Output
"
,
"
default
"
:
options
.
parameter_output
,
"
default
"
:
gadget
.
state
.
parameter_output
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
0
,
"
sandbox
"
:
""
,
"
key
"
:
"
parameter_output
"
,
"
hidden
"
:
options
.
parameter_output
===
undefined
,
"
hidden
"
:
gadget
.
state
.
parameter_output
===
undefined
,
"
type
"
:
"
TextAreaField
"
}
}},
...
...
@@ -157,8 +164,14 @@
}
})
.
push
(
function
()
{
return
gadget
.
getUrlFor
({
"
command
"
:
"
change
"
,
"
options
"
:
{
"
url_string
"
:
undefined
,
"
parameter_output
"
:
undefined
}});
})
.
push
(
function
(
selection_url
)
{
return
gadget
.
updateHeader
({
page_title
:
"
Parameter testing page
"
,
selection_url
:
selection_url
,
submit_action
:
true
});
});
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js.xml
View file @
9fc658c2
...
...
@@ -277,7 +277,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
0.3592.26006.6270
2
</string>
</value>
<value>
<string>
100
3.56160.64867.2046
2
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -295,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>
16
52201764.17
</float>
<float>
16
66625416.83
</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