Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed Aug 27, 2020
1 parent c29ceae commit 2d07575
Show file tree
Hide file tree
Showing 101 changed files with 456 additions and 300 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<script>
import { GlEmptyState, GlSprintf, GlLink } from '@gitlab/ui';
export default {
components: {
GlEmptyState,
GlSprintf,
GlLink,
},
inject: {
svgPath: {
type: String,
},
docsLink: {
type: String,
},
primaryButtonPath: {
type: String,
},
},
};
</script>
<template>
<gl-empty-state
class="js-empty-state"
:title="__('Activate user activity analysis')"
:svg-path="svgPath"
:primary-button-text="__('Turn on usage ping')"
:primary-button-link="primaryButtonPath"
>
<template #description>
<gl-sprintf
:message="
__(
'Turn on %{strongStart}usage ping%{strongEnd} to activate analysis of user activity, known as %{docLinkStart}Cohorts%{docLinkEnd}.',
)
"
>
<template #docLink="{content}">
<gl-link :href="docsLink" target="_blank">{{ content }}</gl-link>
</template>
<template #strong="{ content }"
><strong>{{ content }}</strong></template
>
</gl-sprintf>
</template>
</gl-empty-state>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ export default {
return this.resolvedDiscussionsExpanded ? 'chevron-down' : 'chevron-right';
},
},
watch: {
isResolvedCommentsPopoverHidden(newVal) {
if (!newVal) {
this.$refs.resolvedComments.scrollIntoView();
}
},
},
mounted() {
if (!this.isResolvedCommentsPopoverHidden && this.$refs.resolvedComments) {
this.$refs.resolvedComments.$el.scrollIntoView();
}
},
methods: {
handleSidebarClick() {
this.isResolvedCommentsPopoverHidden = true;
Expand Down Expand Up @@ -129,6 +141,7 @@ export default {
<template v-if="resolvedDiscussions.length > 0">
<gl-button
id="resolved-comments"
ref="resolvedComments"
data-testid="resolved-comments"
:icon="resolvedCommentsToggleIcon"
variant="link"
Expand All @@ -151,9 +164,12 @@ export default {
)
}}
</p>
<a href="#" rel="noopener noreferrer" target="_blank">{{
s__('DesignManagement|Learn more about resolving comments')
}}</a>
<a
href="https://docs.gitlab.com/ee/user/project/issues/design_management.html#resolve-design-threads"
rel="noopener noreferrer"
target="_blank"
>{{ s__('DesignManagement|Learn more about resolving comments') }}</a
>
</gl-popover>
<gl-collapse :visible="resolvedDiscussionsExpanded" class="gl-mt-3">
<design-discussion
Expand Down
22 changes: 22 additions & 0 deletions app/assets/javascripts/pages/admin/cohorts/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Vue from 'vue';
import UsagePingDisabled from '~/admin/cohorts/components/usage_ping_disabled.vue';

document.addEventListener('DOMContentLoaded', () => {
const emptyStateContainer = document.getElementById('js-cohorts-empty-state');

if (!emptyStateContainer) return false;

const { emptyStateSvgPath, enableUsagePingLink, docsLink } = emptyStateContainer.dataset;

return new Vue({
el: emptyStateContainer,
provide: {
svgPath: emptyStateSvgPath,
primaryButtonPath: enableUsagePingLink,
docsLink,
},
render(h) {
return h(UsagePingDisabled);
},
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ export default {
const url = joinPaths(baseUrl, this.blob.rawPath);
axios
.get(url)
.get(url, {
// This prevents axios from automatically JSON.parse response
transformResponse: [f => f],
})
.then(res => {
this.notifyAboutUpdates({ content: res.data });
})
Expand Down
12 changes: 6 additions & 6 deletions app/controllers/projects/issues_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def new
discussion_to_resolve: params[:discussion_to_resolve],
confidential: !!Gitlab::Utils.to_boolean(params[:issue][:confidential])
)
service = Issues::BuildService.new(project, current_user, build_params)
service = ::Issues::BuildService.new(project, current_user, build_params)

@issue = @noteable = service.execute

Expand All @@ -115,7 +115,7 @@ def create
discussion_to_resolve: params[:discussion_to_resolve]
)

service = Issues::CreateService.new(project, current_user, create_params)
service = ::Issues::CreateService.new(project, current_user, create_params)
@issue = service.execute

if service.discussions_to_resolve.count(&:resolved?) > 0
Expand Down Expand Up @@ -143,7 +143,7 @@ def move
new_project = Project.find(params[:move_to_project_id])
return render_404 unless issue.can_move?(current_user, new_project)

@issue = Issues::UpdateService.new(project, current_user, target_project: new_project).execute(issue)
@issue = ::Issues::UpdateService.new(project, current_user, target_project: new_project).execute(issue)
end

respond_to do |format|
Expand All @@ -157,7 +157,7 @@ def move
end

def reorder
service = Issues::ReorderService.new(project, current_user, reorder_params)
service = ::Issues::ReorderService.new(project, current_user, reorder_params)

if service.execute(issue)
head :ok
Expand All @@ -167,7 +167,7 @@ def reorder
end

def related_branches
@related_branches = Issues::RelatedBranchesService
@related_branches = ::Issues::RelatedBranchesService
.new(project, current_user)
.execute(issue)
.map { |branch| branch.merge(link: branch_link(branch)) }
Expand Down Expand Up @@ -319,7 +319,7 @@ def serializer

def update_service
update_params = issue_params.merge(spammable_params)
Issues::UpdateService.new(project, current_user, update_params)
::Issues::UpdateService.new(project, current_user, update_params)
end

def finder_type
Expand Down
10 changes: 1 addition & 9 deletions app/views/admin/cohorts/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,4 @@
- if @cohorts
= render 'cohorts_table'
- else
.bs-callout.bs-callout-warning.clearfix
%p
- usage_ping_path = help_page_path('development/telemetry/usage_ping')
- usage_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: usage_ping_path }
= s_('User Cohorts are only shown when the %{usage_ping_link_start}usage ping%{usage_ping_link_end} is enabled.').html_safe % { usage_ping_link_start: usage_ping_link_start, usage_ping_link_end: '</a>'.html_safe }
- if current_user.admin?
- application_settings_path = metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings')
- application_settings_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: application_settings_path }
= s_('To enable it and see User Cohorts, visit %{application_settings_link_start}application settings%{application_settings_link_end}.').html_safe % { application_settings_link_start: application_settings_link_start, application_settings_link_end: '</a>'.html_safe }
#js-cohorts-empty-state{ data: { empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_usage_ping_link: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('user/admin_area/analytics/user_cohorts') } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Resolve Fix Resolved threads popup link and placement
merge_request: 40489
author:
type: fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Improve empty state for Cohorts to match DevOps Score
merge_request: 39828
author:
type: changed
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Fix snippets edit not loading JSON values
merge_request: 40417
author:
type: fixed
2 changes: 1 addition & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ The following documentation relates to the DevOps **Create** stage:

| Create topics - Projects and Groups | Description |
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
| [Advanced global search](user/search/advanced_global_search.md) **(STARTER)** | Leverage Elasticsearch for faster, more advanced code search across your entire GitLab instance. |
| [Advanced search](user/search/advanced_global_search.md) **(STARTER)** | Leverage Elasticsearch for faster, more advanced code search across your entire GitLab instance. |
| [Advanced syntax search](user/search/advanced_search_syntax.md) **(STARTER)** | Use advanced queries for more targeted search results. |
| [Contribution analytics](user/group/contribution_analytics/index.md) **(STARTER)** | See detailed statistics of group contributors. |
| [Create](gitlab-basics/create-project.md) and [fork](gitlab-basics/fork-project.md) projects, and<br/>[import and export projects<br/>between instances](user/project/settings/import_export.md) | Create, duplicate, and move projects. |
Expand Down
2 changes: 1 addition & 1 deletion doc/administration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
- [Diff limits](../user/admin_area/diff_limits.md): Configure the diff rendering size limits of branch comparison pages.
- [Merge request diffs storage](merge_request_diffs.md): Configure merge requests diffs external storage.
- [Broadcast Messages](../user/admin_area/broadcast_messages.md): Send messages to GitLab users through the UI.
- [Elasticsearch](../integration/elasticsearch.md): Enable Elasticsearch to empower GitLab's Advanced Global Search. Useful when you deal with a huge amount of data. **(STARTER ONLY)**
- [Elasticsearch](../integration/elasticsearch.md): Enable Elasticsearch to empower GitLab's Advanced Search. Useful when you deal with a huge amount of data. **(STARTER ONLY)**
- [External Classification Policy Authorization](../user/admin_area/settings/external_authorization.md) **(PREMIUM ONLY)**
- [Upload a license](../user/admin_area/license.md): Upload a license to unlock features that are in paid tiers of GitLab. **(STARTER ONLY)**
- [Admin Area](../user/admin_area/index.md): for self-managed instance-wide configuration and maintenance.
Expand Down
2 changes: 1 addition & 1 deletion doc/administration/instance_limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ Reports that go over the 20 MB limit won't be loaded. Affected reports:
- [CI/CD parameter `artifacts:expose_as`](../ci/yaml/README.md#artifactsexpose_as)
- [Unit test reports](../ci/unit_test_reports.md)

## Advanced Global Search limits
## Advanced Search limits

### Maximum file size indexed

Expand Down
2 changes: 1 addition & 1 deletion doc/administration/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ In addition, the log contains the originating IP address,
(`remote_ip`), the user's ID (`user_id`), and username (`username`).

Some endpoints such as `/search` may make requests to Elasticsearch if using
[Advanced Global Search](../user/search/advanced_global_search.md). These will
[Advanced Search](../user/search/advanced_global_search.md). These will
additionally log `elasticsearch_calls` and `elasticsearch_call_duration_s`,
which correspond to:

Expand Down
4 changes: 3 additions & 1 deletion doc/development/migration_style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ def up
end

def down
drop_table :issues
with_lock_retries do
drop_table :issues
end
end
```

Expand Down
2 changes: 1 addition & 1 deletion doc/integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ GitLab can be integrated with the following enhancements:
- Configure [PlantUML](../administration/integration/plantuml.md) to use diagrams in AsciiDoc documents.
- Attach merge requests to [Trello](trello_power_up.md) cards.
- Enable integrated code intelligence powered by [Sourcegraph](sourcegraph.md).
- Add [Elasticsearch](elasticsearch.md) for [Advanced Global Search](../user/search/advanced_global_search.md),
- Add [Elasticsearch](elasticsearch.md) for [Advanced Search](../user/search/advanced_global_search.md),
[Advanced System Search](../user/search/advanced_search_syntax.md), and faster searching.

## Integrations
Expand Down
2 changes: 1 addition & 1 deletion doc/integration/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This document describes how to set up Elasticsearch with GitLab. After
Elasticsearch is enabled, you'll have the benefit of fast search response times
and the advantage of the following special searches:

- [Advanced Global Search](../user/search/advanced_global_search.md)
- [Advanced Search](../user/search/advanced_global_search.md)
- [Advanced Syntax Search](../user/search/advanced_search_syntax.md)

## Version requirements
Expand Down
2 changes: 1 addition & 1 deletion doc/user/clusters/applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ fewer than 3 nodes or consisting of `f1-micro`, `g1-small`, `n1-standard-1`, or

NOTE: **Note:**
The Elastic Stack cluster application is intended as a log aggregation solution and is not related to our
[Advanced Global Search](../search/advanced_global_search.md) functionality, which uses a separate
[Advanced Search](../search/advanced_global_search.md) functionality, which uses a separate
Elasticsearch cluster.

#### Optional: deploy Kibana to perform advanced queries
Expand Down
2 changes: 1 addition & 1 deletion doc/user/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ With GitLab Enterprise Edition, you can also:
- [Multiple Issue Boards](project/issue_board.md#multiple-issue-boards).
- Create formal relationships between issues with [Related Issues](project/issues/related_issues.md).
- Use [Burndown Charts](project/milestones/burndown_charts.md) to track progress during a sprint or while working on a new version of their software.
- Leverage [Elasticsearch](../integration/elasticsearch.md) with [Advanced Global Search](search/advanced_global_search.md) and [Advanced Syntax Search](search/advanced_search_syntax.md) for faster, more advanced code search across your entire GitLab instance.
- Leverage [Elasticsearch](../integration/elasticsearch.md) with [Advanced Search](search/advanced_global_search.md) and [Advanced Syntax Search](search/advanced_search_syntax.md) for faster, more advanced code search across your entire GitLab instance.
- [Authenticate users with Kerberos](../integration/kerberos.md).
- [Mirror a repository](project/repository/repository_mirroring.md) from elsewhere on your local server.
- [Export issues as CSV](project/issues/csv_export.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ type: reference, howto
# Test Coverage Visualization **(CORE ONLY)**

> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3708) in GitLab 12.9.
> - It's deployed behind a feature flag, disabled by default.
> - It's [deployed behind a feature flag](../../../user/feature_flags.md), disabled by default.
> - It's disabled on GitLab.com.
> - It can be enabled or disabled per-project.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enabling-the-feature). **(CORE ONLY)**
CAUTION: **Caution:**
This feature might not be available to you. Check the **version history** note above for details.

With the help of [GitLab CI/CD](../../../ci/README.md), you can collect the test
coverage information of your favorite testing or coverage-analysis tool, and visualize
this information inside the file diff view of your merge requests (MRs). This will allow you
Expand Down
14 changes: 7 additions & 7 deletions doc/user/search/advanced_global_search.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ info: "To determine the technical writer assigned to the Stage/Group associated
type: reference
---

# Advanced Global Search **(STARTER)**
# Advanced Search **(STARTER)**

> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/109) in GitLab [Starter](https://about.gitlab.com/pricing/) 8.4.
NOTE: **GitLab.com availability:**
Advanced Global Search (powered by Elasticsearch) is enabled for Bronze and above on GitLab.com since 2020-07-10.
Advanced Search (powered by Elasticsearch) is enabled for Bronze and above on GitLab.com since 2020-07-10.

Leverage Elasticsearch for faster, more advanced code search across your entire
GitLab instance.
Expand All @@ -20,7 +20,7 @@ visit the [administrator documentation](../../integration/elasticsearch.md).

## Overview

The Advanced Global Search in GitLab is a powerful search service that saves
The Advanced Search in GitLab is a powerful search service that saves
you time. Instead of creating duplicate code and wasting time, you can
now search for code within other projects that can help your own project.

Expand All @@ -39,12 +39,12 @@ searching in:

## Use cases

The Advanced Global Search can be useful in various scenarios.
The Advanced Search can be useful in various scenarios.

### Faster searches

If you are dealing with huge amount of data and want to keep GitLab's search
fast, the Advanced Global Search will help you achieve that.
fast, the Advanced Search will help you achieve that.

### Promote innersourcing

Expand All @@ -58,13 +58,13 @@ throughout the GitLab instance and find the code they search for.
Just use the search as before and GitLab will show you matching code from each
project you have access to.

![Advanced Global Search](img/advanced_global_search.png)
![Advanced Search](img/advanced_global_search.png)

You can also use the [Advanced Syntax Search](advanced_search_syntax.md) which
provides some useful queries.

NOTE: **Note:**
Elasticsearch has only data for the default branch. That means that if you go
to the repository tree and switch the branch from the default to something else,
then the "Code" tab in the search result page will be served by the regular
then the "Code" tab in the search result page will be served by the basic
search even if Elasticsearch is enabled.
6 changes: 3 additions & 3 deletions doc/user/search/advanced_search_syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type: reference
> - Introduced in [GitLab Enterprise Starter](https://about.gitlab.com/pricing/) 9.2
NOTE: **GitLab.com availability:**
Advanced Global Search (powered by Elasticsearch) is enabled for Bronze and above on GitLab.com since 2020-07-10.
Advanced Search (powered by Elasticsearch) is enabled for Bronze and above on GitLab.com since 2020-07-10.

Use advanced queries for more targeted search results.

Expand All @@ -20,10 +20,10 @@ visit the [administrator documentation](../../integration/elasticsearch.md).
## Overview

The Advanced Syntax Search is a subset of the
[Advanced Global Search](advanced_global_search.md), which you can use if you
[Advanced Search](advanced_global_search.md), which you can use if you
want to have more specific search results.

Advanced Global Search only supports searching the [default branch](../project/repository/branches/index.md#default-branch).
Advanced Search only supports searching the [default branch](../project/repository/branches/index.md#default-branch).

## Use cases

Expand Down
Loading

0 comments on commit 2d07575

Please sign in to comment.