Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-11 12:06:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-11 12:06:43 +0300
commit0dea53d5e575c6c15ce7384da73b8d4a95b1c8cf (patch)
tree43eb08e897fbac74f151eb650bde6029b6280a6e /app
parentb4e072cbaf808793bafff148b0ec9d47819f479e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/notebook/cells/code.vue1
-rw-r--r--app/assets/javascripts/notebook/cells/code/index.vue12
-rw-r--r--app/assets/javascripts/notebook/cells/output/index.vue5
-rw-r--r--app/assets/javascripts/pager.js4
-rw-r--r--app/assets/stylesheets/framework/files.scss5
-rw-r--r--app/views/help/instance_configuration/_ssh_info.html.haml27
6 files changed, 43 insertions, 11 deletions
diff --git a/app/assets/javascripts/notebook/cells/code.vue b/app/assets/javascripts/notebook/cells/code.vue
index eefc801ed7a..1782e5bfe5a 100644
--- a/app/assets/javascripts/notebook/cells/code.vue
+++ b/app/assets/javascripts/notebook/cells/code.vue
@@ -49,6 +49,7 @@ export default {
v-if="hasOutput"
:count="cell.execution_count"
:outputs="outputs"
+ :metadata="cell.metadata"
:code-css-class="codeCssClass"
/>
</div>
diff --git a/app/assets/javascripts/notebook/cells/code/index.vue b/app/assets/javascripts/notebook/cells/code/index.vue
index 98b6cdd0944..470d8c87d59 100644
--- a/app/assets/javascripts/notebook/cells/code/index.vue
+++ b/app/assets/javascripts/notebook/cells/code/index.vue
@@ -26,6 +26,10 @@ export default {
type: String,
required: true,
},
+ metadata: {
+ type: Object,
+ default: () => ({}),
+ },
},
computed: {
code() {
@@ -36,6 +40,12 @@ export default {
return type.charAt(0).toUpperCase() + type.slice(1);
},
+ cellCssClass() {
+ return {
+ [this.codeCssClass]: true,
+ 'jupyter-notebook-scrolled': this.metadata.scrolled,
+ };
+ },
},
mounted() {
Prism.highlightElement(this.$refs.code);
@@ -46,6 +56,6 @@ export default {
<template>
<div :class="type">
<prompt :type="promptType" :count="count" />
- <pre ref="code" :class="codeCssClass" class="language-python" v-text="code"></pre>
+ <pre ref="code" :class="cellCssClass" class="language-python" v-text="code"></pre>
</div>
</template>
diff --git a/app/assets/javascripts/notebook/cells/output/index.vue b/app/assets/javascripts/notebook/cells/output/index.vue
index b59ddd0d57a..d8b0e099bc4 100644
--- a/app/assets/javascripts/notebook/cells/output/index.vue
+++ b/app/assets/javascripts/notebook/cells/output/index.vue
@@ -19,6 +19,10 @@ export default {
type: Array,
required: true,
},
+ metadata: {
+ type: Object,
+ default: () => ({}),
+ },
},
methods: {
outputType(output) {
@@ -78,6 +82,7 @@ export default {
:count="count"
:index="index"
:raw-code="rawCode(output)"
+ :metadata="metadata"
:code-css-class="codeCssClass"
/>
</div>
diff --git a/app/assets/javascripts/pager.js b/app/assets/javascripts/pager.js
index 386a9b2c740..46e80ba72e3 100644
--- a/app/assets/javascripts/pager.js
+++ b/app/assets/javascripts/pager.js
@@ -56,6 +56,10 @@ export default {
$('.content_list').append(html);
if (count > 0) {
this.offset += count;
+
+ if (count < this.limit) {
+ this.disable = true;
+ }
} else {
this.disable = true;
}
diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss
index 536a26a6ffe..b793a12317e 100644
--- a/app/assets/stylesheets/framework/files.scss
+++ b/app/assets/stylesheets/framework/files.scss
@@ -479,3 +479,8 @@ span.idiff {
padding: $gl-padding;
}
}
+
+.jupyter-notebook-scrolled {
+ overflow-y: auto;
+ max-height: 20rem;
+}
diff --git a/app/views/help/instance_configuration/_ssh_info.html.haml b/app/views/help/instance_configuration/_ssh_info.html.haml
index 987cc61b3f6..a7ee37b2784 100644
--- a/app/views/help/instance_configuration/_ssh_info.html.haml
+++ b/app/views/help/instance_configuration/_ssh_info.html.haml
@@ -1,22 +1,29 @@
- ssh_info = @instance_configuration.settings[:ssh_algorithms_hashes]
-- if ssh_info.any?
- - content_for :table_content do
- %li= link_to 'SSH host keys fingerprints', '#ssh-host-keys-fingerprints'
+- content_for :table_content do
+ %li
+ = link_to _('SSH host key fingerprints'), '#ssh-host-keys-fingerprints'
- - content_for :settings_content do
- %h2#ssh-host-keys-fingerprints
- SSH host keys fingerprints
+- content_for :settings_content do
+ %h2#ssh-host-keys-fingerprints
+ = _('SSH host key fingerprints')
+ - if ssh_info.blank?
%p
- Below are the fingerprints for the current instance SSH host keys.
+ = _('SSH host keys are not available on this system. Please use <code>ssh-keyscan</code> command or contact your GitLab administrator for more information.').html_safe
+ - else
+ %p
+ = _('Below are the fingerprints for the current instance SSH host keys.')
.table-responsive
%table
%thead
%tr
- %th Algorithm
- %th MD5
- %th SHA256
+ %th
+ = _('Algorithm')
+ %th
+ = _('MD5')
+ %th
+ = _('SHA256')
%tbody
- ssh_info.each do |algorithm|
%tr