Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
39c4df8091
commit
e27ddd0d73
|
|
@ -1,25 +0,0 @@
|
|||
---
|
||||
# Cop supports --autocorrect.
|
||||
Layout/FirstArgumentIndentation:
|
||||
Exclude:
|
||||
- 'app/models/customer_relations/contact.rb'
|
||||
- 'app/models/cycle_analytics/project_level_stage_adapter.rb'
|
||||
- 'app/models/users/user_follow_user.rb'
|
||||
- 'ee/lib/ee/gitlab/scim/group/deprovisioning_service.rb'
|
||||
- 'ee/spec/controllers/groups/omniauth_callbacks_controller_spec.rb'
|
||||
- 'ee/spec/controllers/registrations/company_controller_spec.rb'
|
||||
- 'ee/spec/lib/gitlab/geo/log_cursor/daemon_spec.rb'
|
||||
- 'ee/spec/services/audit_events/protected_branch_audit_event_service_spec.rb'
|
||||
- 'ee/spec/services/security/report_summary_service_spec.rb'
|
||||
- 'spec/components/previews/pajamas/alert_component_preview.rb'
|
||||
- 'spec/components/previews/pajamas/banner_component_preview.rb'
|
||||
- 'spec/components/previews/pajamas/button_component_preview.rb'
|
||||
- 'spec/controllers/import/bitbucket_controller_spec.rb'
|
||||
- 'spec/lib/gitlab/application_rate_limiter_spec.rb'
|
||||
- 'spec/lib/gitlab/database/loose_foreign_keys_spec.rb'
|
||||
- 'spec/lib/gitlab/import_export/shared_spec.rb'
|
||||
- 'spec/models/loose_foreign_keys/deleted_record_spec.rb'
|
||||
- 'spec/requests/api/graphql/ci/jobs_spec.rb'
|
||||
- 'spec/services/protected_branches/api_service_spec.rb'
|
||||
- 'spec/support/shared_examples/features/search/redacted_search_results_shared_examples.rb'
|
||||
- 'spec/support/shared_examples/quick_actions/issuable/max_issuable_examples.rb'
|
||||
|
|
@ -2,21 +2,6 @@
|
|||
# Cop supports --autocorrect.
|
||||
Layout/SpaceInsideParens:
|
||||
Exclude:
|
||||
- 'ee/spec/finders/security/vulnerability_feedbacks_finder_spec.rb'
|
||||
- 'ee/spec/frontend/fixtures/analytics/devops_reports/devops_adoption/enabled_namespaces.rb'
|
||||
- 'ee/spec/frontend/fixtures/epic.rb'
|
||||
- 'ee/spec/lib/gitlab/search/index_curator_spec.rb'
|
||||
- 'ee/spec/lib/world_spec.rb'
|
||||
- 'ee/spec/mailers/notify_spec.rb'
|
||||
- 'ee/spec/models/allowed_email_domain_spec.rb'
|
||||
- 'ee/spec/models/boards/epic_board_position_spec.rb'
|
||||
- 'ee/spec/models/dora/change_failure_rate_metric_spec.rb'
|
||||
- 'ee/spec/models/ee/integrations/jira_spec.rb'
|
||||
- 'ee/spec/models/ee/iterations/cadence_spec.rb'
|
||||
- 'ee/spec/models/ee/key_spec.rb'
|
||||
- 'ee/spec/models/ee/project_setting_spec.rb'
|
||||
- 'ee/spec/models/ee/project_spec.rb'
|
||||
- 'ee/spec/models/ee/system_note_metadata_spec.rb'
|
||||
- 'ee/spec/models/geo/every_geo_event_spec.rb'
|
||||
- 'ee/spec/models/incident_management/escalation_rule_spec.rb'
|
||||
- 'ee/spec/models/ip_restriction_spec.rb'
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
720261882a2bbd549cdbccded8ea9b3ca5af846f
|
||||
606e33fd67ccb40becec0638fff387caf6dfc035
|
||||
|
|
|
|||
|
|
@ -103,6 +103,15 @@ Default.args = {
|
|||
},
|
||||
],
|
||||
},
|
||||
headPipeline: {
|
||||
id: 'gid://gitlab/Ci::Pipeline/1',
|
||||
detailedStatus: {
|
||||
id: 'success-1',
|
||||
icon: 'status_success',
|
||||
text: 'Passed',
|
||||
detailsPath: '/',
|
||||
},
|
||||
},
|
||||
userDiscussionsCount: 5,
|
||||
createdAt: '2024-04-22T10:13:09Z',
|
||||
updatedAt: '2024-04-19T14:34:42Z',
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { __, sprintf } from '~/locale';
|
|||
import SafeHtml from '~/vue_shared/directives/safe_html';
|
||||
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
|
||||
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
|
||||
import CiIcon from '~/vue_shared/components/ci_icon/ci_icon.vue';
|
||||
import { isScopedLabel } from '~/lib/utils/common_utils';
|
||||
|
||||
export default {
|
||||
|
|
@ -12,6 +13,7 @@ export default {
|
|||
GlSprintf,
|
||||
GlIcon,
|
||||
GlLabel,
|
||||
CiIcon,
|
||||
TimeAgoTooltip,
|
||||
UserAvatarLink,
|
||||
},
|
||||
|
|
@ -71,7 +73,10 @@ export default {
|
|||
</div>
|
||||
<div class="gl-ml-auto gl-display-flex gl-flex-direction-column">
|
||||
<ul class="gl-display-flex gl-justify-content-end gl-m-0 gl-p-0 gl-list-none">
|
||||
<li v-if="mergeRequest.assignees.nodes.length">
|
||||
<li v-if="mergeRequest.headPipeline && mergeRequest.headPipeline.detailedStatus">
|
||||
<ci-icon :status="mergeRequest.headPipeline.detailedStatus" use-link show-tooltip />
|
||||
</li>
|
||||
<li v-if="mergeRequest.assignees.nodes.length" class="gl-ml-4">
|
||||
<user-avatar-link
|
||||
v-for="(assignee, index) in mergeRequest.assignees.nodes"
|
||||
:key="`assignee_${assignee.id}`"
|
||||
|
|
@ -102,7 +107,10 @@ export default {
|
|||
{{ mergeRequest.userDiscussionsCount }}
|
||||
</li>
|
||||
</ul>
|
||||
<div v-if="mergeRequest.updatedAt" class="gl-font-sm gl-mt-2 gl-text-secondary">
|
||||
<div
|
||||
v-if="mergeRequest.updatedAt"
|
||||
class="gl-font-sm gl-mt-2 gl-text-secondary gl-text-right"
|
||||
>
|
||||
<gl-sprintf :message="__('Updated at %{updatedAt}')">
|
||||
<template #updatedAt><time-ago-tooltip :time="mergeRequest.updatedAt" /></template>
|
||||
</gl-sprintf>
|
||||
|
|
|
|||
|
|
@ -201,11 +201,11 @@ export default {
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<template #right-primary>
|
||||
<template v-if="!errorStatusRow" #right-primary>
|
||||
<publish-method :pipeline="pipeline" />
|
||||
</template>
|
||||
|
||||
<template #right-secondary>
|
||||
<template v-if="!errorStatusRow" #right-secondary>
|
||||
<span data-testid="right-secondary">
|
||||
<gl-sprintf :message="publishedMessage">
|
||||
<template v-if="isGroupPage" #projectName>
|
||||
|
|
|
|||
|
|
@ -279,9 +279,7 @@ export default {
|
|||
<span v-safe-html="serverErrorMessage || i18n.errorMsg"></span>
|
||||
</gl-alert>
|
||||
|
||||
<div
|
||||
class="list-header gl-display-flex gl-justify-content-space-between gl-border-b-solid gl-border-b-1 gl-border-gray-100"
|
||||
>
|
||||
<div class="list-header gl-display-flex gl-justify-content-space-between">
|
||||
<gl-tabs content-class="gl-p-0" @input="filterItemsByStatus">
|
||||
<gl-tab v-for="tab in statusTabs" :key="tab.status" :data-testid="tab.status">
|
||||
<template #title>
|
||||
|
|
@ -303,6 +301,7 @@ export default {
|
|||
:initial-filter-value="filteredSearchValue"
|
||||
initial-sortby="created_desc"
|
||||
:recent-searches-storage-key="filterSearchKey"
|
||||
:class="{ 'gl-border-bottom-0': showItems }"
|
||||
class="row-content-block"
|
||||
@onFilter="handleFilterItems"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -168,3 +168,39 @@ aside.right-sidebar:not(.right-sidebar-merge-requests) {
|
|||
background-color: var(--gray-100);
|
||||
color: var(--gray-700);
|
||||
}
|
||||
|
||||
.gl-dark {
|
||||
.gl-filtered-search-token-type,
|
||||
.gl-filtered-search-token-operator,
|
||||
.gl-filtered-search-token-data,
|
||||
.gl-filtered-search-suggestion-active {
|
||||
background-color: $gray-100;
|
||||
}
|
||||
|
||||
.gl-dropdown-item.gl-filtered-search-suggestion,
|
||||
.gl-filtered-search-suggestion-active {
|
||||
.dropdown-item:hover {
|
||||
background-color: $gray-200;
|
||||
}
|
||||
}
|
||||
|
||||
.filtered-search-token {
|
||||
.name, .operator, .value-container {
|
||||
background-color: $gray-100;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.operator, .value-container {
|
||||
background-color: $gray-200;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filtered-search-wrapper li.droplab-item-active button {
|
||||
background-color: $gray-100;
|
||||
|
||||
&:hover {
|
||||
background-color: $gray-200;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ module Enums
|
|||
parent_pipeline: 12,
|
||||
ondemand_dast_scan: 13,
|
||||
ondemand_dast_validation: 14,
|
||||
security_orchestration_policy: 15
|
||||
security_orchestration_policy: 15,
|
||||
container_registry_push: 16
|
||||
}
|
||||
end
|
||||
|
||||
|
|
@ -61,8 +62,10 @@ module Enums
|
|||
# not affect the ref CI status.
|
||||
# - when an ondemand_dast_validation pipeline runs it is for validating a DAST site
|
||||
# profile and should not affect the ref CI status.
|
||||
# - when a container_registry_push pipeline runs it is for security testing purpose and should
|
||||
# not affect the ref CI status.
|
||||
def self.dangling_sources
|
||||
sources.slice(:webide, :parent_pipeline, :ondemand_dast_scan, :ondemand_dast_validation, :security_orchestration_policy)
|
||||
sources.slice(:webide, :parent_pipeline, :ondemand_dast_scan, :ondemand_dast_validation, :security_orchestration_policy, :container_registry_push)
|
||||
end
|
||||
|
||||
# CI sources are those pipeline events that affect the CI status of the ref
|
||||
|
|
|
|||
|
|
@ -96,22 +96,22 @@ class CustomerRelations::Contact < ApplicationRecord
|
|||
|
||||
def self.sort_by_name
|
||||
order(Gitlab::Pagination::Keyset::Order.build(
|
||||
[
|
||||
Gitlab::Pagination::Keyset::ColumnOrderDefinition.new(
|
||||
attribute_name: 'last_name',
|
||||
order_expression: arel_table[:last_name].asc,
|
||||
distinct: false
|
||||
),
|
||||
Gitlab::Pagination::Keyset::ColumnOrderDefinition.new(
|
||||
attribute_name: 'first_name',
|
||||
order_expression: arel_table[:first_name].asc,
|
||||
distinct: false
|
||||
),
|
||||
Gitlab::Pagination::Keyset::ColumnOrderDefinition.new(
|
||||
attribute_name: 'id',
|
||||
order_expression: arel_table[:id].asc
|
||||
)
|
||||
]))
|
||||
[
|
||||
Gitlab::Pagination::Keyset::ColumnOrderDefinition.new(
|
||||
attribute_name: 'last_name',
|
||||
order_expression: arel_table[:last_name].asc,
|
||||
distinct: false
|
||||
),
|
||||
Gitlab::Pagination::Keyset::ColumnOrderDefinition.new(
|
||||
attribute_name: 'first_name',
|
||||
order_expression: arel_table[:first_name].asc,
|
||||
distinct: false
|
||||
),
|
||||
Gitlab::Pagination::Keyset::ColumnOrderDefinition.new(
|
||||
attribute_name: 'id',
|
||||
order_expression: arel_table[:id].asc
|
||||
)
|
||||
]))
|
||||
end
|
||||
|
||||
def self.find_ids_by_emails(group, emails)
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ class IssuePolicy < IssuablePolicy
|
|||
|
||||
rule { can?(:admin_issue) }.policy do
|
||||
enable :set_issue_metadata
|
||||
enable :admin_issue_link
|
||||
end
|
||||
|
||||
# guest members need to be able to set issue metadata per https://gitlab.com/gitlab-org/gitlab/-/issues/300100
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ module SystemNotes
|
|||
params = hierarchy_note_params(action, noteable, work_item)
|
||||
|
||||
create_note(NoteSummary.new(noteable, project, author, params[:parent_note_body], action: params[:parent_action]))
|
||||
create_note(NoteSummary.new(work_item, project, author, params[:child_note_body], action: params[:child_action]))
|
||||
create_note(NoteSummary.new(work_item, work_item.project, author, params[:child_note_body], action: params[:child_action]))
|
||||
end
|
||||
|
||||
# Called when the description of a Noteable is changed
|
||||
|
|
|
|||
|
|
@ -51,3 +51,5 @@ module WorkItems
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
WorkItems::ParentLinks::BaseService.prepend_mod
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@
|
|||
- 1
|
||||
- - analytics_usage_trends_counter_job
|
||||
- 1
|
||||
- - app_sec_container_scanning_scan_image
|
||||
- 1
|
||||
- - app_sec_dast_scanner_profiles_builds_consistency
|
||||
- 1
|
||||
- - app_sec_dast_scans_consistency
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# See https://docs.gitlab.com/ee/development/migration_style_guide.html
|
||||
# for more information on how to write migrations for GitLab.
|
||||
|
||||
class RemoveTheIndexCiPipelineArtifactsOnPipelineId < Gitlab::Database::Migration[2.2]
|
||||
disable_ddl_transaction!
|
||||
milestone '17.0'
|
||||
INDEX_NAME = 'index_ci_pipeline_artifacts_on_pipeline_id'
|
||||
|
||||
def up
|
||||
remove_concurrent_index_by_name :ci_pipeline_artifacts, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
add_concurrent_index :ci_pipeline_artifacts, :pipeline_id, name: INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
3075a16455e54469cf6ce1c4d232fc4dfed9c849032d74b69afa8985c42b905e
|
||||
|
|
@ -24958,8 +24958,6 @@ CREATE INDEX index_ci_pipeline_artifacts_needs_verification ON ci_pipeline_artif
|
|||
|
||||
CREATE INDEX index_ci_pipeline_artifacts_on_expire_at ON ci_pipeline_artifacts USING btree (expire_at);
|
||||
|
||||
CREATE INDEX index_ci_pipeline_artifacts_on_pipeline_id ON ci_pipeline_artifacts USING btree (pipeline_id);
|
||||
|
||||
CREATE UNIQUE INDEX index_ci_pipeline_artifacts_on_pipeline_id_and_file_type ON ci_pipeline_artifacts USING btree (pipeline_id, file_type);
|
||||
|
||||
CREATE INDEX index_ci_pipeline_artifacts_on_project_id ON ci_pipeline_artifacts USING btree (project_id);
|
||||
|
|
|
|||
|
|
@ -266,3 +266,8 @@ pages:
|
|||
With this configuration, users will have the access to each GitLab Pages deployment through the UI.
|
||||
When using [environments](../../../ci/environments/index.md) for pages, all pages environments are
|
||||
listed on the project environment list.
|
||||
|
||||
### Delete deployments
|
||||
|
||||
Pages deployments created by a merge request, with a `path_prefix` are automatically deleted when the
|
||||
merge request is closed or merged.
|
||||
|
|
|
|||
|
|
@ -5950,7 +5950,7 @@ msgstr ""
|
|||
msgid "Analytics|Start by choosing a metric"
|
||||
msgstr ""
|
||||
|
||||
msgid "Analytics|Statistics on top-level namespace usage. Usage data is a cumulative count, and updated monthly."
|
||||
msgid "Analytics|Statistics on namespace usage. Usage data is a cumulative count, and updated monthly."
|
||||
msgstr ""
|
||||
|
||||
msgid "Analytics|Tables"
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@
|
|||
"@apollo/client": "^3.5.10",
|
||||
"@babel/core": "^7.23.7",
|
||||
"@babel/preset-env": "^7.23.7",
|
||||
"@cubejs-client/core": "^0.35.0",
|
||||
"@cubejs-client/vue": "^0.35.0",
|
||||
"@cubejs-client/core": "^0.35.23",
|
||||
"@cubejs-client/vue": "^0.35.23",
|
||||
"@floating-ui/dom": "^1.2.9",
|
||||
"@gitlab/application-sdk-browser": "^0.3.2",
|
||||
"@gitlab/at.js": "1.5.7",
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ module Pajamas
|
|||
# @param variant select {{ Pajamas::AlertComponent::VARIANT_ICONS.keys }}
|
||||
def default(title: "Alert title (optional)", body: "Alert message goes here.", dismissible: true, variant: :info)
|
||||
render(Pajamas::AlertComponent.new(
|
||||
title: title,
|
||||
dismissible: dismissible,
|
||||
variant: variant.to_sym
|
||||
)) do |c|
|
||||
title: title,
|
||||
dismissible: dismissible,
|
||||
variant: variant.to_sym
|
||||
)) do |c|
|
||||
if body
|
||||
c.with_body { body }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ module Pajamas
|
|||
variant: :promotion
|
||||
)
|
||||
render(Pajamas::BannerComponent.new(
|
||||
button_text: button_text,
|
||||
button_link: button_link,
|
||||
svg_path: "illustrations/devops-sm.svg",
|
||||
variant: variant
|
||||
)) do |c|
|
||||
button_text: button_text,
|
||||
button_link: button_link,
|
||||
svg_path: "illustrations/devops-sm.svg",
|
||||
variant: variant
|
||||
)) do |c|
|
||||
content_tag :p, content
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -28,16 +28,16 @@ module Pajamas
|
|||
text: "Edit"
|
||||
)
|
||||
render(Pajamas::ButtonComponent.new(
|
||||
category: category,
|
||||
variant: variant,
|
||||
size: size,
|
||||
type: type,
|
||||
disabled: disabled,
|
||||
loading: loading,
|
||||
block: block,
|
||||
selected: selected,
|
||||
icon: icon
|
||||
)) do
|
||||
category: category,
|
||||
variant: variant,
|
||||
size: size,
|
||||
type: type,
|
||||
disabled: disabled,
|
||||
loading: loading,
|
||||
block: block,
|
||||
selected: selected,
|
||||
icon: icon
|
||||
)) do
|
||||
text.presence
|
||||
end
|
||||
end
|
||||
|
|
@ -49,9 +49,9 @@ module Pajamas
|
|||
# @param target select {{ Pajamas::ButtonComponent::TARGET_OPTIONS }}
|
||||
def link(target: nil)
|
||||
render(Pajamas::ButtonComponent.new(
|
||||
href: "https://gitlab.com",
|
||||
target: target
|
||||
)) do
|
||||
href: "https://gitlab.com",
|
||||
target: target
|
||||
)) do
|
||||
"This is a link"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@ exports[`Merge request dashboard merge request component renders template 1`] =
|
|||
<ul
|
||||
class="gl-display-flex gl-justify-content-end gl-list-none gl-m-0 gl-p-0"
|
||||
>
|
||||
<li>
|
||||
<li
|
||||
class="gl-ml-4"
|
||||
>
|
||||
<user-avatar-link-stub
|
||||
imgalt=""
|
||||
imgcssclasses=""
|
||||
|
|
@ -92,7 +94,7 @@ exports[`Merge request dashboard merge request component renders template 1`] =
|
|||
</li>
|
||||
</ul>
|
||||
<div
|
||||
class="gl-font-sm gl-mt-2 gl-text-secondary"
|
||||
class="gl-font-sm gl-mt-2 gl-text-right gl-text-secondary"
|
||||
>
|
||||
<gl-sprintf-stub
|
||||
message="Updated at %{updatedAt}"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
|
||||
import MergeRequest from '~/merge_request_dashboard/components/merge_request.vue';
|
||||
import CiIcon from '~/vue_shared/components/ci_icon/ci_icon.vue';
|
||||
|
||||
describe('Merge request dashboard merge request component', () => {
|
||||
let wrapper;
|
||||
|
||||
function createComponent() {
|
||||
function createComponent(mergeRequest = {}) {
|
||||
wrapper = shallowMountExtended(MergeRequest, {
|
||||
propsData: {
|
||||
mergeRequest: {
|
||||
|
|
@ -62,6 +63,7 @@ describe('Merge request dashboard merge request component', () => {
|
|||
userDiscussionsCount: 5,
|
||||
createdAt: '2024-04-22T10:13:09Z',
|
||||
updatedAt: '2024-04-19T14:34:42Z',
|
||||
...mergeRequest,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -72,4 +74,26 @@ describe('Merge request dashboard merge request component', () => {
|
|||
|
||||
expect(wrapper.element).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders CI icon for headPipeline', () => {
|
||||
createComponent({
|
||||
headPipeline: {
|
||||
id: 'gid://gitlab/Ci::Pipeline/1',
|
||||
detailedStatus: {
|
||||
id: 'success-1',
|
||||
icon: 'status_success',
|
||||
text: 'Passed',
|
||||
detailsPath: '/',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper.findComponent(CiIcon).exists()).toBe(true);
|
||||
expect(wrapper.findComponent(CiIcon).props('status')).toEqual({
|
||||
id: 'success-1',
|
||||
icon: 'status_success',
|
||||
text: 'Passed',
|
||||
detailsPath: '/',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -169,6 +169,14 @@ describe('packages_list_row', () => {
|
|||
expect(findPackageName().text()).toBe('@gitlab-org/package-15');
|
||||
});
|
||||
|
||||
it('does not show the publish method', () => {
|
||||
expect(findPublishMethod().exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('does not show the published time', () => {
|
||||
expect(findRightSecondary().exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('does not have a link to navigate to the details page', () => {
|
||||
expect(findPackageLink().exists()).toBe(false);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -366,6 +366,10 @@ RSpec.describe IssuePolicy, feature_category: :team_planning do
|
|||
it 'allows admins to comment' do
|
||||
expect(permissions(admin, issue)).to be_allowed(:create_note)
|
||||
end
|
||||
|
||||
it 'allows admins to admin issue links' do
|
||||
expect(permissions(admin, issue)).to be_allowed(:admin_issue_link)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when admin mode is disabled' do
|
||||
|
|
|
|||
|
|
@ -28,9 +28,6 @@ ci_job_artifacts:
|
|||
- index_ci_job_artifacts_on_project_id
|
||||
index_ci_job_artifacts_on_project_id_and_id:
|
||||
- index_ci_job_artifacts_on_project_id
|
||||
ci_pipeline_artifacts:
|
||||
index_ci_pipeline_artifacts_on_pipeline_id_and_file_type:
|
||||
- index_ci_pipeline_artifacts_on_pipeline_id
|
||||
ci_stages:
|
||||
index_ci_stages_on_pipeline_id_and_position:
|
||||
- index_ci_stages_on_pipeline_id
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
RSpec.shared_examples 'renders usage overview metrics' do
|
||||
RSpec.shared_examples 'renders usage overview metrics' do |has_data: true|
|
||||
let(:usage_overview) { find_by_testid('panel-usage-overview') }
|
||||
|
||||
it 'renders the metrics panel' do
|
||||
expect(usage_overview).to be_visible
|
||||
expect(usage_overview).to have_content format(_("Usage overview for %{name} group"), name: group.name)
|
||||
expect(usage_overview).to have_content format(_("Usage overview for %{title}"), title: panel_title)
|
||||
end
|
||||
|
||||
it 'renders each of the available metrics' do
|
||||
within usage_overview do
|
||||
[
|
||||
['groups', _('Groups'), '5'],
|
||||
['projects', _('Projects'), '10'],
|
||||
['users', _('Users'), '100'],
|
||||
['issues', _('Issues'), '1,500'],
|
||||
['merge_requests', _('Merge requests'), '1,000'],
|
||||
['pipelines', _('Pipelines'), '2,000']
|
||||
['groups', _('Groups'), has_data ? '5' : '-'],
|
||||
['projects', _('Projects'), has_data ? '10' : '-'],
|
||||
['users', _('Users'), has_data ? '100' : '-'],
|
||||
['issues', _('Issues'), has_data ? '1,500' : '-'],
|
||||
['merge_requests', _('Merge requests'), has_data ? '1,000' : '-'],
|
||||
['pipelines', _('Pipelines'), has_data ? '2,000' : '-']
|
||||
].each do |id, name, value|
|
||||
stat = find_by_testid("usage-overview-metric-#{id}")
|
||||
expect(stat).to be_visible
|
||||
|
|
|
|||
|
|
@ -478,7 +478,8 @@ RSpec.describe 'Every Sidekiq worker', feature_category: :shared do
|
|||
'Issuable::RelatedLinksCreateWorker' => 3,
|
||||
'BulkImports::RelationBatchExportWorker' => 6,
|
||||
'BulkImports::RelationExportWorker' => 6,
|
||||
'Ci::Runners::ExportUsageCsvWorker' => 3
|
||||
'Ci::Runners::ExportUsageCsvWorker' => 3,
|
||||
'AppSec::ContainerScanning::ScanImageWorker' => 3
|
||||
}.merge(extra_retry_exceptions)
|
||||
end
|
||||
|
||||
|
|
|
|||
18
yarn.lock
18
yarn.lock
|
|
@ -1065,10 +1065,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-3.0.1.tgz#d84597fbc0f897240c12fc0a31e492b036c70e40"
|
||||
integrity sha512-NPljRHkq4a14YzZ3YD406uaxh7s0g6eAq3L9aLOWywoqe8PkYamAvtsh7KNX6c++ihDrJ0RiU+/z7rGnhlZ5ww==
|
||||
|
||||
"@cubejs-client/core@^0.35.0":
|
||||
version "0.35.0"
|
||||
resolved "https://registry.yarnpkg.com/@cubejs-client/core/-/core-0.35.0.tgz#09f3fe61fe9360a72dbf9f83fc13f8384ada9de0"
|
||||
integrity sha512-QG6KVCtcoBK5U60QSGCOc7OzCpqeJTjJwddLSIDbzlfb09O6RM9qhXraR1G9AInMu2fQsn8EScYsU9RwB5vHrA==
|
||||
"@cubejs-client/core@^0.35.23":
|
||||
version "0.35.23"
|
||||
resolved "https://registry.yarnpkg.com/@cubejs-client/core/-/core-0.35.23.tgz#6d899269aa8f029482e7e4f113f198032c089e26"
|
||||
integrity sha512-tGX7z4P/RJ0E9SrLPmSuRDQGJxgJqERW5jpYImuXMrlumRktyWa4OOIcnAxbItQqf3m0DpWPr5eN0fAkd1gZAA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.1.2"
|
||||
core-js "^3.6.5"
|
||||
|
|
@ -1078,12 +1078,12 @@
|
|||
url-search-params-polyfill "^7.0.0"
|
||||
uuid "^8.3.2"
|
||||
|
||||
"@cubejs-client/vue@^0.35.0":
|
||||
version "0.35.0"
|
||||
resolved "https://registry.yarnpkg.com/@cubejs-client/vue/-/vue-0.35.0.tgz#b0c774b9610e00abb414527f5dfa63c284b2d411"
|
||||
integrity sha512-7R5RyH6QGIDU2diqdzce8ngVaRTnt2Uh/0/dUfVys8sC9hc5+mwuLM567aZvVGNZMAIVslH97XZwlRm7W9ULHA==
|
||||
"@cubejs-client/vue@^0.35.23":
|
||||
version "0.35.23"
|
||||
resolved "https://registry.yarnpkg.com/@cubejs-client/vue/-/vue-0.35.23.tgz#1ad786682db18f6fe7374c2fe720f79d2dcf4b71"
|
||||
integrity sha512-U2LCMHY+FGqH85ehp/qiwdFE5BPUPuODx8kLGyEn1Mtr11ndYPobN4NZCj4kw0yHjcm41eQSH5/GCsZWTutNww==
|
||||
dependencies:
|
||||
"@cubejs-client/core" "^0.35.0"
|
||||
"@cubejs-client/core" "^0.35.23"
|
||||
core-js "^3.6.5"
|
||||
ramda "^0.27.2"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue