diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /app/assets/javascripts/notebook/cells | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'app/assets/javascripts/notebook/cells')
-rw-r--r-- | app/assets/javascripts/notebook/cells/output/index.vue | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/app/assets/javascripts/notebook/cells/output/index.vue b/app/assets/javascripts/notebook/cells/output/index.vue index c8268b1a9ae..a7b753b7ca8 100644 --- a/app/assets/javascripts/notebook/cells/output/index.vue +++ b/app/assets/javascripts/notebook/cells/output/index.vue @@ -33,19 +33,26 @@ export default { outputType(output) { if (output.text) { return 'text/plain'; - } else if (output.output_type === ERROR_OUTPUT_TYPE) { + } + if (output.output_type === ERROR_OUTPUT_TYPE) { return 'error'; - } else if (output.data['image/png']) { + } + if (output.data['image/png']) { return 'image/png'; - } else if (output.data['image/jpeg']) { + } + if (output.data['image/jpeg']) { return 'image/jpeg'; - } else if (output.data['text/html']) { + } + if (output.data['text/html']) { return 'text/html'; - } else if (output.data['text/latex']) { + } + if (output.data['text/latex']) { return 'text/latex'; - } else if (output.data['image/svg+xml']) { + } + if (output.data['image/svg+xml']) { return 'image/svg+xml'; - } else if (output.data[TEXT_MARKDOWN]) { + } + if (output.data[TEXT_MARKDOWN]) { return TEXT_MARKDOWN; } @@ -63,21 +70,29 @@ export default { getComponent(output) { if (output.text) { return CodeOutput; - } else if (output.output_type === ERROR_OUTPUT_TYPE) { + } + if (output.output_type === ERROR_OUTPUT_TYPE) { return ErrorOutput; - } else if (output.data['image/png']) { + } + if (output.data['image/png']) { return ImageOutput; - } else if (output.data['image/jpeg']) { + } + if (output.data['image/jpeg']) { return ImageOutput; - } else if (isDataframe(output)) { + } + if (isDataframe(output)) { return DataframeOutput; - } else if (output.data['text/html']) { + } + if (output.data['text/html']) { return HtmlOutput; - } else if (output.data['text/latex']) { + } + if (output.data['text/latex']) { return LatexOutput; - } else if (output.data['image/svg+xml']) { + } + if (output.data['image/svg+xml']) { return HtmlOutput; - } else if (output.data[TEXT_MARKDOWN]) { + } + if (output.data[TEXT_MARKDOWN]) { return MarkdownOutput; } |