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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
fc29eb28
Commit
fc29eb28
authored
May 10, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Fixup Parameter form (float) and add testing gadget
See merge request
nexedi/slapos.core!384
parents
2e5320ef
5a773e1b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
948 additions
and
37 deletions
+948
-37
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/WebSection_getHostingJSPrecacheManifestList.py
...lapos_base/WebSection_getHostingJSPrecacheManifestList.py
+4
-1
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
+32
-17
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
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_html.html
...e/rjs_gadget_erp5_page_slap_test_parameter_form_html.html
+31
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_html.xml
...le/rjs_gadget_erp5_page_slap_test_parameter_form_html.xml
+334
-0
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
+166
-0
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
+373
-0
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
...jio/bt/template_keep_last_workflow_history_only_path_list
+2
-0
master/bt5/slapos_jio/bt/template_path_list
master/bt5/slapos_jio/bt/template_path_list
+4
-0
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSServiceJSONSerialisation.zpt
...s/slaposjs_zuite/testSlapOSJSServiceJSONSerialisation.zpt
+0
-17
No files found.
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_base/WebSection_getHostingJSPrecacheManifestList.py
View file @
fc29eb28
...
@@ -9,6 +9,7 @@ url_list = [
...
@@ -9,6 +9,7 @@ url_list = [
"gadget_erp5_page_map.css"
,
"gadget_erp5_page_map.css"
,
"gadget_erp5_page_map.html"
,
"gadget_erp5_page_map.html"
,
"gadget_erp5_page_map.js"
,
"gadget_erp5_page_map.js"
,
"gadget_slapos_login_page.css"
,
"gadget_erp5_page_slap_accept_upgrade_decision.html"
,
"gadget_erp5_page_slap_accept_upgrade_decision.html"
,
"gadget_erp5_page_slap_accept_upgrade_decision.js"
,
"gadget_erp5_page_slap_accept_upgrade_decision.js"
,
"gadget_erp5_page_slap_add_compute_node.html"
,
"gadget_erp5_page_slap_add_compute_node.html"
,
...
@@ -216,7 +217,9 @@ url_list = [
...
@@ -216,7 +217,9 @@ url_list = [
"slapos_load_meta_schema_xml.json"
,
"slapos_load_meta_schema_xml.json"
,
"slapos_load_meta_schema_json_in_xml.json"
,
"slapos_load_meta_schema_json_in_xml.json"
,
"gadget_erp5_page_slap_language_view.js"
,
"gadget_erp5_page_slap_language_view.js"
,
"gadget_erp5_page_slap_language_view.html"
"gadget_erp5_page_slap_language_view.html"
,
"gadget_erp5_page_slap_test_parameter_form.js"
,
"gadget_erp5_page_slap_test_parameter_form.html"
]
]
return
url_list
return
url_list
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.js
View file @
fc29eb28
...
@@ -45,19 +45,28 @@
...
@@ -45,19 +45,28 @@
value
:
""
,
value
:
""
,
selected
:
(
default_value
===
undefined
)
selected
:
(
default_value
===
undefined
)
})],
})],
option_index
;
option_index
,
data_format
=
"
string
"
;
if
(
json_field
.
type
===
"
integer
"
||
json_field
.
type
===
"
number
"
)
{
data_format
=
"
number
"
;
}
for
(
option_index
in
json_field
[
'
enum
'
])
{
for
(
option_index
in
json_field
[
'
enum
'
])
{
if
(
json_field
[
'
enum
'
].
hasOwnProperty
(
option_index
))
{
if
(
json_field
[
'
enum
'
].
hasOwnProperty
(
option_index
))
{
option_list
.
push
(
domsugar
(
'
option
'
,
{
option_list
.
push
(
domsugar
(
'
option
'
,
{
value
:
json_field
[
'
enum
'
][
option_index
],
value
:
json_field
[
'
enum
'
][
option_index
],
text
:
json_field
[
'
enum
'
][
option_index
],
text
:
json_field
[
'
enum
'
][
option_index
],
selected
:
(
json_field
[
'
enum
'
][
option_index
]
===
default_value
)
"
data-format
"
:
data_format
,
selected
:
(
json_field
[
'
enum
'
][
option_index
].
toString
()
===
default_value
)
}));
}));
}
}
}
}
return
domsugar
(
'
select
'
,
{
return
domsugar
(
'
select
'
,
{
size
:
1
size
:
1
,
"
data-format
"
:
data_format
},
option_list
);
},
option_list
);
}
}
...
@@ -105,7 +114,6 @@
...
@@ -105,7 +114,6 @@
}
}
function
render_field
(
json_field
,
default_value
)
{
function
render_field
(
json_field
,
default_value
)
{
if
(
json_field
[
'
enum
'
]
!==
undefined
)
{
if
(
json_field
[
'
enum
'
]
!==
undefined
)
{
return
render_selection
(
json_field
,
default_value
);
return
render_selection
(
json_field
,
default_value
);
}
}
...
@@ -133,27 +141,24 @@
...
@@ -133,27 +141,24 @@
return
render_textarea
(
json_field
,
default_value
,
"
string
"
);
return
render_textarea
(
json_field
,
default_value
,
"
string
"
);
}
}
var
value
,
var
domsugar_input_dict
=
{};
type
;
if
(
default_value
!==
undefined
)
{
if
(
default_value
!==
undefined
)
{
value
=
default_value
;
domsugar_input_dict
.
value
=
default_value
;
}
}
if
(
json_field
.
type
===
"
integer
"
)
{
if
(
json_field
.
type
===
"
integer
"
)
{
type
=
"
number
"
;
domsugar_input_dict
.
type
=
"
number
"
;
}
else
if
(
json_field
.
type
===
"
number
"
)
{
}
else
if
(
json_field
.
type
===
"
number
"
)
{
type
=
"
number
"
;
domsugar_input_dict
.
type
=
"
number
"
;
domsugar_input_dict
.
step
=
"
any
"
;
}
else
if
(
json_field
.
type
===
"
hidden
"
)
{
}
else
if
(
json_field
.
type
===
"
hidden
"
)
{
type
=
"
hidden
"
;
domsugar_input_dict
.
type
=
"
hidden
"
;
}
else
{
}
else
{
type
=
"
text
"
;
domsugar_input_dict
.
type
=
"
text
"
;
}
}
return
domsugar
(
'
input
'
,
{
return
domsugar
(
'
input
'
,
domsugar_input_dict
);
value
:
value
,
type
:
type
});
}
}
function
render_subform
(
json_field
,
default_dict
,
root
,
path
,
restricted
)
{
function
render_subform
(
json_field
,
default_dict
,
root
,
path
,
restricted
)
{
...
@@ -333,17 +338,27 @@
...
@@ -333,17 +338,27 @@
$
(
element
.
querySelectorAll
(
"
.slapos-parameter
"
)).
each
(
function
(
key
,
input
)
{
$
(
element
.
querySelectorAll
(
"
.slapos-parameter
"
)).
each
(
function
(
key
,
input
)
{
if
(
input
.
value
!==
""
)
{
if
(
input
.
value
!==
""
)
{
if
(
input
.
type
===
'
number
'
)
{
if
(
input
.
type
===
'
number
'
)
{
json_dict
[
input
.
name
]
=
parse
Int
(
input
.
value
,
10
);
json_dict
[
input
.
name
]
=
parse
Float
(
input
.
value
);
}
else
if
(
input
.
value
===
"
true
"
)
{
}
else
if
(
input
.
value
===
"
true
"
)
{
json_dict
[
input
.
name
]
=
true
;
json_dict
[
input
.
name
]
=
true
;
}
else
if
(
input
.
value
===
"
false
"
)
{
}
else
if
(
input
.
value
===
"
false
"
)
{
json_dict
[
input
.
name
]
=
false
;
json_dict
[
input
.
name
]
=
false
;
}
else
if
(
input
.
tagName
===
"
TEXTAREA
"
)
{
}
else
if
(
input
.
tagName
===
"
TEXTAREA
"
)
{
if
(
input
[
"
data-format
"
]
===
"
string
"
)
{
if
(
input
.
getAttribute
(
"
data-format
"
)
===
"
string
"
)
{
json_dict
[
input
.
name
]
=
input
.
value
;
json_dict
[
input
.
name
]
=
input
.
value
;
}
else
{
}
else
{
json_dict
[
input
.
name
]
=
input
.
value
.
split
(
'
\n
'
);
json_dict
[
input
.
name
]
=
input
.
value
.
split
(
'
\n
'
);
}
}
}
else
if
(
input
.
tagName
===
"
SELECT
"
)
{
if
(
input
.
getAttribute
(
"
data-format
"
)
===
"
number
"
)
{
json_dict
[
input
.
name
]
=
parseFloat
(
input
.
value
);
}
else
if
(
input
.
getAttribute
(
"
data-format
"
)
===
"
integer
"
)
{
// Don't use parseInt since it will round the value, modifing the
// use input. So we keep it the value.
json_dict
[
input
.
name
]
=
parseFloat
(
input
.
value
);
}
else
{
json_dict
[
input
.
name
]
=
input
.
value
;
}
}
else
{
}
else
{
json_dict
[
input
.
name
]
=
input
.
value
;
json_dict
[
input
.
name
]
=
input
.
value
;
}
}
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
View file @
fc29eb28
...
@@ -280,7 +280,7 @@
...
@@ -280,7 +280,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1000.
2322.46712.16657
</string>
</value>
<value>
<string>
1000.
3907.45649.58794
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -298,7 +298,7 @@
...
@@ -298,7 +298,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1651
775757.92
</float>
<float>
1651
866969.39
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_html.html
0 → 100644
View file @
fc29eb28
<!DOCTYPE html>
<html>
<!--
data-i18n=Title
data-i18n=Instance Parameter
-->
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
Site List
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_erp5_page_slap_test_parameter_form.js"
type=
"text/javascript"
></script>
</head>
<body>
<form
class=
"save_form ui-body-c"
novalidate
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"form_view"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</html>
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_html.xml
0 → 100644
View file @
fc29eb28
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_page_slap_test_parameter_form.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
rjs_gadget_erp5_page_slap_test_parameter_form_html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget SlapOS Test Parameter Form
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
003
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1651706016.32
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1000.1233.39690.14438
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1651706058.5
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1651705738.5
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js.js
0 → 100644
View file @
fc29eb28
/*global window, rJS, RSVP, btoa */
/*jslint nomen: true, indent: 2, maxerr: 3, sub:true */
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
updatePanel
"
,
"
updatePanel
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_post
"
,
"
jio_post
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
'
notifySubmit
'
,
function
()
{
return
this
.
triggerSubmit
();
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
checkValidity
()
.
push
(
function
(
is_valid
)
{
if
(
!
is_valid
)
{
return
null
;
}
return
form_gadget
.
getContent
();
});
})
.
push
(
function
(
doc
)
{
if
(
doc
===
null
)
{
return
gadget
.
notifySubmitted
({
message
:
"
Doc is empty
"
,
status
:
'
error
'
});
}
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
"
All is fine, we reseted your form.
"
,
status
:
'
success
'
})
.
push
(
function
()
{
return
gadget
.
redirect
({
"
command
"
:
"
change
"
,
"
options
"
:
{
"
url_string
"
:
doc
.
url_string
,
"
parameter_output
"
:
doc
.
text_content
}});
});
},
function
(
error
)
{
if
(
error
.
target
.
status
===
409
)
{
return
gadget
.
notifySubmitted
({
message
:
"
Error 409
"
,
status
:
'
error
'
});
}
if
(
error
.
target
.
status
===
400
)
{
return
gadget
.
notifySubmitted
({
message
:
"
Error 400
"
,
status
:
'
error
'
});
}
});
});
})
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
return
this
.
element
.
querySelector
(
'
button[type="submit"]
'
).
click
();
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
if
(
options
.
url_string
===
undefined
)
{
options
.
url_string
=
""
;
}
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_view
'
)
]);
})
.
push
(
function
(
result
)
{
var
parameter_hash
,
parameter_dict
,
default_url
;
if
(
options
.
url_string
===
""
)
{
default_url
=
"
https://lab.nexedi.com/rafael/testing-slapos-schemas/raw/master/software/simpledemo/software.cfg
"
}
else
{
default_url
=
options
.
url_string
}
if
(
options
.
parameter_output
===
undefined
)
{
parameter_hash
=
btoa
(
'
<?xml version="1.0" encoding="utf-8" ?><instance></instance>
'
);
}
else
{
parameter_hash
=
btoa
(
options
.
parameter_output
);
}
parameter_dict
=
{
'
parameter
'
:
{
'
json_url
'
:
options
.
url_string
.
split
(
'
?
'
)[
0
]
+
"
.json
"
,
'
parameter_hash
'
:
parameter_hash
,
'
restricted_softwaretype
'
:
false
}
};
return
result
[
0
].
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_url_string
"
:
{
"
description
"
:
"
Software Release Url
"
,
"
title
"
:
"
Software Release URL
"
,
"
default
"
:
default_url
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
options
.
url_string
===
""
,
"
key
"
:
"
url_string
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
your_text_content
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Parameters
"
,
"
default
"
:
parameter_dict
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
options
.
url_string
!==
""
,
"
url
"
:
"
gadget_erp5_page_slap_parameter_form.html
"
,
"
sandbox
"
:
""
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
options
.
url_string
===
""
,
"
type
"
:
"
GadgetField
"
},
"
your_parameter_output
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Parameters Output
"
,
"
default
"
:
options
.
parameter_output
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
0
,
"
sandbox
"
:
""
,
"
key
"
:
"
parameter_output
"
,
"
hidden
"
:
options
.
parameter_output
===
undefined
,
"
type
"
:
"
TextAreaField
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
center
"
,
[[
"
my_url_string
"
],
[
"
your_parameter_output
"
],
[
"
your_text_content
"
]]
]]
}
})
.
push
(
function
()
{
return
gadget
.
updateHeader
({
page_title
:
"
Parameter testing page
"
,
submit_action
:
true
});
});
});
});
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js.xml
0 → 100644
View file @
fc29eb28
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/1
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
cedric.le.ninivin
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_page_slap_test_parameter_form.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
rjs_gadget_erp5_page_slap_test_parameter_form_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1455284351.49
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
SlapOS Test Parameter Form JS
</string>
</value>
</item>
<item>
<key>
<string>
url_string
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1651720603.43
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1000.3591.30719.64324
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1651847543.75
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1651705914.51
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
View file @
fc29eb28
...
@@ -214,6 +214,8 @@ web_page_module/rjs_slapos_load_meta_schema_xml_in_json_json
...
@@ -214,6 +214,8 @@ web_page_module/rjs_slapos_load_meta_schema_xml_in_json_json
web_page_module/rjs_slapos_load_meta_schema_xml_json
web_page_module/rjs_slapos_load_meta_schema_xml_json
web_page_module/rjs_slapos_load_software_schema_json
web_page_module/rjs_slapos_load_software_schema_json
web_page_module/rjs_gadget_slapos_login_page_css
web_page_module/rjs_gadget_slapos_login_page_css
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_html
web_page_module/rjs_tv4_min_js
web_page_module/rjs_tv4_min_js
web_page_module/rjs_vkbeautify_js
web_page_module/rjs_vkbeautify_js
web_site_module/hostingjs
web_site_module/hostingjs
...
...
master/bt5/slapos_jio/bt/template_path_list
View file @
fc29eb28
...
@@ -89,6 +89,8 @@ web_page_module/rjs_gadget_erp5_page_slap_organisation_view_html
...
@@ -89,6 +89,8 @@ web_page_module/rjs_gadget_erp5_page_slap_organisation_view_html
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_js
web_page_module/rjs_gadget_erp5_page_slap_organisation_view_js
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_zh_html
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_zh_html
web_page_module/rjs_gadget_erp5_page_slap_payment_result_html
web_page_module/rjs_gadget_erp5_page_slap_payment_result_html
...
@@ -140,6 +142,8 @@ web_page_module/rjs_gadget_erp5_page_slap_start_instance_tree_js
...
@@ -140,6 +142,8 @@ web_page_module/rjs_gadget_erp5_page_slap_start_instance_tree_js
web_page_module/rjs_gadget_erp5_page_slap_stop_instance_tree_html
web_page_module/rjs_gadget_erp5_page_slap_stop_instance_tree_html
web_page_module/rjs_gadget_erp5_page_slap_stop_instance_tree_js
web_page_module/rjs_gadget_erp5_page_slap_stop_instance_tree_js
web_page_module/rjs_gadget_erp5_page_slap_support_request_view_html
web_page_module/rjs_gadget_erp5_page_slap_support_request_view_html
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_ticket_list_html
web_page_module/rjs_gadget_erp5_page_slap_ticket_list_html
web_page_module/rjs_gadget_erp5_page_slap_ticket_list_js
web_page_module/rjs_gadget_erp5_page_slap_ticket_list_js
web_page_module/rjs_gadget_erp5_page_slap_ticket_view_js
web_page_module/rjs_gadget_erp5_page_slap_ticket_view_js
...
...
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSServiceJSONSerialisation.zpt
View file @
fc29eb28
...
@@ -152,23 +152,6 @@
...
@@ -152,23 +152,6 @@
<td>
//input[@name="//kvm-partition-dict/KVM-CLUSTER-INSTANCE-0/disk-size"]
</td>
<td>
//input[@name="//kvm-partition-dict/KVM-CLUSTER-INSTANCE-0/disk-size"]
</td>
<td>
10
</td>
<td>
10
</td>
</tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//select[@name="//kvm-partition-dict/KVM-CLUSTER-INSTANCE-0/boot-image-url-select"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//select[@name="//kvm-partition-dict/KVM-CLUSTER-INSTANCE-0/boot-image-url-select"]
</td>
<td></td>
</tr>
<tr>
<td>
select
</td>
<td>
//select[@name="//kvm-partition-dict/KVM-CLUSTER-INSTANCE-0/boot-image-url-select"]
</td>
<td>
Debian Buster 10.5 netinst x86_64
</td>
</tr>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//input[@name="ADD//kvm-partition-dict"]
</td>
<td>
//input[@name="ADD//kvm-partition-dict"]
</td>
...
...
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