Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
wendelin
Commits
1845dc9c
Commit
1845dc9c
authored
Jul 08, 2020
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Plain Diff
Visualisation
See merge request
!54
parents
81c776d0
d9b8a4ae
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2069 additions
and
15 deletions
+2069
-15
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataArray.py
...TemplateItem/portal_components/document.erp5.DataArray.py
+18
-14
bt5/erp5_wendelin/PathTemplateItem/web_page_module/wendelin_js.js
..._wendelin/PathTemplateItem/web_page_module/wendelin_js.js
+844
-0
bt5/erp5_wendelin/PathTemplateItem/web_page_module/wendelin_js.xml
...wendelin/PathTemplateItem/web_page_module/wendelin_js.xml
+643
-0
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/DataArray_view.xml
...emplateItem/portal_skins/erp5_wendelin/DataArray_view.xml
+2
-0
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/DataArray_view/my_array_dtype.xml
...tal_skins/erp5_wendelin/DataArray_view/my_array_dtype.xml
+287
-0
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/DataArray_view/my_array_shape.xml
...tal_skins/erp5_wendelin/DataArray_view/my_array_shape.xml
+272
-0
bt5/erp5_wendelin/bt/template_keep_workflow_path_list
bt5/erp5_wendelin/bt/template_keep_workflow_path_list
+1
-0
bt5/erp5_wendelin/bt/template_path_list
bt5/erp5_wendelin/bt/template_path_list
+2
-1
No files found.
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataArray.py
View file @
1845dc9c
...
@@ -179,7 +179,6 @@ class DataArray(BigFile):
...
@@ -179,7 +179,6 @@ class DataArray(BigFile):
ranges
=
HTTPRangeSupport
.
parseRange
(
range
)
ranges
=
HTTPRangeSupport
.
parseRange
(
range
)
array
=
self
.
getArray
()
array
=
self
.
getArray
()
factor
=
array
.
nbytes
/
array
.
shape
[
0
]
if
if_range
is
not
None
:
if
if_range
is
not
None
:
# Only send ranges if the data isn't modified, otherwise send
# Only send ranges if the data isn't modified, otherwise send
...
@@ -241,8 +240,10 @@ class DataArray(BigFile):
...
@@ -241,8 +240,10 @@ class DataArray(BigFile):
'bytes %d-%d/%d'
%
(
start
,
end
-
1
,
self
.
getSize
()))
'bytes %d-%d/%d'
%
(
start
,
end
-
1
,
self
.
getSize
()))
RESPONSE
.
setStatus
(
206
)
# Partial content
RESPONSE
.
setStatus
(
206
)
# Partial content
# convert ranges from bytes to array indices
# convert array to bytes
RESPONSE
.
write
(
array
[
start
/
factor
:
end
/
factor
].
tobytes
())
data
=
array
[:].
view
(
'<b'
).
reshape
((
-
1
,))[
start
:
end
].
tobytes
()
RESPONSE
.
setBody
(
data
,
lock
=
True
)
else
:
else
:
boundary
=
choose_boundary
()
boundary
=
choose_boundary
()
...
@@ -268,16 +269,19 @@ class DataArray(BigFile):
...
@@ -268,16 +269,19 @@ class DataArray(BigFile):
draftprefix
,
boundary
))
draftprefix
,
boundary
))
RESPONSE
.
setStatus
(
206
)
# Partial content
RESPONSE
.
setStatus
(
206
)
# Partial content
data
=
''
for
start
,
end
in
ranges
:
for
start
,
end
in
ranges
:
RESPONSE
.
write
(
'
\
r
\
n
--%s
\
r
\
n
'
%
boundary
)
data
=
'{data}
\
r
\
n
--{boundary}
\
r
\
n
'
\
RESPONSE
.
write
(
'Content-Type: %s
\
r
\
n
'
%
'Content-Type: {content_type}
\
r
\
n
'
\
self
.
content_type
)
'Content-Range: bytes {start:d}-{end:d}/{size:d}
\
r
\
n
\
r
\
n
'
\
RESPONSE
.
write
(
'{array}'
.
format
(
data
=
data
,
'Content-Range: bytes %d-%d/%d
\
r
\
n
\
r
\
n
'
%
(
boundary
=
boundary
,
start
,
end
-
1
,
self
.
getSize
()))
content_type
=
self
.
content_type
,
start
=
start
,
# convert ranges from bytes to array indices
end
=
end
-
1
,
RESPONSE
.
write
(
array
[
start
/
factor
:
end
/
factor
].
tobytes
())
size
=
self
.
getSize
(),
array
=
array
[:].
view
(
'<b'
).
reshape
((
-
1
,))[
start
:
end
].
tobytes
())
RESPONSE
.
write
(
'
\
r
\
n
--%s--
\
r
\
n
'
%
boundary
)
data
=
'{}
\
r
\
n
--{}--
\
r
\
n
'
.
format
(
data
,
boundary
)
RESPONSE
.
setBody
(
data
,
lock
=
True
)
return
True
return
True
bt5/erp5_wendelin/PathTemplateItem/web_page_module/wendelin_js.js
0 → 100644
View file @
1845dc9c
This diff is collapsed.
Click to expand it.
bt5/erp5_wendelin/PathTemplateItem/web_page_module/wendelin_js.xml
0 → 100644
View file @
1845dc9c
This diff is collapsed.
Click to expand it.
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/DataArray_view.xml
View file @
1845dc9c
...
@@ -80,6 +80,8 @@
...
@@ -80,6 +80,8 @@
<string>
my_reference
</string>
<string>
my_reference
</string>
<string>
my_version
</string>
<string>
my_version
</string>
<string>
my_publication_section_list
</string>
<string>
my_publication_section_list
</string>
<string>
my_array_dtype
</string>
<string>
my_array_shape
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/DataArray_view/my_array_dtype.xml
0 → 100644
View file @
1845dc9c
This diff is collapsed.
Click to expand it.
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/DataArray_view/my_array_shape.xml
0 → 100644
View file @
1845dc9c
This diff is collapsed.
Click to expand it.
bt5/erp5_wendelin/bt/template_keep_workflow_path_list
View file @
1845dc9c
web_page_module/wendelin_information_gadget.html
web_page_module/wendelin_information_gadget.html
web_page_module/wendelin_js
portal_gadgets/WendelinInformationGadget
portal_gadgets/WendelinInformationGadget
portal_ingestion_policies/default_http_json
portal_ingestion_policies/default_http_json
portal_ingestion_policies/default_http_json/**
portal_ingestion_policies/default_http_json/**
...
...
bt5/erp5_wendelin/bt/template_path_list
View file @
1845dc9c
...
@@ -20,3 +20,4 @@ portal_gadgets/WendelinInformationGadget/**
...
@@ -20,3 +20,4 @@ portal_gadgets/WendelinInformationGadget/**
portal_ingestion_policies/default_http_json
portal_ingestion_policies/default_http_json
portal_ingestion_policies/default_http_json/**
portal_ingestion_policies/default_http_json/**
web_page_module/wendelin_information_gadget.html
web_page_module/wendelin_information_gadget.html
web_page_module/wendelin_js
\ No newline at end of file
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