Commit 0dea53d5 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent b4e072cb
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
v-if="hasOutput" v-if="hasOutput"
:count="cell.execution_count" :count="cell.execution_count"
:outputs="outputs" :outputs="outputs"
:metadata="cell.metadata"
:code-css-class="codeCssClass" :code-css-class="codeCssClass"
/> />
</div> </div>
......
...@@ -26,6 +26,10 @@ export default { ...@@ -26,6 +26,10 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
metadata: {
type: Object,
default: () => ({}),
},
}, },
computed: { computed: {
code() { code() {
...@@ -36,6 +40,12 @@ export default { ...@@ -36,6 +40,12 @@ export default {
return type.charAt(0).toUpperCase() + type.slice(1); return type.charAt(0).toUpperCase() + type.slice(1);
}, },
cellCssClass() {
return {
[this.codeCssClass]: true,
'jupyter-notebook-scrolled': this.metadata.scrolled,
};
},
}, },
mounted() { mounted() {
Prism.highlightElement(this.$refs.code); Prism.highlightElement(this.$refs.code);
...@@ -46,6 +56,6 @@ export default { ...@@ -46,6 +56,6 @@ export default {
<template> <template>
<div :class="type"> <div :class="type">
<prompt :type="promptType" :count="count" /> <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> </div>
</template> </template>
...@@ -19,6 +19,10 @@ export default { ...@@ -19,6 +19,10 @@ export default {
type: Array, type: Array,
required: true, required: true,
}, },
metadata: {
type: Object,
default: () => ({}),
},
}, },
methods: { methods: {
outputType(output) { outputType(output) {
...@@ -78,6 +82,7 @@ export default { ...@@ -78,6 +82,7 @@ export default {
:count="count" :count="count"
:index="index" :index="index"
:raw-code="rawCode(output)" :raw-code="rawCode(output)"
:metadata="metadata"
:code-css-class="codeCssClass" :code-css-class="codeCssClass"
/> />
</div> </div>
......
...@@ -56,6 +56,10 @@ export default { ...@@ -56,6 +56,10 @@ export default {
$('.content_list').append(html); $('.content_list').append(html);
if (count > 0) { if (count > 0) {
this.offset += count; this.offset += count;
if (count < this.limit) {
this.disable = true;
}
} else { } else {
this.disable = true; this.disable = true;
} }
......
...@@ -479,3 +479,8 @@ span.idiff { ...@@ -479,3 +479,8 @@ span.idiff {
padding: $gl-padding; padding: $gl-padding;
} }
} }
.jupyter-notebook-scrolled {
overflow-y: auto;
max-height: 20rem;
}
- ssh_info = @instance_configuration.settings[:ssh_algorithms_hashes] - ssh_info = @instance_configuration.settings[:ssh_algorithms_hashes]
- if ssh_info.any? - content_for :table_content do
- content_for :table_content do %li
%li= link_to 'SSH host keys fingerprints', '#ssh-host-keys-fingerprints' = link_to _('SSH host key fingerprints'), '#ssh-host-keys-fingerprints'
- content_for :settings_content do - content_for :settings_content do
%h2#ssh-host-keys-fingerprints %h2#ssh-host-keys-fingerprints
SSH host keys fingerprints = _('SSH host key fingerprints')
- if ssh_info.blank?
%p %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-responsive
%table %table
%thead %thead
%tr %tr
%th Algorithm %th
%th MD5 = _('Algorithm')
%th SHA256 %th
= _('MD5')
%th
= _('SHA256')
%tbody %tbody
- ssh_info.each do |algorithm| - ssh_info.each do |algorithm|
%tr %tr
......
...@@ -20,7 +20,7 @@ module Secpick ...@@ -20,7 +20,7 @@ module Secpick
end end
def ee? def ee?
File.exist?('./CHANGELOG-EE.md') File.exist?('./ee/app/models/license.rb')
end end
def dry_run? def dry_run?
......
---
title: Fix erroneous "No activities found" message
merge_request: 18434
author:
type: fixed
---
title: Make instance configuration user friendly
merge_request: 18363
author: Takuya Noguchi
type: other
...@@ -71,11 +71,6 @@ don't have to create and edit HTML files manually. For example, Jekyll has the ...@@ -71,11 +71,6 @@ don't have to create and edit HTML files manually. For example, Jekyll has the
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/33422) in GitLab 11.5. > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/33422) in GitLab 11.5.
NOTE: **Note:**
GitLab Pages access control is not activated on GitLab.com. You can check its
progress on the
[infrastructure issue tracker](https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5576).
You can enable Pages access control on your project, so that only You can enable Pages access control on your project, so that only
[members of your project](../../permissions.md#project-members-permissions) [members of your project](../../permissions.md#project-members-permissions)
(at least Guest) can access your website: (at least Guest) can access your website:
......
...@@ -15,6 +15,10 @@ module Gitlab ...@@ -15,6 +15,10 @@ module Gitlab
category = args.delete(:category) || self.class.name category = args.delete(:category) || self.class.name
Gitlab::Tracking.event(category, action.to_s, **args) Gitlab::Tracking.event(category, action.to_s, **args)
end end
def track_self_describing_event(schema_url, event_data_json, **args)
Gitlab::Tracking.self_describing_event(schema_url, event_data_json, **args)
end
end end
class << self class << self
...@@ -28,6 +32,13 @@ module Gitlab ...@@ -28,6 +32,13 @@ module Gitlab
snowplow.track_struct_event(category, action, label, property, value, context, Time.now.to_i) snowplow.track_struct_event(category, action, label, property, value, context, Time.now.to_i)
end end
def self_describing_event(schema_url, event_data_json, context: nil)
return unless enabled?
event_json = SnowplowTracker::SelfDescribingJson.new(schema_url, event_data_json)
snowplow.track_self_describing_event(event_json, context, Time.now.to_i)
end
def snowplow_options(group) def snowplow_options(group)
additional_features = Feature.enabled?(:additional_snowplow_tracking, group) additional_features = Feature.enabled?(:additional_snowplow_tracking, group)
{ {
......
...@@ -1323,6 +1323,9 @@ msgstr "" ...@@ -1323,6 +1323,9 @@ msgstr ""
msgid "Alerts endpoint" msgid "Alerts endpoint"
msgstr "" msgstr ""
msgid "Algorithm"
msgstr ""
msgid "All" msgid "All"
msgstr "" msgstr ""
...@@ -2358,6 +2361,9 @@ msgstr "" ...@@ -2358,6 +2361,9 @@ msgstr ""
msgid "Below are examples of regex for existing tools:" msgid "Below are examples of regex for existing tools:"
msgstr "" msgstr ""
msgid "Below are the fingerprints for the current instance SSH host keys."
msgstr ""
msgid "Below you will find all the groups that are public." msgid "Below you will find all the groups that are public."
msgstr "" msgstr ""
...@@ -3999,6 +4005,9 @@ msgstr "" ...@@ -3999,6 +4005,9 @@ msgstr ""
msgid "Code" msgid "Code"
msgstr "" msgstr ""
msgid "Code Analytics"
msgstr ""
msgid "Code Owners" msgid "Code Owners"
msgstr "" msgstr ""
...@@ -8524,6 +8533,12 @@ msgstr "" ...@@ -8524,6 +8533,12 @@ msgstr ""
msgid "Identifier" msgid "Identifier"
msgstr "" msgstr ""
msgid "Identify areas of the codebase associated with a lot of churn, which can indicate potential code hotspots."
msgstr ""
msgid "Identify the most frequently changed files in your repository"
msgstr ""
msgid "Identities" msgid "Identities"
msgstr "" msgstr ""
...@@ -9707,6 +9722,9 @@ msgstr "" ...@@ -9707,6 +9722,9 @@ msgstr ""
msgid "Logs" msgid "Logs"
msgstr "" msgstr ""
msgid "MD5"
msgstr ""
msgid "MERGED" msgid "MERGED"
msgstr "" msgstr ""
...@@ -13912,6 +13930,9 @@ msgstr "" ...@@ -13912,6 +13930,9 @@ msgstr ""
msgid "SAML for %{group_name}" msgid "SAML for %{group_name}"
msgstr "" msgstr ""
msgid "SHA256"
msgstr ""
msgid "SSH Key" msgid "SSH Key"
msgstr "" msgstr ""
...@@ -13921,9 +13942,15 @@ msgstr "" ...@@ -13921,9 +13942,15 @@ msgstr ""
msgid "SSH Keys Help" msgid "SSH Keys Help"
msgstr "" msgstr ""
msgid "SSH host key fingerprints"
msgstr ""
msgid "SSH host keys" msgid "SSH host keys"
msgstr "" msgstr ""
msgid "SSH host keys are not available on this system. Please use <code>ssh-keyscan</code> command or contact your GitLab administrator for more information."
msgstr ""
msgid "SSH keys allow you to establish a secure connection between your computer and GitLab." msgid "SSH keys allow you to establish a secure connection between your computer and GitLab."
msgstr "" msgstr ""
......
...@@ -57,12 +57,10 @@ module QA ...@@ -57,12 +57,10 @@ module QA
@project.visit! @project.visit!
Page::Project::Show.perform(&:create_new_file!) Page::Project::Show.perform(&:create_new_file!)
Page::File::Form.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName Page::File::Form.perform do |form|
page.select_template template[:file_name], template[:name] form.select_template template[:file_name], template[:name]
end end
expect(page).to have_content('Template applied')
expect(page).to have_button('Undo')
expect(page).to have_content(content[0..100]) expect(page).to have_content(content[0..100])
Page::File::Form.perform(&:commit_changes) Page::File::Form.perform(&:commit_changes)
......
...@@ -63,9 +63,9 @@ describe('pager', () => { ...@@ -63,9 +63,9 @@ describe('pager', () => {
describe('getOld', () => { describe('getOld', () => {
const urlRegex = /(.*)some_list(.*)$/; const urlRegex = /(.*)some_list(.*)$/;
function mockSuccess() { function mockSuccess(count = 0) {
axiosMock.onGet(urlRegex).reply(200, { axiosMock.onGet(urlRegex).reply(200, {
count: 0, count,
html: '', html: '',
}); });
} }
...@@ -142,5 +142,21 @@ describe('pager', () => { ...@@ -142,5 +142,21 @@ describe('pager', () => {
done(); done();
}); });
}); });
it('disables if return count is less than limit', done => {
Pager.offset = 0;
Pager.limit = 20;
mockSuccess(1);
spyOn(Pager.loading, 'hide');
Pager.getOld();
setTimeout(() => {
expect(Pager.loading.hide).toHaveBeenCalled();
expect(Pager.disable).toBe(true);
done();
});
});
}); });
}); });
...@@ -12,10 +12,8 @@ describe Gitlab::Tracking do ...@@ -12,10 +12,8 @@ describe Gitlab::Tracking do
end end
describe '.snowplow_options' do describe '.snowplow_options' do
subject(&method(:described_class))
it 'returns useful client options' do it 'returns useful client options' do
expect(subject.snowplow_options(nil)).to eq( expect(described_class.snowplow_options(nil)).to eq(
namespace: 'gl', namespace: 'gl',
hostname: 'gitfoo.com', hostname: 'gitfoo.com',
cookieDomain: '.gitfoo.com', cookieDomain: '.gitfoo.com',
...@@ -32,23 +30,35 @@ describe Gitlab::Tracking do ...@@ -32,23 +30,35 @@ describe Gitlab::Tracking do
'_group_' '_group_'
).and_return(false) ).and_return(false)
expect(subject.snowplow_options('_group_')).to include( expect(described_class.snowplow_options('_group_')).to include(
formTracking: false, formTracking: false,
linkClickTracking: false linkClickTracking: false
) )
end end
end end
describe '.event' do describe 'tracking events' do
subject(&method(:described_class)) shared_examples 'events not tracked' do
it 'does not track events' do
stub_application_setting(snowplow_enabled: false)
expect(SnowplowTracker::AsyncEmitter).not_to receive(:new)
expect(SnowplowTracker::Tracker).not_to receive(:new)
track_event
end
end
around do |example| around do |example|
Timecop.freeze(timestamp) { example.run } Timecop.freeze(timestamp) { example.run }
end end
it 'can track events' do before do
tracker = double described_class.instance_variable_set("@snowplow", nil)
end
let(:tracker) { double }
def receive_events
expect(SnowplowTracker::AsyncEmitter).to receive(:new).with( expect(SnowplowTracker::AsyncEmitter).to receive(:new).with(
'gitfoo.com', { protocol: 'https' } 'gitfoo.com', { protocol: 'https' }
).and_return('_emitter_') ).and_return('_emitter_')
...@@ -59,30 +69,67 @@ describe Gitlab::Tracking do ...@@ -59,30 +69,67 @@ describe Gitlab::Tracking do
'gl', 'gl',
'_abc123_' '_abc123_'
).and_return(tracker) ).and_return(tracker)
end
describe '.event' do
let(:track_event) do
described_class.event('category', 'action',
label: '_label_',
property: '_property_',
value: '_value_',
context: nil
)
end
it_behaves_like 'events not tracked'
it 'can track events' do
receive_events
expect(tracker).to receive(:track_struct_event).with( expect(tracker).to receive(:track_struct_event).with(
'category', 'category',
'action', 'action',
'_label_', '_label_',
'_property_', '_property_',
'_value_', '_value_',
'_context_', nil,
timestamp.to_i timestamp.to_i
) )
subject.event('category', 'action', track_event
label: '_label_', end
property: '_property_', end
value: '_value_',
context: '_context_' describe '.self_describing_event' do
let(:track_event) do
described_class.self_describing_event('iglu:com.gitlab/example/jsonschema/1-0-2',
{
foo: 'bar',
foo_count: 42
},
context: nil
) )
end end
it 'does not track when not enabled' do it_behaves_like 'events not tracked'
stub_application_setting(snowplow_enabled: false)
expect(SnowplowTracker::Tracker).not_to receive(:new) it 'can track self describing events' do
receive_events
expect(SnowplowTracker::SelfDescribingJson).to receive(:new).with(
'iglu:com.gitlab/example/jsonschema/1-0-2',
{
foo: 'bar',
foo_count: 42
}
).and_return('_event_json_')
subject.event('epics', 'action', property: 'what', value: 'doit') expect(tracker).to receive(:track_self_describing_event).with(
'_event_json_',
nil,
timestamp.to_i
)
track_event
end
end end
end end
end end
...@@ -990,15 +990,15 @@ ...@@ -990,15 +990,15 @@
dependencies: dependencies:
vue-eslint-parser "^6.0.4" vue-eslint-parser "^6.0.4"
"@gitlab/svgs@^1.76.0": "@gitlab/svgs@^1.78.0":
version "1.76.0" version "1.78.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.76.0.tgz#2def3b5542d23259e81c889c75059a5d1f1e3f61" resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.78.0.tgz#469493bd6cdd254eb5d1271edeab22bbbee2f4c4"
integrity sha512-wTCNSq3CxNrEzrJdEbf8GwHfhzEsUMJNEuGTBGGhe1qc0sY5z/U3s3HG7tdAOrB5pec9JarRXzc7g5ax9bsopQ== integrity sha512-dBgEB/Q4FRD0NapmNrD86DF1FsV0uSgTx0UOJloHnGE2DNR2P1HQrCmLW2fX+QgN4P9CDAzdi2buVHuholofWw==
"@gitlab/ui@5.27.0": "@gitlab/ui@5.32.0":
version "5.27.0" version "5.32.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-5.27.0.tgz#2c65ed2612b2089a9445aaf9f303701efaf2a3a7" resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-5.32.0.tgz#21bb70b6c8b68bdcbb53ffebde80ff3cd93851c8"
integrity sha512-/tqVKlpepl423jpM6ZK95kkn3urS48873ZFeJFtf69mqRmHtVMB9GR4Fz99OyOR252Fpa7XTHx0dVxb5kKs+xA== integrity sha512-xTFz4/WbR1e6zj2xI2DULcAGicA6qidb9Reoa02V5snqWcQY+iHDup/XzgXmttTPCiBlqPIFo/CMhH4gSJWuPQ==
dependencies: dependencies:
"@babel/standalone" "^7.0.0" "@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.2.1" "@gitlab/vue-toasted" "^1.2.1"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment