Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
f620c69a
Commit
f620c69a
authored
Mar 27, 2019
by
ROSPARS Benoit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix jupyter rendering bug that ended in an infinite loop
parent
0610bb09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
app/assets/javascripts/notebook/cells/output/index.vue
app/assets/javascripts/notebook/cells/output/index.vue
+15
-14
changelogs/unreleased/59079-fix-jupyter-render-loop.yml
changelogs/unreleased/59079-fix-jupyter-render-loop.yml
+5
-0
No files found.
app/assets/javascripts/notebook/cells/output/index.vue
View file @
f620c69a
...
...
@@ -20,12 +20,20 @@ export default {
required
:
true
,
},
},
data
()
{
return
{
outputType
:
''
,
};
},
methods
:
{
outputType
(
output
)
{
if
(
output
.
text
)
{
return
'
text/plain
'
;
}
else
if
(
output
.
data
[
'
image/png
'
])
{
return
'
image/png
'
;
}
else
if
(
output
.
data
[
'
text/html
'
])
{
return
'
text/html
'
;
}
else
if
(
output
.
data
[
'
image/svg+xml
'
])
{
return
'
image/svg+xml
'
;
}
return
'
text/plain
'
;
},
dataForType
(
output
,
type
)
{
let
data
=
output
.
data
[
type
];
...
...
@@ -39,20 +47,13 @@ export default {
if
(
output
.
text
)
{
return
CodeOutput
;
}
else
if
(
output
.
data
[
'
image/png
'
])
{
this
.
outputType
=
'
image/png
'
;
return
ImageOutput
;
}
else
if
(
output
.
data
[
'
text/html
'
])
{
this
.
outputType
=
'
text/html
'
;
return
HtmlOutput
;
}
else
if
(
output
.
data
[
'
image/svg+xml
'
])
{
this
.
outputType
=
'
image/svg+xml
'
;
return
HtmlOutput
;
}
this
.
outputType
=
'
text/plain
'
;
return
CodeOutput
;
},
rawCode
(
output
)
{
...
...
@@ -60,7 +61,7 @@ export default {
return
output
.
text
.
join
(
''
);
}
return
this
.
dataForType
(
output
,
this
.
outputType
);
return
this
.
dataForType
(
output
,
this
.
outputType
(
output
)
);
},
},
};
...
...
@@ -73,7 +74,7 @@ export default {
v-for=
"(output, index) in outputs"
:key=
"index"
type=
"output"
:output-type=
"outputType"
:output-type=
"outputType
(output)
"
:count=
"count"
:index=
"index"
:raw-code=
"rawCode(output)"
...
...
changelogs/unreleased/59079-fix-jupyter-render-loop.yml
0 → 100644
View file @
f620c69a
---
title
:
Fix jupyter rendering bug that ended in an infinite loop
merge_request
:
26656
author
:
ROSPARS Benoit
type
:
fixed
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