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 {
v-if="hasOutput"
:count="cell.execution_count"
:outputs="outputs"
:metadata="cell.metadata"
:code-css-class="codeCssClass"
/>
</div>
......
......@@ -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>
......@@ -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>
......
......@@ -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;
}
......
......@@ -479,3 +479,8 @@ span.idiff {
padding: $gl-padding;
}
}
.jupyter-notebook-scrolled {
overflow-y: auto;
max-height: 20rem;
}
- 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
......
......@@ -20,7 +20,7 @@ module Secpick
end
def ee?
File.exist?('./CHANGELOG-EE.md')
File.exist?('./ee/app/models/license.rb')
end
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
> [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
[members of your project](../../permissions.md#project-members-permissions)
(at least Guest) can access your website:
......
......@@ -15,6 +15,10 @@ module Gitlab
category = args.delete(:category) || self.class.name
Gitlab::Tracking.event(category, action.to_s, **args)
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
class << self
......@@ -28,6 +32,13 @@ module Gitlab
snowplow.track_struct_event(category, action, label, property, value, context, Time.now.to_i)
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)
additional_features = Feature.enabled?(:additional_snowplow_tracking, group)
{
......
......@@ -1323,6 +1323,9 @@ msgstr ""
msgid "Alerts endpoint"
msgstr ""
msgid "Algorithm"
msgstr ""
msgid "All"
msgstr ""
......@@ -2358,6 +2361,9 @@ msgstr ""
msgid "Below are examples of regex for existing tools:"
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."
msgstr ""
......@@ -3999,6 +4005,9 @@ msgstr ""
msgid "Code"
msgstr ""
msgid "Code Analytics"
msgstr ""
msgid "Code Owners"
msgstr ""
......@@ -8524,6 +8533,12 @@ msgstr ""
msgid "Identifier"
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"
msgstr ""
......@@ -9707,6 +9722,9 @@ msgstr ""
msgid "Logs"
msgstr ""
msgid "MD5"
msgstr ""
msgid "MERGED"
msgstr ""
......@@ -13912,6 +13930,9 @@ msgstr ""
msgid "SAML for %{group_name}"
msgstr ""
msgid "SHA256"
msgstr ""
msgid "SSH Key"
msgstr ""
......@@ -13921,9 +13942,15 @@ msgstr ""
msgid "SSH Keys Help"
msgstr ""
msgid "SSH host key fingerprints"
msgstr ""
msgid "SSH host keys"
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."
msgstr ""
......
......@@ -57,12 +57,10 @@ module QA
@project.visit!
Page::Project::Show.perform(&:create_new_file!)
Page::File::Form.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
page.select_template template[:file_name], template[:name]
Page::File::Form.perform do |form|
form.select_template template[:file_name], template[:name]
end
expect(page).to have_content('Template applied')
expect(page).to have_button('Undo')
expect(page).to have_content(content[0..100])
Page::File::Form.perform(&:commit_changes)
......
......@@ -63,9 +63,9 @@ describe('pager', () => {
describe('getOld', () => {
const urlRegex = /(.*)some_list(.*)$/;
function mockSuccess() {
function mockSuccess(count = 0) {
axiosMock.onGet(urlRegex).reply(200, {
count: 0,
count,
html: '',
});
}
......@@ -142,5 +142,21 @@ describe('pager', () => {
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
end
describe '.snowplow_options' do
subject(&method(:described_class))
it 'returns useful client options' do
expect(subject.snowplow_options(nil)).to eq(
expect(described_class.snowplow_options(nil)).to eq(
namespace: 'gl',
hostname: 'gitfoo.com',
cookieDomain: '.gitfoo.com',
......@@ -32,23 +30,35 @@ describe Gitlab::Tracking do
'_group_'
).and_return(false)
expect(subject.snowplow_options('_group_')).to include(
expect(described_class.snowplow_options('_group_')).to include(
formTracking: false,
linkClickTracking: false
)
end
end
describe '.event' do
subject(&method(:described_class))
describe 'tracking events' do
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|
Timecop.freeze(timestamp) { example.run }
end
it 'can track events' do
tracker = double
before do
described_class.instance_variable_set("@snowplow", nil)
end
let(:tracker) { double }
def receive_events
expect(SnowplowTracker::AsyncEmitter).to receive(:new).with(
'gitfoo.com', { protocol: 'https' }
).and_return('_emitter_')
......@@ -59,30 +69,67 @@ describe Gitlab::Tracking do
'gl',
'_abc123_'
).and_return(tracker)
end
expect(tracker).to receive(:track_struct_event).with(
'category',
'action',
'_label_',
'_property_',
'_value_',
'_context_',
timestamp.to_i
)
describe '.event' do
let(:track_event) do
described_class.event('category', 'action',
label: '_label_',
property: '_property_',
value: '_value_',
context: nil
)
end
subject.event('category', 'action',
label: '_label_',
property: '_property_',
value: '_value_',
context: '_context_'
)
it_behaves_like 'events not tracked'
it 'can track events' do
receive_events
expect(tracker).to receive(:track_struct_event).with(
'category',
'action',
'_label_',
'_property_',
'_value_',
nil,
timestamp.to_i
)
track_event
end
end
it 'does not track when not enabled' do
stub_application_setting(snowplow_enabled: false)
expect(SnowplowTracker::Tracker).not_to receive(:new)
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
it_behaves_like 'events not tracked'
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_')
expect(tracker).to receive(:track_self_describing_event).with(
'_event_json_',
nil,
timestamp.to_i
)
subject.event('epics', 'action', property: 'what', value: 'doit')
track_event
end
end
end
end
......@@ -990,15 +990,15 @@
dependencies:
vue-eslint-parser "^6.0.4"
"@gitlab/svgs@^1.76.0":
version "1.76.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.76.0.tgz#2def3b5542d23259e81c889c75059a5d1f1e3f61"
integrity sha512-wTCNSq3CxNrEzrJdEbf8GwHfhzEsUMJNEuGTBGGhe1qc0sY5z/U3s3HG7tdAOrB5pec9JarRXzc7g5ax9bsopQ==
"@gitlab/ui@5.27.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-5.27.0.tgz#2c65ed2612b2089a9445aaf9f303701efaf2a3a7"
integrity sha512-/tqVKlpepl423jpM6ZK95kkn3urS48873ZFeJFtf69mqRmHtVMB9GR4Fz99OyOR252Fpa7XTHx0dVxb5kKs+xA==
"@gitlab/svgs@^1.78.0":
version "1.78.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.78.0.tgz#469493bd6cdd254eb5d1271edeab22bbbee2f4c4"
integrity sha512-dBgEB/Q4FRD0NapmNrD86DF1FsV0uSgTx0UOJloHnGE2DNR2P1HQrCmLW2fX+QgN4P9CDAzdi2buVHuholofWw==
"@gitlab/ui@5.32.0":
version "5.32.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-5.32.0.tgz#21bb70b6c8b68bdcbb53ffebde80ff3cd93851c8"
integrity sha512-xTFz4/WbR1e6zj2xI2DULcAGicA6qidb9Reoa02V5snqWcQY+iHDup/XzgXmttTPCiBlqPIFo/CMhH4gSJWuPQ==
dependencies:
"@babel/standalone" "^7.0.0"
"@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