Skip to content
Snippets Groups Projects
Commit 866ca4e4 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 26a50872
No related branches found
No related tags found
No related merge requests found
Showing
with 154 additions and 48 deletions
Loading
Loading
@@ -13,10 +13,10 @@ This feature is [also available at the group level](../../group/insights/index.m
 
## View your project's Insights
 
You can access your project's Insights by clicking the **Project > Insights**
You can access your project's Insights by clicking the **Analytics > Insights**
link in the left sidebar:
 
![Insights sidebar link](img/insights_sidebar_link.png)
![Insights sidebar link](img/insights_sidebar_link_v12_8.png)
 
## Configure your Insights
 
Loading
Loading
doc/user/project/integrations/img/prometheus_dashboard_area_panel_type.png

18.9 KiB

doc/user/project/integrations/img/prometheus_dashboard_area_panel_type_v12_8.png

52.1 KiB

Loading
Loading
@@ -285,7 +285,9 @@ Note the following properties:
| type | string | no | Type of panel to be rendered. Optional for area panel types |
| query_range | string | required | For area panel types, you must use a [range query](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) |
 
![area panel type](img/prometheus_dashboard_area_panel_type.png)
![area panel chart](img/prometheus_dashboard_area_panel_type_v12_8.png)
Starting in [version 12.8](https://gitlab.com/gitlab-org/gitlab/issues/202696), the y-axis values will automatically scale according to the data. Previously, it always started from 0.
 
##### Anomaly chart
 
Loading
Loading
@@ -329,7 +331,7 @@ Note the following properties:
 
![anomaly panel type](img/prometheus_dashboard_anomaly_panel_type.png)
 
#### Column
##### Column chart
 
To add a column panel type to a dashboard, look at the following sample dashboard file:
 
Loading
Loading
Loading
Loading
@@ -52,7 +52,7 @@ relatively quickly to work, and they will take you to another page in the projec
| <kbd>t</kbd> | Go to the project file search page. (**Repository > Files**, click **Find Files**). |
| <kbd>g</kbd> + <kbd>c</kbd> | Go to the project commits list (**Repository > Commits**). |
| <kbd>g</kbd> + <kbd>n</kbd> | Go to the [repository graph](#repository-graph) page (**Repository > Graph**). |
| <kbd>g</kbd> + <kbd>d</kbd> | Go to repository charts (**Repository > Charts**). |
| <kbd>g</kbd> + <kbd>d</kbd> | Go to repository charts (**Analytics > Repository Analytics**). |
| <kbd>g</kbd> + <kbd>i</kbd> | Go to the project issues list (**Issues > List**). |
| <kbd>i</kbd> | Go to the New Issue page (**Issues**, click **New Issue** ). |
| <kbd>g</kbd> + <kbd>b</kbd> | Go to the project issue boards list (**Issues > Boards**). |
Loading
Loading
Loading
Loading
@@ -27,7 +27,7 @@ module API
detail 'This feature was introduced in GitLab 12.5.'
end
post ':id/export' do
GroupExportWorker.perform_async(current_user.id, user_group.id, params)
GroupExportWorker.perform_async(current_user.id, user_group.id, params) # rubocop:disable CodeReuse/Worker
 
accepted!
end
Loading
Loading
Loading
Loading
@@ -76,7 +76,7 @@ module API
group = ::Groups::CreateService.new(current_user, group_params).execute
 
if group.persisted?
GroupImportWorker.perform_async(current_user.id, group.id)
GroupImportWorker.perform_async(current_user.id, group.id) # rubocop:disable CodeReuse/Worker
 
accepted!
else
Loading
Loading
Loading
Loading
@@ -120,7 +120,7 @@ module API
post ':id/pipeline_schedules/:pipeline_schedule_id/play' do
authorize! :play_pipeline_schedule, pipeline_schedule
 
job_id = RunPipelineScheduleWorker
job_id = RunPipelineScheduleWorker # rubocop:disable CodeReuse/Worker
.perform_async(pipeline_schedule.id, current_user.id)
 
if job_id
Loading
Loading
Loading
Loading
@@ -41,7 +41,7 @@ module API
delete ':id/registry/repositories/:repository_id', requirements: REPOSITORY_ENDPOINT_REQUIREMENTS do
authorize_admin_container_image!
 
DeleteContainerRepositoryWorker.perform_async(current_user.id, repository.id)
DeleteContainerRepositoryWorker.perform_async(current_user.id, repository.id) # rubocop:disable CodeReuse/Worker
track_event('delete_repository')
 
status :accepted
Loading
Loading
@@ -79,8 +79,10 @@ module API
message = 'This request has already been made. You can run this at most once an hour for a given container repository'
render_api_error!(message, 400) unless obtain_new_cleanup_container_lease
 
# rubocop:disable CodeReuse/Worker
CleanupContainerRepositoryWorker.perform_async(current_user.id, repository.id,
declared_params.except(:repository_id).merge(container_expiration_policy: false))
# rubocop:enable CodeReuse/Worker
 
track_event('delete_tag_bulk')
 
Loading
Loading
Loading
Loading
@@ -170,9 +170,9 @@ module API
return if release.historical_release?
 
if release.upcoming_release?
CreateEvidenceWorker.perform_at(release.released_at, release.id)
CreateEvidenceWorker.perform_at(release.released_at, release.id) # rubocop:disable CodeReuse/Worker
else
CreateEvidenceWorker.perform_async(release.id)
CreateEvidenceWorker.perform_async(release.id) # rubocop:disable CodeReuse/Worker
end
end
end
Loading
Loading
# frozen_string_literal: true
module Gitlab
module BackgroundMigration
# Create missing LfsObjectsProject records for forks
class LinkLfsObjects
# Model definition used for migration
class ForkNetworkMember < ActiveRecord::Base
self.table_name = 'fork_network_members'
def self.with_non_existing_lfs_objects
joins('JOIN lfs_objects_projects lop ON fork_network_members.forked_from_project_id = lop.project_id')
.where(
<<~SQL
NOT EXISTS (
SELECT 1
FROM lfs_objects_projects
WHERE lfs_objects_projects.project_id = fork_network_members.project_id
AND lfs_objects_projects.lfs_object_id = lop.lfs_object_id
)
SQL
)
end
end
def perform(start_id, end_id)
select_query =
ForkNetworkMember
.select('lop.lfs_object_id, fork_network_members.project_id')
.with_non_existing_lfs_objects
.where(project_id: start_id..end_id)
return if select_query.empty?
execute <<-SQL
INSERT INTO lfs_objects_projects (lfs_object_id, project_id)
#{select_query.to_sql}
SQL
end
private
def execute(sql)
::ActiveRecord::Base.connection.execute(sql)
end
end
end
end
apply:
stage: deploy
image: "registry.gitlab.com/gitlab-org/cluster-integration/cluster-applications:v0.7.0"
image: "registry.gitlab.com/gitlab-org/cluster-integration/cluster-applications:v0.8.0"
environment:
name: production
variables:
Loading
Loading
@@ -12,6 +12,8 @@ apply:
GITLAB_RUNNER_VALUES_FILE: $CI_PROJECT_DIR/.gitlab/managed-apps/gitlab-runner/values.yaml
CILIUM_VALUES_FILE: $CI_PROJECT_DIR/.gitlab/managed-apps/cilium/values.yaml
JUPYTERHUB_VALUES_FILE: $CI_PROJECT_DIR/.gitlab/managed-apps/jupyterhub/values.yaml
PROMETHEUS_VALUES_FILE: $CI_PROJECT_DIR/.gitlab/managed-apps/prometheus/values.yaml
ELASTIC_STACK_VALUES_FILE: $CI_PROJECT_DIR/.gitlab/managed-apps/elastic-stack/values.yaml
script:
- gitlab-managed-apps /usr/local/share/gitlab-managed-apps/helmfile.yaml
only:
Loading
Loading
Loading
Loading
@@ -18,12 +18,21 @@ module Gitlab
super
 
@group = @attributes['group']
update_description
end
 
private
 
attr_reader :group
 
# Convert description empty string to nil
# due to existing object being saved with description: nil
# Which makes object lookup to fail since nil != ''
def update_description
attributes['description'] = nil if attributes['description'] == ''
end
def where_clauses
[
where_clause_base,
Loading
Loading
Loading
Loading
@@ -159,6 +159,10 @@ module QA
autoload :Validator, 'qa/page/validator'
autoload :Validatable, 'qa/page/validatable'
 
module SubMenus
autoload :Common, 'qa/page/sub_menus/common'
end
module Main
autoload :Login, 'qa/page/main/login'
autoload :Menu, 'qa/page/main/menu'
Loading
Loading
Loading
Loading
@@ -13,15 +13,22 @@ module QA
element :contribution_analytics_link
end
 
view 'app/views/layouts/nav/sidebar/_analytics_links.html.haml' do
element :analytics_link
element :analytics_sidebar_submenu
end
def click_group_members_item
within_sidebar do
click_element(:group_members_item)
end
end
 
def click_group_analytics_item
within_sidebar do
click_element(:contribution_analytics_link)
def click_contribution_analytics_item
hover_element(:analytics_link) do
within_submenu(:analytics_sidebar_submenu) do
click_element(:contribution_analytics_link)
end
end
end
 
Loading
Loading
Loading
Loading
@@ -5,6 +5,8 @@ module QA
module Group
module SubMenus
module Common
include QA::Page::SubMenus::Common
def self.included(base)
base.class_eval do
view 'app/views/layouts/nav/sidebar/_group.html.haml' do
Loading
Loading
@@ -13,23 +15,10 @@ module QA
end
end
 
def hover_element(element)
within_sidebar do
find_element(element).hover
yield
end
end
private
 
def within_sidebar
within_element(:group_sidebar) do
yield
end
end
def within_submenu(element)
within_element(element) do
yield
end
def sidebar_element
:group_sidebar
end
end
end
Loading
Loading
Loading
Loading
@@ -5,20 +5,12 @@ module QA
module Project
module SubMenus
module Common
def within_sidebar
within('.sidebar-top-level-items') do
yield
end
end
include QA::Page::SubMenus::Common
private
 
def within_submenu
if has_css?('.fly-out-list')
within('.fly-out-list') do
yield
end
else
yield
end
def sidebar_element
:project_sidebar
end
end
end
Loading
Loading
# frozen_string_literal: true
module QA
module Page
module SubMenus
module Common
def hover_element(element)
within_sidebar do
find_element(element).hover
yield
end
end
def within_sidebar
within_element(sidebar_element) do
yield
end
end
def within_submenu(element = nil)
if element
within_element(element) do
yield
end
else
within_submenu_without_element do
yield
end
end
end
private
def within_submenu_without_element
if has_css?('.fly-out-list')
within('.fly-out-list') do
yield
end
else
yield
end
end
def sidebar_element
raise NotImplementedError
end
end
end
end
end
Loading
Loading
@@ -55,6 +55,7 @@ require_relative 'cop/code_reuse/service_class'
require_relative 'cop/code_reuse/presenter'
require_relative 'cop/code_reuse/serializer'
require_relative 'cop/code_reuse/active_record'
require_relative 'cop/code_reuse/worker'
require_relative 'cop/group_public_or_visible_to_user'
require_relative 'cop/inject_enterprise_edition_module'
require_relative 'cop/graphql/authorize_types'
Loading
Loading
Loading
Loading
@@ -36,7 +36,7 @@ describe 'Internal Group access' do
it { is_expected.to be_denied_for(:visitor) }
end
 
describe 'GET /groups/:path/issues' do
describe 'GET /groups/:path/-/issues' do
subject { issues_group_path(group) }
 
it { is_expected.to be_allowed_for(:admin) }
Loading
Loading
@@ -51,7 +51,7 @@ describe 'Internal Group access' do
it { is_expected.to be_denied_for(:visitor) }
end
 
describe 'GET /groups/:path/merge_requests' do
describe 'GET /groups/:path/-/merge_requests' do
let(:project) { create(:project, :internal, :repository, group: group) }
 
subject { merge_requests_group_path(group) }
Loading
Loading
@@ -68,7 +68,7 @@ describe 'Internal Group access' do
it { is_expected.to be_denied_for(:visitor) }
end
 
describe 'GET /groups/:path/group_members' do
describe 'GET /groups/:path/-/group_members' do
subject { group_group_members_path(group) }
 
it { is_expected.to be_allowed_for(:admin) }
Loading
Loading
@@ -83,7 +83,7 @@ describe 'Internal Group access' do
it { is_expected.to be_denied_for(:visitor) }
end
 
describe 'GET /groups/:path/edit' do
describe 'GET /groups/:path/-/edit' do
subject { edit_group_path(group) }
 
it { is_expected.to be_allowed_for(:admin) }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment