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
Xiaowu Zhang
slapos.core
Commits
5ae623c3
Commit
5ae623c3
authored
May 19, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Display software product image on panel
See merge request
nexedi/slapos.core!294
parents
b0b435ce
6d08c61b
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1228 additions
and
218 deletions
+1228
-218
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscriptionModule_viewHostingSubscriptionList.xml
...HostingSubscriptionModule_viewHostingSubscriptionList.xml
+3
-1
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscriptionModule_viewHostingSubscriptionList/listbox.xml
...ubscriptionModule_viewHostingSubscriptionList/listbox.xml
+4
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscriptionModule_viewHostingSubscriptionList/listbox_list_image.xml
...Module_viewHostingSubscriptionList/listbox_list_image.xml
+120
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscription_getDefaultImageAbsoluteUrl.py
...s_cloud/HostingSubscription_getDefaultImageAbsoluteUrl.py
+14
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscription_getDefaultImageAbsoluteUrl.xml
..._cloud/HostingSubscription_getDefaultImageAbsoluteUrl.xml
+62
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscription_view.xml
...em/portal_skins/slapos_cloud/HostingSubscription_view.xml
+1
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscription_view/my_list_image.xml
...s/slapos_cloud/HostingSubscription_view/my_list_image.xml
+138
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareInstance_getDefaultImageAbsoluteUrl.xml
...pos_cloud/SoftwareInstance_getDefaultImageAbsoluteUrl.xml
+1
-1
master/bt5/slapos_jio/ActionTemplateItem/portal_types/Hosting%20Subscription%20Module/slaposjs_view.xml
...l_types/Hosting%20Subscription%20Module/slaposjs_view.xml
+1
-1
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_hosting_subscription_view_js.js
...rjs_gadget_erp5_page_slap_hosting_subscription_view_js.js
+29
-3
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_hosting_subscription_view_js.xml
...js_gadget_erp5_page_slap_hosting_subscription_view_js.xml
+2
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_service_list_html.html
...e_module/rjs_gadget_erp5_page_slap_service_list_html.html
+1
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_service_list_js.js
..._page_module/rjs_gadget_erp5_page_slap_service_list_js.js
+16
-56
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_service_list_js.xml
...page_module/rjs_gadget_erp5_page_slap_service_list_js.xml
+163
-154
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/HostingSubscriptionModule_viewServicesListAsHateoas.xml
...e/HostingSubscriptionModule_viewServicesListAsHateoas.xml
+158
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/HostingSubscriptionModule_viewServicesListAsHateoas/listbox.xml
...gSubscriptionModule_viewServicesListAsHateoas/listbox.xml
+244
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/HostingSubscriptionModule_viewServicesListAsHateoas/listbox_list_image.xml
...onModule_viewServicesListAsHateoas/listbox_list_image.xml
+120
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/HostingSubscription_viewAsHateoas.xml
...apos_hal_json_style/HostingSubscription_viewAsHateoas.xml
+1
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/HostingSubscription_viewAsHateoas/my_list_image.xml
...style/HostingSubscription_viewAsHateoas/my_list_image.xml
+138
-0
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSService.zpt
...eItem/portal_tests/slaposjs_zuite/testSlapOSJSService.zpt
+12
-0
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscriptionModule_viewHostingSubscriptionList.xml
View file @
5ae623c3
...
...
@@ -88,7 +88,9 @@
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
<list>
<string>
listbox_list_image
</string>
</list>
</value>
</item>
<item>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscriptionModule_viewHostingSubscriptionList/listbox.xml
View file @
5ae623c3
...
...
@@ -90,6 +90,10 @@
<string>
url_string
</string>
<string>
Software Release
</string>
</tuple>
<tuple>
<string>
list_image
</string>
<string>
Software Logo
</string>
</tuple>
</list>
</value>
</item>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscriptionModule_viewHostingSubscriptionList/listbox_list_image.xml
0 → 100644
View file @
5ae623c3
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox_list_image
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_listbox_thumbnail
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewDMSFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Software Logo
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.HostingSubscription_getDefaultImageAbsoluteUrl()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscription_getDefaultImageAbsoluteUrl.py
0 → 100644
View file @
5ae623c3
portal
=
context
.
getPortalObject
()
url_string
=
context
.
getUrlString
()
image_url
=
""
release
=
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Software Release"
,
url_string
=
url_string
,
)
if
release
is
not
None
:
software_product
=
release
.
getAggregateValue
()
# set default value of image_url to the panel's logo
image_url
=
software_product
.
getDefaultImageAbsoluteUrl
()
or
"gadget_slapos_panel.png"
return
image_url
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscription_getDefaultImageAbsoluteUrl.xml
0 → 100644
View file @
5ae623c3
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
HostingSubscription_getDefaultImageAbsoluteUrl
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscription_view.xml
View file @
5ae623c3
...
...
@@ -97,6 +97,7 @@
<string>
listbox_aggregate_parent_title
</string>
<string>
listbox_is_slave
</string>
<string>
listbox_aggregate_parent_reference
</string>
<string>
my_list_image
</string>
</list>
</value>
</item>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/HostingSubscription_view/my_list_image.xml
0 → 100644
View file @
5ae623c3
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
editable
</string>
<string>
enabled
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_list_image
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_thumbnail
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewDMSFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Software Logo
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: here.HostingSubscription_getDefaultImageAbsoluteUrl()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareInstance_getDefaultImageAbsoluteUrl.xml
View file @
5ae623c3
...
...
@@ -58,7 +58,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
XXX Fix it
</string>
</value>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_jio/ActionTemplateItem/portal_types/Hosting%20Subscription%20Module/slaposjs_view.xml
View file @
5ae623c3
...
...
@@ -73,7 +73,7 @@
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/
Base_viewDummy
AsHateoas
</string>
</value>
<value>
<string>
string:${object_url}/
HostingSubscriptionModule_viewServicesList
AsHateoas
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_hosting_subscription_view_js.js
View file @
5ae623c3
...
...
@@ -166,10 +166,24 @@
"
Connection Parameters
"
,
"
Associated Tickets
"
,
"
Instances
"
,
"
Hosting Subscription:
"
"
Hosting Subscription:
"
,
"
Software Logo
"
];
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
getSetting
(
"
hateoas_url
"
);
})
.
push
(
function
(
hateoas_url
)
{
return
gadget
.
jio_getAttachment
(
gadget
.
state
.
jio_key
,
hateoas_url
+
gadget
.
state
.
jio_key
+
'
/HostingSubscription_getDefaultImageAbsoluteUrl
'
,
{});
})
.
push
(
function
(
blob
)
{
return
jIO
.
util
.
readBlobAsText
(
blob
);
})
.
push
(
function
(
result
)
{
gadget
.
state
.
doc
.
list_image
=
result
.
srcElement
.
result
;
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_view
'
),
gadget
.
getTranslationList
(
translation_list
)
...
...
@@ -444,6 +458,18 @@
"
sort
"
:
[[
"
title
"
,
"
ascending
"
]],
"
title
"
:
result
[
1
][
28
],
"
type
"
:
"
ListBox
"
},
"
my_list_image
"
:
{
"
css_class
"
:
""
,
"
default
"
:
gadget
.
state
.
doc
.
list_image
+
"
?quality=75.0&display=thumbnail&format=png
"
,
"
description
"
:
""
,
"
editable
"
:
1
,
"
hidden
"
:
0
,
"
key
"
:
"
list_image
"
,
"
required
"
:
0
,
"
title
"
:
result
[
1
][
30
],
"
type
"
:
"
ImageField
"
}
}},
"
_links
"
:
{
...
...
@@ -462,7 +488,7 @@
[[
"
my_slap_state_title
"
],
[
'
my_monitoring_status
'
],
[
'
my_monitor_scope
'
],
[
'
my_upgrade_scope
'
],
[
'
my_source_project
'
],
[
'
my_source
'
]]
],
[
"
center
"
,
[[
"
my_source_reference
"
],
[
"
my_url_string
"
]]
[[
"
my_source_reference
"
],
[
"
my_url_string
"
]
,
[
"
my_list_image
"
]
]
],
[
"
bottom
"
,
[[
"
ticket_listbox
"
],
[
"
connection_listbox
"
],
[
"
my_text_content
"
],
[
"
listbox
"
]]
...
...
@@ -510,4 +536,4 @@
return
gadget
.
updateHeader
(
header_dict
);
});
});
}(
window
,
rJS
,
RSVP
,
btoa
));
\ No newline at end of file
}(
window
,
rJS
,
RSVP
,
btoa
));
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_hosting_subscription_view_js.xml
View file @
5ae623c3
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
86.45437.22132.6176
4
</string>
</value>
<value>
<string>
9
92.9555.45845.6205
4
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
16
02259937.61
</float>
<float>
16
21433830.07
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_service_list_html.html
View file @
5ae623c3
...
...
@@ -7,6 +7,7 @@
data-i18n=Services
data-i18n=Subscription
data-i18n=Subscriptions
data-i18n=Software Logo
-->
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_service_list_js.js
View file @
5ae623c3
...
...
@@ -12,12 +12,11 @@
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
var
gadget
=
this
;
param_list
[
0
].
select_list
=
[
"
uid
"
,
"
title
"
,
"
short_title
"
,
"
root_slave
"
];
return
gadget
.
jio_allDocs
(
param_list
[
0
])
.
push
(
function
(
result
)
{
var
i
,
value
,
news
,
len
=
result
.
data
.
total_rows
;
...
...
@@ -28,19 +27,13 @@
result
.
data
.
rows
[
i
].
value
.
HostingSubscription_getNewsDict
=
{
field_gadget_param
:
{
css_class
:
""
,
description
:
gadget
.
description_translation
,
hidden
:
0
,
"
default
"
:
{
jio_key
:
value
,
result
:
news
},
default
:
{
jio_key
:
value
,
result
:
news
},
key
:
"
status
"
,
url
:
"
gadget_slapos_hosting_subscription_status.html
"
,
title
:
gadget
.
title_translation
,
type
:
"
GadgetField
"
}
};
result
.
data
.
rows
[
i
].
value
[
"
listbox_uid:list
"
]
=
{
key
:
"
listbox_uid:list
"
,
value
:
2713
};
}
}
return
result
;
...
...
@@ -59,65 +52,32 @@
})
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
,
lines_limit
,
services_translation
,
translation_list
=
[
"
Title
"
,
"
Short Title
"
,
"
Status
"
,
"
Services
"
,
"
The Status
"
];
services_translation
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_getAttachment
(
'
hosting_subscription_module
'
,
'
view
'
);
})
.
push
(
function
(
result
)
{
gadget
.
hosting_subscription_module_view
=
result
;
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_list
'
),
gadget
.
getSetting
(
"
listbox_lines_limit
"
,
20
),
gadget
.
getTranslationList
(
translation_list
)
gadget
.
getTranslationList
(
[
"
Services
"
]
)
]);
})
.
push
(
function
(
result
)
{
gadget
.
title_translation
=
result
[
2
][
2
];
gadget
.
description_translation
=
result
[
2
][
4
];
var
column_list
=
[
[
'
title
'
,
result
[
2
][
0
]],
[
'
short_title
'
,
result
[
2
][
1
]],
[
'
HostingSubscription_getNewsDict
'
,
result
[
2
][
2
]]
],
form_list
=
result
[
0
];
lines_limit
=
result
[
1
];
services_translation
=
result
[
2
][
3
];
var
form_list
=
result
[
0
];
services_translation
=
result
[
2
][
0
];
return
form_list
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
listbox
"
:
{
"
column_list
"
:
column_list
,
"
show_anchor
"
:
0
,
"
default_params
"
:
{},
"
editable
"
:
0
,
"
editable_column_list
"
:
[],
"
key
"
:
"
slap_service_listbox
"
,
"
lines
"
:
lines_limit
,
"
list_method
"
:
"
portal_catalog
"
,
// XXX TODO Filter by default_strict_allocation_scope_uid="!=%s" % context.getPortalObject().portal_categories.allocation_scope.close.forever.getUid(),
"
query
"
:
"
urn:jio:allDocs?query=portal_type%3A%22
"
+
"
Hosting Subscription
"
+
"
%22%20AND%20validation_state%3Avalidated
"
,
"
portal_type
"
:
[],
"
search_column_list
"
:
column_list
,
"
sort_column_list
"
:
column_list
,
"
sort
"
:
[[
"
title
"
,
"
ascending
"
]],
"
title
"
:
services_translation
,
"
type
"
:
"
ListBox
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
/**
* XXX should update every page on Panel
* Directly use a new created ERP5 form to display the list
* instead of using hard-corded JS
**/
erp5_document
:
gadget
.
hosting_subscription_module_view
,
form_definition
:
{
group_list
:
[[
"
bottom
"
,
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_service_list_js.xml
View file @
5ae623c3
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/HostingSubscriptionModule_viewServicesListAsHateoas.xml
0 → 100644
View file @
5ae623c3
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Base_doSelect
</string>
</value>
</item>
<item>
<key>
<string>
action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list>
<string>
listbox
</string>
</list>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list>
<string>
listbox_list_image
</string>
</list>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
HostingSubscriptionModule_viewServicesListAsHateoas
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
HostingSubscriptionModule_viewServicesList
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_list
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Services List
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/HostingSubscriptionModule_viewServicesListAsHateoas/listbox.xml
0 → 100644
View file @
5ae623c3
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
all_columns
</string>
<string>
columns
</string>
<string>
default_params
</string>
<string>
selection_name
</string>
<string>
sort
</string>
<string>
style_columns
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
all_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
selection_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
sort
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
style_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
all_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
creation_date
</string>
<string>
Creation Date
</string>
</tuple>
<tuple>
<string>
modification_date
</string>
<string>
Modification Date
</string>
</tuple>
<tuple>
<string>
url_string
</string>
<string>
Software Release
</string>
</tuple>
<tuple>
<string>
list_image
</string>
<string>
Software Logo
</string>
</tuple>
<tuple>
<string>
reference
</string>
<string>
Reference
</string>
</tuple>
<tuple>
<string>
translated_validation_state_title
</string>
<string>
Validation State
</string>
</tuple>
<tuple>
<string>
translated_slap_state_title
</string>
<string>
Slap State
</string>
</tuple>
<tuple>
<string>
destination_section_title
</string>
<string>
Destination Section
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
columns
</string>
</key>
<value>
<list>
<tuple>
<string>
title
</string>
<string>
Title
</string>
</tuple>
<tuple>
<string>
short_title
</string>
<string>
Short Title
</string>
</tuple>
<tuple>
<string>
HostingSubscription_getNewsDict
</string>
<string>
Status
</string>
</tuple>
<tuple>
<string>
list_image
</string>
<string>
Software Logo
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
default_params
</string>
</key>
<value>
<list>
<tuple>
<string>
validation_state
</string>
<string>
validated
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_list_mode_listbox
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<list>
<tuple>
<string>
Hosting Subscription
</string>
<string>
Hosting Subscription
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
selection_name
</string>
</key>
<value>
<string>
hosting_subscription_module_hateoas_selection
</string>
</value>
</item>
<item>
<key>
<string>
sort
</string>
</key>
<value>
<list>
<tuple>
<string>
title
</string>
<string>
ascending
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
style_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
title
</string>
<string>
Title
</string>
</tuple>
<tuple>
<string>
short_title
</string>
<string>
Short Title
</string>
</tuple>
<tuple>
<string>
HostingSubscription_getNewsDict
</string>
<string>
Status
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Services
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/HostingSubscriptionModule_viewServicesListAsHateoas/listbox_list_image.xml
0 → 100644
View file @
5ae623c3
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox_list_image
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_listbox_thumbnail
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewDMSFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Software Logo
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.HostingSubscription_getDefaultImageAbsoluteUrl()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/HostingSubscription_viewAsHateoas.xml
View file @
5ae623c3
...
...
@@ -109,6 +109,7 @@
<string>
my_upgrade_scope
</string>
<string>
my_source_project_title
</string>
<string>
my_source_title
</string>
<string>
my_list_image
</string>
</list>
</value>
</item>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/HostingSubscription_viewAsHateoas/my_list_image.xml
0 → 100644
View file @
5ae623c3
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
editable
</string>
<string>
enabled
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_list_image
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_thumbnail
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewDMSFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Software Logo
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: here.HostingSubscription_getDefaultImageAbsoluteUrl()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSService.zpt
View file @
5ae623c3
...
...
@@ -122,6 +122,18 @@
<tal:block
define=
"menu_item python: 'Services'; header menu_item"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/access_menu_item"
/>
</tal:block>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url,
'gadget_html5_element.html')]//img[contains(@src, 'gadget_slapos_panel.png')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[contains(@data-gadget-url,
'gadget_html5_element.html')]//img[contains(@src, 'gadget_slapos_panel.png')]
</td>
<td></td>
</tr>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})"
>
...
...
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